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

@@ -169,7 +169,9 @@ fn build_flooded_watercooled() -> System {
.add_edge_with_ports(n_evap, 3, n_ewo, 0)
.expect("chw out");
system.finalize().expect("finalize flooded water-cooled graph");
system
.finalize()
.expect("finalize flooded water-cooled graph");
system
}
@@ -179,12 +181,14 @@ fn flooded_watercooled_4port_is_dof_balanced() {
let report = system.dof_report();
assert_eq!(
report.n_unknowns, 19,
report.n_unknowns,
19,
"unknowns: 3 branches + 2×8 edges = 19\n{}",
report.summary()
);
assert_eq!(
report.n_equations, 19,
report.n_equations,
19,
"equations must match unknowns\n{}",
report.summary()
);
@@ -206,7 +210,12 @@ fn flooded_watercooled_4port_is_dof_balanced() {
.iter()
.find(|c| c.component_name == "evap")
.expect("evap in ledger");
assert_eq!(evap.n_equations, 4, "ΔP + energy + sat-vapor + secondary energy");
// Secondary isobaric P closure was added for the Modelica MassFlowSource_T
// (Free P) pattern: the HX propagates the sink pressure to the source edge.
assert_eq!(
evap.n_equations, 5,
"ΔP + energy + sat-vapor + secondary P + secondary energy"
);
assert!(
evap.roles.iter().any(|r| matches!(
r,
@@ -250,7 +259,8 @@ fn quality_control_without_extra_free_still_same_equation_count() {
without_q.n_equations(),
"quality_control must replace sat-vapor closure, not add a residual"
);
assert_eq!(with_q.n_equations(), 4);
// 3 refrigerant rows (ΔP + energy + closure) + 2 secondary (P + energy, same branch).
assert_eq!(with_q.n_equations(), 5);
}
#[test]