|
flow 0.4.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
|
Functions | |
| bed_sdf (N, npz) | |
| march (N) | |
| stats (name, v, scale) | |
Variables | |
| BED = os.environ.get("BED", "") | |
| MARCH_TOL = float(os.environ.get("MARCH_TOL", "1e-8")) | |
| MAXS = int(os.environ.get("MARCH_MAX", "4000")) | |
| DT = float(os.environ.get("DT", "60.0")) | |
| dict | prev = {} |
| s | |
| sdf | |
| R | |
| steps | |
| list | U = [np.asarray(s.get_u()), np.asarray(s.get_v()), np.asarray(s.get_w())] |
| list | UF = [np.asarray(s.get_uf()), np.asarray(s.get_vf()), np.asarray(s.get_wf())] |
| list | OX = [np.asarray(s.get_ox()), np.asarray(s.get_oy()), np.asarray(s.get_oz())] |
| float | fluid = 0.0 |
| uscale = float(np.abs(U[0][fluid]).mean()) | |
| dict | rms = {} |
| float | half = 0.5 * (U[a] + np.roll(U[a], 1, axis=a)) |
| list | openf = OX[a] > 0.0 |
| div = np.zeros_like(U[0]) | |
| list | flx = OX[a] * half |
| axis | |
| divf = np.zeros_like(U[0]) | |
| float | cavg = 0.5 * (UF[a] + np.roll(UF[a], -1, axis=a)) |
| tuple | d = (U[a] - cavg) |
| float | near = fluid & (np.abs(sdf) <= 2.0) |
| float | bulk = fluid & (np.abs(sdf) > 2.0) |
| lr = np.log(N / prev["N"]) | |
| dict | orders |
| flush | |
S1 probe (doc/collocated_accuracy_ceiling.md #5): does the ABC cell/face reconciliation carry a
steady-state defect that could hold the ~0.3 % flow-excess plateau?
Structural background (this is what the test checks, not assumes): at the JOINT fixed point of the
mode-9 step -- velocity AND accumulated pressure both stationary -- the rotational update
P += (rho/dt)*phi - mu*div(u*) together with A phi = -div(u*) forces (A + rho/(mu dt)) phi = 0,
i.e. phi = 0 and div(u*) = 0. Consequences, each measured here at the march's stopping point:
m1 |uf - halfavg(u)| / <u> the projected face field vs the plain 1/2-1/2 average of the
cell field. projectCorrect writes uf = halfavg(u*) - grad_f(phi)
and the cell correction writes u = u* - gpCenterGrad(phi), so a
persistent gap is EXACTLY the un-converged gauge (phi != 0) plus
the gradient-pair mismatch: the S1 channel. If m1 ~ 0 the ABC
two-field loop closes and S1 is dead.
m2 alpha-div(halfavg(u)) h/<u> the constraint residual of the CELL field (the face field's is
pinned by the solve; the cell field's is the approximate
projection's O(h^2) remainder -- it should CONVERGE, not floor).
m3 |u_cell - cellavg(uf)| / <u> the doc's S1 quantity, split by wall distance (near = |sdf|<=2h).
This is a smoothing difference (h^2 D2u/4 in the bulk); the
interesting part is whether the NEAR-WALL part floors.
Usage: SDFLOW_BUILD=build_ge BED=<packing.npz> python collocated_s1_reconciliation.py [N ...]
(defaults N = 96 128 192 -> R = 6, 8, 12 on the 16^3-box beds)
| collocated_s1_reconciliation.bed_sdf | ( | N, | |
| npz | |||
| ) |
Definition at line 43 of file collocated_s1_reconciliation.py.
Referenced by march().
| collocated_s1_reconciliation.march | ( | N | ) |
Definition at line 67 of file collocated_s1_reconciliation.py.
References bed_sdf().
| collocated_s1_reconciliation.stats | ( | name, | |
| v, | |||
| scale | |||
| ) |
Definition at line 91 of file collocated_s1_reconciliation.py.
| collocated_s1_reconciliation.BED = os.environ.get("BED", "") |
Definition at line 35 of file collocated_s1_reconciliation.py.
| collocated_s1_reconciliation.MARCH_TOL = float(os.environ.get("MARCH_TOL", "1e-8")) |
Definition at line 38 of file collocated_s1_reconciliation.py.
| collocated_s1_reconciliation.MAXS = int(os.environ.get("MARCH_MAX", "4000")) |
Definition at line 39 of file collocated_s1_reconciliation.py.
| collocated_s1_reconciliation.DT = float(os.environ.get("DT", "60.0")) |
Definition at line 40 of file collocated_s1_reconciliation.py.
| dict collocated_s1_reconciliation.prev = {} |
Definition at line 102 of file collocated_s1_reconciliation.py.
| collocated_s1_reconciliation.s |
Definition at line 104 of file collocated_s1_reconciliation.py.
| collocated_s1_reconciliation.sdf |
Definition at line 104 of file collocated_s1_reconciliation.py.
| collocated_s1_reconciliation.R |
Definition at line 104 of file collocated_s1_reconciliation.py.
| collocated_s1_reconciliation.steps |
Definition at line 104 of file collocated_s1_reconciliation.py.
| list collocated_s1_reconciliation.U = [np.asarray(s.get_u()), np.asarray(s.get_v()), np.asarray(s.get_w())] |
Definition at line 105 of file collocated_s1_reconciliation.py.
| list collocated_s1_reconciliation.UF = [np.asarray(s.get_uf()), np.asarray(s.get_vf()), np.asarray(s.get_wf())] |
Definition at line 106 of file collocated_s1_reconciliation.py.
| list collocated_s1_reconciliation.OX = [np.asarray(s.get_ox()), np.asarray(s.get_oy()), np.asarray(s.get_oz())] |
Definition at line 107 of file collocated_s1_reconciliation.py.
| float collocated_s1_reconciliation.fluid = 0.0 |
Definition at line 108 of file collocated_s1_reconciliation.py.
Definition at line 109 of file collocated_s1_reconciliation.py.
| dict collocated_s1_reconciliation.rms = {} |
Definition at line 112 of file collocated_s1_reconciliation.py.
Definition at line 114 of file collocated_s1_reconciliation.py.
| list collocated_s1_reconciliation.openf = OX[a] > 0.0 |
Definition at line 115 of file collocated_s1_reconciliation.py.
| collocated_s1_reconciliation.div = np.zeros_like(U[0]) |
Definition at line 120 of file collocated_s1_reconciliation.py.
Definition at line 123 of file collocated_s1_reconciliation.py.
| collocated_s1_reconciliation.axis |
Definition at line 124 of file collocated_s1_reconciliation.py.
| collocated_s1_reconciliation.divf = np.zeros_like(U[0]) |
Definition at line 127 of file collocated_s1_reconciliation.py.
Definition at line 134 of file collocated_s1_reconciliation.py.
Definition at line 135 of file collocated_s1_reconciliation.py.
Definition at line 136 of file collocated_s1_reconciliation.py.
Definition at line 137 of file collocated_s1_reconciliation.py.
Definition at line 141 of file collocated_s1_reconciliation.py.
| dict collocated_s1_reconciliation.orders |
Definition at line 142 of file collocated_s1_reconciliation.py.
| collocated_s1_reconciliation.flush |
Definition at line 145 of file collocated_s1_reconciliation.py.