|
flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
|
Variables | |
| int | N = 32 |
| float | R = 0.18 * N |
| list | CEN |
| KN_R | |
| KI_I | |
| KI_R | |
| node_ints = np.array([1, -1, -1], dtype=np.int32) | |
| float | node_reals = R |
| inst_ints = np.zeros((len(CEN), KI_I), dtype=np.int32) | |
| inst_reals = np.zeros((len(CEN), KI_R)) | |
| s = sdflow.Solver(N, N, N) | |
| periodic | |
| owner = np.asarray(s.get_cut_owner()) | |
| g = np.arange(N).astype(float) | |
| X | |
| Y | |
| Z | |
| indexing | |
| d = np.empty((len(CEN), N, N, N)) | |
| dx = np.minimum(dx, N-dx) | |
| dy = np.minimum(dy, N-dy) | |
| dz = np.minimum(dz, N-dz) | |
| ref_owner = np.argmin(d, axis=0) | |
| ref_sdf = d.min(axis=0) | |
| float | fluid = ref_sdf > 0.0 |
| float | solid = ~fluid |
| nbr_solid = np.zeros_like(solid) | |
| sh | |
| axis | |
| float | cut = fluid & nbr_solid |
| srt = np.sort(d, axis=0) | |
| tied = int(((srt[1] - srt[0]) == 0.0).sum()) | |
| bad_cut = int((owner[cut] != ref_owner[cut]).sum()) | |
| bad_all = int((owner != ref_owner).sum()) | |
Layer 3 rung 1 gate (flow side): every CUT cell's owner is the brute-force nearest sphere. A cut cell is a fluid cell (sdf>0) with at least one solid face-neighbour -- the cells whose stencils the IBM overlay modifies, and therefore the only cells whose ownership a moving wall velocity (R2) or a CFD-DEM force integration (L4-R2) ever reads. Coordinates: the solver samples the scene at INTEGER cell coordinates (cell (i,j,k) at (i,j,k)), so the reference lattice here is arange(N) -- not the i+0.5 convention scene_check.py uses for its own sampled-array reference.
| int owner_gate.N = 32 |
Definition at line 14 of file owner_gate.py.
| float owner_gate.R = 0.18 * N |
Definition at line 15 of file owner_gate.py.
| list owner_gate.CEN |
Definition at line 16 of file owner_gate.py.
| owner_gate.KN_R |
Definition at line 19 of file owner_gate.py.
| owner_gate.KI_I |
Definition at line 19 of file owner_gate.py.
| owner_gate.KI_R |
Definition at line 19 of file owner_gate.py.
| owner_gate.node_ints = np.array([1, -1, -1], dtype=np.int32) |
Definition at line 20 of file owner_gate.py.
| float owner_gate.node_reals = R |
Definition at line 21 of file owner_gate.py.
Definition at line 23 of file owner_gate.py.
Definition at line 24 of file owner_gate.py.
Definition at line 31 of file owner_gate.py.
| owner_gate.periodic |
Definition at line 33 of file owner_gate.py.
| owner_gate.owner = np.asarray(s.get_cut_owner()) |
Definition at line 35 of file owner_gate.py.
| owner_gate.g = np.arange(N).astype(float) |
Definition at line 37 of file owner_gate.py.
| owner_gate.X |
Definition at line 38 of file owner_gate.py.
| owner_gate.Y |
Definition at line 38 of file owner_gate.py.
| owner_gate.Z |
Definition at line 38 of file owner_gate.py.
| owner_gate.indexing |
Definition at line 38 of file owner_gate.py.
| owner_gate.dx = np.minimum(dx, N-dx) |
Definition at line 41 of file owner_gate.py.
| owner_gate.dy = np.minimum(dy, N-dy) |
Definition at line 42 of file owner_gate.py.
| owner_gate.dz = np.minimum(dz, N-dz) |
Definition at line 43 of file owner_gate.py.
Definition at line 45 of file owner_gate.py.
| owner_gate.ref_sdf = d.min(axis=0) |
Definition at line 46 of file owner_gate.py.
| float owner_gate.fluid = ref_sdf > 0.0 |
Definition at line 48 of file owner_gate.py.
| owner_gate.solid = ~fluid |
Definition at line 49 of file owner_gate.py.
| owner_gate.nbr_solid = np.zeros_like(solid) |
Definition at line 50 of file owner_gate.py.
| owner_gate.sh |
Definition at line 53 of file owner_gate.py.
| owner_gate.axis |
Definition at line 53 of file owner_gate.py.
Definition at line 54 of file owner_gate.py.
Definition at line 56 of file owner_gate.py.
Definition at line 57 of file owner_gate.py.
Definition at line 58 of file owner_gate.py.
Definition at line 59 of file owner_gate.py.