The code of Lattice Boltzmann Simulations for Geometric and Topological Analysis of Soil Pores Effectively Predicts Multiscale Hydraulic Responses Under Freeze-Thaw Cycles
Abstract
This repository contains the Python implementation of a D3Q19 lattice Boltzmann method (LBM) solver used in the manuscript “Geometric and Topological Analysis of Soil Pores Effectively Predicts Multiscale Hydraulic Responses Under Freeze-Thaw Cycles: Evidence from CT Scanning and Lattice Boltzmann Simulations” for pore-scale flow simulations on voxelized porous media derived from X-ray CT images. The code is intended to support reproducible permeability and flow-field calculations in complex soil/rock pore networks, consistent with the modeling workflow reported in the paper. Main capabilities D3Q19 LBM for single-phase incompressible flow in 3D voxel domains Direct simulation on binary pore/solid geometries (e.g., CT-segmented volumes and REV subcubes) . User-configurable boundary conditions and driving scheme (as described in the manuscript) Exports simulation outputs (e.g., velocity components, pressure/derived fields, masks, and/or summary maps) as TIFF stacks for downstream visualization and quantitative analysis Postprocessing utilities to compute bulk hydraulic metrics (e.g., discharge/flux and permeability) from the simulated fields (if included) Repository structure src/: core D3Q19 LBM solver (Python) examples/: minimal runnable examples and parameter templates io/ or utils/: TIFF I/O and preprocessing/postprocessing helpers README.md: installation, usage instructions, and parameter definitions Reproducing results from the paper Prepare the voxel domain(s) following the CT processing/segmentation steps described in the manuscript. Set simulation parameters (grid spacing, relaxation time, forcing/pressure gradient, iteration limit, convergence criterion) in the provided configuration/template file(s).Run the solver for each domain/REV. Use the included postprocessing scripts to compute permeability/flux and generate the reported statistics and figures.Additional notes on recommended parameter ranges and convergence settings are provided in README.md. Requirements Python [version, e.g., ≥3.9] with standard scientific packages (e.g., NumPy, SciPy, and TIFF I/O libraries). License and citation If you use this code, please cite: the Zenodo record for this repository (10.5281/zenodo.18144448)
Fields of Study & Subjects
Lattice Boltzmann Simulation Studies
Enhanced Oil Recovery Techniques
Advanced Numerical Methods in Computational Mathematics
Publication details
- Journal / source
- Zenodo (CERN European Organization for Nuclear Research)
- Publication date
- 4 January 2026
- Document type
- Book