embedded3: cut predictor convection carries ρ (host + e3_cut.cu; density-scaling pin); operator load route includes the wall exchange (exchange.rs); reconstructed_parts, probe aperture floor knob; dfg_split diagnostic test
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 / 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 / Build (macos-latest) (push) Waiting to run
CI / Test (macos-latest) (push) Blocked by required conditions
CI / Build CPU-Only (Explicit) (push) Failing after 3s
Documentation / Build API Documentation (push) Failing after 4s
CI / Build (ubuntu-latest) (push) Failing after 4s
Documentation / Build User Guide (push) Successful in 4s
CI / Format Check (push) Failing after 10s
CI / Clippy Check (push) Failing after 35s
Performance Benchmarks / Run Benchmarks (push) Successful in 1m32s

Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
Omar Sobh
2026-09-18 03:59:57 -05:00
co-authored by Claude Fable 5.1
parent 680041d63d
commit f6add276c0
11 changed files with 454 additions and 9 deletions
@@ -207,6 +207,8 @@ impl Mask {
step_apertures: None,
step_open: None,
merge_master: Vec::new(),
scheme: crate::solvers::incompressible::ConvectionScheme::Upwind,
density: 1.0,
};
mask.compute_merging(None);
Ok(mask)
@@ -564,7 +566,8 @@ impl Mask {
/// without a cut geometry.
pub fn cut_wall_force(&self, body: &Body, f: &Field, mu: f64, t: f64) -> Option<[f64; 3]> {
let (p, s) = self.cut_wall_force_parts(body, f, mu, t)?;
Some([p[0] + s[0], p[1] + s[1], p[2] + s[2]])
let x = self.cut_wall_exchange_force(body, f, mu, self.density, t, None)?;
Some([p[0] + s[0] + x[0], p[1] + s[1] + x[1], p[2] + s[2] + x[2]])
}
/// The reconstructed wall route (S2-1 remedy): on every wall polygon
@@ -585,12 +588,26 @@ impl Mask {
t: f64,
planes: Option<(usize, usize)>,
) -> Option<[f64; 3]> {
let (p, s) = self.cut_wall_force_reconstructed_parts(body, f, mu, t, planes)?;
Some([p[0] + s[0], p[1] + s[1], p[2] + s[2]])
}
/// The reconstructed route split into its pressure and shear parts.
pub fn cut_wall_force_reconstructed_parts(
&self,
body: &Body,
f: &Field,
mu: f64,
t: f64,
planes: Option<(usize, usize)>,
) -> Option<([f64; 3], [f64; 3])> {
let cut = self.cut.as_ref()?;
let g = self.grid;
let (k0, k1) = planes.unwrap_or((0, g.nz));
let h = g.dx.min(g.dy).min(g.dz);
let (d1, d2) = (h, 2.0 * h);
let mut force = [0.0; 3];
let mut shear = [0.0; 3];
for (idx, w) in cut.wall.iter().enumerate() {
let area = (w[0] * w[0] + w[1] * w[1] + w[2] * w[2]).sqrt();
if area == 0.0 || !self.cell_fluid[idx] {
@@ -645,10 +662,10 @@ impl Mask {
let dn = wall_gradient(t1[c] - ts[c], t2[c] - ts[c]);
// Traction on the body = (fluid stress on the fluid side):
// the shear the fluid exerts on the wall along +t.
force[c] += mu * dn * area;
shear[c] += mu * dn * area;
}
}
Some(force)
Some((force, shear))
}
/// The cut-cell load route restricted to the cells (and faces) of the
@@ -663,8 +680,13 @@ impl Mask {
(k0, k1): (usize, usize),
) -> Option<[f64; 3]> {
let (p, s) = self.cut_wall_force_parts_in(body, f, mu, t, Some((k0, k1)))?;
let x = self.cut_wall_exchange_force(body, f, mu, self.density, t, Some((k0, k1)))?;
let lz = (k1 - k0) as f64 * self.grid.dz;
Some([(p[0] + s[0]) / lz, (p[1] + s[1]) / lz, (p[2] + s[2]) / lz])
Some([
(p[0] + s[0] + x[0]) / lz,
(p[1] + s[1] + x[1]) / lz,
(p[2] + s[2] + x[2]) / lz,
])
}
/// The cut-cell load route split into its pressure and shear parts.