|
flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
|
Classes | |
| class | Scale |
Functions | |
| cylinder_fractions (shape, R, cx, cz, sub=32) | |
| sphere_fractions (shape, R, c, sub=24) | |
| bubble_colour_sub (nx, nz, R, cz, sub=4) | |
| bed_sdf (centres, nx, nz, Rg, periodic_xy=True) | |
| rsa_bed (n, W, R, z0, seed, gap=0.02) | |
| cached (name, fn) | |
| set_dt (s, dt) | |
| profile (s, nsteps, pick_dt, cap, label, extra=None) | |
| dt_from_limits (frac=0.4) | |
| case_hysing1 (nx=64, momentum=True, worklist=True) | |
| case_packed (nx=64, nz=160, worklist=True) | |
| case_trickle (nx=48, nz=96, worklist=True) | |
| case_droplet (n=128, worklist=True) | |
| case_scriven (n=96, ja=0.5, ratio=10.0, r0=6.0, worklist=True) | |
| show (tm) | |
| main () | |
Variables | |
| HERE = os.path.dirname(os.path.abspath(__file__)) | |
| CACHE = os.environ.get("VOF_PROFILE_CACHE", os.path.join(HERE, ".vof_profile_cache")) | |
| dict | _LAST_DT = {"dt": 0.0} |
| HYSING1 = dict(rho1=1000.0, rho2=100.0, mu1=10.0, mu2=1.0, g=0.98, sigma=24.5) | |
| dict | CASES |
WO-V9 — the VoF performance profile: where a two-phase step actually goes.
Five cases, transcribed from the gallery drivers so the profile is of the code people run:
hysing1 Hysing et al. (2009) case 1, quasi-2D 64 x 4 x 128 (examples/rising-bubble)
packed the E7 packed column, 64 x 64 x 160, bubble + bed (examples/bubble-through-packing)
trickle the E6 trickle bed, 48 x 48 x 96, liquid distributor (examples/trickle-flow-packing)
droplet a 128^3 static droplet (examples/parasitic-currents)
scriven a 96^3 Scriven bubble, phase change (tests/study/vof_scriven.py)
Each case runs `--warm` steps to fill caches and settle the adaptive dt, then `--steps` TIMED
steps with `set_vof_timing(True)`. Reported: the step's three coarse phases (predictor / momentum
solve / projection), the VoF stages (colour advection with its bridges split out, curvature, CSF,
phase change), the advector's own kernels (reconstruct / fluxes / sweeps / clip / g=3 exchange),
ms/step and the dt census (which of the two explicit limits binds).
Rule 3b: every case records max pressure iterations against its cap; a capped solve is flagged.
Usage:
PYTHONPATH=$PWD/build_cuda python tests/study/vof_profile.py --case all
PYTHONPATH=$PWD/build_cuda python tests/study/vof_profile.py --case hysing1 --worklist off
| vof_profile.cylinder_fractions | ( | shape, | |
| R, | |||
| cx, | |||
| cz, | |||
sub = 32 |
|||
| ) |
Volume fraction of a cylinder with its axis along y (a 2-D disc), exact in z.
Definition at line 40 of file vof_profile.py.
References mean().
| vof_profile.sphere_fractions | ( | shape, | |
| R, | |||
| c, | |||
sub = 24 |
|||
| ) |
Liquid volume fraction of a sphere: exact in z, sub x sub subsampled in (x,y).
Definition at line 53 of file vof_profile.py.
References mean().
| vof_profile.bubble_colour_sub | ( | nx, | |
| nz, | |||
| R, | |||
| cz, | |||
sub = 4 |
|||
| ) |
C = liquid fraction; the gas bubble is the C = 0 sphere at (nx/2, nx/2, cz).
Definition at line 68 of file vof_profile.py.
Referenced by case_packed().
| vof_profile.bed_sdf | ( | centres, | |
| nx, | |||
| nz, | |||
| Rg, | |||
periodic_xy = True |
|||
| ) |
Signed distance to a union of spheres, positive in the fluid; periodic in x and y.
Definition at line 86 of file vof_profile.py.
Referenced by case_packed(), and case_trickle().
| vof_profile.rsa_bed | ( | n, | |
| W, | |||
| R, | |||
| z0, | |||
| seed, | |||
gap = 0.02 |
|||
| ) |
A deterministic random-sequential-addition sphere bed in a laterally periodic column. A stand-in for the gallery pages' DEM-settled packings: same grain radius, same column, same number of grains, and no `dem` import (which would put two Kokkos backends in one process). The PROFILE does not depend on which loose packing it is -- only on the cut-cell count, which is set by the grain count and radius.
Definition at line 103 of file vof_profile.py.
Referenced by case_packed(), and case_trickle().
| vof_profile.cached | ( | name, | |
| fn | |||
| ) |
Definition at line 131 of file vof_profile.py.
Referenced by case_droplet(), case_packed(), case_scriven(), and case_trickle().
| vof_profile.set_dt | ( | s, | |
| dt | |||
| ) |
Every picker goes through this so the harness can halve a rejected step's dt.
Definition at line 145 of file vof_profile.py.
Referenced by case_droplet(), case_scriven(), case_trickle(), dt_from_limits(), and profile().
| vof_profile.profile | ( | s, | |
| nsteps, | |||
| pick_dt, | |||
| cap, | |||
| label, | |||
extra = None |
|||
| ) |
`pick_dt(s, i)` sets dt for step i and returns which limit bound it ('cfl'|'cap'|'fixed').
Definition at line 149 of file vof_profile.py.
References set_dt().
Referenced by main().
| vof_profile.dt_from_limits | ( | frac = 0.4 | ) |
Definition at line 188 of file vof_profile.py.
References set_dt().
Referenced by case_hysing1(), and case_packed().
| vof_profile.case_hysing1 | ( | nx = 64, |
|
momentum = True, |
|||
worklist = True |
|||
| ) |
Definition at line 217 of file vof_profile.py.
References dt_from_limits().
| vof_profile.case_packed | ( | nx = 64, |
|
nz = 160, |
|||
worklist = True |
|||
| ) |
E7: a gas bubble released under a sphere bed in a closed, laterally periodic column.
Definition at line 246 of file vof_profile.py.
References bed_sdf(), bubble_colour_sub(), cached(), dt_from_limits(), and rsa_bed().
| vof_profile.case_trickle | ( | nx = 48, |
|
nz = 96, |
|||
worklist = True |
|||
| ) |
| vof_profile.case_droplet | ( | n = 128, |
|
worklist = True |
|||
| ) |
A stationary droplet, D/dx = n/2, in an n^3 periodic box (the parasitic-currents case).
Definition at line 336 of file vof_profile.py.
| vof_profile.case_scriven | ( | n = 96, |
|
ja = 0.5, |
|||
ratio = 10.0, |
|||
r0 = 6.0, |
|||
worklist = True |
|||
| ) |
WO-P23 rung P3: a Scriven bubble growing in superheated liquid (the phase-change pipeline).
Definition at line 362 of file vof_profile.py.
| vof_profile.show | ( | tm | ) |
Definition at line 427 of file vof_profile.py.
Referenced by main().
| vof_profile.main | ( | ) |
| vof_profile.HERE = os.path.dirname(os.path.abspath(__file__)) |
Definition at line 35 of file vof_profile.py.
| vof_profile.CACHE = os.environ.get("VOF_PROFILE_CACHE", os.path.join(HERE, ".vof_profile_cache")) |
Definition at line 36 of file vof_profile.py.
|
protected |
Definition at line 142 of file vof_profile.py.
| vof_profile.HYSING1 = dict(rho1=1000.0, rho2=100.0, mu1=10.0, mu2=1.0, g=0.98, sigma=24.5) |
Definition at line 214 of file vof_profile.py.
| dict vof_profile.CASES |
Definition at line 418 of file vof_profile.py.