flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
Loading...
Searching...
No Matches
pore_doublet Namespace Reference

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
 

Detailed Description

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]

Function Documentation

◆ box2d()

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().

◆ 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().

◆ build()

pore_doublet.build (   theta_deg,
  U,
  momentum = True,
  slip = 0.0 
)

Definition at line 122 of file pore_doublet.py.

References doublet_sdf().

◆ _run_end()

pore_doublet._run_end (   mask)
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().

◆ 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().

◆ run()

pore_doublet.run (   theta_deg,
  ca,
  steps,
  sample_every,
  label,
  momentum = True,
  budget = None,
  slip = 0.0 
)

Definition at line 198 of file pore_doublet.py.

References fronts().

Referenced by main().

◆ main()

pore_doublet.main ( )

Definition at line 338 of file pore_doublet.py.

References main(), and run().

Referenced by main().

Variable Documentation

◆ NX

pore_doublet.NX

Definition at line 48 of file pore_doublet.py.

◆ NY

pore_doublet.NY

Definition at line 48 of file pore_doublet.py.

◆ PLEN_IN

pore_doublet.PLEN_IN

Definition at line 49 of file pore_doublet.py.

◆ BRANCH

pore_doublet.BRANCH

Definition at line 49 of file pore_doublet.py.

◆ PLEN_OUT

pore_doublet.PLEN_OUT

Definition at line 49 of file pore_doublet.py.

◆ W_NARROW

pore_doublet.W_NARROW

Definition at line 50 of file pore_doublet.py.

◆ W_WIDE

pore_doublet.W_WIDE

Definition at line 50 of file pore_doublet.py.

◆ Z_WALL_BOT

pore_doublet.Z_WALL_BOT

Definition at line 51 of file pore_doublet.py.

◆ Z_SEPT

pore_doublet.Z_SEPT

Definition at line 51 of file pore_doublet.py.

◆ Z_WALL_TOP

pore_doublet.Z_WALL_TOP

Definition at line 51 of file pore_doublet.py.

◆ WALL_SHIFT

float pore_doublet.WALL_SHIFT = 0.25

Definition at line 59 of file pore_doublet.py.

◆ NZ

pore_doublet.NZ = Z_WALL_BOT + W_WIDE + Z_SEPT + W_NARROW + Z_WALL_TOP

Definition at line 60 of file pore_doublet.py.

◆ X1

pore_doublet.X1

Definition at line 61 of file pore_doublet.py.

◆ X2

pore_doublet.X2

Definition at line 61 of file pore_doublet.py.

◆ ZW_LO

pore_doublet.ZW_LO

Definition at line 62 of file pore_doublet.py.

◆ ZW_HI

pore_doublet.ZW_HI

Definition at line 62 of file pore_doublet.py.

◆ ZN_LO

pore_doublet.ZN_LO

Definition at line 63 of file pore_doublet.py.

◆ ZN_HI

pore_doublet.ZN_HI

Definition at line 63 of file pore_doublet.py.

◆ SIGMA

float pore_doublet.SIGMA = 100.0

Definition at line 66 of file pore_doublet.py.

◆ RHO_L

pore_doublet.RHO_L

Definition at line 67 of file pore_doublet.py.

◆ RHO_G

pore_doublet.RHO_G

Definition at line 67 of file pore_doublet.py.

◆ MU_L

pore_doublet.MU_L

Definition at line 68 of file pore_doublet.py.

◆ MU_G

pore_doublet.MU_G

Definition at line 68 of file pore_doublet.py.

◆ CAP_CFL

float pore_doublet.CAP_CFL = 0.5

Definition at line 69 of file pore_doublet.py.

◆ PRESS_CAP

int pore_doublet.PRESS_CAP = 400

Definition at line 70 of file pore_doublet.py.

◆ NPY_DIR

str pore_doublet.NPY_DIR = ""

Definition at line 71 of file pore_doublet.py.

◆ PRESS_RTOL

int pore_doublet.PRESS_RTOL = 1e-8

Definition at line 72 of file pore_doublet.py.

◆ MG_LEVELS

int pore_doublet.MG_LEVELS = 5

Definition at line 73 of file pore_doublet.py.

◆ VEL_SWEEPS

int pore_doublet.VEL_SWEEPS = 20

Definition at line 74 of file pore_doublet.py.