Chapter 2 : Work, Energy and Heat

Example 2.2 Page No : 62

In [1]:
#Given
k = 100; 			# Unit:lbf/in. 			#k = spring constant
l = 2; 			#Unit:inch 			#l =  length of compression of string

# Calculations
work = (1./2)*k*l**2; 			#force-print lacement relation 			#Unit:in*lbf

# Results
print "Workdone is %.2f inch*lbf"%(work);
Workdone is 200.00 inch*lbf

Example 2.3 Page No : 62

In [2]:
#Given
k = 20*1000; 			# Unit:N/m  			#k = 20kN 			#k = spring constant
l = 0.075; 			#Unit:meter  			#l = 75 mm 			#l =  length of compression of string

# Calculations
work = (1./2)*k*l**2; 			#force-print lacement relation 			#Unit:N*m

# Results
print "Workdone is %.2f Jule"%(work);
Workdone is 56.25 Jule

Example 2.4 Page No : 66

In [3]:
#Given
Z = 600; 			#Unit:ft 			#Z = The dismath.tance,the body is raised from its initial position when the force is applied
gc = 32.174; 			#Unit: (lbm*ft)/(lbf*s**2) 			#gc is constant of proportionality
g = gc; 			#Unit:ft/s**2 			#g = The local gravity
m = 1.; 			#Unit:lbm 			#m = mass

# Calculations
PE = (m*g*Z)/gc; 			#potential energy 			#Unit:ft*lbf

# Results
print "%.2f ft*lbf work is done lifting the water to elevation "%(PE)
600.00 ft*lbf work is done lifting the water to elevation 

Example 2.5 Page No : 66

In [4]:
# Given value
m = 1; 			#Unit:kg 			#m = mass
g =  9.81 			#Unit:m/s**2 			#g = The local gravity
Z = 50 			#Unit:m 			#			#Z = The dismath.tance,the body is raised from its initial position when the force is applied 			#In this case Z = delivered water from well to pump

# Calculations
PE = m*g*Z; 			#PE = Potential Energy 			#Unit:Joule

# Results
print "Change in potential energy per kg of water is %.2f J "%(PE); 			#J = Joule = N*m = kg*m**2/s**2
Change in potential energy per kg of water is 490.50 J 

Example 2.6 Page No : 66

In [5]:
# Given value
Rho = 62.4; 			#Unit:lbm/ft**3 			#Rho = The density of water
A = 10000; 			#Flow = 10000; gal/min
V = (231./1728); 			# 12 inch = 1 ft 			#So,1 ft**3 = 1728 in**3  			# One Gallon is a volumetric measure equal to 231 in**3
#A*V 			#Unit:ft**3/min

#In example, 2.4:
#  From example 2.4
Z = 600; 			#Unit:ft 			#Z = The dismath.tance,the body is raised from its initial position when the force is applied
gc = 32.174; 			#Unit: (lbm*ft)/(lbf*s**2) 			#gc is constant of proportionality
g = gc; 			#Unit:ft/s**2 			#g = The local gravity
m = 1; 			#Unit:lbm 			#m = mass

# Calculations and Results
PE = (m*g*Z)/gc; 			#potential energy 			#Unit:ft*lbf
print "%.2f ft*lbf work is done lifting the water to elevation "%(PE);

#So,
# In example 2.5
M = Rho*A*V; 			#M = the mass flow
Power = M*PE; 			#Unit:ft*lbf/lbm
print "Generated Power is %.2f ft*lbf/lbm "%(Power);
# 1 horsepower  =  33,000 ft*lbf/min
print "Power  =  %.2f hp"%(Power/33000);
600.00 ft*lbf work is done lifting the water to elevation 
Generated Power is 50050000.00 ft*lbf/lbm 
Power  =  1516.67 hp

Example 2.7 Page No : 67

In [6]:
print "In problem 2.5";
m = 1; 			#Unit:kg 			#m = mass
g =  9.81 			#Unit:m/s**2 			#g = The local gravity
Z = 50 			#Unit:m 			#			#Z = The dismath.tance,the body is raised from its initial position when the force is applied 			#In this case Z = delivered water from well to pump

