import math
delta_p=70.; #in bar
Et=20680. #in bar
compressibility = delta_p/Et;
print "compressibilty of water = %f"%(compressibility)
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)
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)
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)
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)
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)
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"
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)