|
flow
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
|
Functions | |
| run_sdflow () | |
| run_amr () | |
| compare () | |
Variables | |
| HERE = os.path.dirname(os.path.abspath(__file__)) | |
| int | N = int(sys.argv[2]) if len(sys.argv) > 2 else 16 |
| float | phi = 0.125 |
| mu | |
| f | |
| dt | |
| tuple | R = (phi * 3 / (4 * np.pi)) ** (1 / 3) * N |
| int | c = N / 2.0 |
| str | OUT = f"/tmp/cmp_{{}}_{N}.npy" |
| int | mode = sys.argv[1] if len(sys.argv) > 1 else "compare" |
Localize the ~1% sdflow-collocated vs AMR converged-k difference: run both on the SAME registration-matched SC sphere and compare the converged velocity fields cell-by-cell. Is the difference at the cut cells (projection/openness) or in the bulk (base operator)? sdflow and AMR each init Kokkos and one finalizes it, so they cannot share a process — each engine runs in its own subprocess (mode 'sdflow'/'amr') and writes its u-field to .npy; mode 'compare' (default) spawns both and diffs. sdflow cell (i,j,k) centre=(i,j,k); AMR origin=-0.5 puts leaf (i,j,k) centre at (i,j,k), so the grids coincide.
| compare_amr_sdflow_field.run_sdflow | ( | ) |
Definition at line 23 of file compare_amr_sdflow_field.py.
| compare_amr_sdflow_field.run_amr | ( | ) |
Definition at line 43 of file compare_amr_sdflow_field.py.
| compare_amr_sdflow_field.compare | ( | ) |
Definition at line 59 of file compare_amr_sdflow_field.py.
| compare_amr_sdflow_field.HERE = os.path.dirname(os.path.abspath(__file__)) |
Definition at line 14 of file compare_amr_sdflow_field.py.
| int compare_amr_sdflow_field.N = int(sys.argv[2]) if len(sys.argv) > 2 else 16 |
Definition at line 15 of file compare_amr_sdflow_field.py.
| float compare_amr_sdflow_field.phi = 0.125 |
Definition at line 16 of file compare_amr_sdflow_field.py.
| compare_amr_sdflow_field.mu |
Definition at line 17 of file compare_amr_sdflow_field.py.
| compare_amr_sdflow_field.f |
Definition at line 17 of file compare_amr_sdflow_field.py.
| compare_amr_sdflow_field.dt |
Definition at line 17 of file compare_amr_sdflow_field.py.
Definition at line 18 of file compare_amr_sdflow_field.py.
| int compare_amr_sdflow_field.c = N / 2.0 |
Definition at line 19 of file compare_amr_sdflow_field.py.
| str compare_amr_sdflow_field.OUT = f"/tmp/cmp_{{}}_{N}.npy" |
Definition at line 20 of file compare_amr_sdflow_field.py.
| int compare_amr_sdflow_field.mode = sys.argv[1] if len(sys.argv) > 1 else "compare" |
Definition at line 84 of file compare_amr_sdflow_field.py.