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

Functions

 swarm_colour (n, seeds, sub=4)
 
 seeds_64 (n, layout="lattice")
 
 build (n, Cglob, ratio=100.0)
 
 mixed_count (s)
 
 gather_ints (s, v)
 
 timed (s, steps, cap)
 
 main ()
 

Variables

 HERE = os.path.dirname(os.path.abspath(__file__))
 
int EPS = 1e-8
 

Detailed Description

WO-V9 item 4 — the INTERFACE-WEIGHTED ORB.

A two-phase step's cost is not uniform over the grid: the PLIC reconstruction, the geometric
fluxes and the whole curvature cascade are paid only where the colour is mixed, while the pressure
and momentum solves are paid everywhere.  A plain (cell-count) ORB therefore hands one rank the
whole interface and another rank none of it.  This measures the imbalance that costs, and what
re-weighting the ORB by

        w(cell) = 1  +  W * [the cell is interfacial]

through the existing `rebalance_by_weights` buys.  `W` is the ratio of interfacial to bulk work
per cell; it is swept.

Scene: a 64-marker bubble swarm (the WO-W12 swarm of `tests/study/vof_blocks_ns.py`'s `swarm`
gate, here as a single global colour field so the GRID decomposition is what is being measured),
surface tension on, ratio 100.

    mpirun -np 4 python tests/study/vof_orb_weights.py --steps 20 --w 8

Function Documentation

◆ swarm_colour()

vof_orb_weights.swarm_colour (   n,
  seeds,
  sub = 4 
)
C = 1 inside the markers (the dispersed phase), sub^3-subsampled fractions.

Definition at line 38 of file vof_orb_weights.py.

References mean().

Referenced by main().

◆ seeds_64()

vof_orb_weights.seeds_64 (   n,
  layout = "lattice" 
)
`lattice` is WO-W12's swarm -- 4x4x4, uniformly filling the box.  It is exactly the
configuration a CELL-COUNT ORB already balances perfectly, so it cannot show the lever; it is
kept as the control.  `plume` is the configuration the lever is for: the same 64 markers
packed into the bottom third of the column, i.e. a rising swarm before it has spread.

Definition at line 56 of file vof_orb_weights.py.

Referenced by main().

◆ build()

vof_orb_weights.build (   n,
  Cglob,
  ratio = 100.0 
)

Definition at line 83 of file vof_orb_weights.py.

◆ mixed_count()

vof_orb_weights.mixed_count (   s)

Definition at line 105 of file vof_orb_weights.py.

Referenced by main().

◆ gather_ints()

vof_orb_weights.gather_ints (   s,
  v 
)
max/mean over ranks of an integer per-rank load, using the solver's own allreduce-free
route: mpi4py if present, else a plain allgather through it.

Definition at line 110 of file vof_orb_weights.py.

Referenced by main().

◆ timed()

vof_orb_weights.timed (   s,
  steps,
  cap 
)

Definition at line 117 of file vof_orb_weights.py.

Referenced by main().

◆ main()

vof_orb_weights.main ( )

Definition at line 122 of file vof_orb_weights.py.

References gather_ints(), main(), mixed_count(), seeds_64(), swarm_colour(), and timed().

Referenced by main().

Variable Documentation

◆ HERE

vof_orb_weights.HERE = os.path.dirname(os.path.abspath(__file__))

Definition at line 31 of file vof_orb_weights.py.

◆ EPS

int vof_orb_weights.EPS = 1e-8

Definition at line 35 of file vof_orb_weights.py.