def test_psi(self): """ Test the creation of a pressure quantity with units of psi. """ q = quantity.Pressure(1.0, "psi") self.assertAlmostEqual(q.value, 1.0, 6) self.assertAlmostEqual(q.value_si, 101325. / 14.695949, delta=1e-2) self.assertEqual(q.units, "psi")
def test_torr(self): """ Test the creation of a pressure quantity with units of torr. """ q = quantity.Pressure(1.0, "torr") self.assertAlmostEqual(q.value, 1.0, 6) self.assertAlmostEqual(q.value_si, 101325. / 760., delta=1e-6) self.assertEqual(q.units, "torr")
def test_bar(self): """ Test the creation of a pressure quantity with units of bar. """ q = quantity.Pressure(1.0, "bar") self.assertAlmostEqual(q.value, 1.0, 6) self.assertAlmostEqual(q.value_si, 1.0e5, delta=1e-6) self.assertEqual(q.units, "bar")
def Plist(self, value): self._Plist = quantity.Pressure(value)
def Pmax(self, value): self._Pmax = quantity.Pressure(value)
def Pmin(self, value): self._Pmin = quantity.Pressure(value)