|
flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
|
Functions | |
| model (N, rho, mu, walls=False) | |
| step_matrix (m, dt, kap, scheme) | |
| radius (T) | |
| density (N, kind, ratio, seed=1) | |
| main () | |
Step-operator model of the collocated variable-density step (doc/collocated_varrho_forces.md,
Appendix A) -- an INSTRUMENT, not a gate.
A dense, exact-solve, 2-D, h = 1 model of one step (rho0 = 1), unknowns (u, v, P). The step matrix
T maps (u^n, v^n, P^n) -> (u^{n+1}, v^{n+1}, P^{n+1}) exactly (dense inverse for the implicit
momentum operator, pseudo-inverse for the pressure Poisson), so its spectral radius is the per-step
growth factor of the scheme. Three schemes:
"V8" the retired WO-T step: the pressure and every force as a face acceleration added AFTER the
implicit viscous solve (Basilisk centered.h). Non-incremental; with the rotational update
(kappa = mu) its pressure obeys P^{n+1} = -4 kappa dt S P^n / rho -> radius 8 mu dt (2-D).
"D2" the predictor form with the ARITHMETIC centre->face map: not an adjoint pair, radius > 1
at high contrast.
"D3" the chosen scheme: the predictor form with the MOMENTUM-weighted centre->face map
(rho_L u_L + rho_R u_R)/(rho_L + rho_R), so M Gamma = -C^T and the radius is exactly 1.
Run: OMP_NUM_THREADS=8 python tests/study/colocated_varrho_symbol.py
Expected (the design note): V8 at dt 0.2: 1.6 = 8 mu dt; D2 at ratio 1e4 slightly above 1 at
dt 3 and 10 (the note quotes 1.0136 / 1.0145 for its shape); D3: 1.00000 everywhere.
| colocated_varrho_symbol.model | ( | N, | |
| rho, | |||
| mu, | |||
walls = False |
|||
| ) |
Definition at line 28 of file colocated_varrho_symbol.py.
Referenced by main().
| colocated_varrho_symbol.step_matrix | ( | m, | |
| dt, | |||
| kap, | |||
| scheme | |||
| ) |
Definition at line 59 of file colocated_varrho_symbol.py.
Referenced by main().
| colocated_varrho_symbol.radius | ( | T | ) |
Definition at line 85 of file colocated_varrho_symbol.py.
Referenced by main().
| colocated_varrho_symbol.density | ( | N, | |
| kind, | |||
| ratio, | |||
seed = 1 |
|||
| ) |
Cell density field (x fastest, index x + N*y).
Definition at line 90 of file colocated_varrho_symbol.py.
Referenced by main().
| colocated_varrho_symbol.main | ( | ) |
Definition at line 109 of file colocated_varrho_symbol.py.
References density(), main(), model(), radius(), and step_matrix().
Referenced by main().