|
flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
|
Variables | |
| int | CK = sys.argv[1] if len(sys.argv) > 1 else "runs/prod/ckpt.npz" |
| str | OUT = sys.argv[sys.argv.index("--out") + 1] if "--out" in sys.argv else "stats_now.npz" |
| z = np.load(CK) | |
| ny = int(z["ny"]) | |
| argv | |
| acc = R.new_acc() | |
| pr = R.profiles(acc) | |
| t = float(z["t"]) | |
| turnovers | |
| step | |
| grid | |
| utau | |
| int | j = R.NY // 2 |
| k = int(np.argmax(pr['u_liq'])) | |
Turn a `run_channel_18.py` CHECKPOINT into the profiles NPZ, without waiting for a chunk to end. The running sums live in the checkpoint (`acc_*`), so the campaign can be read at any moment — which is the point: `stats.npz` is only written when a chunk finishes, and a chunk is hours. python profiles_from_ckpt.py runs/prod/ckpt.npz [--out stats_now.npz] It reuses `run_channel_18.py`'s own `profiles()` so there is one definition of what the profiles are; that import needs `peclet.flow` on the path (any build — the transformation touches no solver state).
| int profiles_from_ckpt.CK = sys.argv[1] if len(sys.argv) > 1 else "runs/prod/ckpt.npz" |
Definition at line 18 of file profiles_from_ckpt.py.
| str profiles_from_ckpt.OUT = sys.argv[sys.argv.index("--out") + 1] if "--out" in sys.argv else "stats_now.npz" |
Definition at line 19 of file profiles_from_ckpt.py.
| profiles_from_ckpt.z = np.load(CK) |
Definition at line 21 of file profiles_from_ckpt.py.
| profiles_from_ckpt.ny = int(z["ny"]) |
Definition at line 22 of file profiles_from_ckpt.py.
| profiles_from_ckpt.argv |
Definition at line 23 of file profiles_from_ckpt.py.
| profiles_from_ckpt.acc = R.new_acc() |
Definition at line 27 of file profiles_from_ckpt.py.
| profiles_from_ckpt.pr = R.profiles(acc) |
Definition at line 36 of file profiles_from_ckpt.py.
| profiles_from_ckpt.t = float(z["t"]) |
Definition at line 37 of file profiles_from_ckpt.py.
| profiles_from_ckpt.turnovers |
Definition at line 39 of file profiles_from_ckpt.py.
| profiles_from_ckpt.step |
Definition at line 39 of file profiles_from_ckpt.py.
| profiles_from_ckpt.grid |
Definition at line 40 of file profiles_from_ckpt.py.
| profiles_from_ckpt.utau |
Definition at line 40 of file profiles_from_ckpt.py.
| int profiles_from_ckpt.j = R.NY // 2 |
Definition at line 46 of file profiles_from_ckpt.py.
| profiles_from_ckpt.k = int(np.argmax(pr['u_liq'])) |
Definition at line 48 of file profiles_from_ckpt.py.