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

Functions

 run (N, RF=0.18, wallgrad=False)
 

Variables

 MU
 
 RHO
 
 DT
 
 F = float(os.environ.get("FORCE_F", "1e-3"))
 
 STEPS = int(os.environ.get("FORCE_STEPS", "400"))
 
str ADVECT = "1"
 
 KN_R
 
 KI_I
 
 KI_R
 
str F_SCALE = "1"
 
list Ns = [int(x) for x in (sys.argv[1:] or ["64", "128"])]
 
str wg = "1"
 
list errs = [run(N, wallgrad=wg) for N in Ns]
 
bool allok = True
 

Detailed Description

Layer 4 rung 2 gate: the HYDRODYNAMIC FORCE, checked against the momentum balance the solved
field must already satisfy -- BOTH evaluations:

  * hydro_force_torque_reaction (route b, THE COUPLING FORCE): the discrete reaction. Its identity
    is sum F_c = f_c * N_c with N_c the solver's own count of fluid momentum cells
    (fluid_momentum_cells), and it must hold to the momentum solver's residual -- this is the
    IMPLEMENTATION-COMPLETENESS check, not an accuracy check (the identity is a tautology of a
    correctly assembled budget; if it holds only to percent, a term is missing).
  * diagnostics.hydro_force_torque_traction (traction, DIAGNOSTIC): the reconstructed surface integral, kept so its
    resolution-independent ~29% under-read stays visible.

Setup: Stokes flow through a fixed periodic sphere array driven by a uniform body force f (force
per unit volume, applied to the fluid). At steady state the momentum balance over the periodic cell
is exact and closes with no empirical input:

    sum over spheres of F_hydro  =  f * V_fluid

-- the body force fed into the fluid has nowhere to go but the grain surfaces. So integrating the
traction and comparing it against f * V_fluid is a genuine SELF-CONSISTENCY test of the surface
integral against the same field the velocity-based permeability is read from, exactly as the
Layer-4 spec asks; it needs no Zick-Homsy table to state, and it fails loudly if the aperture
wall-area vector, the traction, or the owner attribution is wrong.

V_fluid is reported two ways, because they differ at O(h) and the reader should see which is
which: the ANALYTIC fluid volume of the sphere array, and the DISCRETE one the solver's own
cut-cell apertures imply.

Also reported: the Darcy permeability k = mu <u> / f measured from the velocity field, so the run
can be lined up against validate_zick_homsy_sdflow.py's numbers, and the per-sphere force spread
(the array is symmetric, so four equal spheres must carry equal drag -- a direct check that the
owner attribution partitions the surface correctly).

Function Documentation

◆ run()

force_gate.run (   N,
  RF = 0.18,
  wallgrad = False 
)

Definition at line 48 of file force_gate.py.

References mean().

Variable Documentation

◆ MU

force_gate.MU

Definition at line 38 of file force_gate.py.

◆ RHO

force_gate.RHO

Definition at line 38 of file force_gate.py.

◆ DT

force_gate.DT

Definition at line 38 of file force_gate.py.

◆ F

force_gate.F = float(os.environ.get("FORCE_F", "1e-3"))

Definition at line 39 of file force_gate.py.

◆ STEPS

force_gate.STEPS = int(os.environ.get("FORCE_STEPS", "400"))

Definition at line 40 of file force_gate.py.

◆ ADVECT

str force_gate.ADVECT = "1"

Definition at line 43 of file force_gate.py.

◆ KN_R

force_gate.KN_R

Definition at line 44 of file force_gate.py.

◆ KI_I

force_gate.KI_I

Definition at line 44 of file force_gate.py.

◆ KI_R

force_gate.KI_R

Definition at line 44 of file force_gate.py.

◆ F_SCALE

str force_gate.F_SCALE = "1"

Definition at line 45 of file force_gate.py.

◆ Ns

list force_gate.Ns = [int(x) for x in (sys.argv[1:] or ["64", "128"])]

Definition at line 155 of file force_gate.py.

◆ wg

str force_gate.wg = "1"

Definition at line 156 of file force_gate.py.

◆ errs

list force_gate.errs = [run(N, wallgrad=wg) for N in Ns]

Definition at line 157 of file force_gate.py.

◆ allok

bool force_gate.allok = True

Definition at line 162 of file force_gate.py.