|
flow
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
|
Functions | |
| inlet_profile (H, S, nz, U_in) | |
| reattachment (u_bottom) | |
| run (Re, S=16, Lr=12, U_in=1.0, nz=4, dt=0.2, max_steps=24000) | |
| main () | |
Verification (sdflow): the backward-facing step (BFS) -- the canonical separated-flow benchmark, and the showcase for the per-face INLET PROFILE. Geometry is the Gartling (1990) expansion-ratio-2 step: a channel of full height H = 2S (S = step height) with no-slip walls top/bottom; flow enters ONLY the upper half (y in [S, 2S]) with the developed parabolic channel profile and is zero over the lower half (the step face); it leaves through the outflow. Behind the step a recirculation bubble forms on the bottom wall; the reattachment length x_r/S grows with Re. Quasi-2D (periodic z). The step is realized purely as the inlet condition via set_domain_bc_profile (no immersed solid): the parabola vanishes at y=S (the step lip) and y=2S (top wall), exactly the developed upper-channel profile. We de-risk in the laminar regime (Re_S = U_in*S/nu = 100, 200) -- a bubble must form, x_r/S must grow with Re, mass is conserved and the flow stays divergence-free -- then push toward Gartling Re=800 and report the reattachment for comparison (Gartling lower-wall reattachment ~6.1 H = ~12 S). Re_S = U_in * S / nu, with U_in the mean inlet velocity over the open upper half.
| verify_bfs_sdflow.inlet_profile | ( | H, | |
| S, | |||
| nz, | |||
| U_in | |||
| ) |
Developed parabola over the open upper half y in [S, 2S], zero over the step face y in [0, S].
Definition at line 28 of file verify_bfs_sdflow.py.
Referenced by run().
| verify_bfs_sdflow.reattachment | ( | u_bottom | ) |
End of the primary bubble = the first - -> + crossing of the near-bottom-wall streamwise velocity AFTER the flow has actually reversed behind the step (skip any thin positive sliver at the step lip).
Definition at line 38 of file verify_bfs_sdflow.py.
Referenced by run().
| verify_bfs_sdflow.run | ( | Re, | |
S = 16, |
|||
Lr = 12, |
|||
U_in = 1.0, |
|||
nz = 4, |
|||
dt = 0.2, |
|||
max_steps = 24000 |
|||
| ) |
Run the backward-facing step at Reynolds number `Re` (Re_S = U_in*S/nu) and return its diagnostics. Step height S, full channel height 2S, channel length Lr*S; a partial parabolic inlet feeds the upper half, the lower half is the step face. Marches to steady state and returns a dict with the lower-wall reattachment length (x_r/S, x_r/H), bubble presence, mass-conservation error and max divergence. Returns None off root.
Definition at line 50 of file verify_bfs_sdflow.py.
References inlet_profile(), and reattachment().
Referenced by main().
| verify_bfs_sdflow.main | ( | ) |
Run the laminar de-risk (Re_S 100, 200) and optional Re=800 push; print results and set exit code.
Definition at line 109 of file verify_bfs_sdflow.py.
Referenced by main().