公开PNRP17并接通实时气动机械耦合

This commit is contained in:
huojiarong committed 2026-08-02 14:51:31 +00:00
1 parent 503394f3ed
commit 1f4027573f
18 files changed
+693 -29

No files matched your search

+10
View File
@@ -204,6 +204,16 @@ class Component(ABC):
return None
def pneumatic_volume_outputs(self) -> Mapping[str, tuple[float, float]]:
"""Return directed ``volume``/``volume_flow`` values by pneumatic port.
Most pneumatic components contribute no external chamber volume. Moving
boundaries such as PNRP17 override this hook; the network resolver then
propagates the pair to the component connected at the same physical port.
"""
return {}
class DynamicComponent(Component):
state_size = 2
+22
View File
@@ -87,6 +87,26 @@ class PortDefinition:
unit="J/kg",
order=30,
),
PortVariableDefinition(
"volume",
"signal",
"directed",
label="外部容积",
quantity="volume",
unit="m3",
result_visible=False,
order=40,
),
PortVariableDefinition(
"volume_flow",
"signal",
"directed",
label="外部容积变化率",
quantity="volume_flow",
unit="m3/s",
result_visible=False,
order=50,
),
),
)
@@ -178,6 +198,8 @@ class PortState:
p: float = 0.0
m_flow: float = 0.0
h_outflow: float = 0.0
volume: float = 0.0
volume_flow: float = 0.0
signal: float = 0.0
x: float = 0.0
v: float = 0.0