R4-i + R5 design pass: RTX_FSI2O_REGEN_ONCE (one patch regeneration per coupled step; dies at step 0 — the registered test is void), the step CSV's subit/dres_y/dres_norm/fx_nodal/fy_nodal columns; the cut predictor's per-face term probe (enable_term_probe) and the curved instrument's exact side/wall viscous integrals — the static convex wall's flat residual is the viscous closure's first-order relative accuracy on O(1/h) fluxes
CI / Build (macos-latest) (push) Canceled after 0s
CI / Python Bindings (maturin) (ubuntu-latest) (push) Canceled after 0s
CI / CI Success (push) Canceled after 0s
CI / Test (macos-latest) (push) Canceled after 0s
CI / Test (ubuntu-latest) (push) Canceled after 0s
CI / Python Bindings (maturin) (macos-latest) (push) Canceled after 0s
CI / WASM Build + Size Check (push) Canceled after 0s
CI / Distributed Training Tests (push) Canceled after 0s
CI / Build CPU-Only (Explicit) (push) Failing after 4s
CI / Clippy Check (push) Failing after 4s
Documentation / Build User Guide (push) Successful in 4s
CI / Format Check (push) Failing after 12s
CI / Build (ubuntu-latest) (push) Failing after 1m26s
Documentation / Build API Documentation (push) Failing after 1m28s
Performance Benchmarks / Run Benchmarks (push) Successful in 2m7s
CI / Build (macos-latest) (push) Canceled after 0s
CI / Python Bindings (maturin) (ubuntu-latest) (push) Canceled after 0s
CI / CI Success (push) Canceled after 0s
CI / Test (macos-latest) (push) Canceled after 0s
CI / Test (ubuntu-latest) (push) Canceled after 0s
CI / Python Bindings (maturin) (macos-latest) (push) Canceled after 0s
CI / WASM Build + Size Check (push) Canceled after 0s
CI / Distributed Training Tests (push) Canceled after 0s
CI / Build CPU-Only (Explicit) (push) Failing after 4s
CI / Clippy Check (push) Failing after 4s
Documentation / Build User Guide (push) Successful in 4s
CI / Format Check (push) Failing after 12s
CI / Build (ubuntu-latest) (push) Failing after 1m26s
Documentation / Build API Documentation (push) Failing after 1m28s
Performance Benchmarks / Run Benchmarks (push) Successful in 2m7s
Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
f5735fdeaa
commit
501b45f9d0
+24
-3
@@ -111,7 +111,8 @@ impl Solver {
|
||||
let cv = mask.cv_geometry(c, p);
|
||||
// S2-7b: the convective sides' own apertures (host prototype).
|
||||
let conv_parts = if mask.conv_sides_exact {
|
||||
mask.cut().and_then(|cut| mask.exact_cv_side_parts(cut, c, p))
|
||||
mask.cut()
|
||||
.and_then(|cut| mask.exact_cv_side_parts(cut, c, p))
|
||||
} else {
|
||||
None
|
||||
};
|
||||
@@ -159,7 +160,9 @@ impl Solver {
|
||||
// The two half faces' own apertures times their faces' values.
|
||||
let v = |q: [i64; 3]| val(d, q).unwrap_or(0.0);
|
||||
(
|
||||
0.5 * (parts[d][1].0 * v(add(cell_minus, ed, 1)) + parts[d][1].1 * v(add(cell_plus, ed, 1))) * a_d,
|
||||
0.5 * (parts[d][1].0 * v(add(cell_minus, ed, 1))
|
||||
+ parts[d][1].1 * v(add(cell_plus, ed, 1)))
|
||||
* a_d,
|
||||
0.5 * (parts[d][0].0 * v(cell_minus) + parts[d][0].1 * v(cell_plus)) * a_d,
|
||||
)
|
||||
}
|
||||
@@ -260,7 +263,8 @@ impl Solver {
|
||||
return 0.0;
|
||||
}
|
||||
let cvq = mask.cv_geometry(c, q);
|
||||
let ubq = mask.surface_velocity_at(body, foot_of(q, lat.face_position(c, q)), c, t_old);
|
||||
let ubq =
|
||||
mask.surface_velocity_at(body, foot_of(q, lat.face_position(c, q)), c, t_old);
|
||||
// Explicit, with a coefficient ∝ 1/d_f: take the gradient from
|
||||
// the faces at least TRANSVERSE_DISTANCE_FLOOR h off the wall —
|
||||
// a FULL neighbour too, over its own distance along the cut
|
||||
@@ -426,6 +430,23 @@ impl Solver {
|
||||
+ wall_rhs)
|
||||
/ (inertia + shear + wall_implicit);
|
||||
let v_alpha = fraction * h[c] * area[c];
|
||||
if let Some(tp) = self.term_probe.borrow_mut().as_mut() {
|
||||
let m = rho * v_eff;
|
||||
let terms = [
|
||||
-conv / m,
|
||||
diff / m,
|
||||
(shear * (ub - u_star) - shear_explicit) / m,
|
||||
pressure / m,
|
||||
source / m,
|
||||
(wall_rhs - wall_implicit * u_star) / m,
|
||||
(u_star - u0) / dt,
|
||||
];
|
||||
let v = &mut tp[c];
|
||||
if v.len() <= idx_f {
|
||||
v.resize(idx_f + 1, [0.0; 7]);
|
||||
}
|
||||
v[idx_f] = terms;
|
||||
}
|
||||
(u_star, rho * (v_eff - v_alpha) * (u_star - u0) / dt)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -230,7 +230,8 @@ impl Default for Parameters {
|
||||
.is_ok_and(|v| v == "off"),
|
||||
// ON by default since S2-7 (`=h` reproduces the records before it).
|
||||
wall_exchange_axis: std::env::var("RTX_E3_WALL_EXCHANGE").map_or(true, |v| v != "h"),
|
||||
wall_exchange_foot: std::env::var("RTX_E3_WALL_EXCHANGE").is_ok_and(|v| v == "axisfoot"),
|
||||
wall_exchange_foot: std::env::var("RTX_E3_WALL_EXCHANGE")
|
||||
.is_ok_and(|v| v == "axisfoot"),
|
||||
conv_sides_exact: std::env::var("RTX_E3_CONV_SIDES").is_ok_and(|v| v == "exact"),
|
||||
wall_flux_true_normal: std::env::var("RTX_E3_WALL_FLUX").is_ok_and(|v| v == "true"),
|
||||
wall_foot_centroid: std::env::var("RTX_E3_WALL_FOOT").is_ok_and(|v| v == "centroid"),
|
||||
@@ -238,7 +239,8 @@ impl Default for Parameters {
|
||||
momentum_volume_tiled: std::env::var("RTX_E3_MOMENTUM_VOLUME")
|
||||
.is_ok_and(|v| v == "tiled"),
|
||||
cv_sides_exact: std::env::var("RTX_E3_CV_SIDES").is_ok_and(|v| v == "exact"),
|
||||
wall_order2_centroid: std::env::var("RTX_E3_WALL_ORDER2").is_ok_and(|v| v == "centroid"),
|
||||
wall_order2_centroid: std::env::var("RTX_E3_WALL_ORDER2")
|
||||
.is_ok_and(|v| v == "centroid"),
|
||||
// ON by default since S2-5 (`=0` reproduces the records before it).
|
||||
diffusion_centroid: std::env::var("RTX_E3_DIFFUSION_CENTROID")
|
||||
.map_or(true, |v| v != "0"),
|
||||
@@ -269,6 +271,11 @@ pub struct Solver {
|
||||
/// cut predictor only): the box route counts it, the operator route
|
||||
/// does not.
|
||||
pub(super) floor_source: std::cell::Cell<[f64; 3]>,
|
||||
/// R5 design-pass instrument (host cut predictor only): per unknown
|
||||
/// face of each component, the last step's momentum terms as
|
||||
/// accelerations `[−conv, diff, wall shear, pressure, source, solid
|
||||
/// exchange, total] / (ρ V_eff)`; `None` (the default) records nothing.
|
||||
pub(super) term_probe: std::cell::RefCell<Option<[Vec<[f64; 7]>; 3]>>,
|
||||
/// The closure lag of the pressure corrections over the last step
|
||||
/// (`Mask::closure_lag` summed over the correctors; host path).
|
||||
pub(super) pressure_lag: std::cell::Cell<[f64; 3]>,
|
||||
@@ -308,6 +315,7 @@ impl Solver {
|
||||
params,
|
||||
momentum_source: None,
|
||||
floor_source: std::cell::Cell::new([0.0; 3]),
|
||||
term_probe: std::cell::RefCell::new(None),
|
||||
pressure_lag: std::cell::Cell::new([0.0; 3]),
|
||||
vol_old: Vec::new(),
|
||||
apertures_old: None,
|
||||
@@ -402,6 +410,16 @@ impl Solver {
|
||||
.expect("embedded mask")
|
||||
}
|
||||
|
||||
/// R5 instrument: record the cut predictor's momentum terms per face
|
||||
/// from the next step on (host path only; a no-op on the device path).
|
||||
pub fn enable_term_probe(&self) {
|
||||
*self.term_probe.borrow_mut() = Some([Vec::new(), Vec::new(), Vec::new()]);
|
||||
}
|
||||
/// The recorded terms per component face index (see `term_probe`).
|
||||
#[must_use]
|
||||
pub fn term_probe(&self) -> Option<[Vec<[f64; 7]>; 3]> {
|
||||
self.term_probe.borrow().clone()
|
||||
}
|
||||
/// The small-cell floor's momentum source over the last step (a force
|
||||
/// on the fluid; host cut predictor only, zero otherwise).
|
||||
#[must_use]
|
||||
|
||||
Reference in New Issue
Block a user