|
flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
|
Functions | |
| sphere_array_sdf (n, centres, radius) | |
| packing (n) | |
| stokes_state (n, steps=60, mu=0.2, force=(2e-3, 1e-3, 5e-4)) | |
| g2 (n=48, nadv=500, cfl=0.2) | |
| g4 (n=48, steps=400, ratio=10.0, grav=2e-3, momentum=True) | |
| g5 (diam=24, steps=200, sigma=1.0, mu=0.05, cfl=0.5) | |
Variables | |
| int | PRESS_MAXIT = 300 |
| list | DEFAULT_CENTRES = [(6.0, 7.0, 8.0), (20.0, 9.0, 23.0), (11.0, 24.0, 19.0), (26.0, 22.0, 6.0)] |
| dict | GATES = {"g2": g2, "g4": g4, "g5": g5} |
| list | names = [a for a in sys.argv[1:] if not a.startswith("-")] or list(GATES) |
| str | quick = "--quick" in sys.argv |
| dict | results = {} |
| dict | fn = GATES[nm] |
| n | |
| nadv | |
| steps | |
| diam | |
WO-Q (rung V5a) — VoF transport in cut cells: the gate battery, in Python.
Every gate prints its numbers; nothing is summarised into an adjective. The three that matter:
G2 CONSERVATION THROUGH A PACKING (kinematic). The single-phase solver is run to a Stokes steady
state on a periodic sphere array, that PROJECTED velocity is frozen, and a liquid slab is
advected by `advect_vof` alone. The conserved functional of the openness-weighted scheme is
`sum eps_eff * C` (`src/vof/cutcell.hpp` rule 1) and its floor is the projection's own
`max_open_divergence()` — both are reported, together with the raw `sum eps * C`, the colour
in solid cells (0 by construction), the boundedness in UNCUT fluid cells and the clipped
volume.
G4 COUPLED DRAINING. The same packing at density ratio 10 with a ZERO-MEAN buoyancy force,
`enable_vof` + the LinearMix closures, optionally `enable_vof_momentum`. Gates: no NaN, the
colour drift against the projection floor, zero colour in solid cells, `max|u|` bounded, and
the pressure iteration count against its cap (a capped solve makes a run INVALID).
G5 THE 90-DEGREE NEUTRAL FILL. A liquid cap on a flat SDF wall at a HALF-INTEGER z, so the wall
cells are genuinely cut, with surface tension. The apparent contact angle is measured from the
cap height on the axis and the contact radius on the first fluid plane
(`theta = 2 atan(h/a)`, the spherical-cap relation), and the Young-Laplace jump against
`2 sigma / R`.
Usage:
PYTHONPATH=$PWD/build_cuda python tests/study/vof_cutcell.py [g2 g4 g5 ...]
| vof_cutcell.sphere_array_sdf | ( | n, | |
| centres, | |||
| radius | |||
| ) |
Periodic array of spheres; > 0 in fluid (flow's SDF convention), cell centres at i + 1/2.
Definition at line 38 of file vof_cutcell.py.
Referenced by packing().
| vof_cutcell.packing | ( | n | ) |
Definition at line 57 of file vof_cutcell.py.
References sphere_array_sdf().
Referenced by g4(), and stokes_state().
| vof_cutcell.stokes_state | ( | n, | |
steps = 60, |
|||
mu = 0.2, |
|||
force = (2e-3, 1e-3, 5e-4) |
|||
| ) |
| vof_cutcell.g2 | ( | n = 48, |
|
nadv = 500, |
|||
cfl = 0.2 |
|||
| ) |
Definition at line 77 of file vof_cutcell.py.
References stokes_state().
| vof_cutcell.g4 | ( | n = 48, |
|
steps = 400, |
|||
ratio = 10.0, |
|||
grav = 2e-3, |
|||
momentum = True |
|||
| ) |
Definition at line 115 of file vof_cutcell.py.
References packing().
| vof_cutcell.g5 | ( | diam = 24, |
|
steps = 200, |
|||
sigma = 1.0, |
|||
mu = 0.05, |
|||
cfl = 0.5 |
|||
| ) |
Definition at line 160 of file vof_cutcell.py.
References mean().
| int vof_cutcell.PRESS_MAXIT = 300 |
Definition at line 35 of file vof_cutcell.py.
| list vof_cutcell.DEFAULT_CENTRES = [(6.0, 7.0, 8.0), (20.0, 9.0, 23.0), (11.0, 24.0, 19.0), (26.0, 22.0, 6.0)] |
Definition at line 54 of file vof_cutcell.py.
Definition at line 241 of file vof_cutcell.py.
| list vof_cutcell.names = [a for a in sys.argv[1:] if not a.startswith("-")] or list(GATES) |
Definition at line 244 of file vof_cutcell.py.
| str vof_cutcell.quick = "--quick" in sys.argv |
Definition at line 245 of file vof_cutcell.py.
| dict vof_cutcell.results = {} |
Definition at line 246 of file vof_cutcell.py.
| dict vof_cutcell.fn = GATES[nm] |
Definition at line 248 of file vof_cutcell.py.
| vof_cutcell.n |
Definition at line 250 of file vof_cutcell.py.
| vof_cutcell.nadv |
Definition at line 250 of file vof_cutcell.py.
| vof_cutcell.steps |
Definition at line 252 of file vof_cutcell.py.
| vof_cutcell.diam |
Definition at line 254 of file vof_cutcell.py.