|
flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
|
Functions | |
| rotlet (px, py, pz, R, w) | |
| rotlet_lattice (px, py, pz, R, w, L, nimg) | |
| run (N, crossings=False) | |
| err (res, shell, nimg=None) | |
| order_study () | |
| reference_probe () | |
Variables | |
| RF = float(os.environ.get("ROTLET_RF", "0.10")) | |
| float | OMEGA = 0.02 |
| MU | |
| RHO | |
| DT | |
| STEPS | |
| tuple | NEAR = (1.15, 2.0) |
| tuple | FAR = (2.0, 3.5) |
| KN_R | |
| KI_I | |
| KI_R | |
| tuple | OFFS = ((-0.5, 0.0, 0.0), (0.0, -0.5, 0.0), (0.0, 0.0, -0.5)) |
Layer 3 rungs 2-3 gate: ROTLET. A single sphere spinning in Stokes flow.
Exact exterior solution for a sphere of radius R spinning at omega in UNBOUNDED Stokes flow:
u(r) = (R/|r|)^3 * (omega x r)
a pure rotational (couplet) field: zero net force, decaying as 1/|r|^2.
The solver's box is PERIODIC, so the true solution is the lattice of images, not the unbounded
rotlet. That difference is physics, not discretisation error, and it does not shrink under
refinement -- so the error is measured against BOTH references and the lattice sum's own
convergence (9^3 vs 13^3 images) is printed, so a reader can see whether the reference is
trustworthy before trusting an order taken against it.
SAMPLING. get_u/get_v/get_w return MAC FACE values -- u at (i-1/2,j,k), v at (i,j-1/2,k), w at
(i,j,k-1/2). Comparing them against the analytic field sampled at CELL CENTRES injects an O(h)
offset that caps the measured order at 1 however accurate the solver is. Each component is
therefore compared at its own staggered point.
Two shells: the near band [1.15R, 2R], a few cells off a curved cut wall, and a far band
[2R, 3.5R]. Order is the claim, not the absolute.
| rotlet_gate.rotlet | ( | px, | |
| py, | |||
| pz, | |||
| R, | |||
| w | |||
| ) |
Unbounded rotlet, omega = (0,0,w).
Definition at line 34 of file rotlet_gate.py.
Referenced by err(), and rotlet_lattice().
| rotlet_gate.rotlet_lattice | ( | px, | |
| py, | |||
| pz, | |||
| R, | |||
| w, | |||
| L, | |||
| nimg | |||
| ) |
Rotlet summed over a (2*nimg+1)^3 block of periodic images.
Definition at line 41 of file rotlet_gate.py.
References rotlet().
Referenced by err().
| rotlet_gate.run | ( | N, | |
crossings = False |
|||
| ) |
Definition at line 52 of file rotlet_gate.py.
Referenced by order_study(), and reference_probe().
| rotlet_gate.err | ( | res, | |
| shell, | |||
nimg = None |
|||
| ) |
Relative L2 error over `shell`; lattice reference when nimg is given, unbounded otherwise.
Definition at line 89 of file rotlet_gate.py.
References rotlet(), and rotlet_lattice().
Referenced by order_study(), and reference_probe().
| rotlet_gate.order_study | ( | ) |
Definition at line 114 of file rotlet_gate.py.
Referenced by reference_probe().
| rotlet_gate.reference_probe | ( | ) |
IS THE PLATEAU THE SOLVER OR THE REFERENCE? Decisive experiment: hold R fixed IN CELLS (so the discretisation error is unchanged) and change only the box, i.e. only R/L. The naive periodic-image correction to an unbounded rotlet scales like (r/L)^3 at fixed r/R, so halving R/L must drop it ~8x; the discretisation error cannot move at all. Whatever the near-shell error does is therefore attributable.
Definition at line 140 of file rotlet_gate.py.
References err(), order_study(), reference_probe(), and run().
Referenced by reference_probe().
| rotlet_gate.RF = float(os.environ.get("ROTLET_RF", "0.10")) |
Definition at line 26 of file rotlet_gate.py.
| float rotlet_gate.OMEGA = 0.02 |
Definition at line 27 of file rotlet_gate.py.
| rotlet_gate.MU |
Definition at line 28 of file rotlet_gate.py.
| rotlet_gate.RHO |
Definition at line 28 of file rotlet_gate.py.
| rotlet_gate.DT |
Definition at line 28 of file rotlet_gate.py.
| rotlet_gate.STEPS |
Definition at line 28 of file rotlet_gate.py.
| tuple rotlet_gate.NEAR = (1.15, 2.0) |
Definition at line 29 of file rotlet_gate.py.
| tuple rotlet_gate.FAR = (2.0, 3.5) |
Definition at line 30 of file rotlet_gate.py.
| rotlet_gate.KN_R |
Definition at line 31 of file rotlet_gate.py.
| rotlet_gate.KI_I |
Definition at line 31 of file rotlet_gate.py.
| rotlet_gate.KI_R |
Definition at line 31 of file rotlet_gate.py.
| tuple rotlet_gate.OFFS = ((-0.5, 0.0, 0.0), (0.0, -0.5, 0.0), (0.0, 0.0, -0.5)) |
Definition at line 86 of file rotlet_gate.py.