def Erhg(vls, Dp, d, epsilon, nu, rhol, rhos, Cvs, use_sf = True): """Relative excess pressure gradient, per equation 8.5-2 vls = average line speed (velocity, m/sec) Dp = Pipe diameter (m) d = Particle diameter (m) epsilon = absolute pipe roughness (m) nu = fluid kinematic viscosity in m2/sec rhol = density of the fluid (ton/m3) rhos = particle density (ton/m3) Cvs = insitu volume concentration use_sf: Whether to apply the sliding flow correction """ Rsd = (rhos-rhol)/rhol vt = vt_ruby(d, Rsd, nu) Rep = vt*d/nu #eqn 8.2-4 top = 4.7 + 0.41*Rep**0.75 bottom = 1. + 0.175*Rep**0.75 beta = top/bottom #eqn 8.2-4 KC = 0.175*(1+beta) Shr = vt*(1-Cvs/KC)**beta /vls #Eqn 8.5-2 Re = homogeneous.pipe_reynolds_number(vls, Dp, nu) lbdl = homogeneous.swamee_jain_ff(Re, Dp, epsilon) Srs = 8.5**2 * (1/lbdl) * (vt/(gravity*d)**0.5)**(10./3.) * ((nu*gravity)**(1./3.)/vls)**2 #Eqn 8.5-2 f = d/(particle_ratio * Dp) #eqn 8.8-4 if not use_sf or f<1: return Shr + Srs else: #Sliding flow per equation 8.8-5 return (Shr + Srs + (f-1)*musf)/f
def test_swamee_jain(self): nu = DHLLDV_constants.water_viscosity[20] Re = homogeneous.pipe_reynolds_number(3.0, 0.5, nu) lmbda = homogeneous.swamee_jain_ff(Re, 0.5, DHLLDV_constants.steel_roughness) self.assertAlmostEqual(lmbda, 0.0129407) Re = 2320 #laminar lmbda = homogeneous.swamee_jain_ff(Re, 0.5, DHLLDV_constants.steel_roughness) self.assertAlmostEqual(lmbda, 2.75862069e-02)
def Srs(vls, Dp, d, epsilon, nu, rhol, rhos, use_sqrtcx=True): """Kinetic energy loss contribution to the Erhg use_sqrtcx: Uses a modification based on figure 7.5_2, exemplified in Sape's code. """ Rsd = (rhos-rhol)/rhol vt = vt_ruby(d, Rsd, nu) Re = homogeneous.pipe_reynolds_number(vls, Dp, nu) lbdl = homogeneous.swamee_jain_ff(Re, Dp, epsilon) if not use_sqrtcx: return 8.5**2 * (1/lbdl) * (vt/(gravity*d)**0.5)**(10./3.) * ((nu*gravity)**(1./3.)/vls)**2 #Eqn 8.5-2 return 8.5**2 * (1/lbdl) * (1/sqrtcx(vt, d))**(3.) * ((nu*gravity)**(1./3.)/vls)**2 #Eqn 8.5-2
def LDV(vls, Dp, d, epsilon, nu, rhol, rhos, Cvs, max_steps=10): """ Return the LDV for the given slurry. Dp = Pipe diameter (m) d = Particle diameter (m) epsilon = absolute pipe roughness (m) nu = fluid kinematic viscosity in m2/sec rhol = density of the fluid (ton/m3) rhos = particle density (ton/m3) Cvs = insitu volume concentration """ Rsd = (rhos-rhol)/rhol fbot = (2*gravity*Rsd*Dp)**0.5 #Very Small Particles vls = 1.0 Re = homogeneous.pipe_reynolds_number(vls, Dp, nu) lambdal = homogeneous.swamee_jain_ff(Re, Dp, epsilon) FL_vs = 1.4*(nu*Rsd*gravity)**(1./3.)*(8/lambdal)**0.5/fbot # eqn 8.10-1 vlsldv = FL_vs*fbot steps = 0 while not (1.00001 >= vls/vlsldv > 0.99999) and steps < max_steps: vls = (vls + vlsldv)/2 Re = homogeneous.pipe_reynolds_number(vls, Dp, nu) lambdal = homogeneous.swamee_jain_ff(Re, Dp, epsilon) FL_vs = 1.4*(nu*Rsd*gravity)**(1./3.)*(8/lambdal)**0.5/fbot # eqn 8.10-1 vlsldv = FL_vs*fbot steps += 1 #Small Particles vls = 4.0 Re = homogeneous.pipe_reynolds_number(vls, Dp, nu) lambdal = homogeneous.swamee_jain_ff(Re, Dp, epsilon) alphap = 3.4 * (1.65/Rsd)**(2./9) #Eqn 8.10-3 vt = heterogeneous.vt_ruby(d, Rsd, nu) Rep = vt*d/nu # eqn 4.2-6 top = 4.7 + 0.41*Rep**0.75 bottom = 1. + 0.175*Rep**0.75 beta = top/bottom # eqn 4.6-4 KC = 0.175*(1+beta) FL_ss = alphap * (vt*Cvs*(1-Cvs/KC)**beta/(lambdal*fbot))**(1./3) # eqn 8.10-3 vlsldv = FL_ss*fbot steps = 0 while not (1.00001 >= vls/vlsldv > 0.99999) and steps < max_steps: vls = (vls + vlsldv)/2 Re = homogeneous.pipe_reynolds_number(vls, Dp, nu) lambdal = homogeneous.swamee_jain_ff(Re, Dp, epsilon) FL_ss = alphap * (vt*Cvs*(1-Cvs/KC)**beta/(lambdal*fbot))**(1./3) # eqn 8.10-3 vlsldv = FL_ss*fbot steps += 1 FL_s = max(FL_vs, FL_ss) #Eqn 8.10-4 #Large particles vls=4.3 if d <= 0.015*Dp: Cvr_ldv = 0.0065/(2*gravity*Rsd*Dp) # Eqn 8.10-7 else: Cvr_ldv = 0.053*(d/Dp)**0.5/(2*gravity*Rsd*Dp) # Eqn 8.10-7 Re = homogeneous.pipe_reynolds_number(vls, Dp, nu) lambdal = homogeneous.swamee_jain_ff(Re, Dp, epsilon) FL_r = alphap*((1-Cvs/KC)**beta * Cvs * (stratified.musf*stratified.Cvb*pi/8)**0.5 * Cvr_ldv**0.5/lambdal)**(1./3) # Eqn 8.10-6 vlsldv = FL_r*fbot steps = 0 while not (1.00001 >= vls/vlsldv > 0.99999) and steps < max_steps: vls = (vls + vlsldv)/2 Re = homogeneous.pipe_reynolds_number(vls, Dp, nu) lambdal = homogeneous.swamee_jain_ff(Re, Dp, epsilon) FL_r = alphap*((1-Cvs/KC)**beta * Cvs * (stratified.musf*stratified.Cvb*pi/8)**0.5 * Cvr_ldv**0.5/lambdal)**(1./3) # Eqn 8.10-6 vlsldv = FL_r*fbot steps += 1 #The Upper limit d0 = 0.0005*(1.65/Rsd)**0.5 #Eqn 8.10-8 drough = 2./1000 # note: only valid for sand with Rsd=1.65 if d > drough: FL_ul = FL_r elif FL_s <= FL_r: FL_ul = FL_s else: FL_ul = FL_s*exp(-1*d/d0) + FL_r*(1-exp(-1*d/d0)) # Eqn 8.10-8 vls = 2.0 Re = homogeneous.pipe_reynolds_number(vls, Dp, nu) lambdal = homogeneous.swamee_jain_ff(Re, Dp, epsilon) A = -1 B = vt*(1-Cvs/KC)**beta/stratified.musf C = ((8.5**2/lambdal)*(vt/(gravity*d)**0.5)**(10./3)*(nu*gravity)**(2./3))/stratified.musf vlsldv = (-1*B - (B**2-4*A*C)**0.5)/(2*A) # Eqn 8.10-11 steps = 0 while not (1.00001 >= vls/vlsldv > 0.99999) and steps < max_steps: vls = (vls + vlsldv)/2 Re = homogeneous.pipe_reynolds_number(vls, Dp, nu) lambdal = homogeneous.swamee_jain_ff(Re, Dp, epsilon) A = -1 B = vt*(1-Cvs/KC)**beta/stratified.musf C = ((8.5**2/lambdal)*(vt/(gravity*d)**0.5)**(10./3)*(nu*gravity)**(2./3))/stratified.musf vlsldv = (-1*B - (B**2-4*A*C)**0.5)/(2*A) # Eqn 8.10-11 steps += 1 FL_ll = vlsldv/fbot # Eqn 8.10-12 FL = max(FL_ul, FL_ll) # Eqn 8.10-13 return FL*fbot
def test_pipe_reynolds_number(self): nu = DHLLDV_constants.water_viscosity[20] self.assertAlmostEqual(homogeneous.pipe_reynolds_number(3.0, 0.5, nu), 1489850.746, places=3)
def test_carrier_labda_6ms(self): Re = homogeneous.pipe_reynolds_number(self.vls_6ms, self.Dp, self.nul) self.assertAlmostEqual(homogeneous.swamee_jain_ff(Re, self.Dp, self.epsilon)*100, 0.009558047*100, places=4)