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

Variables

 R1
 
 R2
 
 OFF
 
 b = geom.SceneBuilder()
 
 db
 
 sp
 
int N = 6
 
 s = pdem.Simulation(64)
 
 sid = sp.register(s)
 
 pos = np.array([[1.4 * i - 3.5, 2.0 + 0.3 * i, 0.0] for i in range(N)], dtype=np.float32)
 
 p = np.asarray(s.get_positions())
 
 ymin = float(p[:, 1].min())
 
 lo = float(sp.shell[:, 1].min())
 
float ok = ymin > 0.5 * (-lo)
 

Detailed Description

Regression for the contact-buffer capacity bug (found via peclet-examples/pall-ring-packing).

TWO independent symptoms of one cause -- every maxContacts-sized collision buffer was sized from
the particle capacity AT THE TIME a shape or wall was registered, while `demStep` grows the
particle capacity every step (ghost headroom = numReal + estGhosts + 4096). Buffers frozen at the
smaller size are an out-of-bounds write, and the narrow phase's boundary contacts -- appended AFTER
the body-body ones -- are the first thing to fall off the end.

  A. add_scene_shape never called ensureContactCapacity() at all (every sibling adder does), so a
     composed-tree particle's contacts against an add_plane floor were dropped and the grains fell
     straight through it.
  B. Even with that call, the buffer did not follow the per-step capacity growth.

Claim: composed-tree particles dropped onto a plane come to rest ON it. Run at OMP_NUM_THREADS=1.

Variable Documentation

◆ R1

contact_capacity_gate.R1

Definition at line 25 of file contact_capacity_gate.py.

◆ R2

contact_capacity_gate.R2

Definition at line 25 of file contact_capacity_gate.py.

◆ OFF

contact_capacity_gate.OFF

Definition at line 25 of file contact_capacity_gate.py.

◆ b

contact_capacity_gate.b = geom.SceneBuilder()

Definition at line 26 of file contact_capacity_gate.py.

◆ db

contact_capacity_gate.db
Initial value:
1= b.add_union(b.add_leaf("sphere", [R1], translation=[-OFF, 0, 0]),
2 b.add_leaf("sphere", [R2], translation=[+OFF, 0, 0]))

Definition at line 27 of file contact_capacity_gate.py.

◆ sp

contact_capacity_gate.sp
Initial value:
1= scene_particle.build(b, db, bounds=([-0.8, -0.5, -0.5], [0.8, 0.5, 0.5]),
2 n=40, shell_resolution=96, target_shell_points=400)

Definition at line 29 of file contact_capacity_gate.py.

◆ N

int contact_capacity_gate.N = 6

Definition at line 32 of file contact_capacity_gate.py.

◆ s

contact_capacity_gate.s = pdem.Simulation(64)

Definition at line 33 of file contact_capacity_gate.py.

◆ sid

contact_capacity_gate.sid = sp.register(s)

Definition at line 36 of file contact_capacity_gate.py.

◆ pos

contact_capacity_gate.pos = np.array([[1.4 * i - 3.5, 2.0 + 0.3 * i, 0.0] for i in range(N)], dtype=np.float32)

Definition at line 39 of file contact_capacity_gate.py.

◆ p

contact_capacity_gate.p = np.asarray(s.get_positions())

Definition at line 47 of file contact_capacity_gate.py.

◆ ymin

contact_capacity_gate.ymin = float(p[:, 1].min())

Definition at line 48 of file contact_capacity_gate.py.

◆ lo

contact_capacity_gate.lo = float(sp.shell[:, 1].min())

Definition at line 49 of file contact_capacity_gate.py.

◆ ok

float contact_capacity_gate.ok = ymin > 0.5 * (-lo)

Definition at line 54 of file contact_capacity_gate.py.