|
flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
|
Classes | |
| class | Health |
Functions | |
| posts (seed=3) | |
| post_sdf (P) | |
| box_dimension (mask, sizes=(1, 2, 4, 8, 16, 32)) | |
| front_stats (inv) | |
| run (theta_deg, ca, sdf, steps, budget=None, npy_dir="") | |
| main () | |
Variables | |
| NX | |
| NY | |
| NZ | |
| NCOL | |
| NROW | |
| X0 | |
| DX | |
| DY = NY / NROW | |
| float | R_POST = 6.5 |
| float | JITTER = 1.5 |
| float | MIN_GAP = 6.0 |
| float | X_IN = 10.0 |
| float | X_BT = 118.0 |
| float | SIGMA = 100.0 |
| RHO_L | |
| RHO_G | |
| MU_L | |
| MU_G | |
| float | CAP_CFL = 0.5 |
| int | PRESS_CAP = 400 |
| int | PRESS_RTOL = 1e-8 |
| int | MG_LEVELS = 5 |
| int | VEL_SWEEPS = 20 |
WO-V7 case 3 — a ZHAO-2019-STYLE 2-D MICROMODEL: wettability and the invasion pattern.
A disordered array of ~56 SDF cylinders (a jittered lattice of posts, the geometry class Zhao,
MacMinn & Juanes, *PNAS* 116:13799 (2019) used) fills a quasi-2D cell that is gas-filled at t = 0.
Liquid is injected through the -x face at a fixed capillary number and leaves at +x. The sweep is
over the contact angle only: theta = 45 (imbibition), 90 (neutral), 135 (drainage).
Zhao et al.'s qualitative result, which this page reproduces or fails to:
**wettability controls the pattern**. Strong imbibition gives a COMPACT, high-saturation
displacement (cooperative pore filling, corner films run ahead); drainage gives a FINGERED,
low-saturation one (capillary fingering / invasion percolation). The quantitative read-outs are
the saturation at breakthrough and the box-counting fractal dimension of the invaded region.
CONVENTIONS AND CAVEATS (WO-V7 preamble; stated on every run):
* STATIC contact angle (V5b). Ca is APPARENT: mu_l U_inlet / sigma.
* density ratio 100; inflow/outflow (never a periodic net force); the posts are clear of both
open faces; a capped pressure solve makes the run INVALID.
* **corner films are NOT represented.** VOF_PLAN 4/V7 names this as the lesson to design
against: the strong-imbibition end of Zhao's benchmark is decided by films in the corners of
the posts, which a 5.7-cell-radius post on a unit-spacing grid cannot resolve. Expect the
compact/fingered TREND, not the saturations.
Usage:
PYTHONPATH=$PWD/build_cuda python tests/study/pore_scale/micromodel_2d.py [--quick]
[--theta 45,90,135] [--ca 1e-3] [--budget 1800] [--npy DIR]
| micromodel_2d.posts | ( | seed = 3 | ) |
A staggered lattice of post centres with bounded jitter, rejected until every pair is at least MIN_GAP apart at the surfaces (y periodic).
Definition at line 74 of file micromodel_2d.py.
References mean().
Referenced by main().
| micromodel_2d.post_sdf | ( | P | ) |
Definition at line 95 of file micromodel_2d.py.
Referenced by main().
| micromodel_2d.box_dimension | ( | mask, | |
sizes = (1, 2, 4, 8, 16, 32) |
|||
| ) |
Box-counting dimension of a 2-D boolean set; returns (D, [(eps, N)]).
Definition at line 134 of file micromodel_2d.py.
Referenced by run().
| micromodel_2d.front_stats | ( | inv | ) |
Roughness of the invasion front, the discriminator Zhao's experiment is really about. `inv` is the boolean invaded set of the array region in the mid-plane, indexed (x, y). For every transverse row y that the liquid reached, the front is the furthest x it reached; the MEAN of that is how far the displacement has got and its STANDARD DEVIATION is how ragged it is. A compact (cooperative-filling) displacement has a small std and reaches every row; a fingered one has a large std, a large max/mean ratio, and leaves rows untouched.
Definition at line 151 of file micromodel_2d.py.
References mean().
Referenced by run().
| micromodel_2d.run | ( | theta_deg, | |
| ca, | |||
| sdf, | |||
| steps, | |||
budget = None, |
|||
npy_dir = "" |
|||
| ) |
Definition at line 171 of file micromodel_2d.py.
References box_dimension(), front_stats(), mean(), and slice().
Referenced by main().
| micromodel_2d.main | ( | ) |
Definition at line 306 of file micromodel_2d.py.
References main(), mean(), post_sdf(), posts(), and run().
Referenced by main().
| micromodel_2d.NX |
Definition at line 40 of file micromodel_2d.py.
| micromodel_2d.NY |
Definition at line 40 of file micromodel_2d.py.
| micromodel_2d.NZ |
Definition at line 40 of file micromodel_2d.py.
| micromodel_2d.NCOL |
Definition at line 54 of file micromodel_2d.py.
| micromodel_2d.NROW |
Definition at line 54 of file micromodel_2d.py.
| micromodel_2d.X0 |
Definition at line 55 of file micromodel_2d.py.
| micromodel_2d.DX |
Definition at line 55 of file micromodel_2d.py.
Definition at line 56 of file micromodel_2d.py.
| float micromodel_2d.R_POST = 6.5 |
Definition at line 57 of file micromodel_2d.py.
| float micromodel_2d.JITTER = 1.5 |
Definition at line 58 of file micromodel_2d.py.
| float micromodel_2d.MIN_GAP = 6.0 |
Definition at line 59 of file micromodel_2d.py.
| float micromodel_2d.X_IN = 10.0 |
Definition at line 61 of file micromodel_2d.py.
| float micromodel_2d.X_BT = 118.0 |
Definition at line 62 of file micromodel_2d.py.
| float micromodel_2d.SIGMA = 100.0 |
Definition at line 64 of file micromodel_2d.py.
| micromodel_2d.RHO_L |
Definition at line 65 of file micromodel_2d.py.
| micromodel_2d.RHO_G |
Definition at line 65 of file micromodel_2d.py.
| micromodel_2d.MU_L |
Definition at line 66 of file micromodel_2d.py.
| micromodel_2d.MU_G |
Definition at line 66 of file micromodel_2d.py.
| float micromodel_2d.CAP_CFL = 0.5 |
Definition at line 67 of file micromodel_2d.py.
| int micromodel_2d.PRESS_CAP = 400 |
Definition at line 68 of file micromodel_2d.py.
| int micromodel_2d.PRESS_RTOL = 1e-8 |
Definition at line 69 of file micromodel_2d.py.
| int micromodel_2d.MG_LEVELS = 5 |
Definition at line 70 of file micromodel_2d.py.
| int micromodel_2d.VEL_SWEEPS = 20 |
Definition at line 71 of file micromodel_2d.py.