接入test_mql真实固定气室拓扑
This commit is contained in:
1 parent
c0f28520b4
commit
2d33a8f4bc
8 files changed
+747
-5
No files matched your search
@@ -55,6 +55,30 @@ class AmesimPneumaticComponentsTest(unittest.TestCase):
|
||||
)
|
||||
self.assertGreater(volume.gas_mass_g(), 1300.0)
|
||||
|
||||
def test_volume_balances_two_connections_with_stream_enthalpy(self) -> None:
|
||||
volume = AmesimPneumaticVolume.from_liters(
|
||||
name="pn_general_chamber",
|
||||
volume_liters=57.0,
|
||||
p0=15.3e6,
|
||||
T0=293.15,
|
||||
)
|
||||
internal_h = volume.properties().h
|
||||
|
||||
derivative = volume.derivatives_from_two_connections(
|
||||
port_a_m_flow=0.2,
|
||||
connected_h_a=internal_h + 1000.0,
|
||||
port_b_m_flow=-0.1,
|
||||
connected_h_b=internal_h - 1000.0,
|
||||
internal_h=internal_h,
|
||||
)
|
||||
|
||||
self.assertAlmostEqual(derivative.m, 0.1)
|
||||
self.assertAlmostEqual(
|
||||
derivative.U,
|
||||
0.2 * (internal_h + 1000.0) - 0.1 * internal_h,
|
||||
)
|
||||
self.assertAlmostEqual(volume.port_a.p, volume.port_b.p)
|
||||
|
||||
def test_variable_volume_tracks_external_volume(self) -> None:
|
||||
volume = AmesimVariablePneumaticVolume.from_liters(
|
||||
name="pn_c1_8",
|
||||
|
||||
Reference in new issue
Block a user