接入test_mql相邻P4主压温边界
This commit is contained in:
1 parent
853ae3043d
commit
95ba5a5e81
3 files changed
+297
-64
No files matched your search
@@ -4564,10 +4564,6 @@ class TestMqlSystem:
|
||||
resistance_boundary_pressure_pa: float,
|
||||
inlet_node_temperature_k: float = 293.15,
|
||||
resistance_boundary_temperature_k: float = 293.15,
|
||||
p4_port1_boundary_pressure_pa: float = 100_000.0,
|
||||
p4_port1_boundary_temperature_k: float = 293.15,
|
||||
p4_port3_boundary_pressure_pa: float = 100_000.0,
|
||||
p4_port3_boundary_temperature_k: float = 293.15,
|
||||
):
|
||||
"""Close a PN3 chamber segment through the adjacent real P4 node.
|
||||
|
||||
@@ -4624,6 +4620,36 @@ class TestMqlSystem:
|
||||
p4_port3_line = self.pnl0002_assembly.lines[
|
||||
p4_neighborhood.port_3.line_alias
|
||||
]
|
||||
p4_port1_remote_neighborhood = self.p4_node_neighborhood(
|
||||
p4_neighborhood.port_1.remote_node_alias
|
||||
)
|
||||
p4_port1_remote_node = self.node4_assembly[
|
||||
p4_port1_remote_neighborhood.node_alias
|
||||
]
|
||||
p4_port1_remote_primary_line = self.pnl0001_assembly.lines[
|
||||
p4_port1_remote_neighborhood.primary.line_alias
|
||||
]
|
||||
p4_port1_remote_primary_chamber_alias = (
|
||||
p4_port1_remote_neighborhood.primary.chamber_alias
|
||||
)
|
||||
p4_port1_remote_primary_chamber = self.network.components[
|
||||
p4_port1_remote_primary_chamber_alias
|
||||
]
|
||||
p4_port3_remote_neighborhood = self.p4_node_neighborhood(
|
||||
p4_neighborhood.port_3.remote_node_alias
|
||||
)
|
||||
p4_port3_remote_node = self.node4_assembly[
|
||||
p4_port3_remote_neighborhood.node_alias
|
||||
]
|
||||
p4_port3_remote_primary_line = self.pnl0001_assembly.lines[
|
||||
p4_port3_remote_neighborhood.primary.line_alias
|
||||
]
|
||||
p4_port3_remote_primary_chamber_alias = (
|
||||
p4_port3_remote_neighborhood.primary.chamber_alias
|
||||
)
|
||||
p4_port3_remote_primary_chamber = self.network.components[
|
||||
p4_port3_remote_primary_chamber_alias
|
||||
]
|
||||
volume = self.network.components[spec.volume_alias]
|
||||
inlet_orifice = self.network.components[spec.inlet_orifice_alias]
|
||||
outlet_orifice = self.network.components[spec.outlet_orifice_alias]
|
||||
@@ -4633,6 +4659,14 @@ class TestMqlSystem:
|
||||
raise TypeError(
|
||||
f"{p4_primary_chamber_alias} is not an AMESim pneumatic volume"
|
||||
)
|
||||
if not isinstance(p4_port1_remote_primary_chamber, AmesimPneumaticVolume):
|
||||
raise TypeError(
|
||||
f"{p4_port1_remote_primary_chamber_alias} is not an AMESim pneumatic volume"
|
||||
)
|
||||
if not isinstance(p4_port3_remote_primary_chamber, AmesimPneumaticVolume):
|
||||
raise TypeError(
|
||||
f"{p4_port3_remote_primary_chamber_alias} is not an AMESim pneumatic volume"
|
||||
)
|
||||
if not isinstance(inlet_orifice, AmesimPneumaticOrifice):
|
||||
raise TypeError(
|
||||
f"{spec.inlet_orifice_alias} is not an AMESim pneumatic orifice"
|
||||
@@ -4653,7 +4687,13 @@ class TestMqlSystem:
|
||||
p4_primary_line=p4_primary_line,
|
||||
p4_primary_chamber=p4_primary_chamber,
|
||||
p4_port1_line=p4_port1_line,
|
||||
p4_port1_remote_node=p4_port1_remote_node,
|
||||
p4_port1_remote_primary_line=p4_port1_remote_primary_line,
|
||||
p4_port1_remote_primary_chamber=p4_port1_remote_primary_chamber,
|
||||
p4_port3_line=p4_port3_line,
|
||||
p4_port3_remote_node=p4_port3_remote_node,
|
||||
p4_port3_remote_primary_line=p4_port3_remote_primary_line,
|
||||
p4_port3_remote_primary_chamber=p4_port3_remote_primary_chamber,
|
||||
volume=volume,
|
||||
inlet_orifice=inlet_orifice,
|
||||
outlet_orifice=outlet_orifice,
|
||||
@@ -4667,14 +4707,6 @@ class TestMqlSystem:
|
||||
pressure_pa=resistance_boundary_pressure_pa,
|
||||
temperature_k=resistance_boundary_temperature_k,
|
||||
),
|
||||
p4_port1_boundary=TestMqlPneumaticBoundaryCondition(
|
||||
pressure_pa=p4_port1_boundary_pressure_pa,
|
||||
temperature_k=p4_port1_boundary_temperature_k,
|
||||
),
|
||||
p4_port3_boundary=TestMqlPneumaticBoundaryCondition(
|
||||
pressure_pa=p4_port3_boundary_pressure_pa,
|
||||
temperature_k=p4_port3_boundary_temperature_k,
|
||||
),
|
||||
)
|
||||
|
||||
def simulate_pn3_p4_node_chamber_segment_from_spec(
|
||||
@@ -4685,10 +4717,6 @@ class TestMqlSystem:
|
||||
resistance_boundary_pressure_pa: float,
|
||||
inlet_node_temperature_k: float = 293.15,
|
||||
resistance_boundary_temperature_k: float = 293.15,
|
||||
p4_port1_boundary_pressure_pa: float = 100_000.0,
|
||||
p4_port1_boundary_temperature_k: float = 293.15,
|
||||
p4_port3_boundary_pressure_pa: float = 100_000.0,
|
||||
p4_port3_boundary_temperature_k: float = 293.15,
|
||||
config: SolveIVPConfig | None = None,
|
||||
t_eval: list[float] | None = None,
|
||||
):
|
||||
@@ -4698,10 +4726,6 @@ class TestMqlSystem:
|
||||
resistance_boundary_pressure_pa=resistance_boundary_pressure_pa,
|
||||
inlet_node_temperature_k=inlet_node_temperature_k,
|
||||
resistance_boundary_temperature_k=resistance_boundary_temperature_k,
|
||||
p4_port1_boundary_pressure_pa=p4_port1_boundary_pressure_pa,
|
||||
p4_port1_boundary_temperature_k=p4_port1_boundary_temperature_k,
|
||||
p4_port3_boundary_pressure_pa=p4_port3_boundary_pressure_pa,
|
||||
p4_port3_boundary_temperature_k=p4_port3_boundary_temperature_k,
|
||||
)
|
||||
run_config = config or SolveIVPConfig(t_stop=1.0e-4, max_step=1.0e-5)
|
||||
return integrate_ode(
|
||||
|
||||
Reference in new issue
Block a user