embedded3: the flag driver logs the reconstructed wall route per sample and in the final read
CI / Python Bindings (maturin) (ubuntu-latest) (push) Blocked by required conditions
CI / Python Bindings (maturin) (macos-latest) (push) Blocked by required conditions
CI / Test (macos-latest) (push) Blocked by required conditions
CI / CI Success (push) Blocked by required conditions
CI / Test (ubuntu-latest) (push) Blocked by required conditions
CI / Build (macos-latest) (push) Waiting to run
CI / WASM Build + Size Check (push) Blocked by required conditions
CI / Distributed Training Tests (push) Blocked by required conditions
CI / Clippy Check (push) Failing after 4s
CI / Format Check (push) Failing after 4s
Performance Benchmarks / Run Benchmarks (push) Failing after 4s
CI / Build (ubuntu-latest) (push) Failing after 4s
Documentation / Build User Guide (push) Successful in 7s
CI / Build CPU-Only (Explicit) (push) Failing after 49s
Documentation / Build API Documentation (push) Failing after 50s
CI / Python Bindings (maturin) (ubuntu-latest) (push) Blocked by required conditions
CI / Python Bindings (maturin) (macos-latest) (push) Blocked by required conditions
CI / Test (macos-latest) (push) Blocked by required conditions
CI / CI Success (push) Blocked by required conditions
CI / Test (ubuntu-latest) (push) Blocked by required conditions
CI / Build (macos-latest) (push) Waiting to run
CI / WASM Build + Size Check (push) Blocked by required conditions
CI / Distributed Training Tests (push) Blocked by required conditions
CI / Clippy Check (push) Failing after 4s
CI / Format Check (push) Failing after 4s
Performance Benchmarks / Run Benchmarks (push) Failing after 4s
CI / Build (ubuntu-latest) (push) Failing after 4s
Documentation / Build User Guide (push) Successful in 7s
CI / Build CPU-Only (Explicit) (push) Failing after 49s
Documentation / Build API Documentation (push) Failing after 50s
Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
b34f6ad966
commit
3eb40f98ce
@@ -202,7 +202,7 @@ fn flag_wake_on_the_device() {
|
|||||||
let mut f = std::fs::File::create(p).expect("csv");
|
let mut f = std::fs::File::create(p).expect("csv");
|
||||||
writeln!(
|
writeln!(
|
||||||
f,
|
f,
|
||||||
"t,tip,drag_span,lift_span,drag_total,lift_total,residual,cg,fresh"
|
"t,tip,drag_span,lift_span,drag_total,lift_total,residual,cg,fresh,drag_rec,lift_rec"
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
f
|
f
|
||||||
@@ -214,6 +214,7 @@ fn flag_wake_on_the_device() {
|
|||||||
let mid = nz / 2;
|
let mid = nz / 2;
|
||||||
let slab = (mid - 2, mid + 2);
|
let slab = (mid - 2, mid + 2);
|
||||||
let start = std::time::Instant::now();
|
let start = std::time::Instant::now();
|
||||||
|
let mut drag_rec_sum = 0.0;
|
||||||
let (mut drag_sum, mut lift_min, mut lift_max, mut samples) =
|
let (mut drag_sum, mut lift_min, mut lift_max, mut samples) =
|
||||||
(0.0, f64::INFINITY, f64::NEG_INFINITY, 0usize);
|
(0.0, f64::INFINITY, f64::NEG_INFINITY, 0usize);
|
||||||
let mut worst_residual = 0.0_f64;
|
let mut worst_residual = 0.0_f64;
|
||||||
@@ -234,15 +235,25 @@ fn flag_wake_on_the_device() {
|
|||||||
let fs = mask
|
let fs = mask
|
||||||
.cut_wall_force_per_span(body, &field, RHO * NU, t, slab)
|
.cut_wall_force_per_span(body, &field, RHO * NU, t, slab)
|
||||||
.expect("wall");
|
.expect("wall");
|
||||||
|
// The reconstructed wall route on the same slab, per span.
|
||||||
|
let fr = mask
|
||||||
|
.cut_wall_force_reconstructed(body, &field, RHO * NU, t, Some(slab))
|
||||||
|
.map(|v| {
|
||||||
|
let lz = (slab.1 - slab.0) as f64 * h;
|
||||||
|
[v[0] / lz, v[1] / lz, v[2] / lz]
|
||||||
|
})
|
||||||
|
.expect("reconstructed");
|
||||||
let ft = mask
|
let ft = mask
|
||||||
.cut_wall_force(body, &field, RHO * NU, t)
|
.cut_wall_force(body, &field, RHO * NU, t)
|
||||||
.expect("wall");
|
.expect("wall");
|
||||||
let tip = deflection(1.0, t).0;
|
let tip = deflection(1.0, t).0;
|
||||||
if sample {
|
if sample {
|
||||||
println!(
|
println!(
|
||||||
" t {t:7.4} (tip {tip:+.4}): drag/span {:.1} lift/span {:+.1} N/m; total {:.3} {:+.3} N; residual {:.1e} CG {} fresh {}; [{:.0} s]",
|
" t {t:7.4} (tip {tip:+.4}): drag/span {:.1} lift/span {:+.1} N/m (reconstructed {:.1} {:+.1}); total {:.3} {:+.3} N; residual {:.1e} CG {} fresh {}; [{:.0} s]",
|
||||||
fs[0],
|
fs[0],
|
||||||
fs[1],
|
fs[1],
|
||||||
|
fr[0],
|
||||||
|
fr[1],
|
||||||
ft[0],
|
ft[0],
|
||||||
ft[1],
|
ft[1],
|
||||||
r.final_residual,
|
r.final_residual,
|
||||||
@@ -253,19 +264,22 @@ fn flag_wake_on_the_device() {
|
|||||||
if let Some(f) = csv.as_mut() {
|
if let Some(f) = csv.as_mut() {
|
||||||
writeln!(
|
writeln!(
|
||||||
f,
|
f,
|
||||||
"{t:.5},{tip:.5},{:.4},{:.4},{:.5},{:.5},{:.3e},{},{}",
|
"{t:.5},{tip:.5},{:.4},{:.4},{:.5},{:.5},{:.3e},{},{},{:.4},{:.4}",
|
||||||
fs[0],
|
fs[0],
|
||||||
fs[1],
|
fs[1],
|
||||||
ft[0],
|
ft[0],
|
||||||
ft[1],
|
ft[1],
|
||||||
r.final_residual,
|
r.final_residual,
|
||||||
r.poisson_iterations,
|
r.poisson_iterations,
|
||||||
r.fresh_cells
|
r.fresh_cells,
|
||||||
|
fr[0],
|
||||||
|
fr[1]
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
}
|
}
|
||||||
if t >= last_period_start {
|
if t >= last_period_start {
|
||||||
drag_sum += fs[0];
|
drag_sum += fs[0];
|
||||||
|
drag_rec_sum += fr[0];
|
||||||
lift_min = lift_min.min(fs[1]);
|
lift_min = lift_min.min(fs[1]);
|
||||||
lift_max = lift_max.max(fs[1]);
|
lift_max = lift_max.max(fs[1]);
|
||||||
samples += 1;
|
samples += 1;
|
||||||
@@ -281,8 +295,9 @@ fn flag_wake_on_the_device() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
let drag_mean = drag_sum / samples.max(1) as f64;
|
let drag_mean = drag_sum / samples.max(1) as f64;
|
||||||
|
let drag_rec = drag_rec_sum / samples.max(1) as f64;
|
||||||
println!(
|
println!(
|
||||||
" FINAL ny {ny}: last period drag/span mean {drag_mean:.1} N/m (2D FSI2 224.6), lift/span {lift_min:+.1} … {lift_max:+.1} (2D ±215 flat tip, ±256 semicircle); worst residual {worst_residual:.1e}; {} phases written; {:.0} s",
|
" FINAL ny {ny}: last period drag/span mean {drag_mean:.1} N/m (reconstructed {drag_rec:.1}; 2D FSI2 224.6, the 2D reference of this kinematics 208.3), lift/span {lift_min:+.1} … {lift_max:+.1} (2D ±215 flat tip, ±256 semicircle); worst residual {worst_residual:.1e}; {} phases written; {:.0} s",
|
||||||
next_phase,
|
next_phase,
|
||||||
start.elapsed().as_secs_f64()
|
start.elapsed().as_secs_f64()
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user