Test Case 04 Dissolution of a 3D calcite post with DBS - GeoChemFoam/GeoChemFoam GitHub Wiki

This test case simulates the dissolution of a calcite post by injection of acidic water in a microchannel using the Darcy-Brinkman-Stokes method. The case is presented with and without adaptive mesh refinement (AMR). The geometry and fluid properties are described in Maes et al, Frontiers in Earth Science, 2022.

  1. Copy the tutorial into the runs directory. cp -r $GCFOAM_TUTORIALS/reactiveTransport/reactiveTransportDBSFoam/3DcalcitePostDBS $GCFOAM_RUNS/.

  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/3DcalcitePost. If you are using Docker, it is recommended that you run the test case directly in its tutorial directory (for performance). cd $GCFOAM_TUTORIALS/reactiveTransport/reactiveTransportDBSFoam/3DcalcitePost . You will then need to copy the case in the result in the runs directory after each step for visualisation.

  3. We first need to define the domain, unpack the image and mesh it by running the ./createMesh.sh script. This is a shell script that runs various openfoam and python modules to create a mesh from the input image. The image is 536x300x40 voxels with a resolution of 5 microns. First a background mesh of size 134x75x10 is created (resolution 20 microns). The image is read and the field eps for local porosity is created by binning the higher resolution values. Then, the mesh is refined around the interface between pores and solid (so the maximum resolution is 10 microns). The centers of each cell is calculated so that the value of eps for the cells that have been refined can be obtained from the higher resolution image. If you are using Docker, you need to copy the results in the runs folder to visualise them. cp -r ../3DcalcitePost/* $GCFOAM_RUNS/3DcalcitePost/.

3D calcite mesh

Fig. 1: Dissolution of a calcite post in acidic water using the DBS method - Mesh

  1. The script ./initCase.sh prepares the case for reactive transport simulation. The flow rate, fluid properties and reaction constant are defined. The Kozeny-Carman constant to calculate the permeability of each voxel as a function of porosity is also defined.

  2. The script ./runCase0.sh calculates the initial steady-state velocity and concentration in the domain. One time-step (dt=1e-06) is performed and the velocity and concentration profile are solved with a steady-state solver. This is correct providing that the displacement of the solid surface is slow compared to the flow and transport in the system (see Maes et al., Frontiers in Earth Science, 2022). If you are using Docker, you need to copy the results in the runs folder to visualise them. cp -r ../3DcalcitePost/* $GCFOAM_RUNS/3DcalcitePost/.

3D calcite mesh

Fig. 2: Dissolution of a calcite post in acidic water using the DBS method - Initial concentration

  1. The script ./runCase.sh runs the simulation until t=800s with the fluid and flow properties defined in the '/initCase.sh' script. If you are using Docker, you need to copy the results in the runs folder to visualise them. cp -r ../3DcalcitePost/* $GCFOAM_RUNS/3DcalcitePost/.

3D calcite mesh

Fig. 3: Dissolution of a calcite post in acidic water using the DBS method - Concentration at t=800 s

  1. The script ./runCase.sh can be used to run the simulation until later time. Modify the 'TotalTime' in the script to 'TotalTime=1600' and run the simulation until t=1600 s. If you are using Docker, you need to copy the results in the runs folder to visualise them. cp -r ../3DcalcitePost/* $GCFOAM_RUNS/3DcalcitePost/.

3D calcite mesh

Fig. 4: Dissolution of a calcite post in acidic water using the DBS method - Concentration at t=1600 s

  1. The script ./processCase.sh calculates the evolution of porosity and solid surface area using the 'processSolidArea' utility
cat solidArea.csv
time poro A
0 0.947227 3.31767e-07
800 0.952656 3.12307e-07
1600 0.957862 2.94512e-07
  1. You can modify the script ./runCase.sh to run it up to 12000 s. You can then use paraview to observe the dissolution of the post

3D calcite mesh