This repository contains the 2D OpenFOAM code developed for simulating displacement flows of non-Newtonian power-law fluids in Hele-Shaw geometries. The code is based on the methodology outlined in the article titled "Numerical Modeling of Fluid Displacement in Hele-Shaw Cells: A Gap-Averaged Approach for Power-Law and Newtonian Fluids" and has been validated against 3D direct numerical simulations (DNS) and experimental data.
- 2D gap-averaged model implementation for power-law fluids.
- Ability to simulate various displacement configurations.
- Validated against experimental results for accurate interface morphology and dynamics.
- Computationally efficient, achieving significant speed improvements over 3D models.
To use the code, you will need to have OpenFOAM installed on your system. Follow the instructions below to set up the environment:
- Clone this repository:
git clone https://github.com/feebsssz/heleShawFoam.git
- Navigate to the directory:
cd heleShawFoam
- Ensure that OpenFOAM is properly set up and source the OpenFOAM environment:
source /path/to/openfoam/etc/bashrc
- Compile the solver:
wmake
After installing heleShawFoam and setting up the environment, navigate to the testcase directory where test case is provided. You can modify the input parameters based on your simulation needs. For details of the case settings, please refer to the README file in the testcase directory.
This project is licensed under the MIT License.
For questions or comments, please reach out to:
Yao Zhang: yao.zhang@uis.no