接入test_mql变容气室机械反馈
This commit is contained in:
1 parent
d4edf1ccb3
commit
958d813300
4 files changed
+109
-10
No files matched your search
@@ -91,6 +91,27 @@ class AmesimPneumaticComponentsTest(unittest.TestCase):
|
||||
volume.set_external_volume_m3(cm3_to_m3(34242.54636512914))
|
||||
self.assertAlmostEqual(volume.volume_cm3(), 49242.54636512914)
|
||||
|
||||
def test_variable_volume_boundary_work_uses_external_volume_rate(self) -> None:
|
||||
volume = AmesimVariablePneumaticVolume.from_liters(
|
||||
name="pn_c1_8",
|
||||
dead_volume_liters=15.0,
|
||||
p0=100000.0,
|
||||
T0=293.15,
|
||||
)
|
||||
props = volume.properties()
|
||||
volume.set_external_volume_m3(0.0, external_volume_rate_m3_s=2.0e-6)
|
||||
|
||||
derivative = volume.derivatives_from_two_connections(
|
||||
port_a_m_flow=0.0,
|
||||
connected_h_a=props.h,
|
||||
port_b_m_flow=0.0,
|
||||
connected_h_b=props.h,
|
||||
internal_h=props.h,
|
||||
)
|
||||
|
||||
self.assertAlmostEqual(derivative.m, 0.0)
|
||||
self.assertAlmostEqual(derivative.U, -props.p * 2.0e-6)
|
||||
|
||||
def test_orifice_returns_signed_mass_flow(self) -> None:
|
||||
orifice = AmesimPneumaticOrifice.from_mm2(
|
||||
name="pn_orifice_18",
|
||||
|
||||
Reference in new issue
Block a user