Axisymmetric Basilisk study of an impacting droplet that repeatedly rebounds
from a substrate until viscous dissipation and gravity suppress the bounce.
The repository now follows the CoMPhy project layout: solver sources live in
simulationCases/, project-local headers live in src-local/, and offline
analysis tools live in postProcess/.
- Basilisk with
qcc - Python 3 with
numpyandmatplotlibfor post-processing scripts ffmpegonly if video assembly is needed
Single-case run from the editable root parameter file:
bash runSimulation.shSingle-case run from a custom parameter file:
bash runSimulation.sh path/to/custom-case.paramsParameter sweep preview:
bash runParameterSweep.sh --dry-runParameter sweep execution:
bash runParameterSweep.shLegacy launcher compatibility:
bash job.shdefault.paramsis the canonical base configuration used by the sweep runner.case.paramsis the editable one-off run configuration at the repository root.sweep.paramsdefines the Cartesian sweep withSWEEP_*variables and the deterministicCASE_START/CASE_ENDrange.- Default case numbering starts at
1000, so the first generated cases aresimulationCases/1000/,simulationCases/1001/, and so on. - The default runtime is single-core:
OMP_NUM_THREADS=1and the default compile flags are-Wall -O2without-fopenmp. - Each run is materialized in
simulationCases/<CaseNo>/case.params, alongside the compiled executable,log,restart, andintermediate/snapshot-*output. - Re-running
bash runSimulation.sh ...for an existingCaseNoreusessimulationCases/<CaseNo>/case.paramsinstead of overwriting it, so case-local edits such as loweringMAXlevelafter a crash are preserved. - The solver resumes from
simulationCases/<CaseNo>/restartwhen present and falls back to the legacydumpcheckpoint name for older cases.
The Basilisk solver reads key=value parameters through
src-local/parse_params.h and src-local/params.h, so the simulation no
longer depends on fragile positional CLI arguments.
runSimulation.sh adds both the repository src-local/ directory and the
per-case copied build/src-local/ directory to the default qcc include path,
so simulation sources can include project-local headers as #include "params.h"
without relative ../src-local/... paths.
postProcess/VideoFullDomain.pyrenders deterministicframe_%06d.pngoutputs fromsimulationCases/<CaseNo>/intermediate/, samplingpostProcess/getData.con the positive-r half-domain and mirroring it soD2is shown on the left half and|\mathbf{u}|on the right half, with the interface frompostProcess/getFacet.coverlaid on both sides. By default the leftD2plot useshot_ron[-1, 2]and the right velocity plot usesBlueswith white at zero velocity. It supports batched parallel rendering with--cpus/--CPUs, clears oldframe_*.pngoutputs before rendering, and writes a case-named MP4 such assimulationCases/1000/1000.mp4after counting the rendered frames in the output directory. The default video fps is chosen to target a 10 s movie subject to a minimum of 30 fps;--fpscan override this with any value>= 30.postProcess/getEnergyScript.pyandpostProcess/getEpsNForce.pyare case-aware wrappers around thegetEnergyAxiandgetEpsForcehelper binaries.- Helper extractors such as
postProcess/getFacet.c,postProcess/getData.c,postProcess/getEnergyAxi.c, andpostProcess/getEpsForce.cremain in C for direct Basilisk snapshot access. postProcess/FinalManuscript_VelRel.pyis a legacy manuscript-era renderer that depends on local helper binaries in the working directory and is kept primarily for archival reproduction of older figure styles.
Example frame render:
python3 postProcess/VideoFullDomain.py \
--case-dir simulationCases/1000 \
--ldomain 4.0 \
--tsnap 0.01 \
--skip-video \
--cpus 4.github/ - CoMPhy documentation and CI/CD scaffold
├── assets/ - static site assets for generated docs
├── ISSUE_TEMPLATE/ - issue templates
├── scripts/ - documentation build and preview scripts
└── workflows/ - GitHub Actions workflows
AGENTS.md - project-specific agent instructions
case.params - editable one-off runtime configuration
default.params - default simulation parameter template
job.sh - legacy compatibility wrapper for runSimulation.sh
postProcess/ - offline analysis, extraction, and rendering tools
├── FinalManuscript_VelRel.py - legacy manuscript plotting script
├── VideoFullDomain.py - parallel whole-domain frame renderer
├── getData.c - snapshot field extractor
├── getEnergyAxi.c - integral energy extractor
├── getEnergyScript.py - case-aware energy extraction wrapper
├── getEpsForce.c - wall-force and dissipation extractor
├── getEpsNForce.py - case-aware force extraction wrapper
└── getFacet.c - interface facet extractor
runParameterSweep.sh - deterministic sweep launcher
runSimulation.sh - compile-and-run entry point for one case
simulationCases/ - Basilisk entry points and generated case directories
└── bounce.c - main axisymmetric bouncing-drop solver
src-local/ - project-local headers and shared parameter helpers
├── params.h - typed runtime parameter accessors
├── params.sh - shared shell helpers for parameter files
└── parse_params.h - low-level key=value parser for the solver
sweep.params - sweep definition with SWEEP_* variables
The C solver and helper utilities use Markdown-first /** ... */ documentation
blocks so Basilisk source renders cleanly in the generated docs site. Python
modules use a matching style with module docstrings, standalone Markdown string
blocks, and function docstrings. If you update simulation or post-processing
code, keep those source-level docs aligned with the implementation.
The repository ships with the standard CoMPhy .github/ documentation system.
To build and preview the docs locally:
.github/scripts/build.sh
.github/scripts/deploy.sh