|
flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
|
Functions | |
| marker_box (C, pad=1) | |
| build_hysing (nx, blocks) | |
| run_hysing (nx, blocks, T=3.0, verbose=True) | |
| gate_hysing () | |
| grace_terminal (Eo, Mo, d, rho_l, mu_l, sigma, g, mu_ratio_to_water=None) | |
| gate_grace () | |
| gate_pair () | |
| gate_contact () | |
| gate_swarm () | |
Variables | |
| str | QUICK = "--quick" in sys.argv |
| str | RTOL = float(sys.argv[sys.argv.index("--rtol") + 1]) if "--rtol" in sys.argv else None |
| list | GATES |
| HYSING1 | |
| dict | ALL |
VoF Part III rung W2 (WO-W12) — the block container coupled to Navier-Stokes.
Every marker carries its own Weymouth-Yue colour field on its own moving box, forms its own
curvature and its own balanced-force CSF face force there, and the three face-force fields are
summed into the global RHS (UNPACK_SUM). The union `C = max_blocks C_block` is what the closures
(rho, mu) see. Two markers that touch therefore cannot coalesce numerically.
hysing gate 1: Hysing case 1 through the BLOCK path against the same case through the
GLOBAL colour field, both without momentum consistency (quasi-2D 64x128x4).
grace gate 2: one 3-D bubble at Eo = 10, Mo = 1e-3, density ratio 100, against the
Grace-diagram terminal velocity / shape regime.
pair gate 3: two bubbles in line, the trailing one catching the leading one -- the film
drains to one cell and the two blocks stay two.
swarm rung W1 in Python: the master-assignment imbalance of the three modes on a 64-bubble
swarm, the per-bubble Lagrangian outputs, and the device-vs-host packing ratio.
COLOUR CONVENTION. With the block container the union C is the DISPERSED phase (C = 1 inside a
marker), because UNPACK_MAX starts from an empty union and a cell no marker covers must read 0.
Every property model here is therefore written with C = 1 = GAS, the mirror of the structured
scripts. The CSF force is unaffected by the flip: kappa(1-C) = -kappa(C) and grad(1-C) = -grad(C),
so sigma kappa grad C is invariant -- which is what makes the gate-1 comparison meaningful.
Usage: PYTHONPATH=<build> python tests/study/vof_blocks_ns.py [gate ...] [--quick]
| vof_blocks_ns.marker_box | ( | C, | |
pad = 1 |
|||
| ) |
Tight global index box of C > 0.5, grown by `pad`, clamped to the grid.
Definition at line 46 of file vof_blocks_ns.py.
Referenced by build_hysing(), gate_grace(), and gate_pair().
| vof_blocks_ns.build_hysing | ( | nx, | |
| blocks | |||
| ) |
Hysing case 1, quasi-2D. `blocks` selects the container; the physics is identical.
Definition at line 60 of file vof_blocks_ns.py.
References marker_box().
Referenced by run_hysing().
| vof_blocks_ns.run_hysing | ( | nx, | |
| blocks, | |||
T = 3.0, |
|||
verbose = True |
|||
| ) |
Definition at line 99 of file vof_blocks_ns.py.
References build_hysing().
Referenced by gate_hysing().
| vof_blocks_ns.gate_hysing | ( | ) |
Definition at line 133 of file vof_blocks_ns.py.
References run_hysing().
| vof_blocks_ns.grace_terminal | ( | Eo, | |
| Mo, | |||
| d, | |||
| rho_l, | |||
| mu_l, | |||
| sigma, | |||
| g, | |||
mu_ratio_to_water = None |
|||
| ) |
Grace (1973), as tabulated by Clift, Grace & Weber (1978) ch. 7, eqs (7-10)/(7-11):
H = (4/3) Eo Mo^-0.149 (mu_l/mu_w)^-0.14 mu_w = 0.9 cP
J = 0.94 H^0.757 (2 < H <= 59.3), 3.42 H^0.441 (H > 59.3)
U_T = (mu_l/(rho_l d)) Mo^-0.149 (J - 0.857)
THE TRAP, and it is the reason this gate was nearly reported wrong. The correlation contains a
DIMENSIONAL factor, `(mu_l/mu_water)^-0.14`, which a purely dimensionless (Eo, Mo, ratio)
specification does NOT determine: at Eo = 10, Mo = 1e-3 the "Grace-diagram terminal velocity"
is 0.959 cells/s if one silently sets that factor to 1 and 0.579 if the liquid is the one that
actually HAS Mo = 1e-3. It has to be the latter: Mo = 1e-3 at water-like rho and sigma forces
mu_l ~ 0.073 Pa s ~ 81 x water (water itself is Mo ~ 2.5e-11), so a factor of 1 describes no
liquid at all. `mu_ratio_to_water = None` therefore DERIVES the factor from the physical
system that the dimensionless pair implies at rho_l = 1000 kg/m^3, sigma = 0.065 N/m,
g = 9.81 m/s^2 -- a glycerol/water mixture, the standard Mo = 1e-3 fluid.
Definition at line 164 of file vof_blocks_ns.py.
Referenced by gate_grace(), and gate_pair().
| vof_blocks_ns.gate_grace | ( | ) |
Definition at line 193 of file vof_blocks_ns.py.
References grace_terminal(), and marker_box().
| vof_blocks_ns.gate_pair | ( | ) |
Definition at line 281 of file vof_blocks_ns.py.
References grace_terminal(), and marker_box().
| vof_blocks_ns.gate_contact | ( | ) |
The discriminating half of gate 3, when the film gate does not reach contact on its own. Seed the two markers ALREADY TOUCHING -- the centre distance is one cell less than the sum of the radii, so their PLIC bands share cells from step 0 -- and run a real two-phase step. A single global colour field has one blob there and can never have two again; two markers have two, each conserving its own volume, and the union carries the shared liquid explicitly.
Definition at line 404 of file vof_blocks_ns.py.
| vof_blocks_ns.gate_swarm | ( | ) |
Definition at line 506 of file vof_blocks_ns.py.
| str vof_blocks_ns.QUICK = "--quick" in sys.argv |
Definition at line 38 of file vof_blocks_ns.py.
| str vof_blocks_ns.RTOL = float(sys.argv[sys.argv.index("--rtol") + 1]) if "--rtol" in sys.argv else None |
Definition at line 41 of file vof_blocks_ns.py.
| list vof_blocks_ns.GATES |
Definition at line 42 of file vof_blocks_ns.py.
| vof_blocks_ns.HYSING1 |
Definition at line 56 of file vof_blocks_ns.py.
| dict vof_blocks_ns.ALL |
Definition at line 543 of file vof_blocks_ns.py.