|
flow 1.4.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
|
Functions | |
| rho_of (C) | |
| face_rho (C, c) | |
| put (path, a) | |
| get (path, n) | |
| main () | |
Variables | |
| HERE = os.path.dirname(os.path.abspath(__file__)) | |
| FLOW = os.path.abspath(os.path.join(HERE, "..", "..", "..")) | |
Case A Q6 diagnosis, lead L2: the density the vof_momentum predictor puts on the advected momentum.
Under enable_vof_momentum the momentum rho^e u_e is carried on the half-shifted control volume (CV)
with its own colour C^e, and the advected velocity is uAdv = (rho^e u)/rho^e. The predictor then
builds its time term as rhoF * uAdv with rhoF = 0.5 (rho(C_i) + rho(C_i-1)), the arithmetic face
mean of the CELL densities at n+1 (flow_ibm_project.hpp buildRhsVarMom), not rho^e. Per step the
momentum the projection conserves, P_f = sum rhoF u, therefore changes by two reinterpretations:
SEED sum rho(C^{e,n}) u^n - sum rhoF^n u^n (advection start: C^e clipped from the C^n planes)
PRED sum (rhoF^{n+1} - rho^{e,n+1}) uAdv (predictor: the brief's L2 term)
and the advection itself conserves sum rho^e u exactly (periodic box). Both are reported as a mean
force density in units of <rho> g (sum / (n^3 dt <rho> g)), next to the closure's a/g, which must
cancel every net momentum source at steady state (G5 probe_budget.py; a/g = s / dt / g).
The march is the case-A driver's (run_case_a.build, full stress, single colour, vof_momentum).
PRED and SEED need only Python accessors (vof_advected_velocity, vof_momentum_diagnostics).
The FACE-WISE mismatch |rhoF - rho^e| / rho_l needs C^e, which is not exposed: each probe step is
replayed by vofmom_probe (C++, the same MomentumConsistentAdvector on the dumped C^n, u^n), and the
replay is accepted only if its uAdv and C^{n+1} match the solver's.
Usage (host):
cmake -S tests/study/case_a/vofmom_probe -B build_vofmom_probe \\
-DCMAKE_PREFIX_PATH=$PWD/../extern/install/host-openmp && cmake --build build_vofmom_probe
OMP_NUM_THREADS=8 OMP_PROC_BIND=false PYTHONPATH=$PWD/build_host \\
python tests/study/case_a/probe_vofmom_rho.py --d-over-h 20 --t-probe 12 --out DIR
Prints one summary line; DIR/steps.csv (one row per probe step), DIR/summary.txt.
| probe_vofmom_rho.rho_of | ( | C | ) |
Definition at line 43 of file probe_vofmom_rho.py.
Referenced by face_rho(), and main().
| probe_vofmom_rho.face_rho | ( | C, | |
| c ) |
The predictor's rhoF: inner u_c[i] is the low face of cell i, pairs cells i-1 and i.
Definition at line 47 of file probe_vofmom_rho.py.
References rho_of().
Referenced by main().
| probe_vofmom_rho.put | ( | path, | |
| a ) |
Definition at line 53 of file probe_vofmom_rho.py.
Referenced by main().
| probe_vofmom_rho.get | ( | path, | |
| n ) |
Definition at line 57 of file probe_vofmom_rho.py.
Referenced by main().
| probe_vofmom_rho.main | ( | ) |
Definition at line 61 of file probe_vofmom_rho.py.
References face_rho(), get(), main(), put(), and rho_of().
Referenced by main().
| probe_vofmom_rho.HERE = os.path.dirname(os.path.abspath(__file__)) |
Definition at line 39 of file probe_vofmom_rho.py.
| probe_vofmom_rho.FLOW = os.path.abspath(os.path.join(HERE, "..", "..", "..")) |
Definition at line 40 of file probe_vofmom_rho.py.