|
flow
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
|
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 | |
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.
| fv_wallflux_apriori.ux | ( | x, | |
| y, | |||
| z | |||
| ) |
Definition at line 24 of file fv_wallflux_apriori.py.
Referenced by reference(), run(), and run_normal().
| fv_wallflux_apriori.sdf | ( | x, | |
| y, | |||
| z | |||
| ) |
Definition at line 29 of file fv_wallflux_apriori.py.
Referenced by run(), and run_normal().
| fv_wallflux_apriori.reference | ( | M = 200000, |
|
d = 1e-6 |
|||
| ) |
Definition at line 32 of file fv_wallflux_apriori.py.
References ux().
| 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().
| fv_wallflux_apriori.run | ( | N, | |
use_far2 = False |
|||
| ) |
Definition at line 72 of file fv_wallflux_apriori.py.
References face_openness(), sdf(), and ux().
|
protected |
Definition at line 176 of file fv_wallflux_apriori.py.
Referenced by 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().
| float fv_wallflux_apriori.R = 0.3102 |
Definition at line 20 of file fv_wallflux_apriori.py.
| fv_wallflux_apriori.C0 = np.array([0.013, -0.007, 0.004]) |
Definition at line 21 of file fv_wallflux_apriori.py.
| float fv_wallflux_apriori.MU = 0.1 |
Definition at line 22 of file fv_wallflux_apriori.py.
| fv_wallflux_apriori.Fex = reference() |
Definition at line 306 of file fv_wallflux_apriori.py.
| fv_wallflux_apriori.pA = None |
Definition at line 310 of file fv_wallflux_apriori.py.
Definition at line 312 of file fv_wallflux_apriori.py.
Definition at line 313 of file fv_wallflux_apriori.py.
Definition at line 314 of file fv_wallflux_apriori.py.
Definition at line 315 of file fv_wallflux_apriori.py.
Definition at line 316 of file fv_wallflux_apriori.py.
Definition at line 317 of file fv_wallflux_apriori.py.
| fv_wallflux_apriori.pB |
Definition at line 321 of file fv_wallflux_apriori.py.
| fv_wallflux_apriori.pN |
Definition at line 321 of file fv_wallflux_apriori.py.
| fv_wallflux_apriori.pC = None |
Definition at line 328 of file fv_wallflux_apriori.py.
Definition at line 332 of file fv_wallflux_apriori.py.
| fv_wallflux_apriori.pN2 |
Definition at line 335 of file fv_wallflux_apriori.py.