PinchOff contains axisymmetric two-phase VOF simulations of the Rayleigh-Plateau instability and pinch-off scaling of a liquid cylinder. The cases reproduce the similarity laws plateau-basilisk-website.c) and a viscous setup (plateau-viscous.c).
Background references: Popinet (2009) and Popinet & Antkowiak (2011).
A liquid cylinder of radius maxlevel = 18.
The solver integrates the axisymmetric incompressible Navier-Stokes equations for two phases with surface tension:
The VOF field
The simulations are nondimensionalized with
| Parameter | Meaning | plateau-viscous | plateau-basilisk-website |
|---|---|---|---|
| Density ratio | 100 | 100 | |
| Viscosity ratio | 100 | inviscid (default |
|
| Surface tension | 1 | 1 | |
| Initial cylinder radius | 0.2 | 0.2 | |
| Perturbation wavenumber | |||
| Perturbation amplitude | 0.1 | 0.1 | |
maxlevel |
Max AMR level | 18 | 18 |
First-time install (or reinstall):
curl -sL https://raw.githubusercontent.com/comphy-lab/basilisk-C/main/reset_install_basilisk-ref-locked.sh | bash -s -- --ref=v2026-01-29 --hardSubsequent runs (reuses existing basilisk/ if same ref):
curl -sL https://raw.githubusercontent.com/comphy-lab/basilisk-C/main/reset_install_basilisk-ref-locked.sh | bash -s -- --ref=v2026-01-29Note: Replace
v2026-01-29with the latest release tag from https://github.com/comphy-lab/basilisk-C/releases.
Set BASILISK to the Basilisk src path and keep the Basilisk checkout outside this repository:
# .project_config (gitignored)
export BASILISK=/path/to/basilisk/srcYou can also export BASILISK directly in your shell.
├── simulationCases/
│ ├── plateau-basilisk-website.c
│ ├── plateau-viscous.c
│ ├── runCode.sh
│ └── Makefile
└── .github/ Website assets and workflows
src-local/ and postProcess/ are not present currently.
cd simulationCases
# MPI run (4 ranks) using the default script
./runCode.sh plateau-viscous
# Visualization build/run (single rank, OpenGL)
./runCode.sh --view plateau-viscous
# Inviscid variant
./runCode.sh plateau-basilisk-websiterunCode.sh expects a .project_config file in the repo root (used to set BASILISK) and a working qcc. The script defaults to plateau; this repository does not include plateau.c, so pass the case name explicitly.
Basilisk Makefile (serial):
make -C simulationCases plateau-viscous
./simulationCases/plateau-viscousNote: runCode.sh creates simulationCases/<case>/ output directories. In a clean clone, make -C simulationCases <case> builds an executable with the same name. If a directory with that name already exists, prefer runCode.sh or build into a different target name.
Serial qcc:
qcc -O2 -Wall -disable-dimensions simulationCases/plateau-viscous.c -o plateau-viscous -lm
./plateau-viscousOpenMP (shared memory):
qcc -O2 -Wall -disable-dimensions -fopenmp simulationCases/plateau-viscous.c -o plateau-viscous -lm
export OMP_NUM_THREADS=8
./plateau-viscousMPI (distributed memory):
CC99='mpicc -std=c99' qcc -Wall -O2 -D_MPI=1 -disable-dimensions simulationCases/plateau-viscous.c -o plateau-viscous -lm
mpirun -np 4 ./plateau-viscousVisualization build (OpenGL):
qcc -O2 -Wall -disable-dimensions simulationCases/plateau-viscous.c -o plateau-viscous -L$BASILISK/gl -lglutils -lfb_tiny -lm
./plateau-viscousThese cases use compile-time constants. Edit them in the .c files and recompile:
| Parameter | Location | Description | Default |
|---|---|---|---|
maxlevel |
plateau-*.c | Maximum AMR level | 18 |
R |
plateau-*.c | Base radius | 0.2 |
k |
plateau-*.c | Perturbation wavenumber | pi |
A |
plateau-*.c | Perturbation amplitude | 0.1 |
rho1, rho2 |
plateau-*.c | Densities | 1, 1e-2 |
mu1, mu2 |
plateau-viscous.c | Viscosities | 1e-2, 1e-4 |
sigma |
plateau-*.c | Surface tension | 1 |
Use your scheduler to launch the MPI binary, for example:
srun -n 4 ./plateau-viscousOutputs are written in the run directory:
prof-<t>: interface profiles fromoutput_facetsmovie.mp4: interface and mesh visualization (when usingview.h)log: time series of(t, r_min, u_max)when you redirect stderr
Example:
./plateau-viscous 2> logUse the gnuplot snippets in the case headers to fit the scaling laws from log.
If you use this code, please cite Basilisk and the relevant pinch-off literature. Add paper and software DOIs here when available.
@article{TBD,
title = {TBD},
author = {TBD},
journal = {TBD},
year = {TBD},
doi = {TBD}
}@software{PinchOffTBD,
title = {PinchOff: Plateau-Rayleigh pinch-off in Basilisk},
author = {TBD},
year = {2026},
url = {https://github.com/<org>/<repo>},
note = {Add Zenodo DOI when available}
}- TBD (add authors and affiliations)
No LICENSE file is included yet. Add a LICENSE file to clarify reuse.