Chapter 4 : Flow Of Fluids

example 4.1 page number 125

In [1]:
import math 

delta_p=70.;   #in bar
Et=20680.     #in bar

compressibility = delta_p/Et;

print "compressibilty of water = %f"%(compressibility)
compressibilty of water = 0.003385

example 4.3 page number 128

In [2]:
import math 
F=0.5*9.8;   #in N
A=3.14*0.05*0.15;   #in m2

shear_stress=F/A;   #in Pa
print "shear_stress = %f Pa"%(shear_stress)

velocity_distribution =0.1/(0.05*10**-3);
viscosity=shear_stress/velocity_distribution;
print "viscosity = %f Pa-s"%(viscosity) 
shear_stress = 208.067941 Pa
viscosity = 0.104034 Pa-s

example 4.5 page number 133

In [3]:
import math 
loss_ratio=3.6;     #delta_P2/delta_P1=3.6
velocity_ratio=2.;   #u2/u1=2

n=math.log(loss_ratio,2);  #delta_P2/delta_P1=(u2/u1)**n

print "power constant = %f flow is turbulent"%(n)
power constant = 1.847997 flow is turbulent

example 4.8 page number 137

In [4]:
import math 
print ('part 1')

x=0.05   #in m
density=1000.   #in kg/m3

viscosity=1.*10**-3    #in Pa-s
u=1.   #in m/s
Re=(density*u*x)/viscosity;

print "Reynolds Number = %f"%(Re)

thickness=4.65*x*(Re)**-0.5;
print "boundary layer thickness = %f m"%(thickness)

print ('part 2')
Re_x=3.2*10**5;
x_cr=(Re_x*viscosity)/(density*u);
print "transition takes place at x = %f m"%(x_cr) 

print ('part 3')
x=0.5   #in m
Re=(density*u*x)/viscosity;
thickness=0.367*x*(Re)**-0.2;
print "boundary layer thickness= %f m"%(thickness)

t_sublayer=71.5*x*(Re)**-0.9;
print "sub layer thickness= %f m"%(t_sublayer)
part 1
Reynolds Number = 50000.000000
boundary layer thickness = 0.001040 m
part 2
transition takes place at x = 0.320000 m
part 3
boundary layer thickness= 0.013300 m
sub layer thickness= 0.000266 m

example 4.9 page number 138

In [5]:
import math 
d1=0.05   #in m
A1=(3.14*d1**2)/4.;
density_1=2.1   #in kg/m3
u1=15.     #in m/s
P1=1.8;   #in bar
P2=1.3;   #in bar

w=density_1*A1*u1;
density_2=density_1*(P2/P1);
print "density at section 2 = %f kg/cubic meter"%(density_2)

u2=u1*(density_1/density_2)*(0.05/0.075)**2;
print "velocity at section 2 = %f m/s"%(u2)
density at section 2 = 1.516667 kg/cubic meter
velocity at section 2 = 9.230769 m/s

example 4.10 page number 139

In [6]:
import math 
Q=0.001*10**5   #in J/s
w=0.001*1000   #in kg/s
density=1000.   #in kg/m3
cp=4.19*10**3   #in J/kg K

delta_T=Q/(w*cp);

print "Temperature increase = %f degree celcius"%(delta_T)
Temperature increase = 0.023866 degree celcius

example 4.11 page number 142

In [7]:
import math 
u1=0;   #in m/s
ws=0;
P1=0.7*10**5    #in Pa
P3=0
density=1000   #in kg/m3

u3=((2*(P1-P3))/density)**0.5;
print "u3 = %f m/s"%(u3)

ratio_area=0.5;
u2=u3/ratio_area;
print "u2 = %f m/s"%(u2)

P2=1.7*10**5-((density*u2**2)/2)
print "P2 = %f Pa"%(P2)
print "this flow is physically unreal"
u3 = 11.832160 m/s
u2 = 23.664319 m/s
P2 = -110000.000000 Pa
this flow is physically unreal

example 4.12 page number 143

In [8]:
import math 

Q=3800./(24*3600)    #in m3/s
d=0.202    #in m

u=Q/((3.14/4)*d**2);    #in m/s
delta_P=5.3*10**6    #in Pa
density=897.    #in kg/m3
F=delta_P/density;    #in J/kg
ws=9.8*30+F;
mass_flow_rate= Q*density;
power=(ws*mass_flow_rate)/0.6;

print "power required = %f kW"%(power/1000)
power required = 407.834267 kW

example 4.13 page number 146

In [9]:
import math 
density=1000    #in kg/m3
viscosity=1*10**-3   #in Pa s
P=100*1000    #in Pa

vdP=P/density;

Q=2.5*10**-3/(24*3600)
A=3.14*(0.0005)**2/4;
u=Q/A;
print "u = %f m/s"%(u)

Re=density*u*0.0005/viscosity;
print "Re = %f"%(Re)

L=(-u**2+vdP)/18.86;
print "L = %f m"%(L)
u = 0.147440 m/s
Re = 73.720217
L = 5.301074 m

example 4.14 page number 151

In [10]:
import math 
d=0.025     #in m
u=3.        #in m/s
density=894.   #in kg/m3
viscosity=6.2*10**4     #in Pa-s

Re=(u*d*density)/viscosity;
f=0.0045;
L=50.;

delta_P=2*f*density*u**2*(L/d)
print "frictional head loss = %f kPa"%(delta_P/1000)

