Drop Impact and Crown Splash with Basilisk on cloudHPC: Adaptive Octree VOF, Validated

Published by Ruggero Poletto on

Animation of a water drop hitting a thin water film: the crown rises and its rim breaks into fingers and droplets (Basilisk octree VOF)

A water drop hits a thin water film: the crown rises, its rim breaks into fingers and droplets. Basilisk octree VOF, 16 cores on cloudHPC.

TL;DR

  • Basilisk, the adaptive-mesh solver by Stรฉphane Popinet, is now available on cloudHPC, with MPI on tree grids and offscreen rendering (view.h) out of the box.
  • Our Basilisk drop impact simulation: a water drop hitting a thin water film (We = 600, Re = 2000, h/D = 0.1) with the momentum-conserving two-phase VOF solver.
  • Validation: the crown base radius follows R/D = Cยทโˆšฯ„ with C = 1.178 (mean of three grids), 0.6 % above the Gao & Li (2015) correlation (C = 1.172). The classic Yarin & Weiss (1995) law (C = 1.61) overpredicts it by about 36 %.
  • Grid independence: three resolutions (171, 341 and 683 cells per drop diameter) give the same spreading constant within 0.3 %.
  • 3D crown with fingers and secondary droplets: an octree run reached ฯ„ โ‰ˆ 2.5 with at most 1.34 million cells, about 100ร— fewer than the equivalent uniform grid, in 4.5 hours on 16 cores.

Why drop impact, and why Basilisk

When a drop hits a liquid film it throws up a thin cylindrical sheet, the crown, whose rim destabilises into fingers that pinch off into droplets. Harold Edgerton’s milk-drop photographs made it famous. Engineers meet it in spray cooling, inkjet printing, fuel injection on wetted walls, pesticide sprays and soil erosion.

It is also one of the hardest problems for a CFD code:

  • a density ratio of about 830 (water/air) across a sharp interface;
  • surface tension acting on scales much smaller than the drop;
  • thin sheets and droplets that need very fine cells, but only where they are.

That last point is what Basilisk is built for. It is a C-based framework (successor of Gerris) with quadtree/octree adaptive mesh refinement, a geometric VOF interface tracking and a well-balanced surface-tension model. Its cells refine automatically where the interface or the velocity field needs them, and coarsen everywhere else.

Results at a glance

Quantity Value
Crown base radius constant C (fit R/D = Cยทโˆšฯ„, 0.3 โ‰ค ฯ„ โ‰ค 3) 1.176 / 1.180 / 1.179 (levels 10 / 11 / 12)
Gao & Li (2015) prediction 1.172 (simulations 0.6 % above, mean)
Yarin & Weiss (1995) prediction 1.607 (36 % above the simulations)
Spread between the three grid levels 0.27 %
R/D at ฯ„ = 3, all three levels 2.033
3D run, C on the two symmetry planes (0.3 โ‰ค ฯ„ โ‰ค 2.4) 1.176
Fit with a free intercept, R/D = a + Cยทโˆšฯ„ (axisymmetric) C = 1.144โ€“1.149, about 2 % below Gao & Li
3D run, maximum cells after adaptation 1.34 million (uniform equivalent: 134 million)

The case

Setup of the drop impact case: drop of diameter D falling at speed U on a film of thickness 0.1 D over a no-slip wall

Parameter Value
Drop diameter, impact speed D, U (all quantities dimensionless)
Film thickness h = 0.1 D
Weber number We = ฯ Uยฒ D / ฯƒ 600
Reynolds number Re = ฯ U D / ฮผ 2000
Density / viscosity ratio gas : liquid 1/830 : 1/55 (air/water)
Gravity neglected (Froude number โ‰ซ 1)
Initial gap dropโ€“film 0.02 D
Wall no-slip
Top and far side open (p = 0, zero-gradient velocity)

With these parameters the impact is well above the splashing threshold. The Cossali et al. (1997) parameter K = WeยทOh^โˆ’0.4 is about 3,500, against a threshold of about 2,300 for h/D = 0.1. A crown with fingers and secondary droplets is therefore expected.

Solver settings (Basilisk)

