def test_perimeters(self): Op, O1, O12, O2 = stratified.perimeters(0.5, 0.1) self.assertAlmostEqual(Op, 1.5707963) #Reduced precision because Beta only to 4 places self.assertAlmostEqual(O1, 1.0788463, places=4) self.assertAlmostEqual(O12, 0.4163317, places=4) self.assertAlmostEqual(O2, 0.4919500, places=4)
def test_lambda1(self): Ap, A1, A2 = stratified.areas(0.5, 0.1) Op, O1, O12, O2 = stratified.perimeters(0.5, 0.1) Dp_H = 4*A1/(O1+O12) vls = 3.0 v1 = vls*Ap/A1 epsilon = DHLLDV_constants.steel_roughness nu_l = DHLLDV_constants.water_viscosity[20] self.assertAlmostEqual(stratified.lambda1(Dp_H, v1, epsilon, nu_l), 0.01311036)
def test_lambda12(self): Ap, A1, A2 = stratified.areas(0.5, 0.1) Op, O1, O12, O2 = stratified.perimeters(0.5, 0.1) Dp_H = 4*A1/(O1+O12) vls = 3.0 v1 = vls*Ap/A1 v2 = 0.0 d = 0.3 nu_l = DHLLDV_constants.water_viscosity[20] self.assertAlmostEqual(stratified.lambda12(Dp_H, d, v1, v2, nu_l), 0.46551996, places=5)
def test_lambda12_sf(self): Ap, A1, A2 = stratified.areas(0.5, 0.1) Op, O1, O12, O2 = stratified.perimeters(0.5, 0.1) Dp_H = 4*A1/(O1+O12) d=0.3 vls = 3.0 v1 = vls*Ap/A1 v2 = 0.0 epsilon = DHLLDV_constants.steel_roughness nu_l = DHLLDV_constants.water_viscosity[20] rho_s = 2.65 rho_l = DHLLDV_constants.water_density[20] self.assertAlmostEqual(stratified.lambda12_sf(Dp_H, d, v1, v2, epsilon, nu_l, rho_l, rho_s), 0.25061545, places=5)