R2-b: the added-mass pins print the confined target (potential flow 1.071 in the unit box + Stokes 0.064 = 1.135); R4 probe: RTX_FSI2O_STEP_CSV — every step's raw force with the accepted fluid step's overlap defects (the march CSV carries 10-step medians)
CI / Build (macos-latest) (push) Waiting to run
CI / Test (macos-latest) (push) Blocked by required conditions
CI / Test (ubuntu-latest) (push) Blocked by required conditions
CI / Python Bindings (maturin) (ubuntu-latest) (push) Blocked by required conditions
CI / WASM Build + Size Check (push) Blocked by required conditions
CI / Distributed Training Tests (push) Blocked by required conditions
CI / CI Success (push) Blocked by required conditions
CI / Python Bindings (maturin) (macos-latest) (push) Blocked by required conditions
CI / Build CPU-Only (Explicit) (push) Failing after 3s
Documentation / Build API Documentation (push) Failing after 4s
Documentation / Build User Guide (push) Successful in 5s
CI / Format Check (push) Failing after 13s
CI / Build (ubuntu-latest) (push) Failing after 1m34s
CI / Clippy Check (push) Failing after 1m45s
Performance Benchmarks / Run Benchmarks (push) Successful in 2m15s

Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
Omar Sobh
2026-09-21 20:22:15 -05:00
co-authored by Claude Fable 5.1
parent 83922974d7
commit 847502f7c3
3 changed files with 20 additions and 2 deletions
@@ -167,7 +167,7 @@ fn cut_cell_added_mass() {
let (cs, cc, c0) = fit(&op); let (cs, cc, c0) = fit(&op);
let (cs_r, cc_r, _) = fit(&rec); let (cs_r, cc_r, _) = fit(&rec);
println!( 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 / scale,
cs_r / scale, cs_r / scale,
1.0 + stokes, 1.0 + stokes,
@@ -109,7 +109,7 @@ async fn oscillating_cylinder_added_mass_on_the_moving_patch() -> CfdResult<()>
let dt = period / steps_per_period as f64; let dt = period / steps_per_period as f64;
let beta = R * R * OMEGA / NU; let beta = R * R * OMEGA / NU;
println!( 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, AMP / R,
2.0 * PI * AMP / R, 2.0 * PI * AMP / R,
1.0 + 4.0 / (PI * beta).sqrt() 1.0 + 4.0 / (PI * beta).sqrt()
@@ -376,6 +376,16 @@ pub fn run_march_overset(case: BenchmarkCase, config: &OversetMarchConfig) -> Ov
writeln!(f, "t,ux,uy,drag,lift").unwrap(); writeln!(f, "t,ux,uy,drag,lift").unwrap();
f 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=<path>`: 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)); 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). // PERF-2 P0: the FEA predictor step (outside both buckets before).
let t_predictor = std::cell::Cell::new(0.0_f64); 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); ux_series.push(ux);
uy_series.push(uy); uy_series.push(uy);
let (drag_now, lift_now) = fluid.borrow().measure_force(); 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_drag.push(drag_now);
interval_lift.push(lift_now); interval_lift.push(lift_now);
if (step + 1) % 10 == 0 { if (step + 1) % 10 == 0 {