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

Functions

 box (pf, cls, nx, ny, nz, walls)
 check_inlet_column (pf, cls, scheme)
 check_plug (pf, cls, scheme, steps=40)
 main ()

Variables

 MU
 DT

Detailed Description

Gate: a transported scalar enters through a Dirichlet inflow face with the prescribed flux.

Why this test exists. advanceScalars froze c^n into cOld BEFORE filling c's ghosts, and the
explicit advection reads cOld's ghosts. set_field (and the coupling drivers, and the VoF energy
transport) write inner cells only, so the first step after such a write upwinded the inflow from
stale values -- zeros on a fresh scalar: c = 1 at a Dirichlet-1 inlet fell to 0.5 in one step
(doc/uf_outlet_fix.md section B).

Checks:
  1. a c == 1 scalar with a Dirichlet-1 inlet stays 1 in the INLET column after one step, both
     grids, first-order upwind and Koren;
  2. a 1-D plug: uniform flow U through a box periodic in y and z, c = 0 initially, c = 1 at the
     inlet. Until the front reaches the outlet the inventory is exactly U t (the inflow carries
     U * 1 per unit area), and the c = 1/2 crossing sits at x = U t to within a cell.

Run:  OMP_NUM_THREADS=4 OMP_PROC_BIND=false PYTHONPATH=<build> \
          python tests/python/test_scalar_inflow.py
Exit 0 pass, 1 fail, 77 skipped (no module).

Function Documentation

◆ box()

test_scalar_inflow.box ( pf,
cls,
nx,
ny,
nz,
walls )

Definition at line 28 of file test_scalar_inflow.py.

Referenced by check_inlet_column(), and check_plug().

◆ check_inlet_column()

test_scalar_inflow.check_inlet_column ( pf,
cls,
scheme )

Definition at line 43 of file test_scalar_inflow.py.

References box().

Referenced by main().

◆ check_plug()

test_scalar_inflow.check_plug ( pf,
cls,
scheme,
steps = 40 )

Definition at line 59 of file test_scalar_inflow.py.

References box(), and mean().

Referenced by main().

◆ main()

test_scalar_inflow.main ( )

Definition at line 78 of file test_scalar_inflow.py.

References check_inlet_column(), check_plug(), and main().

Referenced by main().

Variable Documentation

◆ MU

test_scalar_inflow.MU

Definition at line 25 of file test_scalar_inflow.py.

◆ DT

test_scalar_inflow.DT

Definition at line 25 of file test_scalar_inflow.py.