chore: sync project state and current artifacts

This commit is contained in:
Sepehr
2026-02-22 23:27:31 +01:00
parent 1b6415776e
commit dd77089b22
232 changed files with 37056 additions and 4296 deletions

14
fix_equations.py Normal file
View File

@@ -0,0 +1,14 @@
with open('crates/components/src/python_components.rs', 'r') as f:
text = f.read()
# Compressor: 2 ports -> 4 vars. Normally you expect 2 equations for outlet P, h given inlet, plus 2 for inlet (from elsewhere)
# Actually, n_equations should be the number of residuals returned by the component.
# Let's see how many residuals are set:
# Compressor: residuals[0], residuals[1] -> 2
# ExpansionValve: residuals[0], residuals[1] -> 2
# HeatExchanger: residuals[0], residuals[1], residuals[2] -> 3
# Pipe: residuals[0] -> 1
# FlowSource: 0 (or should it be 2 if it sets P and T?) Wait, FlowSource sets 0 residuals?
# Let's make FlowSource return 2 residuals (P, h) and FlowSink return 0. Wait, if FlowSource returns 0, who constrains the source?
# If FlowSource sets P and H, it needs 2 residuals.