Published September 12, 2026
| Version v1
Dataset
Open
Two-phase flow in porous rocks (μCT geometries and OpenFOAM cases)
Description
The archive Two-phase flow in porous rocks (μCT geometries and OpenFOAM cases) contains the input data and OpenFOAM cases required to simulate two-phase flow in porous rocks. All simulations were conducted using OpenFOAM v2406 (https://www.openfoam.com/news/main-news/openfoam-v2406).
Archive contents
- Berea.raw and Leopard.raw: digital rock images in RAW format.
- split_raw_to_stl.sh: a shell script for selecting a subvolume of a digital rock image and generating an STL surface.
- raw2stl.py: the Python conversion script called by split_raw_to_stl.sh.
- core_drain: an OpenFOAM interFoam case for oil drainage.
- core_imp: an OpenFOAM interFoam case for water imbibition.
To generate the STL geometry, adjust the image and crop parameters in split_raw_to_stl.sh, then run:
./split_raw_to_stl.sh
How to run the case:
- Navigate to the case directory:
cd "$FOAM_RUN/core_drain" - Copy the generated STL surface into constant/triSurface/. For example
cp ../Berea.stl constant/triSurface/Berea.stl - Adjust system/blockMeshDict according to the geometry bounding box. Specify the STL filename in system/snappyHexMeshDict.
- Optionally adjust the initial and boundary conditions in 0/, fluid properties in constant/transportProperties, and simulation controls in system/controlDict.
- Run the simulation:
./run.sh
The script runs blockMesh, snappyHexMesh, decomposePar, parallel interFoam on 8 MPI processes, and reconstructPar. The number of MPI processes is read from system/decomposeParDict.