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

Classes

class  Scale
 
class  Solve
 

Functions

 maxvel (s)
 
 sphere_fractions (shape, R, c, sub=24)
 
 cylinder_fractions (shape, R, cx, cz, sub=32)
 
 zero_crossings (t, y)
 
 gate_static ()
 
 gate_wave ()
 
 gate_lamb ()
 
 gate_hysing (case=1, nx=64)
 
 gate_falling ()
 
 gate_limits ()
 

Variables

str QUICK = "--quick" in sys.argv
 
str RTOL = float(sys.argv[sys.argv.index("--rtol") + 1]) if "--rtol" in sys.argv else None
 
list GATES
 
list STATIC_RESULTS = []
 
dict HYSING
 
dict ALL
 
list run = GATES or list(ALL)
 

Detailed Description

VoF rung V4 (WO-P) — the balanced-force CSF physics battery.

The *algebraic* gates of this rung (the exactness gate, the operator ablation, Young-Laplace,
the capillary dt, inertness, the wisp guard) live in `tests/kokkos/test_vof_surface_tension.cpp`
and run in the ctest. What is here is the PHYSICS: the cases where surface tension has to produce
a number somebody else has already published.

    static      spurious currents of a stationary droplet: Ca = mu max|u| / sigma vs resolution,
                and the wisp-guard ablation at a resolution where it is destructive.
    wave        a small-amplitude standing capillary wave against the analytical dispersion
                relation omega^2 = sigma k^3 / (rho1 + rho2) and the 2 nu k^2 viscous decay rate
                (Prosperetti 1981; Popinet 2009 section 4.2).
    lamb        a droplet oscillating in mode n = 2 against Lamb's (1932, art. 275) frequency
                omega^2 = n(n-1)(n+1)(n+2) sigma / (R^3 ((n+1) rho_in + n rho_out)), AND (2026-09-02)
                the exact viscous mode of vof_capillary_references.py.
    hysing      the Hysing et al. (IJNMF 60:1259, 2009) rising-bubble benchmark, both cases,
                against the published reference quantities. READ THE CAVEAT it prints.
    falling     the falling-drop terminal velocity WO-K had to defer, re-run WITH surface tension
                and with the momentum solve driven to a tolerance instead of a fixed sweep count.
    limits      step economics: does the capillary dt or the Weymouth-Yue CFL bind, and at what
                cost in steps?

UNITS. The solver's cell size is 1 and its time unit is the physical second, so a physical
problem of size L on nx cells is mapped with s = nx / L cells per unit length:

    rho' = rho    mu' = s^2 mu    sigma' = s^3 sigma    (rho g)' = s rho g    u' = s u    t' = t

(derived by substituting x = x'/s, u = u'/s, t = t' into the momentum equation and requiring
every term to scale alike; `Scale` below is that map, and every case states its physical numbers).

EVERY gate that reports a functional records the max pressure-iteration count against its cap and
the flux divergence, and marks a capped run INVALID rather than merely flagging it (shared
preamble rule 3b).

Usage:  PYTHONPATH=<build> python tests/study/vof_surface_tension.py [gate ...] [--quick]

Function Documentation

◆ maxvel()

vof_surface_tension.maxvel (   s)

Definition at line 82 of file vof_surface_tension.py.

Referenced by gate_static().

◆ sphere_fractions()

vof_surface_tension.sphere_fractions (   shape,
  R,
  c,
  sub = 24 
)
Volume fractions of a sphere: exact in z, sub x sub subsampled in (x,y).

Definition at line 108 of file vof_surface_tension.py.

References mean().

◆ cylinder_fractions()

vof_surface_tension.cylinder_fractions (   shape,
  R,
  cx,
  cz,
  sub = 32 
)
Volume fractions of a cylinder with its axis along y (a 2-D disc), exact in z.

Definition at line 123 of file vof_surface_tension.py.

References mean().

◆ zero_crossings()

vof_surface_tension.zero_crossings (   t,
  y 
)
Times of the sign changes of y (linear interpolation).

Definition at line 137 of file vof_surface_tension.py.

Referenced by gate_lamb(), and gate_wave().

◆ gate_static()

vof_surface_tension.gate_static ( )

Definition at line 149 of file vof_surface_tension.py.

References maxvel().

◆ gate_wave()

vof_surface_tension.gate_wave ( )

Definition at line 218 of file vof_surface_tension.py.

References zero_crossings().

◆ gate_lamb()

vof_surface_tension.gate_lamb ( )

Definition at line 301 of file vof_surface_tension.py.

References mean(), and zero_crossings().

◆ gate_hysing()

vof_surface_tension.gate_hysing (   case = 1,
  nx = 64 
)

Definition at line 396 of file vof_surface_tension.py.

◆ gate_falling()

vof_surface_tension.gate_falling ( )

Definition at line 489 of file vof_surface_tension.py.

References run.

◆ gate_limits()

vof_surface_tension.gate_limits ( )

Definition at line 586 of file vof_surface_tension.py.

Variable Documentation

◆ QUICK

str vof_surface_tension.QUICK = "--quick" in sys.argv

Definition at line 49 of file vof_surface_tension.py.

◆ RTOL

str vof_surface_tension.RTOL = float(sys.argv[sys.argv.index("--rtol") + 1]) if "--rtol" in sys.argv else None

Definition at line 53 of file vof_surface_tension.py.

◆ GATES

list vof_surface_tension.GATES
Initial value:
1= [a for i, a in enumerate(sys.argv[1:], 1)
2 if not a.startswith("--") and sys.argv[i - 1] != "--rtol"]

Definition at line 54 of file vof_surface_tension.py.

◆ STATIC_RESULTS

list vof_surface_tension.STATIC_RESULTS = []

Definition at line 56 of file vof_surface_tension.py.

◆ HYSING

dict vof_surface_tension.HYSING
Initial value:
1= {
2 1: dict(rho1=1000.0, rho2=100.0, mu1=10.0, mu2=1.0, g=0.98, sigma=24.5,
3 ref_vmax=0.2417, ref_tvmax=0.9215, ref_yc=1.081, ref_circ=0.9013),
4 2: dict(rho1=1000.0, rho2=1.0, mu1=10.0, mu2=0.1, g=0.98, sigma=1.96,
5 ref_vmax=0.2502, ref_tvmax=0.7317, ref_yc=1.1376, ref_circ=0.5869),
6}

Definition at line 388 of file vof_surface_tension.py.

◆ ALL

dict vof_surface_tension.ALL
Initial value:
1= {
2 "static": gate_static,
3 "wave": gate_wave,
4 "lamb": gate_lamb,
5 "hysing1": lambda: gate_hysing(1, 32 if QUICK else 64),
6 "hysing2": lambda: gate_hysing(2, 32 if QUICK else 64),
7 "falling": gate_falling,
8 "limits": gate_limits,
9}

Definition at line 639 of file vof_surface_tension.py.

◆ run

list vof_surface_tension.run = GATES or list(ALL)

Definition at line 650 of file vof_surface_tension.py.

Referenced by gate_falling().