def primdata(self): """ computes list of rho, u, p data """ p = self._scale_ps * self._Ps rt = self._ref_rttot / Is.TiTs_Mach(self._M, gamma=self._gam) rho = p / rt u = self._M * np.sqrt(self._gam * rt) return [rho, u, p]
def test_stagnation_i2t(): assert Is.TtTs_Mach(2.) == Is.TiTs_Mach(2.) assert Is.PtPs_Mach(2.) == Is.PiPs_Mach(2.) assert Is.Mach_PiPs(3.) == Is.Mach_PtPs(3.) assert Is.Mach_TiTs(3.) == Is.Mach_TtTs(3.) assert Is.Velocity_MachTi(.8, 300.) == Is.Velocity_MachTt(.8, 300.)