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

Functions

 bed_sdf (N, npz)
 
 make ()
 
 march (s, cap=CAP)
 
 diag (s, tag, steps)
 

Variables

 BED = os.environ["BED"]
 
 N = int(os.environ.get("N", "96"))
 
 TOL = float(os.environ.get("MARCH_TOL", "1e-8"))
 
 CAP = int(os.environ.get("MARCH_MAX", "6000"))
 
 DT = float(os.environ.get("DT", "60.0"))
 
 KIND = os.environ.get("KIND", "gauge-exact")
 
 MU
 
 F0
 
 sdf
 
 R
 
float fluid = 0.0
 
 flush
 
 sA = make()
 
 stA = march(sA)
 
 kA
 
 UA
 
 rng = np.random.default_rng(7)
 
list pert
 
 stP = march(sA)
 
 kP
 
 _
 
 sB = make()
 
 plug = np.asfortranarray(np.where(fluid, float(np.abs(UA[0][fluid]).mean()), 0.0))
 
 z = np.zeros_like(plug)
 
 stB = march(sB)
 
 kB
 

Detailed Description

Neutral-mode probe: is the collocated march's stalled state an ATTRACTOR or a FROZEN defect?

The steady Stokes step map is linear with a unique true fixed point (phi = 0).  The measured
stalled states (|uf-halfavg(u)| ~ 4e-2 <u>, k off by the plateau) can only be exactly stationary
if the map has (near-)neutral modes; then the reached state depends on the initial condition and
on any perturbation applied along the way.  Test: march from IC-A (zero velocity, the protocol
IC), then (1) perturb the converged state with a small random solenoidal-ish kick and re-march,
(2) march independently from IC-B (a bulk plug profile).  Attractor => all k agree to march
noise.  Neutral modes => they differ at the plateau scale.

  SDFLOW_BUILD=build_omp3 BED=...npz N=96 python collocated_neutral_probe.py

Function Documentation

◆ bed_sdf()

collocated_neutral_probe.bed_sdf (   N,
  npz 
)

Definition at line 32 of file collocated_neutral_probe.py.

◆ make()

collocated_neutral_probe.make ( )

Definition at line 59 of file collocated_neutral_probe.py.

◆ march()

collocated_neutral_probe.march (   s,
  cap = CAP 
)

Definition at line 75 of file collocated_neutral_probe.py.

◆ diag()

collocated_neutral_probe.diag (   s,
  tag,
  steps 
)

Definition at line 87 of file collocated_neutral_probe.py.

Variable Documentation

◆ BED

collocated_neutral_probe.BED = os.environ["BED"]

Definition at line 23 of file collocated_neutral_probe.py.

◆ N

collocated_neutral_probe.N = int(os.environ.get("N", "96"))

Definition at line 24 of file collocated_neutral_probe.py.

◆ TOL

collocated_neutral_probe.TOL = float(os.environ.get("MARCH_TOL", "1e-8"))

Definition at line 25 of file collocated_neutral_probe.py.

◆ CAP

collocated_neutral_probe.CAP = int(os.environ.get("MARCH_MAX", "6000"))

Definition at line 26 of file collocated_neutral_probe.py.

◆ DT

collocated_neutral_probe.DT = float(os.environ.get("DT", "60.0"))

Definition at line 27 of file collocated_neutral_probe.py.

◆ KIND

collocated_neutral_probe.KIND = os.environ.get("KIND", "gauge-exact")

Definition at line 28 of file collocated_neutral_probe.py.

◆ MU

collocated_neutral_probe.MU

Definition at line 29 of file collocated_neutral_probe.py.

◆ F0

collocated_neutral_probe.F0

Definition at line 29 of file collocated_neutral_probe.py.

◆ sdf

collocated_neutral_probe.sdf

Definition at line 55 of file collocated_neutral_probe.py.

◆ R

collocated_neutral_probe.R

Definition at line 55 of file collocated_neutral_probe.py.

◆ fluid

float collocated_neutral_probe.fluid = 0.0

Definition at line 56 of file collocated_neutral_probe.py.

◆ flush

collocated_neutral_probe.flush

Definition at line 105 of file collocated_neutral_probe.py.

◆ sA

collocated_neutral_probe.sA = make()

Definition at line 108 of file collocated_neutral_probe.py.

◆ stA

collocated_neutral_probe.stA = march(sA)

Definition at line 109 of file collocated_neutral_probe.py.

◆ kA

collocated_neutral_probe.kA

Definition at line 110 of file collocated_neutral_probe.py.

◆ UA

collocated_neutral_probe.UA

Definition at line 110 of file collocated_neutral_probe.py.

◆ rng

collocated_neutral_probe.rng = np.random.default_rng(7)

Definition at line 113 of file collocated_neutral_probe.py.

◆ pert

list collocated_neutral_probe.pert
Initial value:
1= [np.asfortranarray(np.where(fluid, 0.1 * np.abs(UA[0][fluid]).mean()
2 * rng.standard_normal(UA[a].shape), 0.0))
3 for a in range(3)]

Definition at line 114 of file collocated_neutral_probe.py.

◆ stP

collocated_neutral_probe.stP = march(sA)

Definition at line 119 of file collocated_neutral_probe.py.

◆ kP

collocated_neutral_probe.kP

Definition at line 120 of file collocated_neutral_probe.py.

◆ _

collocated_neutral_probe._
protected

Definition at line 120 of file collocated_neutral_probe.py.

◆ sB

collocated_neutral_probe.sB = make()

Definition at line 123 of file collocated_neutral_probe.py.

◆ plug

collocated_neutral_probe.plug = np.asfortranarray(np.where(fluid, float(np.abs(UA[0][fluid]).mean()), 0.0))

Definition at line 124 of file collocated_neutral_probe.py.

◆ z

collocated_neutral_probe.z = np.zeros_like(plug)

Definition at line 125 of file collocated_neutral_probe.py.

◆ stB

collocated_neutral_probe.stB = march(sB)

Definition at line 127 of file collocated_neutral_probe.py.

◆ kB

collocated_neutral_probe.kB

Definition at line 128 of file collocated_neutral_probe.py.