def test_range_validity(self): s = State(T=300, p=0.0035) s1 = State(T=700, p=0.0035) s2 = State(T=700, p=30) self.assertTrue(s in Region2()) self.assertTrue(s2 in Region2()) self.assertTrue(s2 in Region2())
def test_range_validity(self): assert 1 == 2 # Table 33. s = State(T=650, rho=500) s1 = State(T=650, rho=200) s2 = State(T=750, rho=500) self.assertTrue(s in Region2()) self.assertTrue(s2 in Region2()) self.assertTrue(s2 in Region2())
def test_range_validity(self): s = State(T=300, p=3) s1 = State(T=300, p=80) s2 = State(T=500, p=3) self.assertTrue(s in Region1()) self.assertTrue(s2 in Region1()) self.assertTrue(s2 in Region1()) s = State(T=300, p=3) self.assertTrue(s in Region1())
def test_property_accuracy(self): """Test the results from Table 15.""" s = State(T=300, p=0.0035) s1 = State(T=700, p=0.0035) s2 = State(T=700, p=30) states = [s, s1, s2] table15 = np.array([[0.394913866e2, 0.923015898e2, 0.542946619e-2], [0.254991145e4, 0.333568375e4, 0.263149474e4], [0.241169160e4, 0.301262819e4, 0.246861076e4], [0.852238967e1, 0.101749996e2, 0.517540298e1], [0.191300162e1, 0.208141274e1, 0.103505092e2], [0.427920172e3, 0.644289068e3, 0.480386523e3]]) table15 = table15.T for state, properties in zip(states, table15): r = Region2(state=state) p = [r.v, r.h, r.u, r.s, r.cp, r.w] np.testing.assert_almost_equal(properties, p, decimal=5)
def test_property_accuracy(self): """Test the results from Table 5.""" s = State(T=300, p=3) s1 = State(T=300, p=80) s2 = State(T=500, p=3) states = [s, s1, s2] table5 = np.array([[0.100215168e-2, 0.971180894e-3, 0.120241800e-2], [0.115331273e3, 0.184142828e3, 0.975542239e3], [0.112324818e3, 0.106448356e3, 0.971934985e3], [0.392294792, 0.368563852, 0.258041912e1], [0.417301218e1, 0.401008987e1, 0.465580682e1], [0.150773921e4, 0.163469054e4, 0.124071337e4]]) table5 = table5.T for state, properties in zip(states, table5): r = Region1(state=state) p = [r.v, r.h, r.u, r.s, r.cp, r.w] np.testing.assert_almost_equal(properties, p, decimal=5)