예제 #1
0
    def testAndersonTable(self):  # Appendix A and B from Anderson2016
        # For this case the pressure ratios of two tables must be multiplied. Accuracy unknown after multiplication
        # Lets guess 1 digit loss is fine
        gamma = 1.4

        in_out = (
            (0.1760e1, 0.8458e1, 0.4736e1, 3),  # M = 2.05
            (0.1395e2, 0.2247e3, 0.2140e2, 2)  # M = 4.3
        )

        for AR, PR_exit, PR_shockwave, places in in_out:
            res = IRT.exit_pressure_ratio_shockwave(exit_area_ratio=AR,
                                                    gamma=gamma)
            self.assertAlmostEqual(res, PR_exit / PR_shockwave, places)
예제 #2
0
 def testOne(self):
     # Should return pressure ratio for M=1, as shockwave is infinitely weak
     # Value taken from Anderson2006 Appendix A again
     expected = 0.1893e1
     res = IRT.exit_pressure_ratio_shockwave(exit_area_ratio=1, gamma=1.4)
     self.assertAlmostEqual(res, expected, 3)