required_P=25*density*9.8;
total_head=delta_P+required_P;
print "total pressure head = %f bar"%(total_head/10**5)
frictional head loss = 144.828000 kPa
total pressure head = 3.638580 bar

example 4.15 page number 152

In [11]:
import math 
Q=0.8*10**-3;   #in m3/s
d=0.026    #in m
A=(3.14*(d**2))/4   #in m2

u=Q/A;    #in m/s
density=800    #in kg/m3
viscosity=0.0005   #in Pa-s

Re=(u*density*d)/viscosity;
f=0.079*(Re)**-0.25;
L=60
h_f=2*f*((u**2)/9.8)*(L/d);

print "level difference = %f m"%(h_f)
level difference = 5.343360 m

example 4.16 page number 153

In [12]:
import math 
delta_z=50;    #in m
L=290.36    #in m
d=0.18    #in m
Q=0.05    #in m3/s

A=(3.14*d**2)/4;    #in m2
u=Q/A;    #in m/s
density=1180;   #in kg/m3
viscosity=0.0012   #in Pa-s
Re=u*density*d/viscosity;

f=0.004;
sigma_F=2*f*u**2*L/d;
ws=((9.8*50)+sigma_F)/0.6;
mass_flow_rate=Q*density;    #in Kg/s
power=mass_flow_rate*ws/1000;   #in KW
energy_cost=power*24*0.8;

print "Energy cost = Rs %f"%(energy_cost)
Energy cost = Rs 1019.280105

example 4.17 page number 154

In [13]:
import math 
density=998   #in kg/m3
viscosity=0.0008  #in Pa-s
d=0.03   #in m
u=1.2   #in m/s

Re=density*d*u/viscosity;

f=0.0088;
D=1   #in m
N=10
L=3.14*D*N;
delta_P=(2*f*u**2*L)/d;   #in Pa
delta_P_coil=delta_P*(1+(3.54*(d/D)));

print "frictional pressure drop = %f kPa"%(delta_P_coil)
frictional pressure drop = 29.343858 kPa

example 4.18 page number 154

In [14]:
import math 

b=0.050    #in m
a=0.025    #in m
d_eq=b-a  #in m
density=1000  #in kg/m3
u=3    #in m/s
viscosity = 0.001

Re=d_eq*u*density/viscosity;

e=40*10**6   #in m
f=0.0062;
P_perunit_length=2*f*density*u**2/d_eq;   #in Pa/m

print "pressure per unit length = %f Pa/m"%(P_perunit_length)
pressure per unit length = 4464.000000 Pa/m

example 4.19 page number 155

In [15]:
import math 
d = 0.3   #in m
u = 17.63   #avg velocity in m/s

q = (3.14/4)*d**2*u;

print "volumetric flow rate = %f cubic meter per second"%(q)
volumetric flow rate = 1.245559 cubic meter per second

example 4.20 page number 156

In [16]:
import math 

d = 0.15   #in m

u = (0.0191/0.15**2);   #in m/s
q = (3.14/4)*d**2*u;

print "volumetric flow rate = %f cubic meter/s"%(q)
volumetric flow rate = 0.014994 cubic meter/s

example 4.21 page number 160

In [17]:
import math 
Q=0.0003    #in m3/s
d=0.05    #in m
A=(3.14*d**2)/4;

u=Q/A;

density=1000;   #in kg/m3
viscosity=0.001;  #in Pa-s
e=0.3;
dp=0.00125;   #particle diameter in m

Re=(dp*u*density)/(viscosity*(1-e));
fm=(150/Re)+1.75;
L=0.5   #in m
delta_Pf=fm*((density*L*u**2)/dp)*((1-e)/e**3);   #in Pa

delta_P=delta_Pf-(density*9.8*L);
pressure_gradient=delta_P/(L*1000);   #in kPa/m

print "required pressure gradient = %f kPa/m of packed height"%(pressure_gradient)
required pressure gradient = 1104.702008 kPa/m of packed height

example 4.22 page number 163

In [18]:
from scipy.optimize import fsolve 
import math 

d=120*10**-6    #in m
density=2500   #particle density in kg/m3
e_min=0.45;
density_water=1000   #in kg/m3

viscosity=0.9*10**-3;   #in Pa-s
umf=(d**2*(density-density_water)*9.8*e_min**3)/(150*viscosity*(1-e_min));
print "minimum fludization velocity = %f m/s"%(umf)

Re_mf=(d*umf*density_water)/(viscosity*(1-e_min));


def F(e):
    return e**3+1.657*e-1.675;

x = 10.;
e = fsolve(F,x)

print "e = %f"%(e)
length_ratio=(1-e_min)/(1-e);
print "ratio of heights = %f"%(length_ratio)
minimum fludization velocity = 0.000260 m/s
e = 0.753096
ratio of heights = 2.227583

example 4.23 page number 167

In [19]:
import math 
P=9807.   #in Pa
density=1000.   #in kg/m3
Q=250./(60.*density)
head=25.   #in m

w= head*Q*P;     #in kW
power_delivered=w/0.65;
power_taken=power_delivered/0.9;

print "power_delivered = %f kW"%(power_delivered/1000)
print "power taken by motor = %f kW"%(power_taken/1000)
power_delivered = 1.571635 kW
power taken by motor = 1.746261 kW
In [ ]: