Add diagram workbench UI with Modelica DoF coaching and ISO glyphs.
Ship the Next.js cycle editor with CAD chrome, technical HX symbols, Fixed/Free boundary guidance, and secondary water/air pressure drop support in the solver stack. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -152,7 +152,10 @@ fn test_edge_with_ports_unknown_port_name_error() {
|
||||
}) = result
|
||||
{
|
||||
assert_eq!(component, "a");
|
||||
assert!(port_name.starts_with("bogus_port"), "port_name should start with the port name, got: {port_name}");
|
||||
assert!(
|
||||
port_name.starts_with("bogus_port"),
|
||||
"port_name should start with the port name, got: {port_name}"
|
||||
);
|
||||
} else {
|
||||
panic!("Expected PortNotFound error");
|
||||
}
|
||||
@@ -183,12 +186,15 @@ fn test_edge_with_ports_same_circuit_succeeds() {
|
||||
|
||||
#[test]
|
||||
fn test_build_system_with_port_validated_edges() {
|
||||
// DoF ledger post-CM1.4: 2-edge chain → 1 branch ṁ + 2×(P,h) = 5 unknowns,
|
||||
// so component equations must total 5 for the finalize DoF gate (2+2+1).
|
||||
// The last mock contributes a single equation to keep the system square.
|
||||
let system = SystemBuilder::new()
|
||||
.component("a", Box::new(MockComponentWithPorts::new(2)))
|
||||
.unwrap()
|
||||
.component("b", Box::new(MockComponentWithPorts::new(2)))
|
||||
.unwrap()
|
||||
.component("c", Box::new(MockComponentWithPorts::new(2)))
|
||||
.component("c", Box::new(MockComponentWithPorts::new(1)))
|
||||
.unwrap()
|
||||
.edge_with_ports("a", "outlet", "b", "inlet")
|
||||
.unwrap()
|
||||
|
||||
Reference in New Issue
Block a user