Test Case 08 dissolution of a 3D calcite post with ALE - GeoChemFoam/GeoChemFoam GitHub Wiki

This test case simulates the dissolution of a calcite post by injection of acidic water in a microchannel using the ALE method. The geometry and fluid properties are described in Maes et al 2022.

  1. Copy the tutorial into the runs directory. cp -r $GCFOAM_TUTORIALS/reactiveTransport/reactiveTransportALEFoam/3DcalcitePost $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/micromodel. 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/reactiveTransportALEFoam/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 create a mesh by running the ./createMesh.sh script. The image is a 536x300x40 voxel raw image with a resolution of 5 microns. First the image is unpacked and converted from a raw file to an stl using the 'raw2stl.py' script. A 134x75x10 background cartesian mesh is created (resolution is then 20 microns) and decomposed if using more than 1 processor. You can visualise the stl image ('constant/triSurface/Image_meshed.stl') using paraview and check that the outline of the blockMesh matches the image boundary (Fig. 1). If you are using Docker, you need to copy the results in the runs folder to visualise them. cp -r ../3DcalcitePost/* $GCFOAM_RUNS/3DcalcitePost/.

STL

Figure 1: STL image and mesh outline of 3DcalcitePost.

  1. Then the ./runSnappyHexMesh.sh script is used to extract a mesh of the pore-space. The 'snappyHexMesh' utility is run, which snaps the background mesh to the stl image. First it removes all the cells that have more than 50% of their volume in the solid phase. Then, if nLevel defined in the createMesh script is equal to one, each cell that is in contact with the solid surface is refined once in each direction (resolution is then 10 microns). If nLevel is 2, each cells that are still in contact with the solid are refined once in each direction. And so on and so forth. Then the cells that have between 0-50% of volume in the solid are replaced by cells that overlap the solid boundaries as much as possible. Then, the mesh is morpehd to satisfy threshold quality check. If you are using Docker, you need to copy the results in the runs folder to visualise them. cp -r ../3DcalcitePost/* $GCFOAM_RUNS/3DcalcitePost/.

STL

Figure 2: Mesh for dissolution of a calcite post in acidic water using the ALE method.

  1. The script ./initCase.sh prepares the case for reactive transport simulation. The flow rate, fluid properties and reaction constant are defined here.

  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/.

STL Fig. 3: Dissolution of a calcite post in acidic water using the ALE method - Initial concentration.

  1. The script ./runCase.sh runs the simulation until t=800 s 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/.

STL Fig. 4: Dissolution of a calcite post in acidic water using the ALE 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/.

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

  1. The script ./processCase.sh calculates the evolution of porosity and solid surface area using the 'processPoroSurf' utility.
cat poroSurf.csv
time poro a
0 0.947316 3.30847e-07
800 0.952712 3.11456e-07
1600 0.957928 2.93043e-07