|
flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
|
Classes | |
| class | Box |
Functions | |
| exact (x, y, k1, k2) | |
| lagr_d (nodes, x, order) | |
| dir_face (xi) | |
| dir_face_both (xi) | |
| dir_face_flux (xi, kl, kr) | |
| dir_face_closed (xi) | |
| crossing (G, P, Q, axis) | |
| solve_one_field (G, k1, k2, method) | |
| norms (G, T, k1, k2) | |
| solve_p2f (G, k1, k2, c=0.7) | |
Variables | |
| float | R = 1.0 |
| float | L = 5.0 |
| atol | |
| methods = sys.argv[1:] or ["OF-h", "OF-a", "GFM", "DIR", "DIR-B"] | |
| rng = rng.random((2, 2)) | |
| list | NDs = [16, 32, 64, 128] |
| str | line = 0 |
| list | ee = [] |
| G = Box(ND, o) | |
| T | |
| nfb | |
| list | prev = ee[0] |
| flush | |
2-D prototype, round 7: Frank Peters' directional conjugate IBM (~/Codes/conjugate/
IBM_conjugated_transport.tex) against the other conjugate candidates, on HIS test problem.
Test (tex sec. Results): steady -div(k grad T) = 0, disc r < R = 1 with k2, k1 = 1 outside, in a
square of side 5 with Dirichlet values from the exact infinite-domain solution
inside : T = 2 k1/(k1+k2) x ; outside: T = x + (k1-k2)/(k1+k2) R^2 x / r^2.
Errors at cell centres (L1, L2, Linf as in the tex), k2 = 0.01, 0.5, 2, 100.
Methods (all finite-volume on cell-centred unknowns; one cell = the phase of its centre unless noted)
OF-h one field, harmonic mean of the two cell conductivities on a face ("one field")
OF-a one field, face conductivity = aperture-weighted arithmetic mean a k1 + (1-a) k2
GFM one field, series coefficient across the crossing (Liu-Fedkiw-Kang 2000):
k_f = 1/((1/2+xi)/k_P + (1/2-xi)/k_Q) on faces whose centre line crosses the interface
DIR Peters' directional scheme: on a crossing line, quadratics through (-3/2, -1/2, xi) and
(xi, 1/2, 3/2) sharing T_xi; T_xi minimises T''(xi-)^2 + T''(xi+)^2 (eq. 12); the face
flux is k(side of x=0) T'(0) (eq. 13/14). Non-crossing faces use the phase k.
Fallback (no second same-phase cell on a side): GFM coefficient.
DIR-B DIR + the appendix "second approach" effective conductivity on faces that are CUT but whose
centre line does not cross (k_eff with a_s, l_s = 0, n_x).
P2F two-field probe-flux cut-cell FV (conj.py): fluid and solid unknowns in cut cells, probe
0.7h each side, 2x2 elimination per facet (error read from the DOF of the centre's phase).
| conj_peters.exact | ( | x, | |
| y, | |||
| k1, | |||
| k2 | |||
| ) |
Definition at line 29 of file conj_peters.py.
Referenced by norms(), solve_one_field(), and solve_p2f().
| conj_peters.lagr_d | ( | nodes, | |
| x, | |||
| order | |||
| ) |
weights w with p^(order)(x) = sum w_j f_j for the Lagrange polynomial through nodes.
Definition at line 50 of file conj_peters.py.
Referenced by dir_face(), dir_face_both(), and dir_face_flux().
| conj_peters.dir_face | ( | xi | ) |
Peters' face derivative T'(0) = sum w_j T_j over (T_-3/2, T_-1/2, T_1/2, T_3/2), unit spacing.
Definition at line 62 of file conj_peters.py.
References lagr_d().
Referenced by solve_one_field().
| conj_peters.dir_face_both | ( | xi | ) |
(left-branch row, right-branch row) of T'(0) over (T-3/2, T-1/2, T1/2, T3/2), shared min-curvature T_xi.
Definition at line 76 of file conj_peters.py.
References lagr_d().
| conj_peters.dir_face_flux | ( | xi, | |
| kl, | |||
| kr | |||
| ) |
as dir_face_both, but T_xi from FLUX continuity kl T'_l(xi) = kr T'_r(xi) (k-aware).
Definition at line 87 of file conj_peters.py.
References lagr_d().
Referenced by solve_one_field().
| conj_peters.dir_face_closed | ( | xi | ) |
the tex's closed form (eq. after 'with f_A ...'), to cross-check dir_face.
Definition at line 99 of file conj_peters.py.
| conj_peters.crossing | ( | G, | |
| P, | |||
| Q, | |||
| axis | |||
| ) |
xi in (-1/2, 1/2): crossing of the segment P->Q (unit spacing, face at 0) with the circle.
Definition at line 109 of file conj_peters.py.
Referenced by solve_one_field().
| conj_peters.solve_one_field | ( | G, | |
| k1, | |||
| k2, | |||
| method | |||
| ) |
Definition at line 118 of file conj_peters.py.
References crossing(), dir_face(), dir_face_flux(), and exact().
| conj_peters.norms | ( | G, | |
| T, | |||
| k1, | |||
| k2 | |||
| ) |
Definition at line 209 of file conj_peters.py.
References exact().
| conj_peters.solve_p2f | ( | G, | |
| k1, | |||
| k2, | |||
c = 0.7 |
|||
| ) |
Definition at line 217 of file conj_peters.py.
References exact().
| float conj_peters.R = 1.0 |
Definition at line 25 of file conj_peters.py.
| float conj_peters.L = 5.0 |
Definition at line 26 of file conj_peters.py.
| conj_peters.atol |
Definition at line 276 of file conj_peters.py.
| list conj_peters.methods = sys.argv[1:] or ["OF-h", "OF-a", "GFM", "DIR", "DIR-B"] |
Definition at line 278 of file conj_peters.py.
| conj_peters.rng = rng.random((2, 2)) |
Definition at line 279 of file conj_peters.py.
| list conj_peters.NDs = [16, 32, 64, 128] |
Definition at line 282 of file conj_peters.py.
| str conj_peters.line = 0 |
Definition at line 285 of file conj_peters.py.
| conj_peters.ee = [] |
Definition at line 287 of file conj_peters.py.
| conj_peters.G = Box(ND, o) |
Definition at line 289 of file conj_peters.py.
| conj_peters.T |
Definition at line 290 of file conj_peters.py.
| conj_peters.nfb |
Definition at line 290 of file conj_peters.py.
| list conj_peters.prev = ee[0] |
Definition at line 294 of file conj_peters.py.
| conj_peters.flush |
Definition at line 295 of file conj_peters.py.