# Chapter 2 : The first law of Thermodynamics¶

## Example 2.1 pg : 37¶

In [1]:

# Variables
P1 = 200. 			#psia
P2 = 15. 			#psia
V1 = 1. 			#ft**3
g = 1.3

# Calculations
V2 = V1*(P1/P2)**(1/g)
W = -(144*(P2*V2 - P1*V1)/(g-1))

# Results
print "Work done  =  %.2e ft. lbf"%(W)

Work done  =  4.32e+04 ft. lbf


## Example 2.2 pg : 37¶

In [2]:

# Variables
L = 0.305 			#m
v = 4.58 			#m/s
i = 10. 			#A
B = 1.   			#W/m**2

# Calculations
F = i*B*L
W = F*v

# Results
print "Force necessary  =  %.2f N"%(F)
print " Work per unit time  =  %.2f W"%(W)

Force necessary  =  3.05 N
Work per unit time  =  13.97 W


## Example 2.3 pg : 45¶

In [3]:

# Variables
U = 2545. 			#B/hr
m = 50. 			#lbm
cv = 1.

# Calculations
dT = U/(m*cv)

# Results
print "Change in temperature  =  %.1f F"%(dT)

Change in temperature  =  50.9 F


## Example 2.4 pg : 46¶

In [5]:

# Variables
P1 = 14.7  			#psia
V1 = 1. 			#ft**3
P2 = 14.7 			#psia
M = 28.97
T1 = 70.+460 			#R
T2 = 500.+460 			#R
cp = 0.24 			#B/lbm F

# Calculations
m = P1*144*V1*M/(1545*T1)
Qp = m*cp*(T2-T1)
V2 = V1*P1*T2/(P2*T1)

W = P1*144*(V2-V1)
W = -W/778
dU = Qp+W

# Results
print "Work done  =  %.2f Btu"%(W)
print " Heat added  =  %.2f Btu"%(Qp)
print " Change in internal energy  =  %.2f Btu"%(dU)

Work done  =  -2.21 Btu
Change in internal energy  =  5.52 Btu


## Example 2.5 pg : 47¶

In [6]:

# Variables
l = 20.
b = 25.
h = 8.
Vp = 2.5
n = 20.
P = 14.7    			#psia
T = 530. 	    		#R
t = 15. 		    	#min
Qp = 375. 			    #B/hr
cv = 0.1715 			#B/lbm F

# Calculations
Vroom = l*b*h
Vair = Vroom-Vp*n
m = P*Vair*144/(53.35*T)
dU = n*Qp
U = t*dU/60
dT = U/(m*cv)

# Results
print "Air temperature rise  =  %d F"%(dT+1)

Air temperature rise  =  37 F