校准第二支路热流体能量与管路摩擦

This commit is contained in:
huojiarong committed 2026-08-11 12:13:09 +00:00
1 parent 0f73d5b568
commit caca32a513
12 files changed
+336 -42

No files matched your search

+20
View File
@@ -63,6 +63,26 @@ class StreamResolver:
values[endpoint.component][endpoint.port] = connected_port.h_outflow
return values
def connected_temperature_reference_enthalpies(
self,
) -> dict[str, dict[str, float]]:
"""Return connector references used for upstream temperature only."""
values: dict[str, dict[str, float]] = {
component.name: {} for component in self.network.components.values()
}
for endpoint, connected in self._connected_endpoint.items():
connected_component = self.network.components[connected.component]
connected_port = connected_component.get_port(connected.port)
values[endpoint.component][endpoint.port] = float(
getattr(
connected_component,
"temperature_reference_h",
connected_port.h_outflow,
)
)
return values
def solve(self) -> tuple[StreamSolveDiagnostics, dict[str, dict[str, float]]]:
dynamic_components = [
component