# variables
T = 68; #degreeF
p = 10; # psi
d = 15; # feet
rho = 1.59; #specific gravity
# calculations
gam = rho*62.4; #lb/cuft
p1 = gam*d + p*144; #psf
# results
print 'p1 = %d psf = %.1f psi '%(p1,p1*0.00694);
#incorrect answer given in the textbook
# variables
h = 35000; # feet
p1 = 14.7; # psia
T1 = 519; # degreeR
gam1 = 0.0765; # lb/cuft
p2 = 504; # psfa
# calculations
T2 = T1 - h*0.00356; # degreeR
gam2 = p2/(53.3*T2); # lb/cuft
# results
print 'p2 = %d psfa = %.2f psia \nspecific weight = %.3f lb/cuft'%(p2,p2*0.00695,gam2);
# variables
h1 = 12.5; # inches
p1 = 14.50; # psia
# calculations
p = p1 - h1*(14.70/29.92); #absolute pressure in psia
# results
print 'Absolute pressure = %.2f psia'%(p);
# variables
gam1 = 0.9*62.4;
gam2 = 13.55*62.4;
l1 = 10; # feet
l2 = 15./12; # feet
# calculations
p_x = gam2*l2 - gam1*l1; # psf
# results
print 'The gauge reading = %d psf = %.2f psi'%(p_x,0.00694*p_x);
import math
from scipy.integrate import quad
# variables
l1 = 4.; # feet
b1 = 6.; # feet
b2 = 6.; # feet
l2 = 2.55; # feet
t = 1.; # feet
# calculations
F1 = 0.5*l1*b1*62.4*(0.5*l1 + t) ; # lb
F2 = 0.25*math.pi*b2**2 *62.4*(l2 + t); # lb
a1 = l1*b2**3 /(36*0.5*b2*0.5*l1*b1); # feet
a2 = 70/((0.5*l2 + t)*28.3); # feet
l_p = (F1*(0.5*l1 + a1)+F2*(l2+a2))/(F1+F2) +1; #feet
x_p1 = (0.5*l1-a1) - a1*2/b2; # feet
def f2(y):
return (62.4/2)*(36-y**2)*(y+1)
M = quad(f2,0,6)[0]
x_p2 = M/F2; # feet
x_p = (x_p2*F2 - F1*x_p1)/(F1+F2); # feet
# results
print 'Total force on composite area is %d lb'%(F1+F2);
print ' Vertical location of resultant force is %.2f ft below the water surface'%(l_p);
print ' Horizontal location of resultant force is %.3f ft right of the water surface'%(x_p);
#incorrect answer given in textbook
import math
import numpy
# variables
l = 8.; #feet
b = 10.; # feet
# calculations
F_h = 0.5*l*b*62.4*(b+2.5); # lb
x = 83.2/(40*(b+2.5)); # feet
F_v = (b+5)*62.4*40-(l*62.4*(25 - 0.25*math.pi*25)); # lb
F = math.sqrt(F_h**2 + F_v**2); # lb
e = (2680*3.91 + 37440*(0.25*b))/F_v ; # feet
theta = 180*numpy.arctan(F_v/F_h) /math.pi; # degrees
x_p = 0.25*b-x; # feet
# results
print 'Magnitude of resultant force is %d lb'%(F);
print 'Theta = %d degrees'%(theta);
print 'Location is %.3f feet above and %.2f feet to the right of B'%(x_p,e);
#there are errors in the answer given in textbook
# variables
A = 4000.; # sq.ft
d1 = 10.; # feet
d2 = 2.; # inches
rho = 64.; # lb/cuft
# calculations
W = A*(d2/12)*rho; # lb
# results
print 'Weight of cargo = %d lb'%(round(W,-2));
import math
# variables
gam = 53.0; # lb/cuft
D = 17.; # inches
d = 12.; # inches
# calculations
V = (math.pi/6)*(D/d)**3;
V1 = 0.584; #cuft
V2 = 0.711; #cuft
W = V*gam;
F_B = V1*62.4;
F_ACA = (V2)*62.4;
F = W+F_ACA-F_B;
# results
print 'The force exerted between sphere and orfice plate = %.1f lb'%(F);
#incorrect answer for W in textbook. Hence the answer differs
from scipy.integrate import quad
# variables
v = 15; # ft/sec**2
d = 5; # ft
# calculations
def f3(z):
return -62.4*(v+32.2)/32.2
p = quad(f3,0,-5)[0]
# results
print 'p = %d psf'%(p);
import math
from scipy.integrate import quad
# variables
m = -0.229; #slope
a_z = 1.96; # ft/sec**2
a_x = 4*a_z; # ft/sec**2
a = math.sqrt(a_x**2 + a_z**2); # ft/sec**2
def f1(z):
return -(32.2 + a_z)*(62.4/32.2)
p = quad(f1,0,-2.75)[0]
# results
print 'p = %.1f psf'%(p);
#there is an error in the answer given in textbook
import math
# variables
l1 = 2.; # feet
l2 = 3.; # feet
rpm = 100;
# calculations
p_A = (l1+l2)-(2./3)*(2*math.pi*rpm/60)**2 /(2*32.2);
p_B = (l1+l2)+(1./3)*(2*math.pi*rpm/60)**2 /(2*32.2);
# results
print 'Pressure heads at point A and point B ae %.2f ft and %.2ft ft respectively'%(p_A,p_B);