Basilisk has no numbered releases: we used the snapshot installed on cloudHPC in November 2026 (/opt/basilisk).

  • navier-stokes/centered.h + two-phase.h + tension.h, and navier-stokes/conserving.h for momentum-conserving advection. Without it, the high density ratio gave spurious velocities and the time step collapsed to 5ยท10โปโถ in our first local tests.
  • Adaptation with adapt_wavelet on the volume fraction (tolerance 10โปยณ) and velocity (10โปยฒ in 2D, 2ยท10โปยฒ in 3D).
  • Axisymmetric validation (axi.h): domain 6 D ร— 6 D, maximum levels 10, 11 and 12, i.e. 171, 341 and 683 cells per drop diameter.
  • 3D crown (grid/octree.h): a quarter of the domain (3 D ร— 3 D ร— 3 D, symmetry planes x = 0 and z = 0) at level 9 (171 cells per diameter), up to ฯ„ โ‰ˆ 2.5. A 1 % azimuthal perturbation (mode 24) of the drop velocity seeds the fingers, and the images are mirrored to show the full crown.
  • Images: generated during the run with Basilisk view.h (offscreen, no display): draw_vof coloured by height, a frame every 0.04 D/U, about 1 s or less per frame.

How the crown radius is measured

Tracking interface cells is fragile here, because the droplets thrown off the rim confuse any “largest radius at a given height” rule. Instead we integrate the liquid volume fraction in vertical columns to get a liquid-height profile h(r). From the crown peak we move outwards until h drops below 1.5 film thicknesses: that radius is the crown base. Detached droplets barely change h(r), so the measurement is stable. In 3D the same profile is taken on the two symmetry planes and averaged. The code is in crown.h in the case files.

Validation: crown base radius

Crown base radius versus time for three grid levels compared with Yarin & Weiss and Gao & Li

Yarin & Weiss (1995) derived the self-similar law R/D = Cโ‚ยทโˆš(ฯ„ โˆ’ ฯ„โ‚€) for the crown base, with Cโ‚ = (2/3ฮด)^ยผ and ฮด = h/D, the film thickness over the drop diameter. For ฮด = 0.1 it gives Cโ‚ = 1.61. Experiments and simulations have consistently found the crown spreading more slowly. Gao & Li (2015) introduced a loss factor ฮป = 0.26 Re^0.05 / (We^0.07 ฮด^0.34), giving C = (2ฮปยฒ/3ฮด)^ยผ. For our case ฮป = 0.53 and C = 1.17.

What we found:

  • All three grids give C between 1.176 and 1.180 (mean 1.178), within 0.7 % of Gao & Li. At ฯ„ = 3 the three levels give the same crown radius, 2.033 D, to within the measurement bin (0.006 D).
  • The 0.6 % agreement assumes the square-root law through ฯ„ = 0, as in the correlations. Fitting a free intercept, R/D = a + Cยทโˆšฯ„, gives C = 1.144โ€“1.149 and a โ‰ˆ 0.04, about 2 % below Gao & Li. Either way the simulations sit on the Gao & Li curve and far from Yarin & Weiss.
  • Yarin & Weiss overpredicts the radius by 36 %. That is the known behaviour of the inviscid kinematic model, which ignores the energy lost at impact.
  • The 3D run at level 9 gives C = 1.176 on its symmetry planes, the same as the axisymmetric runs. The fingers and droplets that the axisymmetric model cannot capture do not change how fast the crown base moves.

What this does not validate: finger number, droplet sizes and crown height. Those depend on the perturbation and on resolution near the rim, and would need dedicated experiments, such as the high-speed imaging of Cossali et al. (2004). We show them as a qualitative result.

The 3D crown

ฯ„ = 0.4 ฯ„ = 1.6 ฯ„ = 2.5
Ejecta sheet and early droplets Crown with rim fingers Fingers pinching off into droplets
  • ฯ„ โ‰ˆ 0.4: a thin ejecta sheet leaves the contact line and breaks into a mist of small droplets.
  • ฯ„ โ‰ˆ 1โ€“1.6: the crown wall rises, and its rim thickens into a toroidal bulge that develops regular fingers.
  • ฯ„ โ‰ˆ 2.5 (end of the run): the fingers stretch and pinch off into secondary droplets, while the crown base keeps spreading as โˆšฯ„.

