# variables
g=32.2; #ft/s^2
rho_water=62.3; #lbm/ft^3
# calculation
#specific weoight=(density)*(acceleration due to gravity)
specific_wt=rho_water*g; #lbm.ft/ft^3.s^2
#1 lbf=32.2 lbm.ft/s^2
specific_wt=specific_wt/32.2; #lbf/ft^3
# result
print "Specific weight of water is" ,specific_wt , "lbf/ft^3"
# variables
d=304.9; #m
rho_water=1024.; #Kg/m^3
g=9.81; #m/s^2
p_atm=101.3; #KPa
# calculation
#gauge pressure=(desity)*(acc. due to gravity)*(depth)
p_depth=p_atm+rho_water*g*d/1000.0; #KPa
# result
print "pressure at the depth is" , (p_depth) , "KPa"
# variables
rho_oil=55.; #lbm/ft^3
g=32.2; #ft/s^2
d=60.; #ft (depth of oil cylinder)
# calculation and result
gauge_pressure=rho_oil*g*d/32.2; #lbf/ft^2
print "Gauge pressure is",
print gauge_pressure,
print "lbf/ft^2"
#1 ft=12 in
gauge_pressure=gauge_pressure/144.0; #lbf/in^2
print "Gauge pressure is",
print gauge_pressure,
print "lbf/in^2"
import math
# varirbles
#calc of density of air at a certain height
p_atm=14.7; #psia
T=289.; #K
#P2=P1*exp^(-(acc. due to gravity)*(mass of air)*(height)/(universal gas const.)/(temp.))
g=9.81; #m/s^2
R=8314; #N.m^2/Kmol/K
#for height of 1000 ft=304.8m
h=304.8; #m
p_1000=14.7*math.exp(-g*29*h/R/289);
print "pressure at 1000ft is",
print p_1000,
print "psia"
#for height of 10000 ft=3048m
h=3048.; #m
p_10000=p_atm*math.exp(-g*29.*h/R/289.);
print "pressure at 10000ft is",
print p_10000,
print "psia"
#for height of 100000 ft=30480m
h=30480.; #m
p_100000=14.7*math.exp(-g*29.*h/R/289.);
print "pressure at 100000ft is",
print p_100000,
print "psia",
# variables
p_atm=14.7; #psia
g=9.81; #m/s^2
#P2=P1*[1-(acc. due to gravity)*(mass of air)*(height)/(univ. gas const.)/(temp.)]
T=289.; #K
R=8314. #N.m^2/Kmol/K
# calculation and result
#for height of 1000ft=304.8m
h=304.8 #m
p_1000=p_atm*(1-g*29*h/R/T)
print "pressure at 1000ft is",
print p_1000,
print "psia"
#for height of 10000ft=3048m
h=3048. #m
p_10000=p_atm*(1-g*29*h/R/T)
print "pressure at 10000ft is",
print p_10000,
print "psia"
#for height of 100000ft=30480m
h=30480. #m
p_100000=p_atm*(1-g*29*h/R/T)
print "pressure at 100000ft is",
print p_100000,
print "psia"
#NOTE that the pressure comes out to be negative at 100000ft justifying that density of air changes with altitude
import math
# variables
#calc atm pressure on a storage tank roof
p_atm=14.7; #psia
#diameter of roof is 120ft
d_roof=120.; #ft
# calculation
#force=(pressure)*(area)
f_roof=p_atm*(math.pi)*d_roof**2/4.*144; #lbf ;144 because 1ft=12inch
# result
print "Force exerted by atmosphere on the roof is",
print f_roof,
print "lbf"
import math
# variables
#calc atm pressure on a storage tank roof
p_atm=14.7; #psia
#diameter of roof is 120ft
d_roof=120.; #ft
#force=(atm. pressure + gauge pressure)*(area)
#gauge pressure=(desity)*(acc. due to gravity)*(depth)
rho_water=62.3 #lbm/ft^3
g=32.2; #ft/s^2
# calculation
#depth of water on roof=8 inch=o.667 ft
h=0.667; #ft
gauge_pressure=rho_water*g*h/32.2*(math.pi)*d_roof**2/4.; #lbf
# result
print gauge_pressure
# variables
#lock gate has water on one side and air on the other at atm. pressure
w=20.; #m (width of the lock gate)
h=10.; #m (height of the lock gate)
p_atm=1.; #atm
rho_water=1000.; #Kg/m^3
g=9.81 #m/s^2
# calculation
#for a small strip of dx height at the depth of x on the lock gate
#net pressure on strip = (p_atm+(rho_water)*g*x) - p_atm
#thus, net pressure on strip = (rho_water)*g*x
#force on strip = (rho_water*g*x)*w.dx = (rho_water)*g*w*(x.dx)
#force on lock gate = integration of force on strip fromm h=0 to h=10
#integration(x.dx) = x^2/2
#for h=0 to h=10; integration (x.dx) = h^2/2
force_lockgate=(rho_water)*g*w*h**2/2;
# result
print "The net force on the lock gate is",force_lockgate/10**6,"MN"
sigma_tensile=20000. #lbf/in^2 (tensile stress is normally 1/4 rupture stress)
#max pressure is observed at the bottom of the storage
p_max=22.9; #lbf/in^2
#diameter of storaeg tank = 120ft =1440in
d=1440.; #in
# calculation
t=(p_max)*d/sigma_tensile/2; #in
# result
print "Thichness of the storage tank is",
print t,
print "in"
# variables
p_working=250.0; #lbf/in^2
#diameter of the cylinder = 10ft = 120in
d=120.0; #in
sigma_tensile=20000.; #lbf/in^2
# calculation
t=p_working*d/sigma_tensile/2; #in
# result
print "Thichness of the storage tank is",
print t,
print "in"
import math
# variables
p_atm=1.; #atm
T=293.; #K
d=3.; #m (diameter of the balloon)
# calculation
#buoyant force=(density of air)*g*(volume of balloon)
#weight of balloon = (density of helium)*g*(volume of balloon)
#density for gases = PM/RT
#payload of balloon = buoyant force - weight
V_balloon=(math.pi)*d**3/6.; #m^3
R=8.2*10**(-2); #m^3.atm/mol/K
M_air=29.; #Kg/Kmol
M_he=4.; #Kg/Kmol
g=9.81; #m/s^2
payload=(V_balloon)*g*p_atm*(M_air-M_he)/R/T; #N
# result
print "Payload of the balloon is",
print payload,
print "N"
# variables
#calc fraction of block in water
SG_wood=0.96; #Specific gravity
SG_gasoline=0.72;
# calculation
#Let r be the ratio - V_water/V_wood
r=(SG_wood-SG_gasoline)/(1-SG_gasoline);
# result
print "Fraction of wood in water",
print r
# variables
#height of water above pt.C = 2.5ft
rho_water=62.3; #lbm/ft^3;
h1=2.5; #ft
rho_gas=0.1; #lbm/ft^3
h2=0.5; #ft (height of gas)
g=32.2; #ft/s^2
# calculation
gauge_pressure=((rho_water)*g*h1+(rho_gas)*g*h2)/144/32.2 #lbf/in^2
# result
print "Gauge pressure is",
print gauge_pressure,
print "lbf/in^2"
rho_water=62.3; #lbm/ft^3
SG_oil=1.1;
rho_oil=SG_oil*(rho_water);
g=32.2; #ft/s^2
h1_1=1.; #ft
h1_2=2.; #ft
h2_1=2.; #ft
h2_2=1.; #ft
# calculation
p_diff=((rho_water)*g*(h1_1-h1_2)+(rho_oil)*g*(h2_1-h2_2))/32.2/144.0; #lbf/in^2
# result
print "The pressure difference is",
print p_diff,
print "lbf/in^2"
# variables
k=10000.; #N/m (spring constant)
x=0.025; #m (displacement in spring)
A=0.01; #m^2 (area of piston)
# calculation
gauge_pressure=k*x/A/1000.; #KPa
# result
print "The gauge pressure is",
print gauge_pressure,
print "KPa"
# variables
g=32.2; #ft/s^2
h=20.; #ft (height of fireplace)
rho_air=0.075; #lbm/ft^3
T_air=293.0; #K (surrounding temperature)
T_fluegas=422.0; #K
# calculation
p_diff=g*h*(rho_air)*(1-(T_air/T_fluegas))/32.2/144; #lbf/in^2
# result
print "The pressure difference is",
print p_diff,
print "lbf/in^2",
# variables
rho_water=1000. #Kg/m^3
g=9.81; #m/s^2
h=5.; #m (depth of water)
# calculation and result
#for elevator not accelerated
p_gauge=(rho_water)*g*h/1000.0; #KPa
print "THe gauge pressure is",
print p_gauge,
print "KPa"
#for elevator accelerated at 5m/s^2 in upward direction
a=5.; #m/s^2
p_gauge=(rho_water)*(g+a)*h/1000.0; #KPa
print "THe gauge pressure is",
print p_gauge,
print "KPa"
#for elevator accelerated at 5m/s^2 in downward direction
a=5.; #m/s^2
p_gauge=(rho_water)*(g-a)*h/1000.0; #KPa
print "THe gauge pressure is",
print p_gauge,
print "KPa"
import math
# variables
#angle free surface makes with the horizontal in an accelerated body
a=1.; #ft/s^2
g=32.2; #ft/s^2
# calculation
theta=math.atan(a/g); #radians
theta=theta*180./math.pi; #degrees
# result
print "The angle made by free surface with the horizontal is",
print theta,
print "degrees"
import math
# variables
f=78/60.0; #rps
r=0.15; #m
g=9.81; #m/s^2
# calculation
#omega=2*(%pi)*f
z=((2*(math.pi)*f)**2)*r**2/2/g; #m
# result
print "The liquid in the cylinder rises to a height of",
print z,
print "m"
import math
# variables
#Let difference between heights at bottom and top be d
d=20.; #in
r_a=14.; #in
f=1000/60.; #rps
g=32.2; #ft/s^2
# calculation
r_b=((r_a)**2-2*(d)*g*12/(2*(math.pi)*f)**2)**0.5; #in
# result
print "The thickness of water strip at bottom of industrial centrifuge",
print r_b,
print "in"