##Solutions to Problems In applied mechanics
##A N Gobby
import math
##initialisation of variables
p=144.*60.##lbf/ft^2
A1=1./4.*math.pi*(1/2.)**2##ft^2
A2=1./4.*math.pi*(1/4.)**2##ft^2
w=5.##ft/s
U1=1./A1##ft/s
U2=1./A2##ft/s
g=32.2##ft/s
P=(U1**2/(2.*g))+(p/(2.*g))
P1=(3.+U2**2/(62.4))+(144./(62.4))
##CALCULATIONS
Pb=(P/P1)*w##lbf/in^2
##RESULTS
print'%s %.2f %s'%('the bernouli s equation= ',Pb,' lbf/in^2')
##Solutions to Problems In applied mechanics
##A N Gobby
import math
##initialisation of variables
p=1.23##ft^2
t=0.197##ft^2
u=1.595##ft^2
g=13.56##ft^2
w=9.2##in
m=0.97##in
##CALCULATIONS
H=(g-1.)*w/12.##ft^2
Q=m*u*math.sqrt(H)##ft^3
S=Q*60.*62.4/10.##gallons/min
##RESULTS
print'%s %.2f %s'%('the head difference in feet of water= ',S,' gallons/min')
##Solutions to Problems In applied mechanics
##A N Gobby
import math
##initialisation of variables
h=4.##ft
h1=3.24##ft^3/min
d=0.785##in
v=5.26##ft^3/min
##CALCULATIONS
Cd=h1/v##ft
C=1/4.*math.pi*(d)**2/(1./4.*math.pi*(1.)**2)##ft^3
V=Cd/C
##RESULTS
print'%s %.2f %s'%('the coefficients of discharge velocity and contraction=',V,'')
##Solutions to Problems In applied mechanics
##A N Gobby
import math
##initialisation of variables
x=32.5##in
y=33.7##in
h=8.##in
##CALCULATIONS
C=math.sqrt((x)**2/(4.*y*h))##ft
##RESULTS
print'%s %.2f %s'%('the coefficient of velocity= ',C,' ft')