Simulation Of Axisymmetric Phenomena in bubblY films
High-fidelity simulations of soap bubble dynamics and wrinkling instabilities using Basilisk C.
This repository contains computational tools for studying the dynamics of thin liquid films forming bubbles, with a focus on wrinkling instabilities driven by surface tension and viscous effects. The simulations solve the two-phase Navier-Stokes equations in axisymmetric configurations, capturing the complex interplay between:
- Surface tension-driven dynamics at the liquid-gas interface
- Viscous dissipation within the thin film
- Gravitational effects characterized by the Bond number
- Film thickness variations leading to instability formation
The code models a soap bubble consisting of:
- A thin liquid film (water with surfactants)
- Surrounding gas phase (air)
- Interface dynamics tracked using Volume-of-Fluid (VOF) method
- Smoke tracer diffusion for flow visualization
-
Ohnesorge number (Oh): Ratio of viscous to inertio-capillary forces
$$\text{Oh} = \frac{\mu}{\sqrt{\rho\sigma R}}$$ -
Bond number (Bo): Ratio of gravitational to surface tension forces
$$\text{Bo} = \frac{\rho g R^2}{\sigma}$$ -
Péclet number (Pe): Ratio of advective to diffusive transport
$$\text{Pe} = \frac{V_\gamma R}{D}$$ where$V_\gamma$ is the inertio-capillary velocity -
Curvature parameter (k): Ratio of bubble radius to film thickness
$$k = \frac{R}{h}$$
├── basilisk/src/ Core Basilisk CFD library (reference only, do not modify)
├── simulationCases/ Test cases for simulation
│ └── soapBubble-full.c Full bubble simulation (spherical cap + rim)
│ └── soapBubble-half.c Half-bubble simulation variant
└── postProcess/ Project-specific post-processing tools
├── getData.c Data extraction utility
├── getFacet.c Interface facet extraction
└── Video-generic.py Python script for post-processing
Models a complete bubble with:
- Lower hemisphere: Circular cap geometry
- Upper region: Spherical rim structure
- Initial film thickness:
$h = 1/k$ - Adaptive mesh refinement near interfaces
Variant configuration for studying partial bubble dynamics with modified boundary conditions.
Parameter | Symbol | Typical Value | Description |
---|---|---|---|
Ohnesorge number | Viscous effects | ||
Density ratio | Gas/liquid density | ||
Viscosity ratio | Gas/liquid viscosity | ||
Curvature parameter | 25 |
|
|
Péclet number (gas) | Smoke diffusion | ||
Domain size | 5.0 | Computational domain |
- C99-compliant compiler (gcc or clang)
- GNU make
- Python 3+ with matplotlib, numpy for post-processing
# Clone repository
git clone [email protected]:comphy-lab/soapy.git
cd soapy
# Install Basilisk locally
./reset_install_requirements.sh
source .project_config
# Compile simulations
cd simulationCases
make soapBubble-full.tst
# Run full bubble simulation
./soapBubble-full.tst
# Run with custom parameters (edit source file for parameter changes)
# Key parameters: Oh1, k, tmax, MAXlevel
# Output files are saved in intermediate/ directory
cd postProcess
# Compile data extraction tools
qcc -autolink getData.c -o getData -lm
qcc -autolink getFacet.c -o getFacet -lm
# Generate animations
python Video-generic.py --case ../simulationCases --folder output_frames
The simulations generate:
-
Snapshot files: Binary dumps at regular intervals (
$\Delta t = 0.01$ ) - Interface data: VOF field and curvature information
- Velocity fields: Full velocity components in axisymmetric coordinates
- Tracer concentration: Smoke diffusion patterns
- Pressure fields: Dynamic pressure evolution
The simulations investigate the Taylor-Culick instability in soap bubbles, where:
-
Thin film dynamics: The bubble consists of a liquid film of thickness
$h \ll R$ (bubble radius) - Wrinkling mechanism: Instabilities arise from the competition between surface tension and viscous forces
- Rim formation: The bubble edge develops a toroidal rim structure that influences stability
- Drainage patterns: Gravity and capillary forces create complex flow patterns within the film
-
Taylor-Culick velocity: Characteristic retraction speed
$$V_{\text{TC}} = \sqrt{\frac{2\sigma}{\rho h}}$$ - Rayleigh-Plateau instability: Drives rim breakup and droplet formation
- Marangoni effects: Surface tension gradients due to surfactant concentration
- Film thinning: Coupled drainage and evaporation processes
The code employs:
- Volume-of-Fluid (VOF) method for interface tracking
- Adaptive mesh refinement (AMR) for resolving thin films
- Implicit viscous solver for stability at low Oh numbers
- Conservative momentum advection for accurate interface dynamics
- Height-function curvature computation for surface tension
This code is part of ongoing research. For collaborations or questions:
- Open an issue for bug reports or feature requests
- Contact the authors for research collaborations
- See CLAUDE.md for code style guidelines
- Saumili Jana - Primary developer ([email protected])
- Vatsal Sanjay - [email protected]
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.