Ejemplo n.º 1
0
 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")
Ejemplo n.º 2
0
 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")
Ejemplo n.º 3
0
 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")
Ejemplo n.º 4
0
 def Plist(self, value):
     self._Plist = quantity.Pressure(value)
Ejemplo n.º 5
0
 def Pmax(self, value):
     self._Pmax = quantity.Pressure(value)
Ejemplo n.º 6
0
 def Pmin(self, value):
     self._Pmin = quantity.Pressure(value)