An extensible framework for multiphase flows with complex rheology, built on Basilisk C
MultiRheoFlow is an open-source multiphase, multirheology extension of the ElastoFlow solver. It provides a catalogue of models implemented in Basilisk C, leveraging adaptive mesh refinement for high-fidelity simulations of non-Newtonian fluids and viscoelastic materials with free surfaces, interfaces, and capillary effects.
Developed at the Computational Multiphase Physics (CoMPhy) Lab at Durham University, MultiRheoFlow provides a modular platform where different rheological constitutive equations can be integrated with multiphase flow scenarios.
- Diverse Rheology Models: Simulates a wide spectrum of material
behaviors:
- Newtonian fluids (done ✅)
- Viscoelastic fluids (Oldroyd-B - done ✅, Giesekus - good to have 🍀, FENE-P - urgent 📌)
- Yield-stress materials (Bingham - done ✅, Herschel-Bulkley - done ✅)
- Elastoviscoplastic materials (Saramito model - done ✅)
- Multiphase Capabilities: Handles interfacial dynamics with:
- Two-phase and multiphase flow support
- Accurate surface tension and capillary effects
- Interface capturing via the volume-of-fluid method
- Arbitrary density and viscosity contrasts
- High-Performance Computing: Leverages Basilisk's advantages:
- Adaptive mesh refinement for computational efficiency
- Parallelization for large-scale simulations
- 2D, axisymmetric, and 3D simulation capabilities
- Log-Conformation Method: Ensures stability for highly elastic flows using advanced numerical techniques
simulationCases/dropImpact.csimulationCases/dropImpact-EVP.csimulationCases/dropImpact-EVP-HB.csimulationCases/dropAtomisation.csimulationCases/pinchOff.csimulationCases/testEigenDecomposition.c- Parameter files such as:
default-VE.paramsdefault-EVP.paramsdefault-EVP-HB.paramssimulationCases/Bo0.0010.dat
runSimulation.sh: Root-level runner using--caseand--input.default-*.params: Root-level default parameter files for drop-impact variants.src-local/: Project-specific Basilisk headers and helpers.simulationCases/: Simulation entry points and case utilities.postProcess/: Post-processing and visualization tools..github/: Documentation and CI tooling (generated docs go to.github/docs/).
- Follow the instructions here.
- For Windows, we recommend using WSL; please report any issues you find.
# Prerequisites: Basilisk installation (http://basilisk.fr)
git clone https://github.com/comphy-lab/MultiRheoFlow.git
cd MultiRheoFlow
curl -sL https://raw.githubusercontent.com/comphy-lab/basilisk-C/main/reset_install_basilisk-ref-locked.sh | bash -s -- --ref=v2026-01-29 --hardUpdate v2026-01-29 with the latest version.
cd simulationCases
make dropImpact.tstTo disable on-the-fly visualization:
cd simulationCases
CFLAGS=-DDISPLAY=-1 make dropImpact.tstbash runSimulation.sh
bash runSimulation.sh --case simulationCases/dropImpact.c
bash runSimulation.sh --case simulationCases/dropImpact-EVP.c
bash runSimulation.sh --case simulationCases/dropImpact-EVP-HB.cDefaults:
--case->simulationCases/dropImpact.c--input->default-VE.params
When a different case is provided and --input is omitted,
runSimulation.sh uses case-specific defaults:
dropImpact->default-VE.paramsdropImpact-EVP->default-EVP.paramsdropImpact-EVP-HB->default-EVP-HB.params
Parameter keys:
- VE and EVP:
MAXlevel,Ldomain(orL0),tmax,We,Ohs,Oha,De,Ec - EVP-HB:
MAXlevel,Ldomain(orL0),tmax,We,Ohs,Oha,Ohp,Ec,J,n(ornHB)Deis computed internally asDe = Ohp/Ec
You can also override defaults by passing a parameter file:
bash runSimulation.sh --case simulationCases/dropImpact-EVP-HB.c \
--input default-EVP-HB.params
bash runSimulation.sh --case simulationCases/dropImpact-EVP-HB.c \
--input my-custom.paramssimulationCases/runCases.sh remains available as a compatibility
wrapper around runSimulation.sh:
cd simulationCases
bash runCases.sh dropImpact-EVP-HB default-EVP-HB.params
bash cleanup.sh dropImpact-EVP-HBqcc -O2 -Wall -disable-dimensions -I$PWD/src-local \
simulationCases/dropImpact.c -o dropImpact -lm
./dropImpactNote: you should have OpenMPI installed.
CC99='mpicc -std=c99 -D_GNU_SOURCE=1' qcc -Wall -O2 -D_MPI=1 \
-disable-dimensions -I$PWD/src-local simulationCases/dropImpact.c \
-o dropImpact -lm
mpirun -np $NUM_PROCESSORS_TO_USE ./dropImpactpostProcess/VideoAxi.pypostProcess/getData-elastic-scalar2D.cpostProcess/getFacet2D.c
Generate the documentation locally:
.github/scripts/build.shPreview locally:
.github/scripts/deploy.shContributions to MultiRheoFlow are welcome! Please see our Contributing guide for details on how to submit code, report bugs, or request features.
This project is licensed under the GNU GPLv3 License. See the LICENSE file for details, consistent with Basilisk's licensing.
MultiRheoFlow builds upon ElastoFlow and the Basilisk C framework.