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

@@ -1,32 +1,112 @@
{
"name": "BPHX Evaporator and Condenser Bounded Test",
"name": "BPHX Water-Cooled Chiller R134a",
"description": "Full vapor-compression cycle with brazed-plate evaporator and condenser (4-port). Both Bphx units use emergent_pressure so outlet closures (superheat / subcooling) square the DoF like Condenser/Evaporator.",
"fluid": "R134a",
"fluid_backend": "CoolProp",
"circuits": [
{
"id": 0,
"name": "Refrigerant + water loops",
"components": [
{ "type": "RefrigerantSource", "name": "src", "fluid": "R134a", "p_set_bar": 5.0, "quality": 0.3 },
{ "type": "BphxEvaporator", "name": "evap", "ua": 2000.0, "refrigerant": "R134a", "secondary_fluid": "Water", "secondary_inlet_temp_c": 12.0, "secondary_mass_flow_kg_s": 0.5, "secondary_cp_j_per_kgk": 4186.0 },
{ "type": "RefrigerantSink", "name": "sink", "fluid": "R134a", "p_back_bar": 5.0 }
{
"type": "IsentropicCompressor",
"name": "comp",
"isentropic_efficiency": 0.70,
"t_cond_k": 318.15,
"t_evap_k": 278.15,
"superheat_k": 5.0,
"emergent_pressure": true,
"displacement_m3": 6.5e-5,
"speed_hz": 50.0,
"volumetric_efficiency": 0.92
},
{
"type": "BphxCondenser",
"name": "cond",
"refrigerant": "R134a",
"secondary_fluid": "Water",
"n_plates": 40,
"plate_length_m": 0.40,
"plate_width_m": 0.12,
"target_subcooling_k": 5.0,
"emergent_pressure": true,
"correlation": "Longo2004",
"ua": 2500.0
},
{
"type": "IsenthalpicExpansionValve",
"name": "exv",
"t_evap_k": 278.15,
"emergent_pressure": true
},
{
"type": "BphxEvaporator",
"name": "evap",
"refrigerant": "R134a",
"secondary_fluid": "Water",
"n_plates": 40,
"plate_length_m": 0.40,
"plate_width_m": 0.12,
"target_superheat_k": 5.0,
"emergent_pressure": true,
"correlation": "Longo2004",
"ua": 2000.0
},
{
"type": "BrineSource",
"name": "cond_water_in",
"fluid": "Water",
"p_set_bar": 2.0,
"t_set_c": 30.0,
"m_flow_kg_s": 0.40,
"fix_pressure": false,
"fix_temperature": true,
"fix_mass_flow": true
},
{
"type": "BrineSink",
"name": "cond_water_out",
"fluid": "Water",
"p_back_bar": 2.0,
"fix_pressure": true
},
{
"type": "BrineSource",
"name": "evap_water_in",
"fluid": "Water",
"p_set_bar": 3.0,
"t_set_c": 12.0,
"m_flow_kg_s": 0.50,
"fix_pressure": false,
"fix_temperature": true,
"fix_mass_flow": true
},
{
"type": "BrineSink",
"name": "evap_water_out",
"fluid": "Water",
"p_back_bar": 3.0,
"fix_pressure": true
}
],
"edges": [
{ "from": "src:outlet", "to": "evap:inlet" },
{ "from": "evap:outlet", "to": "sink:inlet" }
]
},
{
"id": 1,
"components": [
{ "type": "RefrigerantSource", "name": "src2", "fluid": "R134a", "p_set_bar": 15.0, "quality": 1.0 },
{ "type": "BphxCondenser", "name": "cond", "ua": 2000.0, "refrigerant": "R134a", "secondary_fluid": "Water", "secondary_inlet_temp_c": 30.0, "secondary_mass_flow_kg_s": 0.4, "secondary_cp_j_per_kgk": 4186.0 },
{ "type": "RefrigerantSink", "name": "sink2", "fluid": "R134a", "p_back_bar": 15.0 }
],
"edges": [
{ "from": "src2:outlet", "to": "cond:inlet" },
{ "from": "cond:outlet", "to": "sink2:inlet" }
{ "from": "comp:outlet", "to": "cond:inlet" },
{ "from": "cond:outlet", "to": "exv:inlet" },
{ "from": "exv:outlet", "to": "evap:inlet" },
{ "from": "evap:outlet", "to": "comp:inlet" },
{ "from": "cond_water_in:outlet", "to": "cond:secondary_inlet" },
{ "from": "cond:secondary_outlet", "to": "cond_water_out:inlet" },
{ "from": "evap_water_in:outlet", "to": "evap:secondary_inlet" },
{ "from": "evap:secondary_outlet", "to": "evap_water_out:inlet" }
]
}
],
"solver": { "strategy": "fallback", "max_iterations": 100, "tolerance": 1e-6 }
"solver": {
"strategy": "fallback",
"max_iterations": 300,
"tolerance": 1e-6
}
}

View File