# Calculations and Results
PE = m*g*Z; 			#PE = Potential Energy 			#Unit:Joule
print "Change in potential energy per kg of water is %.2f J "%(PE); 			#J = Joule = N*m = kg*m**2/s**2
#Given data in problem 2.7 is
M = 1000; 			#Unit;kg/min			#M = Water density 
Power = PE*M*(1./60); 			#1 min = 60 seconds 			#power 			#unit:Joule/s = W
print "Power is %.2f Watt"%(Power); 			#Watt = N*m/s  =  Joule/s  = Watt
#1 Hp = 746 Watt
print "Power is %.2f Horsepower"%(Power/745);
In problem 2.5
Change in potential energy per kg of water is 490.50 J 
Power is 8175.00 Watt
Power is 10.97 Horsepower

Example 2.8 Page No : 69

In [7]:
m = 10.; 			#Unit:lb 			#m = Mass
V1 = 88.; 			#Unit:			#ft/s V1 = Velocity before it is slowed down
V2 = 10.; 			#Unit;ft/s 			#V2 = Velocity after it is slowed down
gc = 32.174; 			#Unit: (lbm*ft)/(lbf*s**2) 			#gc is constant of proportionality

# Calculations and Results
KE1 = m*V1**2/(2*gc); 			#The kinetic energy of the body before it is slowed down 			#Unit:ft*lbf
print "The kinetic energy of the body before it is slowed down is %.2f ft*lbf"%(KE1);

KE2 = m*V2**2/(2*gc); 			#The kinetic energy of the body before it is slowed down 			#Unit:ft*lbf
print "The kinetic energy of the body before it is slowed down is %.2f ft*lbf"%(KE2);

KE = KE1-KE2; 			#KE = Change in kinetic energy 			#Unit:ft*lbf
print "Change in kinetic energy is %.2f ft*lbf"%(KE);
The kinetic energy of the body before it is slowed down is 1203.46 ft*lbf
The kinetic energy of the body before it is slowed down is 15.54 ft*lbf
Change in kinetic energy is 1187.92 ft*lbf

Example 2.9 Page No : 70

In [8]:
# Given value
m = 1500.; 			#Unit:kg 			#m = mass
V1 = 50.; 			#Km/hour V1 = Velocity before it is slowed down
#V1 = (50*1000 m/hour)**2/(3600 s/hour)**2 

# Calculations
KE1 = (m*(V1*1000)**2/3600**2)/2; 			#KE1 = Initial kinetic energy 			#Unit:Joule

#After slowing down
V2 = 30; 			#Unit:KM/hour 			#V2 = Velocity after it is slowed down
#V2 = (30*1000 m/hour)**2/(3600 s/hour)**2 
KE2 = (m*(V2*1000)**2/3600**2)/2; 			#KE2 = After slowing down, the kinetic energy 			#Unit:Joule

KE = KE1-KE2; 			#KE = Change in kinetic energy 			#Unit:Joule

# Results
print "Change in kinetic energy is %.2f kJ"%(KE/1000);
Change in kinetic energy is 92.59 kJ

Example 2.10 Page No : 70

In [10]:
import math

m = 10 			#Unit:kg 			#m = mass
Z = 10 			#Unit:m 			#Z = The dismath.tance,the body is raised from its initial position when the force is applied
g =  9.81 			#Unit:m/s**2 			#g = The local gravity
#There are no losses in the system
#So,initial potential energy plus initial kinetic energy equal to sum of final potential energy plus final kinetic energy
#So, PE1+KE1 = PE2+KE2
#From the figure,KE1 = 0; PE2 = 0;
#So,PE1 = KE2;

# Calculations and Results
PE1 = m*g*Z; 			#PE = Potential Energy 			#Unit:Joule
#KE2 = (m*v**2)/2
v = (PE1*2)/m; 
V = math.sqrt(v); 			#Unit:m/s 			#velocity 
print "Velocity  =  %.2f m/s"%(V);
KE2 = PE1; 			#kinetic energy 			#Unit:Joule
print "Kinetic energy is %.2f N*m"%(PE1);
Velocity  =  14.01 m/s
Kinetic energy is 981.00 N*m

Example 2.11 Page No : 74

