Test Case 06 Bubble in a straight channel - GeoChemFoam/GeoChemFoam GitHub Wiki

This test case is an example of the speed-up that can be obtained when using interOSFoam at low capillary number. Detailed methods on this operator splitting solver can be found in here. For this test case, we consider a 2D straight channel of size 600 x 100 microns. The fluid considered here are air (density = 1 kg/m^3,  viscosity = 18 microPa.s) and ethanol ( density = 789 kg/m^3,  viscosity = 1.2 mPa.s). The interfacial tension is equal to 20 mN/m. The top and bottom boundaries are wall conditions with a fixed contact angle of 0 degrees. The bubble is initialised as a rectangle of length L = 200 microns and width 100 microns, at a position x = 20 microns from the left boundary, and is relaxed until capillary equilibrium. Then, at t=0, we inject from the left boundary ethanol at constant velocity U=0.167 mm/s. The simulation is run until t=0.01 s, at a constant time-step of t = 4x10^-5 s and a capillary relaxation time-step of 5x10^-8 s.

  1. Navigate to the tutorial directory cd $GCFOAM_TUTORIALS/multiphase/interOSFoam/BubbleChannelCa10-5/. In this tutorial the case is already initialised so there is no initCase.sh script. This will be updated in future versions to include the initialisation step.

  2. Create the mesh using ./createMesh.sh

Bubble createMesh

  1. Run ./initCase0.sh to define the fluid properties and the initialise the bubble as a rectangle

Bubble Init

  1. Run ./runCase0.sh to simulate capillary relaxation. At the end of the simulation, use 'tail' to check the last 20 lines of interOSFoam0.out tail -n 20 interOSFoam0.out. If the bubble is at equilibrium, the capillary relaxation step will have finished before reaching the maximum iteration.

Bubble tail

If you are using docker you must first copy the run into your mounted docker directory cp -r $GCFOAM_TUTORIALS/transport/multiSpeciesTransportFoam/Ketton $GCFOAM_RUNS/..

Bubble0

  1. Run ./initCaseTPFlow.sh to initialise the two-phase flow simulation by defining the injection velocity

  2. Run ./runCaseTPFlow.sh to run the simulation until T=0.01 s then view it in paraview. If you are using docker you must first copy the run into your mounted docker directory cp -r $GCFOAM_TUTORIALS/transport/multiSpeciesTransportFoam/Ketton $GCFOAM_RUNS/.

Bubble gif

  1. Run ./processCase.sh to write in the 'relaxSteps.csv' file the number of relaxation step for each time-step. Each time-step corresponds to 800 capillary relaxation steps. However, they converge will before that. The relaxation steps converge in an average of 18, providing a speed-up of approximatively 40x.

Bubble createMesh