|
flow 0.4.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
|
Functions | |
| bed_sdf (N, npz) | |
Variables | |
| BED = os.environ["BED"] | |
| N = int(os.environ.get("N", "192")) | |
| STEPS = int(os.environ.get("STEPS", "20000")) | |
| EVERY = int(os.environ.get("EVERY", "500")) | |
| DT = float(os.environ.get("DT", "60.0")) | |
| KIND = os.environ.get("KIND", "gauge-exact") | |
| ROT = int(os.environ.get("ROT", "1")) | |
| ROTF = int(os.environ.get("ROTF", "0")) | |
| ROTW = float(os.environ.get("ROTW", "1")) | |
| WALLW = float(os.environ.get("WALLW", "0")) | |
| DTSWITCH | |
| MU | |
| F0 | |
| SHIFT = np.array([float(v) for v in os.environ.get("SHIFT", "0,0,0").split(",")]) | |
| sdf | |
| R | |
| str | sv = "stag" else flow.SolverColocated |
| str | s = sv(N, N, N) |
| cutcell_pressure | |
| True | |
| pressure_coarse | |
| float | fluid = 0.0 |
| flush | |
| pk = None | |
| Pprev = None | |
| list | U = [np.asarray(s.get_u()), np.asarray(s.get_v()), np.asarray(s.get_w())] |
| int | us = float(np.abs(U[0][fluid]).mean()) + 1e-300 |
| int | kc = float(U[0].mean()) * MU / F0 / R ** 2 |
| float | m1 = 0.0 |
| list | OX = [np.asarray(s.get_ox()), np.asarray(s.get_oy()), np.asarray(s.get_oz())] |
| int | kf = float((OX[0] * U[0]).mean()) * MU / F0 / R ** 2 |
| div = np.zeros_like(U[0]) | |
| list | flx = OX[a] * U[a] |
| axis | |
| int | m2 = float(np.sqrt((div[fluid] ** 2).mean())) / us |
| list | UF = [np.asarray(s.get_uf()), np.asarray(s.get_vf()), np.asarray(s.get_wf())] |
| float | m1sq = 0.0 |
| float | half = 0.5 * (U[a] + np.roll(U[a], 1, axis=a)) |
| list | op = OX[a] > 0 |
| str | dk = "" if pk is None else f"{kc - pk:+.2e}" |
| str | dm = "" if pm is None else f"{m1 - pm:+.2e}" |
| Pf = np.asarray(s.get_p()) | |
| str | dP = "" if Pprev is None else f"{np.abs(Pf - Pprev).max():.3e}" |
| pm | |
Long-march probe of the STALL hypothesis (2026-08-20): the collocated march quasi-freezes on a slow u-P manifold far from the true fixed point (measured: |uf - halfavg(u)| rms 4.5e-2 <u> at the stopping point, while the ONLY true fixed point of the map has phi = 0, uf == halfavg(u), and a dt-free steady system). If that is the plateau mechanism, marching far past the <u> criterion must show k creeping toward the staggered answer as the reconciliation gap decays (however slowly); if k and the gap are EXACTLY stationary, the implemented map has a non-closing loop that differs from the model and the discrepancy must be found in code. Runs the phi=0.60 bed, collocated gauge-exact, for STEPS steps regardless of any criterion, printing every EVERY steps: k (cell + flux estimators), m1 = rms|uf - halfavg(u)|/<|u|>, m2 = rms alpha-div(halfavg(u))/<|u|>, and the drift of each since the last print. SDFLOW_BUILD=build_ge BED=...npz N=192 STEPS=20000 EVERY=500 DT=60 python collocated_longmarch.py
| collocated_longmarch.bed_sdf | ( | N, | |
| npz | |||
| ) |
Definition at line 46 of file collocated_longmarch.py.
| collocated_longmarch.BED = os.environ["BED"] |
Definition at line 25 of file collocated_longmarch.py.
| collocated_longmarch.N = int(os.environ.get("N", "192")) |
Definition at line 26 of file collocated_longmarch.py.
| collocated_longmarch.STEPS = int(os.environ.get("STEPS", "20000")) |
Definition at line 27 of file collocated_longmarch.py.
| collocated_longmarch.EVERY = int(os.environ.get("EVERY", "500")) |
Definition at line 28 of file collocated_longmarch.py.
| collocated_longmarch.DT = float(os.environ.get("DT", "60.0")) |
Definition at line 29 of file collocated_longmarch.py.
| collocated_longmarch.KIND = os.environ.get("KIND", "gauge-exact") |
Definition at line 30 of file collocated_longmarch.py.
| collocated_longmarch.ROT = int(os.environ.get("ROT", "1")) |
Definition at line 31 of file collocated_longmarch.py.
| collocated_longmarch.ROTF = int(os.environ.get("ROTF", "0")) |
Definition at line 32 of file collocated_longmarch.py.
| collocated_longmarch.ROTW = float(os.environ.get("ROTW", "1")) |
Definition at line 33 of file collocated_longmarch.py.
| collocated_longmarch.WALLW = float(os.environ.get("WALLW", "0")) |
Definition at line 34 of file collocated_longmarch.py.
| collocated_longmarch.DTSWITCH |
Definition at line 38 of file collocated_longmarch.py.
| collocated_longmarch.MU |
Definition at line 40 of file collocated_longmarch.py.
| collocated_longmarch.F0 |
Definition at line 40 of file collocated_longmarch.py.
| collocated_longmarch.SHIFT = np.array([float(v) for v in os.environ.get("SHIFT", "0,0,0").split(",")]) |
Definition at line 43 of file collocated_longmarch.py.
| collocated_longmarch.sdf |
Definition at line 69 of file collocated_longmarch.py.
| collocated_longmarch.R |
Definition at line 69 of file collocated_longmarch.py.
| str collocated_longmarch.sv = "stag" else flow.SolverColocated |
Definition at line 70 of file collocated_longmarch.py.
| collocated_longmarch.cutcell_pressure |
Definition at line 104 of file collocated_longmarch.py.
| collocated_longmarch.True |
Definition at line 104 of file collocated_longmarch.py.
| collocated_longmarch.pressure_coarse |
Definition at line 104 of file collocated_longmarch.py.
| float collocated_longmarch.fluid = 0.0 |
Definition at line 105 of file collocated_longmarch.py.
| collocated_longmarch.flush |
Definition at line 107 of file collocated_longmarch.py.
| collocated_longmarch.pk = None |
Definition at line 110 of file collocated_longmarch.py.
| collocated_longmarch.Pprev = None |
Definition at line 111 of file collocated_longmarch.py.
| list collocated_longmarch.U = [np.asarray(s.get_u()), np.asarray(s.get_v()), np.asarray(s.get_w())] |
Definition at line 118 of file collocated_longmarch.py.
Definition at line 119 of file collocated_longmarch.py.
Definition at line 120 of file collocated_longmarch.py.
| int collocated_longmarch.m1 = 0.0 |
Definition at line 122 of file collocated_longmarch.py.
| list collocated_longmarch.OX = [np.asarray(s.get_ox()), np.asarray(s.get_oy()), np.asarray(s.get_oz())] |
Definition at line 123 of file collocated_longmarch.py.
Definition at line 124 of file collocated_longmarch.py.
| collocated_longmarch.div = np.zeros_like(U[0]) |
Definition at line 125 of file collocated_longmarch.py.
Definition at line 127 of file collocated_longmarch.py.
| collocated_longmarch.axis |
Definition at line 128 of file collocated_longmarch.py.
Definition at line 129 of file collocated_longmarch.py.
| list collocated_longmarch.UF = [np.asarray(s.get_uf()), np.asarray(s.get_vf()), np.asarray(s.get_wf())] |
Definition at line 131 of file collocated_longmarch.py.
| float collocated_longmarch.m1sq = 0.0 |
Definition at line 134 of file collocated_longmarch.py.
Definition at line 137 of file collocated_longmarch.py.
| list collocated_longmarch.op = OX[a] > 0 |
Definition at line 138 of file collocated_longmarch.py.
Definition at line 144 of file collocated_longmarch.py.
Definition at line 145 of file collocated_longmarch.py.
| collocated_longmarch.Pf = np.asarray(s.get_p()) |
Definition at line 146 of file collocated_longmarch.py.
Definition at line 147 of file collocated_longmarch.py.
| collocated_longmarch.pm |
Definition at line 151 of file collocated_longmarch.py.