The octree concentrates cells at the interface. The number of cells dropped from 1.8 million at initialisation to about 0.3 million once the flat film had coarsened. It then grew to 1.34 million as the crown, fingers and droplets formed. A uniform level-9 grid on the same domain would have 134 million cells.

Run times and costs

All runs on cloudHPC spot (preemptible) instances.

Run Instance Solver time Billed cost
3D crown, level 9, ฯ„ = 0 โ†’ 2.46 (2,602 steps) 16 vCPU hypercore 4.5 h โ‚ฌ8.29
Axisymmetric, level 10, ฯ„ = 0 โ†’ 6 (6,170 steps) 8 vCPU highcore 4.3 min โ‚ฌ0.81*
Axisymmetric, levels 11 and 12 2 vCPU highcore 11.4 h (L11) + ~19 h (L12, stopped at ฯ„ = 4) โ‚ฌ3.09

* The level-10 job also started level 11 on 8 cores before we stopped it and moved levels 11โ€“12 to a smaller machine.

Set-up tests and failed runs added about โ‚ฌ2.20. The whole validation and the 3D animation cost about โ‚ฌ14.

What we learned on cloudHPC

These are the lessons from getting the runs right, shown as they happened.

  1. First launch: compilation error in MPI mode.

    grid/memindex/virtual.h:135: error: 'MADV_DONTNEED' undeclared
    

    Recent Basilisk versions use madvise() in the tree-grid memory index, which needs _GNU_SOURCE when compiling with mpicc -std=c99. The cloudHPC Basilisk launcher now adds -D_GNU_SOURCE=1, so any tree-grid case compiles in MPI out of the box.
    2. Count cells per core, not cores. Basilisk exchanges ghost cells across every refinement level, so with too few cells per MPI process the run slows down. The level-10 axisymmetric case (about 10,000 cells) spent 62 % of its time in MPI on 8 processes, and the level-11 case ran roughly 2ร— faster per step on 2 processes than on 8 (estimated from log timestamps). The 3D run, about 84,000 cells per core at its peak on 16 cores, still spent 45 % of its time in MPI. Rule of thumb: at least ~100,000 cells per physical core in 3D, and small 2D or axisymmetric runs (around 10โด cells) on 1โ€“2 cores.
    3. Fine levels get expensive per step. On level 11 the log started printing convergence for u.x not reached after 100 iterations from ฯ„ โ‰ˆ 2.2 (the viscous solver hitting its iteration cap), and the cost per step rose from about 4.5 s to 10โ€“18 s late in the run. Level 12 ran at 8โ€“11 s per step almost from the start. For a validation that only needs the crown base, stop the run once the quantity of interest is covered (ฯ„ โ‰ˆ 3 here).
    4. Use dump/restore on spot instances. Basilisk has no automatic restart. We added

    event init (t = 0) { if (restore (file = "restart")) return 0; /* ...initial conditions... */ }
    event dumps (t += 0.2) dump (file = "restart");
    

    so a preempted 3D run continues from its last dump instead of starting over. Time series go to a file opened in append mode, because out is rewritten on every relaunch.
    5. Refine only what you need at t = 0. Our first 3D attempt (a level-10 test on 32 cores) refined a thick band around the film to the maximum level. It started from 29.7 million cells and spent about 9 minutes initialising, then coarsened below 1 million cells within 20 steps (0.6 million after ~200). Refining only ยฑ2 cells around the film cut initialisation of the level-9 run to about a minute.

How to run it on cloudHPC

  1. Put one .c program with main() in a folder, or one per sub-folder to run several cases one after the other, with any header it includes (here crown.h).
  2. Upload the folder and launch the Basilisk solver. The program is compiled with qcc automatically. Tree grids run with MPI on all physical cores, multigrid and Cartesian grids with OpenMP.
  3. Choose highcore or hypercore instances and size them on cells after adaptation (see point 2 of the lessons above).
  4. Results come back in BASILISK.tar.gz: out (stdout, ending with the Basilisk timing summary: steps, pointsยทstep/s and MPI share), log (stderr: progress and warnings), log.qcc (compilation) and everything your program writes, including the PNG frames from view.h.

