|
flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
|
Classes | |
| class | Health |
Functions | |
| box2d (px, pz, xlo, xhi, zlo, zhi) | |
| doublet_sdf () | |
| build (theta_deg, U, momentum=True, slip=0.0) | |
| _run_end (mask) | |
| fronts (C, eps) | |
| run (theta_deg, ca, steps, sample_every, label, momentum=True, budget=None, slip=0.0) | |
| main () | |
Variables | |
| NX | |
| NY | |
| PLEN_IN | |
| BRANCH | |
| PLEN_OUT | |
| W_NARROW | |
| W_WIDE | |
| Z_WALL_BOT | |
| Z_SEPT | |
| Z_WALL_TOP | |
| float | WALL_SHIFT = 0.25 |
| NZ = Z_WALL_BOT + W_WIDE + Z_SEPT + W_NARROW + Z_WALL_TOP | |
| X1 | |
| X2 | |
| ZW_LO | |
| ZW_HI | |
| ZN_LO | |
| ZN_HI | |
| float | SIGMA = 100.0 |
| RHO_L | |
| RHO_G | |
| MU_L | |
| MU_G | |
| float | CAP_CFL = 0.5 |
| int | PRESS_CAP = 400 |
| str | NPY_DIR = "" |
| int | PRESS_RTOL = 1e-8 |
| int | MG_LEVELS = 5 |
| int | VEL_SWEEPS = 20 |
WO-V7 case 1 — the PORE DOUBLET: which branch fills first, and when.
Two straight channels of width `w` and `2w` leave a common inlet plenum and rejoin in a common
outlet plenum. Liquid is injected at the inlet face at a fixed uniform velocity `U`; the doublet
is gas-filled at t = 0. The question is the classical one (Chatzis & Dullien, *J. Can. Pet.
Tech.* 22:97, 1983; Moore & Slobod 1956): **which branch does the liquid fill first?**
capillary-dominated (Ca -> 0), WETTING invasion (theta < 90): the NARROW branch, because the
driving capillary pressure 2 sigma cos(theta)/w is larger there;
capillary-dominated, NON-WETTING invasion (theta > 90): the WIDE branch, because the
*resisting* entry pressure |2 sigma cos(theta)|/w is smaller there;
viscous-dominated (Ca -> large): the WIDE branch in BOTH cases, because a slit's hydraulic
conductance goes as w^3.
So the wetting sweep is the discriminating one: it must INVERT between low and high Ca, while the
non-wetting sweep must NOT (both limits pick the wide branch).
CONVENTIONS AND CAVEATS, stated on every run (WO-V7 preamble):
* the contact angle is the STATIC V5b fill. The V6 dynamic angle is qualitative until V6b adds
the velocity-side Navier slip, so the capillary numbers below are **apparent**: they are
mu_l * U_inlet / sigma with U_inlet the prescribed superficial inlet velocity, not a measured
contact-line speed.
* density ratio 100. Higher is not rated: V2b's uniform-velocity identity is floored at 1.2e-7
by the solver's FLOAT momentum-operator storage, and WO-R's G3 gas-over-pool caveat (a pool at
ratio 1000 picks up 3e-2 of the inlet speed) is unresolved.
* no periodic net body force anywhere (VOF_PLAN 13.2 item 6): the drive is an inflow/outflow pair.
* the solid is kept clear of the inflow and outflow planes (flow's open-BC/cut-cell defect,
`doc/cutcell_openbc_convergence.md`).
* a run whose pressure solve touches its cap is INVALID and is reported as such (rule 3b).
Usage:
PYTHONPATH=$PWD/build_cuda python tests/study/pore_scale/pore_doublet.py [--quick]
[--theta 45,135] [--ca 1e-4,1e-3,1e-2]
| pore_doublet.box2d | ( | px, | |
| pz, | |||
| xlo, | |||
| xhi, | |||
| zlo, | |||
| zhi | |||
| ) |
Exact signed distance (outside) to an axis-aligned box in the (x, z) plane.
Definition at line 77 of file pore_doublet.py.
Referenced by doublet_sdf().
| pore_doublet.doublet_sdf | ( | ) |
> 0 in the fluid (flow's convention). Three solid boxes, all clear of x = 0 and x = NX.
Definition at line 86 of file pore_doublet.py.
References box2d().
Referenced by build().
| pore_doublet.build | ( | theta_deg, | |
| U, | |||
momentum = True, |
|||
slip = 0.0 |
|||
| ) |
Definition at line 122 of file pore_doublet.py.
References doublet_sdf().
|
protected |
Length of the run of True that starts at index 0 (0 if the first entry is False).
Definition at line 165 of file pore_doublet.py.
Referenced by fronts().
| pore_doublet.fronts | ( | C, | |
| eps | |||
| ) |
Two front positions per branch, in cells from the branch entrance X1, plus the branch
liquid saturation.
`tip` the leading edge: the last x, contiguous from the entrance, at which ANY cell of the
cross-section is more than half liquid.
`bar` the cross-section-AVERAGED front: the last x, contiguous from the entrance, at which the
openness-weighted mean colour of the cross-section exceeds a half.
Both are reported because they differ by the length of the meniscus, and that length scales
with the CHANNEL WIDTH: at theta = 135 the meniscus in the 32-cell branch is about twice as
long as in the 16-cell one, so `bar` alone carries a systematic bias of order w/2 in favour of
the NARROW branch. Breakthrough is declared on `tip`, which has no such bias.
Definition at line 171 of file pore_doublet.py.
References _run_end().
Referenced by run().
| pore_doublet.run | ( | theta_deg, | |
| ca, | |||
| steps, | |||
| sample_every, | |||
| label, | |||
momentum = True, |
|||
budget = None, |
|||
slip = 0.0 |
|||
| ) |
| pore_doublet.main | ( | ) |
| pore_doublet.NX |
Definition at line 48 of file pore_doublet.py.
| pore_doublet.NY |
Definition at line 48 of file pore_doublet.py.
| pore_doublet.PLEN_IN |
Definition at line 49 of file pore_doublet.py.
| pore_doublet.BRANCH |
Definition at line 49 of file pore_doublet.py.
| pore_doublet.PLEN_OUT |
Definition at line 49 of file pore_doublet.py.
| pore_doublet.W_NARROW |
Definition at line 50 of file pore_doublet.py.
| pore_doublet.W_WIDE |
Definition at line 50 of file pore_doublet.py.
| pore_doublet.Z_WALL_BOT |
Definition at line 51 of file pore_doublet.py.
| pore_doublet.Z_SEPT |
Definition at line 51 of file pore_doublet.py.
| pore_doublet.Z_WALL_TOP |
Definition at line 51 of file pore_doublet.py.
| float pore_doublet.WALL_SHIFT = 0.25 |
Definition at line 59 of file pore_doublet.py.
| pore_doublet.NZ = Z_WALL_BOT + W_WIDE + Z_SEPT + W_NARROW + Z_WALL_TOP |
Definition at line 60 of file pore_doublet.py.
| pore_doublet.X1 |
Definition at line 61 of file pore_doublet.py.
| pore_doublet.X2 |
Definition at line 61 of file pore_doublet.py.
| pore_doublet.ZW_LO |
Definition at line 62 of file pore_doublet.py.
| pore_doublet.ZW_HI |
Definition at line 62 of file pore_doublet.py.
| pore_doublet.ZN_LO |
Definition at line 63 of file pore_doublet.py.
| pore_doublet.ZN_HI |
Definition at line 63 of file pore_doublet.py.
| float pore_doublet.SIGMA = 100.0 |
Definition at line 66 of file pore_doublet.py.
| pore_doublet.RHO_L |
Definition at line 67 of file pore_doublet.py.
| pore_doublet.RHO_G |
Definition at line 67 of file pore_doublet.py.
| pore_doublet.MU_L |
Definition at line 68 of file pore_doublet.py.
| pore_doublet.MU_G |
Definition at line 68 of file pore_doublet.py.
| float pore_doublet.CAP_CFL = 0.5 |
Definition at line 69 of file pore_doublet.py.
| int pore_doublet.PRESS_CAP = 400 |
Definition at line 70 of file pore_doublet.py.
| str pore_doublet.NPY_DIR = "" |
Definition at line 71 of file pore_doublet.py.
| int pore_doublet.PRESS_RTOL = 1e-8 |
Definition at line 72 of file pore_doublet.py.
| int pore_doublet.MG_LEVELS = 5 |
Definition at line 73 of file pore_doublet.py.
| int pore_doublet.VEL_SWEEPS = 20 |
Definition at line 74 of file pore_doublet.py.