From dbc5dbaefb29ed4516d6ae79e8f622c975791474 Mon Sep 17 00:00:00 2001 From: Omar Sobh Date: Fri, 18 Sep 2026 19:05:51 -0500 Subject: [PATCH] =?UTF-8?q?embedded3=20S2-6:=20the=20three=20closures=20de?= =?UTF-8?q?fault=20ON=20(oblique=20distance,=20transverse=20centroid=20cor?= =?UTF-8?q?rection,=20fine=20floor)=20=E2=80=94=20RTX=5FE3=5FWALL=5FDISTAN?= =?UTF-8?q?CE=3Dface=20RTX=5FE3=5FDIFFUSION=5FTRANSVERSE=3D0=20RTX=5FE3=5F?= =?UTF-8?q?DISTANCE=5FFLOOR=3Dcoarse=20reproduce=20every=20earlier=20recor?= =?UTF-8?q?d=20digit=20for=20digit=20(checked:=20DFG=202D=20ny=2062=20host?= =?UTF-8?q?);=20DFG=202D=20D/h=2030=20c=5FD=20-0.19=20%=20->=20-0.01=20%,?= =?UTF-8?q?=203D=20ny=20124=206.1750=20/=200.00844=20/=200.1692=20inside?= =?UTF-8?q?=20the=20bar=20on=20both=20routes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5.1 --- .../solvers/incompressible/embedded3/step/mod.rs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/crates/specialized/rtx-cfd/src/solvers/incompressible/embedded3/step/mod.rs b/crates/specialized/rtx-cfd/src/solvers/incompressible/embedded3/step/mod.rs index 4ca8d88..73d626f 100644 --- a/crates/specialized/rtx-cfd/src/solvers/incompressible/embedded3/step/mod.rs +++ b/crates/specialized/rtx-cfd/src/solvers/incompressible/embedded3/step/mod.rs @@ -100,7 +100,7 @@ pub struct Parameters { /// α)|n_t|` (`n_t` the wall normal's part in the face plane) instead /// of `φ + ½h(1 − α)`, which over-reads the distance on oblique walls /// by `½h(1 − α)(1 − |n_t|)` at every h (S2-5). `Parameters::default()` - /// reads `RTX_E3_WALL_DISTANCE=oblique` (default: the recorded form). + /// is ON since S2-6 (`RTX_E3_WALL_DISTANCE=face` restores the recorded form). pub wall_distance_oblique: bool, /// The transverse part of the centroid diffusion (S2-6): two neighbour /// faces with different apertures have open-part centroids offset @@ -108,11 +108,11 @@ pub struct Parameters { /// carries `∇u · Δs_⊥` — a first-order wall position on oblique walls /// (≈ 0.1 h inside the body). Removed with the faces' own wall-normal /// gradients `(u − U_b)/d_f`, in the cross AND the own direction. - /// Needs `diffusion_centroid`. `RTX_E3_DIFFUSION_TRANSVERSE=1`. + /// Needs `diffusion_centroid`. ON since S2-6 (`RTX_E3_DIFFUSION_TRANSVERSE=0`). pub diffusion_transverse: bool, /// The wall-distance floor at 0.01 of the smallest spacing instead of /// 0.05: the coarse floor doubles the distance of faces with α < 0.1 - /// (the flat wall's θ 0.95 excess, S2-6). `RTX_E3_DISTANCE_FLOOR=fine`. + /// (the flat wall's θ 0.95 excess). ON since S2-6 (`RTX_E3_DISTANCE_FLOOR=coarse`). pub distance_floor_fine: bool, /// The diffusive exchange of a fluid face with a SOLID neighbour face /// over the axis distance to the wall, `δ = min(h, d_f/|n_d|)`, and @@ -155,11 +155,15 @@ impl Default for Parameters { .ok() .and_then(|v| v.parse().ok()) .unwrap_or(1), + // The three S2-6 closures are ON by default; `RTX_E3_WALL_DISTANCE=face`, + // `RTX_E3_DIFFUSION_TRANSVERSE=0` and `RTX_E3_DISTANCE_FLOOR=coarse` + // together reproduce every record before S2-6 digit for digit. wall_distance_oblique: std::env::var("RTX_E3_WALL_DISTANCE") - .is_ok_and(|v| v == "oblique"), + .map_or(true, |v| v != "face"), diffusion_transverse: std::env::var("RTX_E3_DIFFUSION_TRANSVERSE") - .is_ok_and(|v| v == "1"), - distance_floor_fine: std::env::var("RTX_E3_DISTANCE_FLOOR").is_ok_and(|v| v == "fine"), + .map_or(true, |v| v != "0"), + distance_floor_fine: std::env::var("RTX_E3_DISTANCE_FLOOR") + .map_or(true, |v| v != "coarse"), wall_exchange_axis: std::env::var("RTX_E3_WALL_EXCHANGE").is_ok_and(|v| v == "axis"), pressure_centroid: std::env::var("RTX_E3_PRESSURE_CENTROID").is_ok_and(|v| v == "1"), // ON by default since S2-5 (`=0` reproduces the records before it).