|
flow 0.4.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
|
Functions | |
| comps (open_faces, active) | |
Variables | |
| pack | |
| R | |
| pk = np.load(pack) | |
| box = np.asarray(pk["box"], float) | |
| G = np.round(box * R).astype(int) | |
| c = np.asarray(pk["centers"]) * R | |
| r = np.asarray(pk["scales"]) * R | |
| S = np.full(tuple(G), 1e30, np.float32) | |
| list | ax = [np.arange(G[k]) + 0.5 for k in range(3)] |
| cs = c + sh * G | |
| keep = np.all((cs + (r + 3)[:, None] > 0) & (cs - (r + 3)[:, None] < G), axis=1) | |
| i0 | |
| i1 | |
| j0 | |
| j1 | |
| k0 | |
| k1 | |
| d | |
| out | |
| n = int(np.prod(G)) | |
| int | fluidC = 0 |
| list | Fm = [0.5 * (np.roll(S, 1, axis=a) + S) >= 0 for a in range(3)] |
| nfaces = sum(Fm[a].astype(np.int8) + np.roll(Fm[a], -1, axis=a).astype(np.int8) for a in range(3)) | |
| int | hasface = nfaces > 0 |
| list | cur_open = [np.roll(fluidC, 1, axis=a) & fluidC for a in range(3)] |
| nc | |
| tot | |
| orph | |
| nc2 | |
| tot2 | |
| orph2 | |
How many pressure unknowns does the CURRENT centre-based classification throw away, and what
does it do to fluid connectivity? Compares
CURRENT : cell has a row iff its CENTRE is fluid; face open iff BOTH centres fluid
FACE : cell has a row iff >=1 of its 6 faces has a FLUID velocity point; face open iff that
face point is fluid (= the paper's rule: pressure lives wherever a fluid face needs
a gradient)
Face sdf = mean of the two adjacent centres, exactly as the solver classifies it.
| gp_pressure_classification.comps | ( | open_faces, | |
| active | |||
| ) |
connected components of the pressure graph over `active` cells.
Definition at line 51 of file gp_pressure_classification.py.
| gp_pressure_classification.pack |
Definition at line 14 of file gp_pressure_classification.py.
| gp_pressure_classification.R |
Definition at line 14 of file gp_pressure_classification.py.
| gp_pressure_classification.pk = np.load(pack) |
Definition at line 15 of file gp_pressure_classification.py.
| gp_pressure_classification.box = np.asarray(pk["box"], float) |
Definition at line 16 of file gp_pressure_classification.py.
Definition at line 17 of file gp_pressure_classification.py.
Definition at line 18 of file gp_pressure_classification.py.
Definition at line 19 of file gp_pressure_classification.py.
| gp_pressure_classification.S = np.full(tuple(G), 1e30, np.float32) |
Definition at line 20 of file gp_pressure_classification.py.
| list gp_pressure_classification.ax = [np.arange(G[k]) + 0.5 for k in range(3)] |
Definition at line 21 of file gp_pressure_classification.py.
Definition at line 23 of file gp_pressure_classification.py.
| gp_pressure_classification.keep = np.all((cs + (r + 3)[:, None] > 0) & (cs - (r + 3)[:, None] < G), axis=1) |
Definition at line 24 of file gp_pressure_classification.py.
| gp_pressure_classification.i0 |
Definition at line 26 of file gp_pressure_classification.py.
| gp_pressure_classification.i1 |
Definition at line 26 of file gp_pressure_classification.py.
| gp_pressure_classification.j0 |
Definition at line 27 of file gp_pressure_classification.py.
| gp_pressure_classification.j1 |
Definition at line 27 of file gp_pressure_classification.py.
| gp_pressure_classification.k0 |
Definition at line 28 of file gp_pressure_classification.py.
| gp_pressure_classification.k1 |
Definition at line 28 of file gp_pressure_classification.py.
| gp_pressure_classification.d |
Definition at line 31 of file gp_pressure_classification.py.
| gp_pressure_classification.out |
Definition at line 33 of file gp_pressure_classification.py.
| gp_pressure_classification.n = int(np.prod(G)) |
Definition at line 35 of file gp_pressure_classification.py.
| int gp_pressure_classification.fluidC = 0 |
Definition at line 36 of file gp_pressure_classification.py.
Definition at line 38 of file gp_pressure_classification.py.
| gp_pressure_classification.nfaces = sum(Fm[a].astype(np.int8) + np.roll(Fm[a], -1, axis=a).astype(np.int8) for a in range(3)) |
Definition at line 39 of file gp_pressure_classification.py.
| int gp_pressure_classification.hasface = nfaces > 0 |
Definition at line 41 of file gp_pressure_classification.py.
Definition at line 70 of file gp_pressure_classification.py.
| gp_pressure_classification.nc |
Definition at line 71 of file gp_pressure_classification.py.
| gp_pressure_classification.tot |
Definition at line 71 of file gp_pressure_classification.py.
| gp_pressure_classification.orph |
Definition at line 71 of file gp_pressure_classification.py.
| gp_pressure_classification.nc2 |
Definition at line 73 of file gp_pressure_classification.py.
| gp_pressure_classification.tot2 |
Definition at line 73 of file gp_pressure_classification.py.
| gp_pressure_classification.orph2 |
Definition at line 73 of file gp_pressure_classification.py.