embedded3 flag wake: RTX_E3_FLAG_CYL_SPAN=flag — the cylinder cut to the flag's span with the flag's rounded edges (the whole body finite in the wider ducts); wall to wall by default, slab gate byte-identical
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 / WASM Build + Size Check (push) Blocked by required conditions
CI / CI Success (push) Blocked by required conditions
CI / Distributed Training Tests (push) Blocked by required conditions
Performance Benchmarks / Run Benchmarks (push) Failing after 4s
CI / Build CPU-Only (Explicit) (push) Failing after 4s
CI / Clippy Check (push) Failing after 4s
Documentation / Build API Documentation (push) Failing after 5s
CI / Format Check (push) Failing after 18s
Documentation / Build User Guide (push) Successful in 6s
CI / Build (ubuntu-latest) (push) Failing after 1m27s
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 / WASM Build + Size Check (push) Blocked by required conditions
CI / CI Success (push) Blocked by required conditions
CI / Distributed Training Tests (push) Blocked by required conditions
Performance Benchmarks / Run Benchmarks (push) Failing after 4s
CI / Build CPU-Only (Explicit) (push) Failing after 4s
CI / Clippy Check (push) Failing after 4s
Documentation / Build API Documentation (push) Failing after 5s
CI / Format Check (push) Failing after 18s
Documentation / Build User Guide (push) Successful in 6s
CI / Build (ubuntu-latest) (push) Failing after 1m27s
Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
b848d98719
commit
c4a29b557d
@@ -256,6 +256,21 @@ fn flag_3d(x: f64, y: f64, z: f64, t: f64, r: f64) -> (f64, (f64, f64)) {
|
|||||||
(outside + q1.max(q2).min(0.0) - r, v)
|
(outside + q1.max(q2).min(0.0) - r, v)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// The finite cylinder: the 2D circle cut to `span` in z with the same
|
||||||
|
/// rounded edges as the flag (`RTX_E3_FLAG_CYL_SPAN=flag`, 2026-09-23: the
|
||||||
|
/// whole body a finite object in the wider ducts); wall to wall otherwise.
|
||||||
|
fn cylinder_3d(d2: f64, z: f64, r: f64) -> f64 {
|
||||||
|
let span = flag_span();
|
||||||
|
if span >= duct_depth() || !std::env::var("RTX_E3_FLAG_CYL_SPAN").is_ok_and(|v| v == "flag") {
|
||||||
|
return d2;
|
||||||
|
}
|
||||||
|
let zc = 0.5 * duct_depth();
|
||||||
|
let q1 = d2 + r;
|
||||||
|
let q2 = (z - zc).abs() - 0.5 * span + r;
|
||||||
|
let outside = (q1.max(0.0).powi(2) + q2.max(0.0).powi(2)).sqrt();
|
||||||
|
outside + q1.max(q2).min(0.0) - r
|
||||||
|
}
|
||||||
|
|
||||||
fn inflow(y: f64, z: f64) -> f64 {
|
fn inflow(y: f64, z: f64) -> f64 {
|
||||||
let (hd, d) = (duct_height(), duct_depth());
|
let (hd, d) = (duct_height(), duct_depth());
|
||||||
16.0 * U_M * y * z * (hd - y) * (d - z) / (hd * hd * d * d)
|
16.0 * U_M * y * z * (hd - y) * (d - z) / (hd * hd * d * d)
|
||||||
@@ -355,11 +370,11 @@ fn flag_wake_on_the_device() {
|
|||||||
let cyl = move |x: f64, y: f64| ((x - CX).powi(2) + (y - cy).powi(2)).sqrt() - R_CYL;
|
let cyl = move |x: f64, y: f64| ((x - CX).powi(2) + (y - cy).powi(2)).sqrt() - R_CYL;
|
||||||
let r_fillet = root_fillet();
|
let r_fillet = root_fillet();
|
||||||
let body = Body::from_sdf(move |x, y, z, t| {
|
let body = Body::from_sdf(move |x, y, z, t| {
|
||||||
fillet_union(cyl(x, y), flag_3d(x, y, z, t, r_edge).0, r_fillet)
|
fillet_union(cylinder_3d(cyl(x, y), z, r_edge), flag_3d(x, y, z, t, r_edge).0, r_fillet)
|
||||||
})
|
})
|
||||||
.with_surface_velocity(move |x, y, z, t| {
|
.with_surface_velocity(move |x, y, z, t| {
|
||||||
let (df, (vx, vy)) = flag_3d(x, y, z, t, r_edge);
|
let (df, (vx, vy)) = flag_3d(x, y, z, t, r_edge);
|
||||||
if df <= cyl(x, y) {
|
if df <= cylinder_3d(cyl(x, y), z, r_edge) {
|
||||||
(vx, vy, 0.0)
|
(vx, vy, 0.0)
|
||||||
} else {
|
} else {
|
||||||
(0.0, 0.0, 0.0)
|
(0.0, 0.0, 0.0)
|
||||||
@@ -378,8 +393,9 @@ fn flag_wake_on_the_device() {
|
|||||||
}
|
}
|
||||||
solver.initialize(&mut field);
|
solver.initialize(&mut field);
|
||||||
println!(
|
println!(
|
||||||
" flag wake ny {ny} (span {}; duct {:.2} × {:.2} m, inflow {}, z sides {}; root fillet {:.4} m, tip inset {:.4} m): {nx}×{ny_grid}×{nz} = {} cells, h {h:.4e}, dt {dt:.3e}, {periods} periods = {t_end:.3} s, {} steps",
|
" flag wake ny {ny} (span {}, cylinder {}; duct {:.2} × {:.2} m, inflow {}, z sides {}; root fillet {:.4} m, tip inset {:.4} m): {nx}×{ny_grid}×{nz} = {} cells, h {h:.4e}, dt {dt:.3e}, {periods} periods = {t_end:.3} s, {} steps",
|
||||||
flag_span(),
|
flag_span(),
|
||||||
|
if std::env::var("RTX_E3_FLAG_CYL_SPAN").is_ok_and(|v| v == "flag") { "cut to the span" } else { "wall to wall" },
|
||||||
duct_height(),
|
duct_height(),
|
||||||
duct_depth(),
|
duct_depth(),
|
||||||
if slab_nz > 0 || inflow_2d { "2d" } else { "3d" },
|
if slab_nz > 0 || inflow_2d { "2d" } else { "3d" },
|
||||||
|
|||||||
Reference in New Issue
Block a user