embedded3: moving-body box route (Δ(Vu) unsteady term, Solver::previous_volumes), floor-source / closure-lag / applied-force instruments, moving.rs split; falsifier prints the route residual under each
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 / Test (macos-latest) (push) Blocked by required conditions
CI / Test (ubuntu-latest) (push) Blocked by required conditions
CI / Python Bindings (maturin) (macos-latest) (push) Blocked by required conditions
CI / Python Bindings (maturin) (ubuntu-latest) (push) Blocked by required conditions
CI / Build (macos-latest) (push) Waiting to run
CI / Format Check (push) Failing after 4s
CI / Clippy Check (push) Failing after 4s
CI / Build (ubuntu-latest) (push) Failing after 3s
Performance Benchmarks / Run Benchmarks (push) Failing after 5s
Documentation / Build User Guide (push) Successful in 7s
CI / Build CPU-Only (Explicit) (push) Failing after 29s
Documentation / Build API Documentation (push) Failing after 31s

Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
Omar Sobh
2026-09-18 06:27:04 -05:00
co-authored by Claude Fable 5.1
parent 62b46194dd
commit 53b1babb91
6 changed files with 354 additions and 134 deletions
@@ -204,6 +204,12 @@ struct Record {
/// Load per unit span by the control-volume route (a box of whole
/// cells around the body, reading no near-wall value).
fy_cv: f64,
/// The inertia floor's momentum source per unit span (cut wall).
fy_floor: f64,
/// The pressure corrections' closure lag per unit span (cut wall).
fy_lag: f64,
/// The force the momentum equation applied (shear on u*, exchange on uⁿ).
fy_applied: f64,
fresh: usize,
skipped: usize,
p_far: f64,
@@ -294,14 +300,25 @@ fn run(scheme: WallScheme, moving: bool, dt: f64, t_end: f64) -> Run {
}
}
fy /= lz;
let fy_floor = solver.floor_source()[1] / lz;
let fy_lag = solver.pressure_lag()[1] / lz;
let fy_applied = if scheme == WallScheme::CutCell {
mask.cut_wall_force_applied(body, &field, MU, RHO, t)
.expect("applied")[1]
/ lz
} else {
0.0
};
let margin = 8;
let fy_cv = mask.control_volume_force(
let fy_cv = mask.control_volume_force_moving(
&field,
dt,
RHO,
MU,
None,
(margin, N - margin, margin, N - margin, 0, nz),
false,
solver.previous_volumes(),
)[1] / lz;
let p_far = field.p[g.cell(kp, jp, ip)];
let mut ke = 0.0;
@@ -337,12 +354,36 @@ fn run(scheme: WallScheme, moving: bool, dt: f64, t_end: f64) -> Run {
t,
fy,
fy_cv,
fy_floor,
fy_lag,
fy_applied,
fresh: result.fresh_cells,
skipped,
p_far,
ke,
});
}
if scheme == WallScheme::CutCell {
let n = records.len().max(1) as f64;
let rms = |f: &dyn Fn(&Record) -> f64| {
(records.iter().map(|r| f(r) * f(r)).sum::<f64>() / n).sqrt()
};
let mean = |f: &dyn Fn(&Record) -> f64| records.iter().map(f).sum::<f64>() / n;
println!(
" route residual (wall box) RMS {:.3e} → with the floor source {:.3e}, with the closure lag {:.3e}, both {:.3e}, APPLIED form {:.3e} (mean {:+.3e}); means wall {:+.3e} box {:+.3e} floor {:+.3e} lag {:+.3e}; box RMS {:.3e}",
rms(&|r| r.fy - r.fy_cv),
rms(&|r| r.fy + r.fy_floor - r.fy_cv),
rms(&|r| r.fy + r.fy_lag - r.fy_cv),
rms(&|r| r.fy + r.fy_floor + r.fy_lag - r.fy_cv),
rms(&|r| r.fy_applied - r.fy_cv),
mean(&|r| r.fy_applied),
mean(&|r| r.fy),
mean(&|r| r.fy_cv),
mean(&|r| r.fy_floor),
mean(&|r| r.fy_lag),
rms(&|r| r.fy_cv)
);
}
Run {
records,
energy_per_flip,