|
flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
|
Functions | |
| case_args (a) | |
| set_bed_scene (s, case) | |
| build (flow, case, scheme, st, scene=True) | |
| inner (v, G=2) | |
| components (s, fluid, proj=True, graph="sdf") | |
| outputs (s, case, scheme, fluid) | |
| rel (a, b, scale) | |
| main () | |
Variables | |
| HERE = os.path.dirname(os.path.abspath(__file__)) | |
Does the pressure in SEALED fluid pockets of a dense bed change any physical output? A study
instrument (not a ctest): it prints one line per (output, perturbation).
A sealed pocket is a fluid component of the projection's face-aperture graph other than the main
pore space -- nearly always one cell at a sphere near-contact, every face aperture exactly zero. Its
pressure is a null vector of the pressure operator, uncoupled from the velocity constraint, so its
value is whatever the projection writes into the decoupled row.
Method: build the bed as an analytic SCENE (one instance per sphere, so the per-body reaction and
traction loads exist), configure it exactly as tests/study/steady_acceleration_gates.py does
(Case.configure, production settings), march to steady, snapshot u, v, w, p (the G5 'field'
restore; the run is Stokes, so that is the whole state), then for each perturbation
p -> p + c * [pocket mask] (one pocket, all pockets; c = 0 is the baseline, run twice for the
noise floor):
instant -- outputs recomputed with no step (the reaction reads the stashed u* of the last step);
stepped -- the same after ONE step from the perturbed state.
The outputs: per-body reaction force / torque (staggered only), per-body traction force / torque /
pressure part, the bed totals and K from <u_x>, the velocity fields, and the pressure a user reads
(the fluid mean, x-plane means, main-space values, the pockets themselves).
PYTHONPATH=build_cuda OMP_NUM_THREADS=8 OMP_PROC_BIND=false \
python tests/study/pocket_pressure_probe.py --arrangement bed.npz --scheme staggered
Face convention (checked by the instrument itself): get_ox[i] is the face between cells i-1 and i,
as the binding says. anderson_rev1_probes.py reads it as the face (i, i+1); with that reading this
bed shows 1,085 pockets / 1,168 cells, with the right one 205 / 217 (sdf > 0 nodes) or 115 / 126
(--graph dof, the staggered cut-cell operator's own graph, which also joins through solid-CENTRED
cut cells).
The raw field registry (get_field / set_field / diagnostics.field_view) is used here as a study
instrument only; production code must not. The perturbation c is therefore in the registry's
internal pressure units; the reported pressure changes are scaled by the physical (get_p) range.
| pocket_pressure_probe.case_args | ( | a | ) |
The namespace steady_acceleration_gates.Case and Case.configure read.
Definition at line 47 of file pocket_pressure_probe.py.
Referenced by main().
| pocket_pressure_probe.set_bed_scene | ( | s, | |
| case | |||
| ) |
One sphere node + one instance per body, periodic min-image, physical coordinates.
Definition at line 54 of file pocket_pressure_probe.py.
Referenced by build().
| pocket_pressure_probe.build | ( | flow, | |
| case, | |||
| scheme, | |||
| st, | |||
scene = True |
|||
| ) |
Definition at line 71 of file pocket_pressure_probe.py.
References set_bed_scene().
| pocket_pressure_probe.inner | ( | v, | |
G = 2 |
|||
| ) |
Definition at line 84 of file pocket_pressure_probe.py.
| pocket_pressure_probe.components | ( | s, | |
| fluid, | |||
proj = True, |
|||
graph = "sdf" |
|||
| ) |
Components of the face-aperture graph (ox at index i couples cells i-1 and i; as in
anderson_rev1_probes.py, rolled so that index i couples i and i+1).
graph='sdf' -- anderson_rev1_probes.py's definition: nodes are the sdf > 0 cells, an edge needs
BOTH cells sdf > 0. A solid-CENTRED cut cell (sdf <= 0, open faces) is not a
node, so a fluid cell joined to the main space only through one looks sealed.
graph='dof' -- the pressure operator's own graph: every open face is an edge whatever the sdf
sign of its cells; nodes are the cells with an open face plus the sdf > 0 cells.
Returns (labels over the grid, main label, component sizes, apertures, node mask).
Definition at line 88 of file pocket_pressure_probe.py.
Referenced by main().
| pocket_pressure_probe.outputs | ( | s, | |
| case, | |||
| scheme, | |||
| fluid | |||
| ) |
| pocket_pressure_probe.rel | ( | a, | |
| b, | |||
| scale | |||
| ) |
Definition at line 153 of file pocket_pressure_probe.py.
Referenced by main().
| pocket_pressure_probe.main | ( | ) |
Definition at line 157 of file pocket_pressure_probe.py.
References case_args(), components(), main(), mean(), outputs(), rel(), and run().
Referenced by main().
| pocket_pressure_probe.HERE = os.path.dirname(os.path.abspath(__file__)) |
Definition at line 42 of file pocket_pressure_probe.py.