def test_TRP_example(self): # Slide 57-51 from Ideal Rocket Motor lecture from Thermal Rocket Propulsion course are used as example (Zandbergen) expected = 3021 gamma = 1.3 R = 390.4 T_chamber = 3400 AR_exit = 49 res = IRT.exit_velocity(AR_exit=AR_exit, T_chamber=T_chamber, R=R, gamma=gamma) self.assertAlmostEqual( res, expected, -1) # 4 digits accuracy (-1, rounding difference)
def test_simple_input(self): expected = 1.0801234497346432 # Manually calculated # area ratio of 1 means the mach number is 1 res = IRT.exit_velocity(AR_exit=1, T_chamber=1, R=1, gamma=1.4) self.assertEqual(res, expected)