#Calculate the volumetric flow rate
import math
# variables
g=32.2 #ft/s**2
dz=1.25 #ft
Dp=0.03 #in (Diameter of particle)
eta=0.33 #dimentionless
rho=62.3 #lbm/ft**3
mew=1.002 #cP
dx=1 #ft
#1 cP.ft.s = 6.72*10**(-4)#lbm
#1 ft = 12 in
# calculation
Vs=g*dz*(Dp/12.0)**2*eta**3*rho/(150*mew*(1-eta)**2*dx*6.72*10**(-4)) #ft/s
d=2 #in (diameter of pipe)
A=(math.pi)/4.0*(d/12.0)**2 #ft**2
Q=Vs*A #ft**3/s
R=(Dp/12)*Vs*rho/(mew*6.72*10**(-4)*(1-eta)) #dimentionless (Reynold's number)
# results
print "The velocity of water is %f ft/s\n"%Vs
print "The volumetric flow rate is %f ft**3/s\n"%Q
print "Reynolds number is %f"%R
#Calculate the pressure gradient
# variables
Vs=2. #ft/s
dp=0.03 #in (diameter of particle)
rho=62.3 #lbm/ft**3
eta=0.33 #dimentionless
# calculation
#let DP denote pressure gradient
#1 ft = 12 in
#1 lbf.s**2 = 32.2lbm.ft
DP=1.75*rho*Vs**2*(1-eta)/((dp/12)*eta**3*32.2*144) #psi/ft
# result
print "The pressure gradient is %d psi/ft"%DP
#Calculate the permeability
# variables
Q=1. #ft**3/min
mew=0.018 #cP
dx=0.5 #in
A=1. #ft**2
dP=2. #lbf/in**2
# calculations
#1 ft = 12 in
#1 min = 60 sec
#1 ft**2.cP = 2.09*10**(-5) lbf.s
#1 darcy = 1.06*10**(-11) ft**2
k=(Q*mew*(dx/12.0)/A/dP)*(1/144.0)*2.09*10**(-5)*(1/60.0)*(1.0/(1.06*10**(-11))) #darcy
# result
print "The permeability is %.3f darcy"%k