Chapter 2 - Fundamental Concepts

Example 1 - Pg 17

In [2]:
#Calculate the potential energy of the system
#Initialization of variables
z=100 #ft
m=32.1739 #lbm
#calculations
PE=m*z
#results
print '%s %.2f %s' %("Potential energy =",PE,"ft-lbm")
Potential energy = 3217.39 ft-lbm

Example 3 - Pg 21

In [3]:
#calculate the absolute energy and change in mass of the mixture
#Initialization of variables
import math
m0=18.016 #lbm
gc=32.1739 #lbm ft/lbf sec^2
c=186000*5280
dU=94.4*math.pow(10,6) #ft-lbf
#calculations
U=m0/gc *c*c
dm= -dU*gc/(c*c)
#results
print '%s %.2e %s' %("Absolute energy of this mixture =",U,"ft-lbf")
print '%s' %("\n In case b, there is no change in mass")
print '%s %.2e %s' %("\n Change in mass =",dm,"lbm")
print '%s' %("The answers are a bit different due to rounding off error in textbook.")
Absolute energy of this mixture = 5.40e+17 ft-lbf

 In case b, there is no change in mass

 Change in mass = -3.15e-09 lbm
The answers are a bit different due to rounding off error in textbook.