完善通用求解器回归与前端交互

- 引入因果坐标内核、热流体恢复和递进长时回归\n- 完善正交连线、线桥、视图保持与结果曲线缩放\n- 补充依赖约束、CI、测试基线和北京时间更新日志
This commit is contained in:
lujingze committed 2026-08-18 06:42:07 +00:00
1 parent 143e8dd309
commit b435daecf2
65 files changed
+172271 -701

No files matched your search

+17 -1
View File
@@ -189,6 +189,15 @@ class AmesimPnl00r(AlgebraicComponent):
self.port_1.h_outflow = initial_h
self.port_2 = self.register_declared_port("port_2")
self.port_2.h_outflow = initial_h
# A zero-volume two-port transports its stream outflow from the
# opposite connection, so ``port.h_outflow`` is deliberately crossed.
# Pressure loss, however, needs the enthalpy arriving at the same-side
# upstream connection. Keep that reference separate from the public
# connector outflow state.
self._connected_h = {
"port_1": initial_h,
"port_2": initial_h,
}
@staticmethod
def _integer_parameter(name: str, value: float) -> int:
@@ -219,7 +228,7 @@ class AmesimPnl00r(AlgebraicComponent):
return max(
self.medium.temperature_from_pressure_enthalpy(
max(port.p, 1.0),
port.h_outflow,
self._connected_h[port_name],
),
1.0,
)
@@ -388,9 +397,16 @@ class AmesimPnl00r(AlgebraicComponent):
)
def update_stream_outflows(self, connected_h: Mapping[str, float]) -> None:
self._connected_h = dict(connected_h)
self.port_1.h_outflow = connected_h["port_2"]
self.port_2.h_outflow = connected_h["port_1"]
def update_flow_temperature_references(
self,
connected_h: Mapping[str, float],
) -> None:
self._connected_h = dict(connected_h)
class AmesimPnl0001(ThermodynamicVolumeComponent):
"""AMESim PNL0001 C-R pneumatic pipe with compressibility and friction."""