diff --git a/crates/specialized/rtx-cfd/tests/embedded3_added_mass.rs b/crates/specialized/rtx-cfd/tests/embedded3_added_mass.rs index 45189c4..431292c 100644 --- a/crates/specialized/rtx-cfd/tests/embedded3_added_mass.rs +++ b/crates/specialized/rtx-cfd/tests/embedded3_added_mass.rs @@ -167,7 +167,7 @@ fn cut_cell_added_mass() { let (cs, cc, c0) = fit(&op); let (cs_r, cc_r, _) = fit(&rec); println!( - " ADDED MASS n = {n}: C_m operator {:.4} (reconstructed {:.4}) vs Stokes {:.3}; viscous {:.4} (reconstructed {:.4}) vs {:.3}; offset {:+.3e}; worst residual {worst:.1e}; {:.0} s", + " ADDED MASS n = {n}: C_m operator {:.4} (reconstructed {:.4}) vs Stokes {:.3} unbounded / 1.135 confined (potential flow 1.071 in the unit box + 0.064); viscous {:.4} (reconstructed {:.4}) vs {:.3}; offset {:+.3e}; worst residual {worst:.1e}; {:.0} s", cs / scale, cs_r / scale, 1.0 + stokes, diff --git a/crates/specialized/rtx-cfd/tests/overset_added_mass.rs b/crates/specialized/rtx-cfd/tests/overset_added_mass.rs index 4d78f4b..4253d6d 100644 --- a/crates/specialized/rtx-cfd/tests/overset_added_mass.rs +++ b/crates/specialized/rtx-cfd/tests/overset_added_mass.rs @@ -109,7 +109,7 @@ async fn oscillating_cylinder_added_mass_on_the_moving_patch() -> CfdResult<()> let dt = period / steps_per_period as f64; let beta = R * R * OMEGA / NU; println!( - " n = {n}, h = {h:.4}, patch inner edge {hp:.4}, dt = {dt:.3e} ({steps_per_period} per period), A/r = {:.3}, KC = {:.3}, β = {beta:.0}: Stokes C_m ≈ {:.3}", + " n = {n}, h = {h:.4}, patch inner edge {hp:.4}, dt = {dt:.3e} ({steps_per_period} per period), A/r = {:.3}, KC = {:.3}, β = {beta:.0}: Stokes C_m ≈ {:.3} (unbounded; the unit box confines the cylinder: potential-flow C_m 1.071 + Stokes 0.064 = 1.135, R2-b 2026-09-21)", AMP / R, 2.0 * PI * AMP / R, 1.0 + 4.0 / (PI * beta).sqrt() diff --git a/crates/specialized/rtx-fsi/tests/fsi2_harness/overset_march.rs b/crates/specialized/rtx-fsi/tests/fsi2_harness/overset_march.rs index e810a7f..d7b4bbf 100644 --- a/crates/specialized/rtx-fsi/tests/fsi2_harness/overset_march.rs +++ b/crates/specialized/rtx-fsi/tests/fsi2_harness/overset_march.rs @@ -376,6 +376,16 @@ pub fn run_march_overset(case: BenchmarkCase, config: &OversetMarchConfig) -> Ov writeln!(f, "t,ux,uy,drag,lift").unwrap(); f }); + // R4 probe (2026-09-21): every step's RAW force (the CSV above carries + // 10-step medians) with the accepted fluid step's overlap defects — + // `RTX_FSI2O_STEP_CSV=`: t, ux, uy, drag, lift, Σ|div| on the + // patch acceptors, Σ|div| on the background fringe, the patch's max + // cell imbalance. + let mut step_csv = std::env::var("RTX_FSI2O_STEP_CSV").ok().map(|p| { + let mut f = std::fs::File::create(p).expect("step csv"); + writeln!(f, "t,ux,uy,drag,lift,defect_patch,defect_bg,patch_div").unwrap(); + f + }); let (t_fluid, t_structure) = (std::cell::Cell::new(0.0_f64), std::cell::Cell::new(0.0_f64)); // PERF-2 P0: the FEA predictor step (outside both buckets before). let t_predictor = std::cell::Cell::new(0.0_f64); @@ -560,6 +570,14 @@ pub fn run_march_overset(case: BenchmarkCase, config: &OversetMarchConfig) -> Ov ux_series.push(ux); uy_series.push(uy); let (drag_now, lift_now) = fluid.borrow().measure_force(); + if let Some(f) = step_csv.as_mut() { + let (dp, db, pd) = fluid.borrow().last_defects.get(); + writeln!( + f, + "{t_now:.6},{ux:.6e},{uy:.6e},{drag_now:.6e},{lift_now:.6e},{dp:.3e},{db:.3e},{pd:.3e}" + ) + .unwrap(); + } interval_drag.push(drag_now); interval_lift.push(lift_now); if (step + 1) % 10 == 0 {