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).