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

Functions

 ux (x, y, z)
 
 sdf (x, y, z)
 
 reference (M=200000, d=1e-6)
 
 face_openness (N, axis, h)
 
 run (N, use_far2=False)
 
 _quad (x, a1, a2, a3)
 
 run_normal (N, analytic=False)
 

Variables

float R = 0.3102
 
 C0 = np.array([0.013, -0.007, 0.004])
 
float MU = 0.1
 
 Fex = reference()
 
 pA = None
 
 r = run(N)
 
int eA = 100*(r["FB"]-Fex)/abs(Fex)
 
int eC = 100*(r["Fcen"]-Fex)/abs(Fex)
 
 oA = np.log2(abs(pA)/abs(eA)) if pA else float("nan")
 
 oB = np.log2(abs(pB)/abs(eB)) if pB else float("nan")
 
float fac = np.log2(N/pN) if pA else 1.0
 
 pB
 
 pN
 
 pC = None
 
 oC = np.log2(abs(pC) / abs(eC)) / np.log2(N / pN2) if pC else float("nan")
 
 pN2
 

Detailed Description

A-priori test of the fully-FV cut-cell wall viscous flux with 7-point ingredients.

Estimator (what the proposed FV collocated momentum assembly would compute):
  F_est = mu * sum_cells sum_a W_a * g_a
  - W_a = h^2 (o_{a-} - o_{a+}) : the wall fragment's area-weighted fluid-outward normal,
          FREE from the face openness by the divergence theorem (no surface reconstruction).
  - g_a : d(ux)/da at the wall from the UNIDIRECTIONAL wall-anchored quadratic along axis a
          through {u(wall)=0, U_c, U_far} -- strictly 7-point data. Central difference where
          the axis does not cross the wall; solid-center cells borrow the adjacent fluid
          cell's gradient vector.
Reference: F_exact = mu * closed-surface integral of grad(ux).n dA (n = fluid-outward = -rhat),
by Fibonacci quadrature of the analytic Stokes solution. Note grad(ux) = n * d(ux)/dn EXACTLY
on the wall (no-slip kills tangential derivatives), so the axis decomposition misses nothing
structurally; the test measures fit truncation + evaluation-point displacement + attribution.
Face openness computed semi-analytically (256-point chord integration of the exact disk cut),
so the fragment identity is near-exact and the GRADIENT estimator is what is being tested.

Function Documentation

◆ ux()

fv_wallflux_apriori.ux (   x,
  y,
  z 
)

Definition at line 24 of file fv_wallflux_apriori.py.

Referenced by reference(), run(), and run_normal().

◆ sdf()

fv_wallflux_apriori.sdf (   x,
  y,
  z 
)

Definition at line 29 of file fv_wallflux_apriori.py.

Referenced by run(), and run_normal().

◆ reference()

fv_wallflux_apriori.reference (   M = 200000,
  d = 1e-6 
)

Definition at line 32 of file fv_wallflux_apriori.py.

References ux().

◆ face_openness()

fv_wallflux_apriori.face_openness (   N,
  axis,
  h 
)
Fluid area fraction of every face perpendicular to `axis`, shape (N+1,N,N) in
(plane, t1, t2) order; t1,t2 = the other two axes in cyclic order. Semi-analytic:
the sphere cuts the face plane in a disk; per cut face integrate the chord (256 pts).

Definition at line 42 of file fv_wallflux_apriori.py.

Referenced by run(), and run_normal().

◆ run()

fv_wallflux_apriori.run (   N,
  use_far2 = False 
)

Definition at line 72 of file fv_wallflux_apriori.py.

References face_openness(), sdf(), and ux().

◆ _quad()

fv_wallflux_apriori._quad (   x,
  a1,
  a2,
  a3 
)
protected

Definition at line 176 of file fv_wallflux_apriori.py.

Referenced by run_normal().

◆ run_normal()

fv_wallflux_apriori.run_normal (   N,
  analytic = False 
)

Definition at line 180 of file fv_wallflux_apriori.py.

References _quad(), face_openness(), sdf(), and ux().

Variable Documentation

◆ R

float fv_wallflux_apriori.R = 0.3102

Definition at line 20 of file fv_wallflux_apriori.py.

◆ C0

fv_wallflux_apriori.C0 = np.array([0.013, -0.007, 0.004])

Definition at line 21 of file fv_wallflux_apriori.py.

◆ MU

float fv_wallflux_apriori.MU = 0.1

Definition at line 22 of file fv_wallflux_apriori.py.

◆ Fex

fv_wallflux_apriori.Fex = reference()

Definition at line 306 of file fv_wallflux_apriori.py.

◆ pA

fv_wallflux_apriori.pA = None

Definition at line 310 of file fv_wallflux_apriori.py.

◆ r

fv_wallflux_apriori.r = run(N)

Definition at line 312 of file fv_wallflux_apriori.py.

◆ eA

int fv_wallflux_apriori.eA = 100*(r["FB"]-Fex)/abs(Fex)

Definition at line 313 of file fv_wallflux_apriori.py.

◆ eC

int fv_wallflux_apriori.eC = 100*(r["Fcen"]-Fex)/abs(Fex)

Definition at line 314 of file fv_wallflux_apriori.py.

◆ oA

fv_wallflux_apriori.oA = np.log2(abs(pA)/abs(eA)) if pA else float("nan")

Definition at line 315 of file fv_wallflux_apriori.py.

◆ oB

fv_wallflux_apriori.oB = np.log2(abs(pB)/abs(eB)) if pB else float("nan")

Definition at line 316 of file fv_wallflux_apriori.py.

◆ fac

float fv_wallflux_apriori.fac = np.log2(N/pN) if pA else 1.0

Definition at line 317 of file fv_wallflux_apriori.py.

◆ pB

fv_wallflux_apriori.pB

Definition at line 321 of file fv_wallflux_apriori.py.

◆ pN

fv_wallflux_apriori.pN

Definition at line 321 of file fv_wallflux_apriori.py.

◆ pC

fv_wallflux_apriori.pC = None

Definition at line 328 of file fv_wallflux_apriori.py.

◆ oC

fv_wallflux_apriori.oC = np.log2(abs(pC) / abs(eC)) / np.log2(N / pN2) if pC else float("nan")

Definition at line 332 of file fv_wallflux_apriori.py.

◆ pN2

fv_wallflux_apriori.pN2

Definition at line 335 of file fv_wallflux_apriori.py.