In [11]:
p1 = 100.; 			#pressure at the enmath.tance 			#Unit:psia,lbf/in**2
Rho1 = 62.4; 			#Unit:lbm/ft**3  			#Rho = The density
v1 = 144.*(1/Rho1) 			#Specific Volume at entrance or reciprocal of fluid density 			# 144 in**2 = 1 ft**2
#1 Btu  =  778 ft*lbf 
J = 778.; 			#Unit:ft*lbf/Btu 			#conversion factor

# Calculations and Results
FW1 = (p1*v1)/J; 			#Flow work  			#Btu/lbm
print "Flow work  =  %.2f Btu/lbm"%(FW1);

print "At the exit of device"
p2 = 50.; 			#pressure at the exit 			#Unit:psia,lbf/in**2
Rho2 = 30.; 			#Unit:lbm/ft**3 			#Rho = The density
v2 = 144.*(1./Rho2) 			#Specific Volume at exit or reciprocal of fluid density 			# 144 in**2 = 1 ft**2
#1 Btu  =  778 ft*lbf 
J = 778.; 			#Unit:ft*lbf/Btu 			#conversion factor
FW2 = (p2*v2)/J; 			#Flow work 			#Btu/lbm
print "Flow work  =  %.2f Btu/lbm"%(FW2);
Flow work  =  0.30 Btu/lbm
At the exit of device
Flow work  =  0.31 Btu/lbm

Example 2.12 Page No : 75

In [12]:
print "At the entrance of device"
p1 = 200*1000; 			#200kPa*1000 Pa/kPa  			#pressure at the entrance 			#Unit:N/m**2
Rho1 = 1000; 			#kg/m**3 			#Fluid density at entrance
v1 = 1./Rho1; 			#Specific Volume at entrance or reciprocal of fluid density
FW1 = p1*v1; 			#Flow work at entrance 			#Unit:N*m/kg
print "Flow work  =  %.2fN*m/kg"%(FW1);

print "At the exit of device"
p2 = 100*1000; 			#200kPa*1000 Pa/kPa  			#pressure at the exit 			#Unit:N/m**2
Rho2 = 250; 			#kg/m**3 			#Fluid density at exit
v2 = 1./Rho2; 			#Specific Volume at entrance or reciprocal of fluid density
FW2 = p2*v2; 			#Flow work at exit			#Unit:N*m/kg
print "Flow work  =  %.2f N*m/kg"%(FW2);
At the entrance of device
Flow work  =  200.00N*m/kg
At the exit of device
Flow work  =  400.00 N*m/kg

Example 2.14 Page No : 78

In [13]:
#It is necessary that pressure be expressed as psfa when the volume is in cubic feet
#100 psia  =  100*144 psfa
p1 = 100*144; 			#Unit:psfa  			#initial pressure
v1 = 2; 			#Unit:ft**3/lb 			#Initial Specific Volume
v2 = 1.; 			#Unit:ft**3/lb 			#Final Specific Volume

# Calculations
w = p1*v1*math.log(v2/v1); 			#work done on fluid 			#Unit:ft*lbf/lbm

# Results
print "Work done on fluid  =  %.2f ft*lbf/lb"%(w);
#1 Btu  =  778 ft*lbf 
print "Work done on the fluid per pound of fluid is %.2f Btu/lbm"%(w/778);
Work done on fluid  =  -19962.64 ft*lbf/lb
Work done on the fluid per pound of fluid is -25.66 Btu/lbm

Example 2.15 Page No : 79

In [15]:
import math

# Given value
#p1*v1 = p2*v2
p1 = 200.*1000; 			#p1 = Initial Pressure 			#Unit:Pa
p2 = 800*1000; 			#p2 = Final Pressure 			#Unit:Pa
v1 = 0.1; 			#v1 = Initial Special Volume 			#Unit:m**3/kg

# Calculations
v2 = (p1/p2)*v1; 			#v1 = final Special Volume 			#Unit:m**3/kg
w = p1*v1*math.log(v2/v1); 			#workdone 			#Unit:kJ/kg

# Results
print "Work done per kilogram of gas is %.2f kJ/kg into the system)"%(w/1000);
Work done per kilogram of gas is -27.73 kJ/kg into the system)