Test Case 10 Rising bubble in 2D - GeoChemFoam/GeoChemFoam GitHub Wiki

In this test case, we simulate the dissolution of a rising gas bubble immersed in liquid water. We consider a 2D domain of size 1.2 cm x 2.4 cm. The left boundary is defined as a symmetryPlane, so only half of the gas bubble, initialised as a square of size 2mmx2.2mm is considered. The bubble is immersed in liquid water. The gas is assumed to be pure, and dissolving in water with Henry's constant H = 10. As the bubble rises due to buoyancy, interfacial mass transfer occurs and the gas slowly dissolves.

  1. Navigate to the correct tutorial: cd $GCFOAM_TUTORIALS/multiphaseTransport/interTransferFoam/risingBubble2D/.

  2. If you are using the Native version of GeoChemFoam, it is recommended that you run the test case from the runs directory cd $GCFOAM_RUNS/risingBubble2D. If you are using Docker, it is recommended that you run the test case directly in its tutorial directory (for performance). cd $GCFOAM_TUTORIALS/multiphaseTransport/interTransferFoam/risingBubble2D . You will then need to copy the case in the result in the runs directory after each step for visualisation.

  3. Run the ./createMesh.sh script to define the domain and mesh it. If you are using Docker, you need to copy the results in the runs folder to visualise them. cp -r ../risingBubble2D/* $GCFOAM_RUNS/.

risingBubble Mesh Fig. 1 Mesh for dissolution of rising bubble in 2D.

  1. Run the ./initCase0.sh script to define the fluid properties and initialise the bubble. If you are using Docker, you need to copy the results in the runs folder to visualise them. cp -r ../risingBubble2D/* $GCFOAM_RUNS/

risingBubble Mesh Fig. 2 Initialisation for dissolution of rising bubble in 2D.

  1. Run the ./runCase0.sh. This script use interGCFoam with no gravity to set the bubble to capillary equilibrium. To check if the bubble is at equilibrium, look up the end of the interGCFoam0.out file. tail -n 22 interGCFoam0.out If the bubble is at capillary equilibrium, the last pc Initial Residual will be lower than 1e-4. risingBubble tail

If the bubble is not at equilibrium, increase the TotalTime and re-run runCase0.sh unitl it reaches equilibrium. If you are using Docker, you need to copy the results in the runs folder to visualise them. cp -r ../risingBubble2D/* $GCFOAM_RUNS/

risingBubble Mesh Fig. 3 Equilibrated bubble at T=0 for dissolution of rising bubble in 2D.

  1. Run the ./initCaseTransfer.sh script. This script define the fluid and species properties and put the gravity back on for the transport simulation.

  2. Run the ./runCaseTransfer.sh script to run the transport simulation. If you are using Docker, you need to copy the results in the runs folder to visualise them. cp -r ../risingBubble2D/* $GCFOAM_RUNS/

risingBubble Mesh Figure 4: Numerical simulation of dissolution of a rising bubble in 2D.

  1. Run the ./processTransfer.sh script. This script calculates the phase saturation.
cat sat.csv
time sat1 sat2
0 0.984722 0.0152778
0.002 0.984986 0.0150139
0.004 0.985157 0.0148434
0.006 0.985294 0.0147061
0.008 0.985414 0.0145862
0.01 0.985524 0.0144762
0.012 0.985627 0.0143731
0.014 0.985724 0.014276
0.016 0.985817 0.0141831
0.018 0.985908 0.0140922
0.02 0.985997 0.0140028
0.022 0.986084 0.0139156
0.024 0.98617 0.0138298
0.026 0.986255 0.0137452
0.028 0.986339 0.0136614
0.03 0.986422 0.0135782
0.032 0.986505 0.0134955
0.034 0.986587 0.0134131
0.036 0.986669 0.013331
0.038 0.986751 0.0132491
0.04 0.986832 0.0131676
0.042 0.986914 0.0130862
0.044 0.986995 0.0130051
0.046 0.987076 0.0129244
0.048 0.987156 0.0128439
0.05 0.987236 0.0127636
0.052 0.987316 0.0126835
0.054 0.987396 0.0126035
0.056 0.987477 0.0125235
0.058 0.987557 0.0124434
0.06 0.987637 0.0123631
0.062 0.987717 0.0122829
0.064 0.987797 0.0122029
0.066 0.987877 0.0121231
0.068 0.987956 0.0120441
0.07 0.988034 0.0119658
0.072 0.988112 0.0118882
0.074 0.988189 0.0118113
0.076 0.988266 0.0117345
0.078 0.988342 0.011658
0.08 0.988419 0.0115813
0.082 0.988496 0.0115045
0.084 0.988573 0.0114275
0.086 0.98865 0.0113502
0.088 0.988727 0.0112731
0.09 0.988804 0.011196
0.092 0.988881 0.0111194
0.094 0.988957 0.0110435
0.096 0.989032 0.0109683
0.098 0.989106 0.0108938
0.1 0.98918 0.0108197