|
flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
|
Functions | |
| arg (name, default, cast=str) | |
| run_static (rtol) | |
| run_hysing (rtol) | |
| run_column (rtol) | |
Variables | |
| A = list(sys.argv) | |
| OUT = arg("--out", "d1") | |
| CASES = arg("--cases", "static,hysing,column").split(",") | |
| list | RTOLS = [float(r) for r in arg("--rtols", "1e-10,1e-9,1e-8,1e-7,1e-6").split(",")] |
| NCOL = arg("--column-steps", 2000, int) | |
| CASE_DIR | |
| CKPT | |
| argv | |
| dict | RUN = {"static": run_static, "hysing": run_hysing, "column": run_column} |
| exist_ok | |
| flush | |
| path = os.path.join(OUT, f"{case}_rtol{rtol:.0e}.json") | |
| t0 = time.time() | |
| dict | res = RUN[case](rtol) |
D1 -- the pressure-tolerance study of doc/vof_step_performance_design.md sec. 5.12 (WO-0 starts
it, WO-13 analyses it). An instrument, not a gate: it records, it does not judge.
For every pressure-driver rtol in --rtols (default 1e-10 [reference], 1e-9, 1e-8, 1e-7, 1e-6; the
momentum solve follows the pressure driver's rtol by default) it runs up to three cases and writes
one JSON per (case, rtol) into --out:
static tests/study/vof_surface_tension.py's static droplet (all resolution rungs, 60 steps
each): max|u| per rung -> static_rtol<R>.json
hysing Hysing case 1 through the BLOCK path (tests/study/vof_blocks_ns.py run_hysing, nx 64,
T = 3): peak rise velocity, its time, final centroid, volume drift -> hysing_rtol<R>.json
column the bubble column from ckpt_t43, --column-steps steps (default 2000), MG-PCG at the
rtol, device flux constraint (the production protocol of run_peclet.py): per step dt,
pressure iterations, momentum residual and time (the Python API exposes no momentum
iteration count), max_open_divergence_projected(), every marker's volume and
x-velocity; every 50 steps run_peclet.sample() (gas volume, drift = rise speed)
-> column_rtol<R>.json
A (case, rtol) whose JSON already exists is skipped, so re-running resumes.
Usage:
PYTHONPATH=<flow build> OMP_NUM_THREADS=8 OMP_PROC_BIND=false \\
python tests/study/vof_perf/d1_tolerance.py --out DIR [--cases static,hysing,column]
[--rtols 1e-10,1e-9,1e-8,1e-7,1e-6] [--column-steps 2000] [--ckpt PATH] [--case-dir DIR]
| d1_tolerance.arg | ( | name, | |
| default, | |||
cast = str |
|||
| ) |
Definition at line 37 of file d1_tolerance.py.
| d1_tolerance.run_static | ( | rtol | ) |
Definition at line 60 of file d1_tolerance.py.
| d1_tolerance.run_hysing | ( | rtol | ) |
Definition at line 67 of file d1_tolerance.py.
| d1_tolerance.run_column | ( | rtol | ) |
Definition at line 75 of file d1_tolerance.py.
| d1_tolerance.A = list(sys.argv) |
Definition at line 34 of file d1_tolerance.py.
| d1_tolerance.OUT = arg("--out", "d1") |
Definition at line 41 of file d1_tolerance.py.
| d1_tolerance.CASES = arg("--cases", "static,hysing,column").split(",") |
Definition at line 42 of file d1_tolerance.py.
| list d1_tolerance.RTOLS = [float(r) for r in arg("--rtols", "1e-10,1e-9,1e-8,1e-7,1e-6").split(",")] |
Definition at line 43 of file d1_tolerance.py.
| d1_tolerance.NCOL = arg("--column-steps", 2000, int) |
Definition at line 44 of file d1_tolerance.py.
| d1_tolerance.CASE_DIR |
Definition at line 45 of file d1_tolerance.py.
| d1_tolerance.CKPT |
Definition at line 47 of file d1_tolerance.py.
| d1_tolerance.argv |
Definition at line 51 of file d1_tolerance.py.
| dict d1_tolerance.RUN = {"static": run_static, "hysing": run_hysing, "column": run_column} |
Definition at line 122 of file d1_tolerance.py.
| d1_tolerance.exist_ok |
Definition at line 123 of file d1_tolerance.py.
| d1_tolerance.flush |
Definition at line 124 of file d1_tolerance.py.
| d1_tolerance.path = os.path.join(OUT, f"{case}_rtol{rtol:.0e}.json") |
Definition at line 127 of file d1_tolerance.py.
| d1_tolerance.t0 = time.time() |
Definition at line 131 of file d1_tolerance.py.
| dict d1_tolerance.res = RUN[case](rtol) |
Definition at line 133 of file d1_tolerance.py.