#calculate the flow rate of water and pressure drop
#Initialization of variables
dg=0.5 #in
dw=12. #in
rhog=0.022 #slug/ft^3
rhow=1.94 #slug/ft^3
muw=2.34e-5 #lb-sec/ft^2
mug=3.50e-7 #lb-sec/ft^2
Qg=0.15 #ft^3/s
dpg=100. #lb/ft^2
#calculations
Vr=dg/dw *rhog/rhow *muw/mug
Qr=Vr*dw*dw /dg/dg
Qw=Qr*Qg
dpr=rhow/rhog *(Vr)*Vr
dpw=dpr*dpg
#results
print '%s %.2f %s' %("Flow rate of water =",Qw,"ft^3/s")
print '%s %.1f %s' %("\n Pressure drop =",dpw,"lb/ft^2")
#calculate the velocity ratio, time ratio, acceleration ratio and force ratio.
#Initialization of variables
import math
Lr=1./10.
rhom=2.
rhop=1.94
#calculations
Vr=math.sqrt(Lr)
Tr=Lr/Vr
ar=Vr/Tr
Fr=rhom/rhop *ar*Lr*Lr*Lr
#results
print '%s %.4f' %("Velocity ratio = ",Vr)
print '%s %.4f' %("\n Time ratio = ",Tr)
print '%s %d' %("\n Acceleration ratio = ",ar)
print '%s %.6f' %("\n Force ratio = ",Fr)