Test Case 05 Bentheimer heat transfer - GeoChemFoam/GeoChemFoam GitHub Wiki

In this test case, supercritical CO2 is injected through the pores of a Bentheimer sandstone micro-CT image at a temperature T0, while the rock is heated at a temperature T1 represented by constant boundary condition on all sides apart from the inlet and outlet. The application simpleDBSFoam is used to calculate the velocity field and heatTransportFoam is used to solve the temperature map with convection and conduction in the fluid and conduction in the solid.

  1. Copy the tutorial into the runs directory. cp -r $GCFOAM_TUTORIALS/heatTransfer/heatTransportFoam/Bentheimer $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/heatTransfer/heatTransportFoam/Bentheimer . 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 4003 voxels with resolution 5 microns. A 2003 is selected. The image is padded by 4 voxels at the inlet and outlet. First a background mesh of size 503+padding 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 solid and pores (maximum resolution 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 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 ../Bentheimer/* $GCFOAM_RUNS/Bentheimer/.

Estaillades Mesh

Figure 1: Mesh and local porosity field for Bentheimer micro-CT image (the injection and production zones have been clipped in paraview).

  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 flow rate (4.2e-9 m^3/s), the fluid viscosity (8.2e-9 m^2/s) and the Kozeny-Carman constant (1.8e12 m^(-2)). 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 ../Bentheimer/* $GCFOAM_RUNS/Bentheimer/.

Bentheimer streamlines

Figure 2: Sreamlines for Bentheimer micro-CT image (the injection and production zones have been clipped in paraview).

  1. The ./processFlow.sh script moves the solution of simpleFoam to the '0' folder (ready for the heat transfer simulation) and calculates the permeability using the 'processPoroPerm' utility.
cat poroPerm.csv
time poro perm Lpore Re UD
0 0.269499 2.14228e-12 7.97453e-06 1.51326 0.00419352
  1. The ./initCaseHeat.sh script is then run to prepare the case to run heat transport. The simulation will use the velocity field that is now in the '0' folder (so you need to run 'processFlow.sh' before 'initCaseHeat.sh'). The solid and fluid heat conductivity kappa (in W/m/K), density rho (in kg/m^3) and specific heat capacity (in J/kg/K) are defined in the script. The initial temperature, with constant dimensionless temperature=0 on the inlet, zero gradient temperature on the outlet and constant dimensionless temperature = 1.0 on the side boundaries (the boundary condition can be changed in the 0_orig/T file) is created and decomposed in the processors if the mesh was created in parallel.

  2. The ./runCaseHeat.sh solves the temperature equation based on the velocity field calculated in step 6 and the properties defined in step 7. If you are using Docker, you need to copy the results in the runs folder to visualise them. cp -r ../Bentheimer/* $GCFOAM_RUNS/Bentheimer/.

Bentheimer temp Figure 3: Temperature map for Bentheimer micro-CT image (the injection and production zones have been clipped in paraview).

  1. The ./processHeat.sh calculate the average temperature in fluid and solid and the transfer coefficient HT between the fluid and solid using the 'processHeatTransfer' utility.
cat HT.csv
time Tf Ts coeff
0 1 1 -0
0.04 0.898223 0.941145 0.00739813
0.08 0.861812 0.908224 0.00709689
0.12 0.843287 0.890536 0.00704551
0.16 0.833857 0.88127 0.00704161
0.2 0.829117 0.876525 0.00704679
0.24 0.826755 0.87413 0.00705179
0.28 0.825585 0.872933 0.00705508
0.32 0.825007 0.872339 0.00705699
0.36 0.824723 0.872045 0.00705802
0.4 0.824583 0.8719 0.00705856
⚠️ **GitHub.com Fallback** ⚠️