flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
Loading...
Searching...
No Matches
owner_gate Namespace Reference

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())
 

Detailed Description

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.

Variable Documentation

◆ N

int owner_gate.N = 32

Definition at line 14 of file owner_gate.py.

◆ R

float owner_gate.R = 0.18 * N

Definition at line 15 of file owner_gate.py.

◆ CEN

list owner_gate.CEN
Initial value:
1= [(0.25*N, 0.25*N, 0.25*N), (0.75*N, 0.75*N, 0.25*N),
2 (0.75*N, 0.25*N, 0.75*N), (0.25*N, 0.75*N, 0.75*N)]

Definition at line 16 of file owner_gate.py.

◆ KN_R

owner_gate.KN_R

Definition at line 19 of file owner_gate.py.

◆ KI_I

owner_gate.KI_I

Definition at line 19 of file owner_gate.py.

◆ KI_R

owner_gate.KI_R

Definition at line 19 of file owner_gate.py.

◆ node_ints

owner_gate.node_ints = np.array([1, -1, -1], dtype=np.int32)

Definition at line 20 of file owner_gate.py.

◆ node_reals

float owner_gate.node_reals = R

Definition at line 21 of file owner_gate.py.

◆ inst_ints

owner_gate.inst_ints = np.zeros((len(CEN), KI_I), dtype=np.int32)

Definition at line 23 of file owner_gate.py.

◆ inst_reals

owner_gate.inst_reals = np.zeros((len(CEN), KI_R))

Definition at line 24 of file owner_gate.py.

◆ s

owner_gate.s = sdflow.Solver(N, N, N)

Definition at line 31 of file owner_gate.py.

◆ periodic

owner_gate.periodic

Definition at line 33 of file owner_gate.py.

◆ owner

owner_gate.owner = np.asarray(s.get_cut_owner())

Definition at line 35 of file owner_gate.py.

◆ g

owner_gate.g = np.arange(N).astype(float)

Definition at line 37 of file owner_gate.py.

◆ X

owner_gate.X

Definition at line 38 of file owner_gate.py.

◆ Y

owner_gate.Y

Definition at line 38 of file owner_gate.py.

◆ Z

owner_gate.Z

Definition at line 38 of file owner_gate.py.

◆ indexing

owner_gate.indexing

Definition at line 38 of file owner_gate.py.

◆ d

owner_gate.d = np.empty((len(CEN), N, N, N))

Definition at line 39 of file owner_gate.py.

◆ dx

owner_gate.dx = np.minimum(dx, N-dx)

Definition at line 41 of file owner_gate.py.

◆ dy

owner_gate.dy = np.minimum(dy, N-dy)

Definition at line 42 of file owner_gate.py.

◆ dz

owner_gate.dz = np.minimum(dz, N-dz)

Definition at line 43 of file owner_gate.py.

◆ ref_owner

owner_gate.ref_owner = np.argmin(d, axis=0)

Definition at line 45 of file owner_gate.py.

◆ ref_sdf

owner_gate.ref_sdf = d.min(axis=0)

Definition at line 46 of file owner_gate.py.

◆ fluid

float owner_gate.fluid = ref_sdf > 0.0

Definition at line 48 of file owner_gate.py.

◆ solid

owner_gate.solid = ~fluid

Definition at line 49 of file owner_gate.py.

◆ nbr_solid

owner_gate.nbr_solid = np.zeros_like(solid)

Definition at line 50 of file owner_gate.py.

◆ sh

owner_gate.sh

Definition at line 53 of file owner_gate.py.

◆ axis

owner_gate.axis

Definition at line 53 of file owner_gate.py.

◆ cut

float owner_gate.cut = fluid & nbr_solid

Definition at line 54 of file owner_gate.py.

◆ srt

owner_gate.srt = np.sort(d, axis=0)

Definition at line 56 of file owner_gate.py.

◆ tied

owner_gate.tied = int(((srt[1] - srt[0]) == 0.0).sum())

Definition at line 57 of file owner_gate.py.

◆ bad_cut

owner_gate.bad_cut = int((owner[cut] != ref_owner[cut]).sum())

Definition at line 58 of file owner_gate.py.

◆ bad_all

owner_gate.bad_all = int((owner != ref_owner).sum())

Definition at line 59 of file owner_gate.py.