Snapshot WIP: solver HP epic progress, BPHX/HX physics, BMAD skill refresh.
Some checks failed
CI / check (push) Has been cancelled

Capture uncommitted solver robustness work (regularization, domain errors, linear solver lifecycle, tube DP/MSH), web workbench updates, and synced BMAD skills across IDE agent folders before starting BPHX pressure-drop.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-19 16:35:31 +02:00
parent 88620790d6
commit 5bd180b5b8
1363 changed files with 101041 additions and 58547 deletions

View File

@@ -27,9 +27,12 @@ struct LinearSystem2x2 {
impl LinearSystem2x2 {
fn well_conditioned() -> Self {
// CM1.3: the solver clamps pressure (state[1]) to >= 10_000 Pa. Choose
// the linear system so that the analytical solution lands at the bound
// (P = h = 10_000), keeping Newton convergence exact in one iteration.
Self {
a: [[2.0, 1.0], [1.0, 2.0]],
b: [3.0, 3.0],
b: [30_000.0, 30_000.0],
}
}
}
@@ -301,10 +304,11 @@ fn test_picard_timeout_returns_error_when_configured() {
return_best_state_on_timeout: false,
zoh_fallback: false,
},
// CM1.2: Picard's positional update is misaligned by the ṁ-front /
// closure-back layout for this synthetic 2×2, so seed it at the analytical
// solution (ṁ=seed, P=1, h=1). CM1.3 restores alignment with real residuals.
initial_state: Some(vec![DEFAULT_MASS_FLOW_SEED_KG_S, 1.0, 1.0]),
// CM1.3: keep the Picard seed at the analytical solution so the test
// focuses on timeout/pre-allocation wiring, not Picard convergence.
// Pressure must respect the 10_000 Pa lower bound, so the solution is
// (ṁ=seed, P=10_000, h=10_000).
initial_state: Some(vec![DEFAULT_MASS_FLOW_SEED_KG_S, 10_000.0, 10_000.0]),
..Default::default()
};
@@ -416,9 +420,9 @@ fn test_picard_config_best_state_preallocated() {
let mut solver = PicardConfig {
timeout: Some(Duration::from_millis(100)),
max_iterations: 10,
// CM1.2: seed Picard at the analytical solution (ṁ=seed, P=1, h=1) — the
// synthetic ṁ-closure misaligns Picard's positional update until CM1.3.
initial_state: Some(vec![DEFAULT_MASS_FLOW_SEED_KG_S, 1.0, 1.0]),
// CM1.3: seed Picard at the analytical solution (ṁ=seed, P=10_000, h=10_000)
// so the test targets pre-allocation wiring and not Picard convergence.
initial_state: Some(vec![DEFAULT_MASS_FLOW_SEED_KG_S, 10_000.0, 10_000.0]),
..Default::default()
};