Ejemplo n.º 1
0
    def testAndersonTable(self):
        # Test values from Appendix B from Anderson
        gamma = 1.4

        in_out = ((0.102e1, 0.1047e1, 3), (0.158e1, 0.2746e1, 3),
                  (0.345e1, 0.1372e2, 2), (0.61e1, 0.4324e2, 2), (0.36e2,
                                                                  0.1512e4, 0))

        for M, PR, places in in_out:
            res = IRT.pressure_ratio_shockwave(M=M, gamma=gamma)
            self.assertAlmostEqual(res, PR, places)
Ejemplo n.º 2
0
 def testOne(self):
     # Mach is 1 input should return 1
     expected = 1
     res = IRT.pressure_ratio_shockwave(M=1, gamma=1.4)
     self.assertEqual(res, expected)