The case files used for this post (axisymmetric levels 10โ€“12, 3D crown, measurement and plotting scripts) are available on request.

FAQ

What is Basilisk CFD?
Basilisk is an open-source C framework for solving partial differential equations on adaptive Cartesian grids (quadtree/octree). It is written by Stรฉphane Popinet as the successor of Gerris and is widely used for multiphase flows with surface tension: drops, bubbles, waves and atomisation.

How accurate is Basilisk for drop impact on a liquid film?
In this case the crown base spreading constant was on average 0.6 % above the Gao & Li (2015) correlation (at most 0.7 % for any grid), and three grid resolutions agreed within 0.3 %. The 3D and axisymmetric runs gave the same spreading rate.

Why does the Yarin & Weiss law overpredict the crown radius?
It is an inviscid, kinematic model that assumes all the impact momentum goes into the spreading crown. Viscous and capillary losses at impact slow the crown down. Gao & Li’s loss factor ฮป โ‰ˆ 0.53 for this case accounts for it.

How many cores should I use for a Basilisk simulation?
Size on the number of cells after adaptation: in 3D aim for at least ~100,000 cells per physical core, and run small 2D or axisymmetric cases on 1โ€“2 cores. With fewer cells per core, ghost-cell exchanges take a growing share of the time (45โ€“62 % in our runs), so extra cores bring little or nothing.

Can Basilisk make animations on a cloud machine without a display?
Yes. view.h renders offscreen; save("frame.png") writes images during the run. On cloudHPC the graphics libraries are installed and linked automatically.

References

  1. Popinet, S. (2009). An accurate adaptive solver for surface-tension-driven interfacial flows. Journal of Computational Physics, 228(16), 5838โ€“5866. https://doi.org/10.1016/j.jcp.2009.04.042
  2. Popinet, S. (2018). Numerical models of surface tension. Annual Review of Fluid Mechanics, 50, 49โ€“75. https://doi.org/10.1146/annurev-fluid-122316-045034
  3. Basilisk documentation and source: http://basilisk.fr
  4. Yarin, A. L., & Weiss, D. A. (1995). Impact of drops on solid surfaces: self-similar capillary waves, and splashing as a new type of kinematic discontinuity. Journal of Fluid Mechanics, 283, 141โ€“173. https://doi.org/10.1017/S0022112095002266
  5. Gao, X., & Li, R. (2015). Impact of a single drop on a flowing liquid film. Physical Review E, 92, 053005. https://doi.org/10.1103/PhysRevE.92.053005
  6. Cossali, G. E., Coghe, A., & Marengo, M. (1997). The impact of a single drop on a wetted solid surface. Experiments in Fluids, 22, 463โ€“472. https://doi.org/10.1007/s003480050073
  7. Cossali, G. E., Marengo, M., Coghe, A., & Zhdanov, S. (2004). The role of time in single drop splash on thin film. Experiments in Fluids, 36, 888โ€“900. https://doi.org/10.1007/s00348-003-0772-0
  8. Josserand, C., & Zaleski, S. (2003). Droplet splashing on a thin liquid film. Physics of Fluids, 15, 1650โ€“1657. https://doi.org/10.1063/1.1572815
  9. Lamanna, G., Geppert, A., Bernard, R., Hรถrner, I., & Weigand, B. (2020). Drop impact on wetted walls: an analytical solution for modelling the crown spreading based on stagnation-point flow. arXiv:2007.08889. https://arxiv.org/abs/2007.08889

CloudHPC is a HPC provider to run engineering simulations on the cloud. CloudHPC provides from 1 to 224 vCPUs for each process in several configuration of HPC infrastructure - both multi-thread and multi-core. Current software ranges includes several CAE, CFD, FEA, FEM software among which OpenFOAM, FDS, Blender and several others.

New users benefit of a FREE trial of 300 vCPU/Hours to be used on the platform in order to test the platform, all each features and verify if it is suitable for their needs