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

Functions

 solver (ni, nr, ii, ir)
 
 builder_scene (**kw)
 
 raw_scene ()
 
 net_force (s, steps=300)
 
 check (cond, msg)
 

Variables

 N
 
 R
 
 MU
 
 DT
 
int OMEGA = 1e-3
 
 KI_I
 
 KI_R
 
float x0 = 0.5 * N + 0.3
 
tuple CEN = (x0, x0, x0)
 
bool ok = True
 
 s = solver(*builder_scene(ang_vel=[0, 0, OMEGA]))
 
 c = np.asarray(s.instance_center(0))
 
 ang_vel
 
 center
 
float RP = 8.0
 
 F0 = net_force(s)
 
 Fp = net_force(s)
 
int U = OMEGA * RP
 
 Ft = net_force(s)
 
 rel = np.linalg.norm(F0) / np.linalg.norm(Fp)
 

Detailed Description

Centre of rotation: NaN follows the body, any finite point pins -- the world origin included.

Semantics gated (ยง7 item 3):
  (a) builder default (NaN) -> centre = the translation, instance_center_pinned False;
  (b) builder center=(0,0,0) -> PINNED at the world origin (the case zero-as-unset made impossible);
  (c) raw array with zeros -> legacy 'follows the body' (every shipped page);
  (d) set_instance_motion(center=...) -> pinned, and it STAYS pinned when the body is moved by
      set_instance_transform (the old float comparison re-tracked it whenever the body passed
      through its own pin).
Physics gated: a sphere spinning about a point a distance R_p from its centre translates at
U = |w x R_p| at that instant, so its net reaction force must match the drag of the same sphere
towed at U through the same box (Stokes, advection off); a sphere spinning about its OWN centre
has no net force beyond the discretisation asymmetry of an off-lattice sphere (< 1% of the pivot force).

Usage: PYTHONPATH=<flow build>:<core geom build> python centre_of_rotation_gate.py

Function Documentation

◆ solver()

centre_of_rotation_gate.solver (   ni,
  nr,
  ii,
  ir 
)

Definition at line 29 of file centre_of_rotation_gate.py.

◆ builder_scene()

centre_of_rotation_gate.builder_scene ( **  kw)

Definition at line 41 of file centre_of_rotation_gate.py.

◆ raw_scene()

centre_of_rotation_gate.raw_scene ( )

Definition at line 48 of file centre_of_rotation_gate.py.

◆ net_force()

centre_of_rotation_gate.net_force (   s,
  steps = 300 
)

Definition at line 57 of file centre_of_rotation_gate.py.

◆ check()

centre_of_rotation_gate.check (   cond,
  msg 
)

Definition at line 65 of file centre_of_rotation_gate.py.

Variable Documentation

◆ N

centre_of_rotation_gate.N

Definition at line 21 of file centre_of_rotation_gate.py.

◆ R

centre_of_rotation_gate.R

Definition at line 21 of file centre_of_rotation_gate.py.

◆ MU

centre_of_rotation_gate.MU

Definition at line 22 of file centre_of_rotation_gate.py.

◆ DT

centre_of_rotation_gate.DT

Definition at line 22 of file centre_of_rotation_gate.py.

◆ OMEGA

int centre_of_rotation_gate.OMEGA = 1e-3

Definition at line 23 of file centre_of_rotation_gate.py.

◆ KI_I

centre_of_rotation_gate.KI_I

Definition at line 24 of file centre_of_rotation_gate.py.

◆ KI_R

centre_of_rotation_gate.KI_R

Definition at line 24 of file centre_of_rotation_gate.py.

◆ x0

float centre_of_rotation_gate.x0 = 0.5 * N + 0.3

Definition at line 25 of file centre_of_rotation_gate.py.

◆ CEN

tuple centre_of_rotation_gate.CEN = (x0, x0, x0)

Definition at line 26 of file centre_of_rotation_gate.py.

◆ ok

bool centre_of_rotation_gate.ok = True

Definition at line 64 of file centre_of_rotation_gate.py.

◆ s

centre_of_rotation_gate.s = solver(*builder_scene(ang_vel=[0, 0, OMEGA]))

Definition at line 71 of file centre_of_rotation_gate.py.

◆ c

centre_of_rotation_gate.c = np.asarray(s.instance_center(0))

Definition at line 72 of file centre_of_rotation_gate.py.

◆ ang_vel

centre_of_rotation_gate.ang_vel

Definition at line 80 of file centre_of_rotation_gate.py.

◆ center

centre_of_rotation_gate.center

Definition at line 85 of file centre_of_rotation_gate.py.

◆ RP

float centre_of_rotation_gate.RP = 8.0

Definition at line 91 of file centre_of_rotation_gate.py.

◆ F0

centre_of_rotation_gate.F0 = net_force(s)

Definition at line 93 of file centre_of_rotation_gate.py.

◆ Fp

centre_of_rotation_gate.Fp = net_force(s)

Definition at line 95 of file centre_of_rotation_gate.py.

◆ U

int centre_of_rotation_gate.U = OMEGA * RP

Definition at line 96 of file centre_of_rotation_gate.py.

◆ Ft

centre_of_rotation_gate.Ft = net_force(s)

Definition at line 98 of file centre_of_rotation_gate.py.

◆ rel

centre_of_rotation_gate.rel = np.linalg.norm(F0) / np.linalg.norm(Fp)

Definition at line 103 of file centre_of_rotation_gate.py.