|
flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
|
Classes | |
| class | Cell |
| class | System |
Functions | |
| sdf (p, R) | |
| center_of (p) | |
| k_PH (G, kf, ks) | |
| bilin (G, ids_fn, p, valid) | |
| k_P2F (G, kf, ks, gapaware=False, c=0.7) | |
Variables | |
| C0 = np.array([0.5, 0.5]) | |
| list | IMG = [np.array([a, b], float) for a in (-1, 0, 1) for b in (-1, 0, 1)] |
| int | ks = float(sys.argv[1]) if len(sys.argv) > 1 else 100.0 |
| list | gaps = [float(a) for a in sys.argv[2:]] or [0.2, 0.05, 0.02] |
| float | R = 0.5 * (1 - gap) |
| dict | res = {} |
| G = Cell(n, R, off=(0.0, 0.0)) | |
| q | |
| st | |
| gapaware | |
| flush | |
| dict | v = v[-1] + (v[-1] - v[-2]) / 3 |
2-D prototype, round 8: NEAR-CONTACT conjugate conduction.
Effective conductivity of a periodic square array of cylinders (unit cell, cylinder radius R at the
centre), macroscopic gradient dT/dx = -1, k_f = 1. Gap g = 1 - 2R from 0.2 down to 0.01.
Unknowns are periodic: T(x) = theta - x. k_eff = total +x heat flux through a face column.
Methods
P2F two-field probe-flux cut-cell FV (conj.py), probe 0.7h, round-4 fallback ladder
(renormalised valid weights -> 1.0h -> 1.5h). A probe landing inside ANOTHER solid image
is not detected (the current design's blind spot).
P2Fg P2F + gap-aware fluid probe: s_f = min(0.7h, 0.5 * normal distance to the next solid)
PH Peters' hybrid (his 3-D packing code construct_flux_ibm.m, transcribed to 2-D):
simple crossing face (1 crossing, 2 same-phase cells each side) -> directional
min-curvature quadratic, aperture-weighted branches;
close / very close crossing face -> appendix series-parallel
k_eff = [k_f + (k_s-k_f) a_s (1-n_x^2)] / [1 + (k_f/k_s - 1) l_s n_x^2]
(l_s = solid fraction of the centre line);
cut non-crossing face -> k_f + (k_s-k_f) a_s (1-n_x^2) (fluid centres; mirror for solid).
Reference: Richardson extrapolation (p = 2) of the two finest resolutions, compared across methods.
| packing2d.sdf | ( | p, | |
| R | |||
| ) |
Definition at line 28 of file packing2d.py.
| packing2d.center_of | ( | p | ) |
Definition at line 32 of file packing2d.py.
| packing2d.k_PH | ( | G, | |
| kf, | |||
| ks | |||
| ) |
Definition at line 80 of file packing2d.py.
References center_of(), and sdf().
| packing2d.bilin | ( | G, | |
| ids_fn, | |||
| p, | |||
| valid | |||
| ) |
Definition at line 129 of file packing2d.py.
Referenced by k_P2F().
| packing2d.k_P2F | ( | G, | |
| kf, | |||
| ks, | |||
gapaware = False, |
|||
c = 0.7 |
|||
| ) |
Definition at line 141 of file packing2d.py.
References bilin(), center_of(), and sdf().
| packing2d.C0 = np.array([0.5, 0.5]) |
Definition at line 24 of file packing2d.py.
| list packing2d.IMG = [np.array([a, b], float) for a in (-1, 0, 1) for b in (-1, 0, 1)] |
Definition at line 25 of file packing2d.py.
| packing2d.ks = float(sys.argv[1]) if len(sys.argv) > 1 else 100.0 |
Definition at line 212 of file packing2d.py.
| list packing2d.gaps = [float(a) for a in sys.argv[2:]] or [0.2, 0.05, 0.02] |
Definition at line 213 of file packing2d.py.
| float packing2d.R = 0.5 * (1 - gap) |
Definition at line 215 of file packing2d.py.
| dict packing2d.res = {} |
Definition at line 216 of file packing2d.py.
Definition at line 218 of file packing2d.py.
| packing2d.q |
Definition at line 220 of file packing2d.py.
| packing2d.st |
Definition at line 220 of file packing2d.py.
| packing2d.gapaware |
Definition at line 221 of file packing2d.py.
| packing2d.flush |
Definition at line 223 of file packing2d.py.
| dict packing2d.v = v[-1] + (v[-1] - v[-2]) / 3 |
Definition at line 225 of file packing2d.py.