embedded3 S2-3d: face-momentum unsteady term for the box (Mask::box_momentum_rates, Solver::previous_apertures); falsifier prints the residual against it
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) (macos-latest) (push) Blocked by required conditions
CI / Python Bindings (maturin) (ubuntu-latest) (push) Blocked by required conditions
CI / CI Success (push) Blocked by required conditions
Documentation / Build API Documentation (push) Failing after 4s
CI / Clippy Check (push) Failing after 33s
CI / WASM Build + Size Check (push) Blocked by required conditions
CI / Distributed Training Tests (push) Blocked by required conditions
Performance Benchmarks / Run Benchmarks (push) Failing after 7s
CI / Build CPU-Only (Explicit) (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 1m13s

Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
Omar Sobh
2026-09-18 12:58:30 -05:00
co-authored by Claude Fable 5.1
parent cdd5ad0b66
commit 9ae0e42dcd
4 changed files with 111 additions and 1 deletions
@@ -210,6 +210,8 @@ struct Record {
fy_lag: f64,
/// The force the momentum equation applied (shear on u*, exchange on uⁿ).
fy_applied: f64,
/// The box route with the scheme's own (face control volume) momentum rate.
fy_cv_faces: f64,
fresh: usize,
skipped: usize,
p_far: f64,
@@ -320,6 +322,15 @@ fn run(scheme: WallScheme, moving: bool, dt: f64, t_end: f64) -> Run {
false,
solver.previous_volumes(),
)[1] / lz;
let (rate_faces, rate_cells) = mask.box_momentum_rates(
&field,
dt,
RHO,
(margin, N - margin, margin, N - margin, 0, nz),
solver.previous_apertures(),
solver.previous_volumes(),
);
let fy_cv_faces = fy_cv + (rate_cells[1] - rate_faces[1]) / lz;
let p_far = field.p[g.cell(kp, jp, ip)];
let mut ke = 0.0;
for k in 0..nz {
@@ -357,6 +368,7 @@ fn run(scheme: WallScheme, moving: bool, dt: f64, t_end: f64) -> Run {
fy_floor,
fy_lag,
fy_applied,
fy_cv_faces,
fresh: result.fresh_cells,
skipped,
p_far,
@@ -370,13 +382,15 @@ fn run(scheme: WallScheme, moving: bool, dt: f64, t_end: f64) -> Run {
};
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}",
" route residual (wall box) RMS {:.3e} → with the floor source {:.3e}, with the closure lag {:.3e}, both {:.3e}, APPLIED form {:.3e} (mean {:+.3e}), against the FACE-momentum box {:.3e} (its 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),
rms(&|r| r.fy - r.fy_cv_faces),
mean(&|r| r.fy_cv_faces),
mean(&|r| r.fy),
mean(&|r| r.fy_cv),
mean(&|r| r.fy_floor),