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

Classes

class  Case
class  Mac

Functions

 cdf_box (s, h)
 cdf_hat (s, h)
 build (case, scheme, tau_mode="fit")
 solve_err (case, scheme, tau_mode="fit")

Variables

 GL_X
 GL_W
 FCORR = None
 OWN_ONLY = None
str DNN_W = "all"
bool CELL_VOL = False
str TAU_RULE = "band-avg"
int DNN_EPS = 1e-3
str SHARP_BASE = "arith"

Detailed Description

A-priori operator test for a sharp viscous stress on a 2-D MAC grid (architect, 2026-10-31).

Steady two-phase Stokes  div(2 mu D(u)) - grad p + f = 0, div u = 0  on [0,1]^2 with a planar interface
phi = n.(x - c) - s (side A: phi < 0).  Dirichlet data = exact FACE-AVERAGED velocities on every node outside
the unknown set (boundary faces and one ghost row).  The MAC unknown is the face-averaged velocity, so the
error is measured against exact face averages.  Direct sparse solve: this is the steady state of flow's
predictor + projection with any lagging of explicit terms.

Schemes (sample stress on cell centres = normal, on nodes = shear):
  arith  : beta_cell = mu(C), beta_node = mean of 4 cells          (flow default)
  harm4  : beta_node = harmonic of 4 cells                          (register Q4 option)
  facef  : exact PLIC face fraction per row, arithmetic             ("sub-cell mu from PLIC")
  linkh  : each link difference divided by its own resistance       (GFM / Liu-Fedkiw-Kang)
  sharp  : beta m + sum_l T_l(tau)(1 - beta Rbar_l), tau = interface traction
           tau: 'oracle' (exact) or 'fit' (kinked LS fit on the low-mu side gradient, 3x3 block)

Function Documentation

◆ cdf_box()

mac2d.cdf_box ( s,
h )

Definition at line 24 of file mac2d.py.

◆ cdf_hat()

mac2d.cdf_hat ( s,
h )

Definition at line 28 of file mac2d.py.

◆ build()

mac2d.build ( case,
scheme,
tau_mode = "fit" )

Definition at line 152 of file mac2d.py.

Referenced by solve_err().

◆ solve_err()

mac2d.solve_err ( case,
scheme,
tau_mode = "fit" )

Definition at line 443 of file mac2d.py.

References build().

Variable Documentation

◆ GL_X

mac2d.GL_X

Definition at line 21 of file mac2d.py.

◆ GL_W

mac2d.GL_W

Definition at line 21 of file mac2d.py.

◆ FCORR

mac2d.FCORR = None

Definition at line 144 of file mac2d.py.

◆ OWN_ONLY

mac2d.OWN_ONLY = None

Definition at line 145 of file mac2d.py.

◆ DNN_W

str mac2d.DNN_W = "all"

Definition at line 146 of file mac2d.py.

◆ CELL_VOL

bool mac2d.CELL_VOL = False

Definition at line 147 of file mac2d.py.

◆ TAU_RULE

str mac2d.TAU_RULE = "band-avg"

Definition at line 148 of file mac2d.py.

◆ DNN_EPS

int mac2d.DNN_EPS = 1e-3

Definition at line 149 of file mac2d.py.

◆ SHARP_BASE

str mac2d.SHARP_BASE = "arith"

Definition at line 440 of file mac2d.py.