Test Case 14 Calculation of Formation Factor in a micro CT image of Fontainebleau sandstone - GeoChemFoam/GeoChemFoam GitHub Wiki

In this test case, we calculate the Formation Factor (FF) of a Fontainebleau sandstone micro-CT image Laplacian equation. The pore/solid boundary is characterised by the local porosity epsilon in each voxel. A two-level mesh is used to refine the cells at the pore/solid interface. The application laplacianGCFoam is used to solve the equation and the formation factor is then calculated.

  1. Copy the tutorial into the runs directory. cp -r $GCFOAM_TUTORIALS/basic/laplacianFoam/Fontainebleau $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/Bentheimer. If you are using Docker, it is recommended that you run the test case directly in its tutorial directory (for performance). cd $GCFOAM_TUTORIALS/basic/laplacianFoam/Fontainebleau . 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 4803 voxels with resolution 5.7 microns. A 2003 subvolume is selected. First a background mesh of size 1003 is created (resolution 11.4 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 solid and pores (maximum resolution 5.7 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 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 ../Fontainebleau/* $GCFOAM_RUNS/Fontainebleau/.

Fontainebleau Mesh

Figure 1: Mesh and local porosity field for Fontainebleau micro-CT image.

  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 ./initCase.sh prepares the case for simulation. This script defines the diffusion constant (1e-6 m-2/s). If more than one processor is used, then the scalar filed T is decomposed on the processors.

  3. The ./runCase.sh calculates the velocity field. 'LaplacianGCFoam' is used to solve the Laplacian equation for the scalar field T based on the diffusion coefficient 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 ../Fontainebleau/* $GCFOAM_RUNS/Fontainebleau/.

Fontainebleau T

Figure 2: Solution of the laplacian equation for Fontainebleau micro-CT image (the image is showing eps*T in paraview).

  1. The ./processCase.sh script calculates the formation factor using the 'processFF' utility.
cat FF.csv
time poro FF
0 0.0850887 190.378
⚠️ **GitHub.com Fallback** ⚠️