# Matter and Energy¶

## Example 1.1, Page 17¶

In [1]:
# Initialization of Variable
from math import pi
from math import atan
g=32.2 #ft/s^2
m=500.0 #lb
rate=10.0 #ft/s^2

#calculations
F1=m/g *rate
ms=m/g
F2=ms*rate

#results
print "Force in case 1 in lbf",round(F1,3)
print "Force in case 2 in lbf",round(F2,3)

Force in case 1 in lbf 155.28
Force in case 2 in lbf 155.28


## Example 1.2,Page 18¶

In [2]:
# Initialization of Variable
from math import pi
from math import atan
g=32.2 #ft/s^2
g2=32.0 #ft/s^2
rate=10 #ft/s^2
w1=500 #lbf

#calculations
fd1=w1*g2/g
F=fd1/g2 *rate
ms=w1/g
F2=ms*rate
#results
print  "Net weight of body in case 1 in lbf",round(F,3)
print "Force in case 2 in lbf",round(F2,3)

Net weight of body in case 1 in lbf 155.28
Force in case 2 in lbf 155.28


## Example 1.3, Page 19¶

In [3]:
# Initialization of Variable
from math import pi
from math import atan
g=32.174 #ft/s^2
m=500.0 #lbm
rate=10.0 #ft/s^2

#calculations
F=1/g *m*rate

#results
print "Force required in lbf",round(F,3)

Force required in lbf 155.405


## Example 1.4, Page 21¶

In [4]:
# Initialization of Variable
from math import pi
from math import atan
g1=32.174 #ft/s^2
gc=g1
g2=30 #ft/s^2
m=100 #lbm

#calculations
w1=g1/gc *m
w2=g2/gc *m

#results
print "Weight in case 1 in lbf",round(w1,3)
print " Weight in case 2 in lbf",round(w2,3)

Weight in case 1 in lbf 100.0
Weight in case 2 in lbf 93.243


## Example 1.5,Page 22¶

In [5]:
# Initialization of Variable
from math import pi
from math import atan
ge=32.174 #ft/s^2
gm=5.47 #ft/s^2
we=50 #lbm

#calculations
wm=we*gm/ge

#results
print "In case a, it will weigh the same, weight  in lbm",round(we,2)
print " In case b, weight in lbf",round(wm,2)

In case a, it will weigh the same, weight  in lbm 50.0
In case b, weight in lbf 8.5


## Example 1.6,Page 31¶

In [6]:
# Initialization of Variable
from math import pi
from math import atan
g=32.2 #ft/s^2
p1=100 #psig
p2=29.0 #in of Hg

#calculations
BP=p2*0.491
AP=BP+p1

#results
print "Absolute pressure in psia",round(AP,3)

Absolute pressure in psia 114.239


## Example 1.7,Page 32¶

In [7]:
# Initialization of Variable
from math import pi
from math import atan
g=32.2 #ft/s^2
Pb=29.5 #in of Hg
Pv=10 #in of Hg

#calculations
AP=(Pb-Pv)*0.491

#results
print "Absoulte pressure in psia",round(AP,3)

Absoulte pressure in psia 9.575


## Example 1.8,Page 38¶

In [8]:
# Initialization of Variable
from math import pi
from math import atan
g=32.2 #ft/s^2
v1=1 #cu ft
p1=100 #psia

#calculations
v2=2*v1
W=144*p1*(v2-v1)

#results
print "Work done in ft-lb",round(W,3)

Work done in ft-lb 14400.0


## Example 1.9,Page 39¶

In [9]:
# Initialization of Variable
from math import pi
from math import atan
g=32.2 #ft/s^2
v1=1 #cu ft
p1= 100.0 #psia
p2=50.0 #psia
v2=3.0 #cu ft

#calculations
pa=(p1+p2)/2
W=pa*(v2-v1)*144

#results
print "Work done in ft-lb",round(W,3)

Work done in ft-lb 21600.0


## Example 1.10,Page 40¶

In [10]:
# Initialization of Variable
from math import pi
from math import atan
g=32.2 #ft/s^2
p1=100.0 #psia
p2=25.0 #psia
v2=2.0 #cu ft

#calculations
W=p1*144*v2 - p2*144*v2

#results
print "Work done in ft-lb",round(W,3)

Work done in ft-lb 21600.0


## Example 1.11,Page 41¶

In [11]:
# Initialization of Variable
from math import pi
from math import atan
g=32.2 #ft/s^2
n=100 #rpm
p1=100 #psia
p2=25 #psia
v2=2 #cu ft

#calculations
W=p1*144*v2 - p2*144*v2
Hp=W*n/33000

#results
print round(Hp,3),"Horsepower developed in hp"

65.0 Horsepower developed in hp


## Example 1.12,Page 46¶

In [12]:
#initialisation of variable
P=50.0 #hp
m=30.0 #lb
E=19000.0 #Btu/lb

#calculations
eta= P*2545/(m*E) *100 #efficiency

#results
print "Efficiency in percent",round(eta,3)

Efficiency in percent 22.325