|
flow
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
|
Functions | |
| cavity (N, nz, Re, dt, mode, U=1.0, nsteps=200, vcyc=4, vel_iter=60, outer=2, pit=40) | |
| main () | |
Velocity-MG benchmark on the DOMAIN-BC paths (lid cavity 256^3, backward-facing step high-res 2D).
Unlike the IBM packed case (which has a dt ceiling from the row-scaled cut/solid coarse-coupling), the
cavity/BFS have NO immersed solid, so the velocity-MG coarse operator is geometry-exact -> it should be
both (a) FASTER than RB-GS at high resolution (MG kills the stiff-diffusion error in O(1) V-cycles vs RB-GS
O(N) sweeps), and (b) free of any dt restriction (a standard Helmholtz MG is unconditionally stable).
Reports, per case:
- SPEEDUP: wall-clock + step count to reach steady, RB-GS vs velocity-MG (diffusion-only) at the same dt,
and the velocity-MG run with a LARGE dt (pseudo-transient acceleration -> far fewer steps).
- NO-DT-RESTRICTION: implicit-FOU + upwind velocity-MG at a sweep of growing dt; must stay finite and keep
converging (CFL = U*dt up to O(1000)), where explicit advection and the IBM packed case would diverge.
| bench_velocity_mg_256.cavity | ( | N, | |
| nz, | |||
| Re, | |||
| dt, | |||
| mode, | |||
U = 1.0, |
|||
nsteps = 200, |
|||
vcyc = 4, |
|||
vel_iter = 60, |
|||
outer = 2, |
|||
pit = 40 |
|||
| ) |
Lid-driven cavity (N x N x nz), run a FIXED nsteps; return wall-clock + the converged-so-far centreline umin. mode: 'rbgs' | 'vmg' (diffusion-only) | 'vmg_fou' (implicit-FOU + upwind).
Definition at line 26 of file bench_velocity_mg_256.py.
Referenced by main().
| bench_velocity_mg_256.main | ( | ) |
Definition at line 55 of file bench_velocity_mg_256.py.
References cavity(), and main().
Referenced by main().