@@ -1,12 +1,23 @@
{
"schema_version": "1.0",
"schema_version": "1",
"name": "Capillary Tube R134a Smoke",
"description": "WIP smoke fixture: RefrigerantSource → CapillaryTube → RefrigerantSink. DoF can square, but CapillaryTube Component residuals are still stubs (mass/enthalpy continuity only — no frictional ΔP residual), so the Newton Jacobian is singular. Kept for parsing/wiring tests; not yet a UI Load example.",
"fluid": "R134a",
"fluid_backend": "CoolProp",
"circuits": [
{
"id": 0,
"name": "Capillary smoke",
"components": [
{
"type": "RefrigerantSource",
"name": "src",
"fluid": "R134a",
"p_set_bar": 12.0,
"quality": 0.0
},
{
"type": "CapillaryTube",
"name": "cap",
@@ -17,11 +28,21 @@
"h_inlet_kj_kg": 250.0,
"p_outlet_bar": 3.5,
"h_outlet_kj_kg": 250.0
},
{
"type": "RefrigerantSink",
"name": "sink",
"fluid": "R134a",
"p_back_bar": 3.5
}
],
"edges": []
"edges": [
{ "from": "src:outlet", "to": "cap:inlet" },
{ "from": "cap:outlet", "to": "sink:inlet" }
]
}
],
"solver": {
"strategy": "newton",
"max_iterations": 50,

View File

@@ -0,0 +1,122 @@
{
"name": "Air-Cooled Chiller R134a with Condenser Fan",
"description": "Same emergent-pressure air-cooled chiller as chiller_aircooled_r134a.json, with an explicit Fan on the condenser air path: AirSource → Fan → Cond(secondary) → AirSink. Fan curve sized for ~1.2 kg/s (~1.0 m³/s) against the coil secondary ΔP (150 Pa). secondary_humidity_ratio MUST match AirSource psychrometrics (W at T_dry, RH, P).",
"fluid": "R134a",
"fluid_backend": "CoolProp",
"circuits": [
{
"id": 0,
"name": "Refrigerant + secondary loops",
"components": [
{
"type": "IsentropicCompressor",
"name": "comp",
"isentropic_efficiency": 0.70,
"t_cond_k": 318.15,
"t_evap_k": 278.15,
"superheat_k": 5.0,
"emergent_pressure": true,
"displacement_m3": 6.5e-5,
"speed_hz": 50.0,
"volumetric_efficiency": 0.92
},
{
"type": "Condenser",
"name": "cond",
"ua": 2500.0,
"emergent_pressure": true,
"subcooling_k": 5.0,
"secondary_fluid": "Air",
"secondary_humidity_ratio": 0.01412,
"dp_model": "isobaric",
"secondary_rated_pressure_drop_pa": 150,
"secondary_rated_m_flow_kg_s": 1.2
},
{
"type": "IsenthalpicExpansionValve",
"name": "exv",
"t_evap_k": 278.15,
"emergent_pressure": true
},
{
"type": "Evaporator",
"name": "evap",
"ua": 1468.0,
"emergent_pressure": true,
"secondary_fluid": "Water",
"dp_model": "isobaric",
"secondary_rated_pressure_drop_pa": 40000,
"secondary_rated_m_flow_kg_s": 0.4778
},
{
"type": "AirSource",
"name": "cond_air_in",
"p_set_bar": 1.01325,
"t_dry_c": 35.0,
"rh": 40.0,
"m_flow_kg_s": 1.2,
"fix_pressure": false,
"fix_temperature": true,
"fix_mass_flow": true
},
{
"type": "Fan",
"name": "cond_fan",
"fluid": "Air",
"speed_ratio": 1.0,
"air_density_kg_m3": 1.15,
"design_flow_m3_s": 1.04,
"curve_p0": 250.0,
"curve_p1": 0.0,
"curve_p2": -20.0,
"eff_e0": 0.65,
"eff_e1": 0.0,
"eff_e2": 0.0
},
{
"type": "AirSink",
"name": "cond_air_out",
"p_back_bar": 1.01325,
"fix_pressure": true
},
{
"type": "BrineSource",
"name": "evap_water_in",
"fluid": "Water",
"p_set_bar": 3.0,
"t_set_c": 12.0,
"m_flow_kg_s": 0.4778,
"fix_pressure": false,
"fix_temperature": true,
"fix_mass_flow": true
},
{
"type": "BrineSink",
"name": "evap_water_out",
"fluid": "Water",
"p_back_bar": 3.0,
"fix_pressure": true
}
],
"edges": [
{ "from": "comp:outlet", "to": "cond:inlet" },
{ "from": "cond:outlet", "to": "exv:inlet" },
{ "from": "exv:outlet", "to": "evap:inlet" },
{ "from": "evap:outlet", "to": "comp:inlet" },
{ "from": "cond_air_in:outlet", "to": "cond_fan:inlet" },
{ "from": "cond_fan:outlet", "to": "cond:secondary_inlet" },
{ "from": "cond:secondary_outlet", "to": "cond_air_out:inlet" },
{ "from": "evap_water_in:outlet", "to": "evap:secondary_inlet" },
{ "from": "evap:secondary_outlet", "to": "evap_water_out:inlet" }
]
}
],
"solver": {
"strategy": "newton",
"max_iterations": 300,
"tolerance": 1e-6
}
}