def test_07(self): Value = U.press_conv(1, from_units='psi', to_units='cm H2O') Truth = 1 / .014198 # truth value from NASA RP 1046 Table A27. # Note that there is an inconsistency between # the stated conversions from psi to cm H2O # (70.376), and the conversion from cm H2O to # psi (.014198) print('Truth=%.8f, Value=%.8f' % (Truth, Value)) self.assertLessEqual(RE(Value, Truth), 5e-5)
def test_06(self): Value = U.press_conv(1, from_units='in H2O', to_units='mm HG') Truth = 1.865 print('Truth=%.8f, Value=%.8f' % (Truth, Value)) self.assertLessEqual(RE(Value, Truth), 1e-5)
def test_05(self): Value = U.press_conv(1, from_units='cm H2O', to_units='in H2O') Truth = 1 / 2.54 self.assertLessEqual(RE(Value, Truth), 4e-5)
def test_04(self): Value = U.press_conv(1, from_units='lb/ft**2', to_units='mb') Truth = 0.4788 self.assertLessEqual(RE(Value, Truth), 1e-5)
def test_03(self): Value = U.press_conv(1, from_units='psi', to_units='lb/ft**2') Truth = 144 self.assertLessEqual(RE(Value, Truth), 1e-5)
def test_02(self): Value = U.press_conv(1, from_units='mm HG', to_units='psi') Truth = 0.01934543333 self.assertLessEqual(RE(Value, Truth), 5e-4)
def test_01(self): Value = U.press_conv(1, from_units='in HG', to_units='mm HG') Truth = 25.4 self.assertLessEqual(RE(Value, Truth), 1e-5)