b4am: prescribed b4 motion on the overset (modal added mass / fluid damping instrument)

- tests/fsi2_b4_added_mass.rs: #[ignore] instrument fsi2_b4_prescribed_mode. The flag's wetted
  surface moves as q(t) phi (phi from B4_MODE, M-orthonormal in-vacuo b4), q = q0 r(t) sin(w t);
  per step the CSV records q, qd, qdd and the generalised fluid force sum_k f_k . phi_k from the
  march's own nodal load (sample_load); optional per-node load CSV. B4_DT overrides the fluid step.
- fsi2_harness/overset.rs: RTX_FSI2O_STILL=1 turns the inflow off (still fluid) while keeping
  u_mean for the CFL step and the solvers' reference flux. Unset = unchanged; gate: a short
  prescribed replay (fsi2_overset_prescribed_motion, ny 62, 185 steps) byte-identical to main.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
Omar Sobh
2026-09-25 10:23:21 -05:00
co-authored by Claude Opus 5.5
parent 973274f2c0
commit ec0e4f1573
2 changed files with 212 additions and 1 deletions
@@ -343,8 +343,18 @@ impl OversetFluid {
" multigrid V-cycle: CUDA DEVICE, f32 red-black (PERF-2 regime, RTX_FSI2O_MG_DEVICE)"
);
}
// `RTX_FSI2O_STILL=1` (b4am): no inflow — still fluid — with the
// case's u_mean kept for the CFL step and the solvers' reference
// flux (their inner stops), so a still-fluid run differs from the
// mean-flow run in the inflow alone. Unset = the benchmark inflow.
let still = std::env::var("RTX_FSI2O_STILL").is_ok_and(|v| v == "1");
if still {
println!(
" STILL FLUID: inflow off (RTX_FSI2O_STILL), u_mean {u_mean} kept for dt and references"
);
}
background.set_boundary_velocity(move |x, y, t| {
if x <= 0.0 {
if x <= 0.0 && !still {
(inflow_for(u_mean, y, t), 0.0)
} else {
(0.0, 0.0)