rtx-cfd: OverlapMap::region_force — momentum flux into a background region (control-volume face formula, one-sided next to holes); overset_cfd1 prints the four momentum routes (CV box, ring outer, hole boundary, wall) and their defects at the settled state
Documentation / Build API Documentation (push) Canceled after 0s
Documentation / Build User Guide (push) Canceled after 0s
CI / WASM Build + Size Check (push) Canceled after 0s
CI / Distributed Training Tests (push) Canceled after 0s
CI / Build CPU-Only (Explicit) (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 / Test (ubuntu-latest) (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 / Build (macos-latest) (push) Canceled after 0s
CI / Build (ubuntu-latest) (push) Canceled after 0s
CI / Test (macos-latest) (push) Canceled after 0s
CI / CI Success (push) Canceled after 0s
Documentation / Build API Documentation (push) Canceled after 0s
Documentation / Build User Guide (push) Canceled after 0s
CI / WASM Build + Size Check (push) Canceled after 0s
CI / Distributed Training Tests (push) Canceled after 0s
CI / Build CPU-Only (Explicit) (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 / Test (ubuntu-latest) (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 / Build (macos-latest) (push) Canceled after 0s
CI / Build (ubuntu-latest) (push) Canceled after 0s
CI / Test (macos-latest) (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_01X2GmJXeQ2njUecEKiJZ1G2
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
5f780447de
commit
134ac03870
@@ -10,7 +10,7 @@
|
||||
use rtx_cfd::mesh::PatchSide;
|
||||
use rtx_cfd::mesh::patch_gen::cylinder_flag_patch;
|
||||
use rtx_cfd::solvers::incompressible::{
|
||||
AleBoundaries, CurvilinearParameters, CurvilinearPisoSolver, EmbeddedParameters,
|
||||
AleBoundaries, CellClass, CurvilinearParameters, CurvilinearPisoSolver, EmbeddedParameters,
|
||||
EmbeddedPisoSolver, FlowField, NormalDiffusion, OversetField, OversetParameters,
|
||||
OversetPisoSolver, PatchConvection, PatchField, PoissonSolverKind, SideBoundary,
|
||||
};
|
||||
@@ -262,6 +262,29 @@ async fn run_cfd1(ny: usize) -> CfdResult<Cfd1> {
|
||||
.patch()
|
||||
.surface_force(&field.patch, PatchSide::Inner, solver.time());
|
||||
let (drag_cv, lift_cv) = cv_force(&field, &solver);
|
||||
// P4 momentum-defect measurement: the force the background transmits
|
||||
// into the ring (fringe + hole), into the hole alone, and the patch's
|
||||
// wall force — consecutive differences are the active region's
|
||||
// residual, the fringe ring's momentum defect, and the patch region's.
|
||||
let ring = solver
|
||||
.overlap()
|
||||
.region_force(&field.background, RHO, mu, |c| c != CellClass::Active);
|
||||
let hole = solver
|
||||
.overlap()
|
||||
.region_force(&field.background, RHO, mu, |c| c == CellClass::Hole);
|
||||
let wall = load.total();
|
||||
println!(
|
||||
" momentum routes ny = {ny}: CV box ({drag_cv:.4}, {lift_cv:.4}) | ring outer ({:.4}, {:.4}) | hole boundary ({:.4}, {:.4}) | wall ({:.4}, {:.4}); defects [% of wall drag]: active {:+.2} fringe ring {:+.2} patch region {:+.2}",
|
||||
ring.0,
|
||||
ring.1,
|
||||
hole.0,
|
||||
hole.1,
|
||||
wall[0],
|
||||
wall[1],
|
||||
100.0 * (drag_cv - ring.0) / wall[0],
|
||||
100.0 * (ring.0 - hole.0) / wall[0],
|
||||
100.0 * (hole.0 - wall[0]) / wall[0],
|
||||
);
|
||||
Ok(Cfd1 {
|
||||
drag_surface: load.total()[0],
|
||||
lift_surface: load.total()[1],
|
||||
|
||||
Reference in New Issue
Block a user