P5-1: FSI2 with the fluid on the overset — fsi2_harness/overset.rs (the background without a body, the cylinder–flag patch regenerated around the deformed flag every pass via set_patch_mesh, the wall velocity from the interface velocities along the wetted polygon, the load from the patch's wall faces into WettedSurface::transfer_load — no probes, no clamp, no smoothing), fsi2_harness/overset_march.rs (the harness's rigid phase / release / subiterated coupling with its acceptance rule, no rescue machinery, death returned not panicked), tests/turek_hron_fsi2_overset.rs (RTX_FSI2O_* knobs); rtx-cfd: CurvilinearPisoSolver::wall_tractions (per-face pressure + full-stress traction, surface_force sums the same terms bit-identically); Interface::edges (bottom/tip/top for the generator); cylinder_flag_mms RTX_CF_BEND (P5-0 gate iv: Stokes orders 2.14 / 2.09 on the flag bent to 80 mm)
Documentation / Build API Documentation (push) Canceled after 0s
CI / Build (macos-latest) (push) Canceled after 0s
CI / Build (ubuntu-latest) (push) Canceled after 0s
CI / Test (macos-latest) (push) Canceled after 0s
CI / Test (ubuntu-latest) (push) Canceled after 0s
CI / Build CPU-Only (Explicit) (push) Canceled after 0s
Documentation / Build User Guide (push) Canceled after 0s
Performance Benchmarks / Run Benchmarks (push) Canceled after 0s
CI / Format Check (push) Canceled after 0s
CI / Clippy Check (push) Canceled after 0s
CI / Python Bindings (maturin) (macos-latest) (push) Canceled after 0s
CI / Python Bindings (maturin) (ubuntu-latest) (push) Canceled after 0s
CI / WASM Build + Size Check (push) Canceled after 0s
CI / Distributed Training Tests (push) Canceled after 0s
CI / CI Success (push) Canceled after 0s

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_0116sg1Qz1gMv9hdcKP1XUam
This commit is contained in:
Omar Sobh
2026-09-07 07:16:53 -07:00
co-authored by Claude Fable 5.1
parent c2451fbacf
commit f0b2563bf8
6 changed files with 1076 additions and 41 deletions
@@ -3,8 +3,8 @@
//! S3 harness) — do the Stokes-limit and upwind orders survive the junction
//! fillets' skew? Rungs at the benchmark's h = 0.41 / 41, 62, 82.
use rtx_cfd::mesh::patch_gen::{cylinder_flag_patch, cylinder_flag_patch_deformed, FlagEdges};
use rtx_cfd::mesh::PatchMesh;
use rtx_cfd::mesh::patch_gen::cylinder_flag_patch;
use rtx_cfd::solvers::incompressible::{
CurvilinearParameters, CurvilinearPisoSolver, NormalDiffusion, PatchConvection, PatchField,
};
@@ -43,6 +43,26 @@ fn patch(ny: usize) -> CfdResult<PatchMesh> {
.unwrap_or(500);
// Fixed geometry across the ladder: the fillet of the coarsest rung.
let fillet = 0.5 * 0.41 / 41.0;
// P5-0 gate (iv), `RTX_CF_BEND=a`: the same MMS on the patch around
// the flag bent to tip deflection `a` (the cantilever shape).
if let Some(a) = std::env::var("RTX_CF_BEND")
.ok()
.and_then(|v| v.parse::<f64>().ok())
{
return Ok(cylinder_flag_patch_deformed(
[0.2, 0.2],
0.05,
0.01,
&bent_edges(a, 35, 2),
h,
fillet,
6.0 * h,
12,
4.0,
sweeps,
)?
.0);
}
Ok(cylinder_flag_patch(
[0.2, 0.2],
0.05,
@@ -58,6 +78,42 @@ fn patch(ny: usize) -> CfdResult<PatchMesh> {
.0)
}
/// The FEA flag's wetted edges under the cantilever end-load shape with
/// tip deflection `a` (as `patch_cylinder_flag_deformed.rs`).
fn bent_edges(a: f64, nx: usize, ny: usize) -> FlagEdges {
let (x0, x1, t, cy) = (0.25, 0.6, 0.01, 0.2);
let len = x1 - x0;
let centre = |x: f64| {
let xi = (x - x0) / len;
(
a * xi * xi * (3.0 - xi) / 2.0,
a * (6.0 * xi - 3.0 * xi * xi) / 2.0 / len,
)
};
let edge = |x: f64, side: f64| -> [f64; 2] {
let (y, dy) = centre(x);
let n = (1.0 + dy * dy).sqrt();
[x - side * t * dy / n, cy + y + side * t / n]
};
let m = 2 * nx;
let bottom: Vec<[f64; 2]> = (0..=m)
.map(|i| edge(x0 + len * i as f64 / m as f64, -1.0))
.collect();
let top: Vec<[f64; 2]> = (0..=m)
.rev()
.map(|i| edge(x0 + len * i as f64 / m as f64, 1.0))
.collect();
let (b, tp) = (bottom[m], top[0]);
let k = 2 * ny;
let tip: Vec<[f64; 2]> = (0..=k)
.map(|j| {
let f = j as f64 / k as f64;
[b[0] + f * (tp[0] - b[0]), b[1] + f * (tp[1] - b[1])]
})
.collect();
FlagEdges { bottom, tip, top }
}
async fn march(ny: usize, convection: PatchConvection) -> CfdResult<(f64, usize, f64)> {
let mesh = patch(ny)?;
let h = 0.41 / ny as f64;