|
flow 1.4.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
|
Functions | |
| plane_fractions (n, nrm, x0, sub=8) | |
| colour (geom, lowA, frac=0.5) | |
| solenoidal (seed) | |
| solenoidal_periodic (seed) | |
| rho_face_periodic (rho) | |
| energy_periodic (vel, rho) | |
| energy_periodic_deflated (vel, rho) | |
| energy (vel, rho) | |
| run (args) | |
| main () | |
Variables | |
| N | |
| STEPS | |
| PCAP | |
| PRTOL | |
| int | FLOOR = 1e-20 |
| tuple | PAIRS = ((1e-2, 1e-3), (1e2, 1e3), (1e-3, 1e-4), (1e3, 1e4)) |
| tuple | DS = (0.1, 1.0, 10.0, 100.0, 1e4) |
G-SV9 (b) and (d) (doc/vof_sharp_viscous_stress.md §11): the 3-D homogeneous march of the sharp
viscous split with the production stepper.
Unit box, N = 16, no-slip walls on all six faces (homogeneous Dirichlet), Stokes (momentum
advection off, no body force), sharp viscous interface. The colour is FROZEN: it is reset to the
initial field after every step (the step builds mu, rho and the band from the colour it starts
with; its colour stage at the tail is discarded), so the march is the linear operator of §6.
(b) plane: the plane with normal n(22.5, 22.5 deg) through the centre, offset 0.3 cell along n
(C = 1, phase A, on the side n.(x - x0) < 0);
(d) film: a grid-aligned 1-cell slab of the low-mu phase normal to x (cells x = N/2), both of
its faces carrying virtual planes.
(b') pplane: the periodic twin, reported only (§11 third-pass amendment, WO-6a): a TRIPLY PERIODIC
box with the rational normal m = (2,1,1), n = m/|m|, period P = 1/|m| along n; two
parallel planes per period, the first at offset 0.3 cell (s0 = n.(1/2,1/2,1/2) + 0.3 h),
the second half a period further (layer fraction 0.5, coordinator 2026-11-01): phase A
where frac((n.x - s0)/P) < 1/2, exact cell fractions (gsv1.layered_fractions). The
initial field is the periodic MAC curl of a random edge potential with each
component's rho_F-weighted mean removed (the momentum invariant of the periodic box,
which no step can decay; DECISION, reported); E sums every face. WO-6a' (§6.5): on the
periodic box the verdicts judge E' = E - sum_c (sum_F rho_F u_c)^2/(2 sum_F rho_F), the
energy of the M-orthogonal complement of the translations (the inexact default momentum
solve deposits momentum, which the undamped translations accumulate); E is reported.
--frac sets the layer fraction, --D the D_hi list, --pairs the PAIRS indices (WO-6f).
mu_A/mu_B = 1e-2, 1e2, 1e-3, 1e3 with rho_A/rho_B = 1e-3, 1e3, 1e-4, 1e4 (the high-mu phase has
mu = rho = 1); D_hi = mu_hi dt/(rho_hi h^2) in {0.1, 1, 10, 100, 1e4}; 2000 steps.
Initial field: the discrete MAC curl of a random edge vector potential (zero on the walls), so it
is exactly solenoidal with zero wall-normal velocity; its amplitude keeps the colour CFL <= 1e-3
(the problem is linear, so the scale is immaterial).
Kinetic energy: E = 1/2 sum_faces rho_F u^2 h^3, rho_F the solver's face density (the mean of the
two cells' rho(C), face_props.hpp) -- the M-norm of the §6 analysis.
PASS (per run): E_n <= E_0 for every n, and E_{n+100}/E_n <= 1 + 1e-10 for every n >= 200.
Pressure (WO-6a, §6.2): the production driver the rho property model selects (Chebyshev), never a
forced CG driver, with rtol 1e-12 and a cap (PCAP) that must never bind: a capped step makes the
run NOT JUDGED. Two growth verdicts per run (§6.2, USER Q15 pending): 'as written' above, and
'floor-excluded', the growth ratio judged only over windows with E_n >= 1e-20 E_0 (the ratio
below that level is reported, not judged).
nice -n 10 python gsv9.py [--geom plane|film|pplane|both] [--procs 6] [--mode sharp|averaged] (one line per run + a verdict)
| gsv9.plane_fractions | ( | n, | |
| nrm, | |||
| x0, | |||
| sub = 8 ) |
Definition at line 57 of file gsv9.py.
References mean().
Referenced by colour(), and gsv9_split.colour().
| gsv9.colour | ( | geom, | |
| lowA, | |||
| frac = 0.5 ) |
| gsv9.solenoidal | ( | seed | ) |
| gsv9.solenoidal_periodic | ( | seed | ) |
| gsv9.rho_face_periodic | ( | rho | ) |
The solver's face density: the mean of the two cells, face c index i between cells i-1 and i.
Definition at line 116 of file gsv9.py.
Referenced by energy_periodic(), energy_periodic_deflated(), and run().
| gsv9.energy_periodic | ( | vel, | |
| rho ) |
Definition at line 121 of file gsv9.py.
References rho_face_periodic().
Referenced by energy_periodic_deflated(), and run().
| gsv9.energy_periodic_deflated | ( | vel, | |
| rho ) |
WO-6a' (§6.5 finding 1): E' = E - sum_c (sum_F rho_F u_c)^2 / (2 sum_F rho_F), the energy of the M-orthogonal complement of the three translations (exact lambda = 1 eigenvectors of any momentum-conserving step on a periodic box). Same h^3 = 1/N^3 normalisation as energy_periodic.
Definition at line 125 of file gsv9.py.
References energy_periodic(), and rho_face_periodic().
| gsv9.run | ( | args | ) |
Definition at line 145 of file gsv9.py.
References colour(), energy_periodic(), rho_face_periodic(), solenoidal(), and solenoidal_periodic().
| tuple gsv9.PAIRS = ((1e-2, 1e-3), (1e2, 1e3), (1e-3, 1e-4), (1e3, 1e4)) |