Test Case 03 Estaillades with microporosity - GeoChemFoam/GeoChemFoam GitHub Wiki

In this test case, simpleDBSFoam is used to calculate the permeability of a 150^3 voxels micro-CT image that includes microporosity (a subvolume of Estaillades Limestone). Microporosity is defined by a porosity lower than 1 and a permeability coefficient. These values are defined in the 'createMesh.sh' script and are used to build two fields, '0/eps' (inverse of porosity) and '0/Kinv' (inverse of permeability) that define their values for each grid block. The 'runCaseFlow.sh' script calculate the velocity field and the permeability.

  1. Copy the tutorial into the runs directory. cp -r $GCFOAM_TUTORIALS/incompressible/simpleDBSFoam/est_subvol/ $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/est_subvol/. If you are using Docker, it is recommended that you run the test case directly in its tutorial directory (for performance). cd $GCFOAM_TUTORIALS/incompressible/simpleDBSFoam/est_subvol. 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 bash script that runs various openfoam and python modules to create a mesh from the input image. The image is 5003 voxels with resolution 4 microns and with 3 different phase (1, 2 and 3) corresponding to three different porosities (1, 0.35, 0.0001) and three different permeability (1e13 1.82e-15 1e-20). Note that the porosity and permeability of the solid cannot be zero (division by 0), so they are replaced by small numbers. The permeability of the pores (Stokes phase) is defined as a large number. A 2003 is selected. The image is padded by 4 voxels at the inlet and outlet to apply cyclic boundary condition. First a background mesh of size 1003+padding is created (resolution 8 microns). The image is read and field eps for local porosity and Kinv for inverse of permeability are created by binning their higher resolution values. Then, the mesh is refined around the interface between two different porous phases (i.e solid, pores and micro-porous phases). The maximum resolution is 4 microns. The centers of each cell are calculated so that the value of eps and Kinv for the cells that have been refined can be obtained from the higher resolution image. If more than 1 processor is used, the mesh is then decomposed. If you are using Docker, you need to copy the results in the runs folder to visualise them. cp -r ../est_subvol/* $GCFOAM_RUNS/est_subvol/.

Estaillades Mesh

  1. The ./runSmoothSolidSurface.sh script applies a laplace smoother to smooth the solid surface. Two parameters are defined. 'nSmooth' defines the number of times the smoother is applied and 'cSmooth' the smoothing coefficient applied (0 means no smoothing, 1 means full laplace smoothing).

  2. The ./initCaseFlow.sh prepares the case for flow simultation. This script defines the pressure gradient (PGRAD=10^5 Pa/m) and the fluid viscosity (Visc=1e-6 m^2/s). If more than one processor is used, the pressure and velocity field are decomposed on the processors.

  3. The ./runCaseFlow.sh calculates the velocity field. 'SimpleDBSFoam' is used to solve the Darcy-Stokes-Brinkman equation and calculate the streamlines based on the pressure gradient and boundary conditions defined in the 'initCaseFlow.sh' script. If you are using Docker, you need to copy the results in the runs folder to visualise them. cp -r ../est_subvol/* $GCFOAM_RUNS/est_subvol/.

Estaillades streamlines

  1. Finally, the ./processFlow.sh script calculates the permeability using the 'processPoroPerm' utility.
cat poroPerm.csv
time poro perm Lpore Re UD
0 0.225703 8.5102e-15 5.4922e-07 0.00207086 0.00085102
⚠️ **GitHub.com Fallback** ⚠️