# Chapter 8 - Basic Applications of the Second Law¶

## Example 1 - Pg 130¶

In [1]:
#calculate the Max Efficiency possible
#initialization of varaibles
T1=85+460. #R
T2=50+460. #R
#calculations
eta=(T1-T2)/T1
#results
print '%s %.1f %s' %("Max. efficiency =",eta*100,"percent")

Max. efficiency = 6.4 percent


## Example 2 - Pg 130¶

In [2]:
#calculate the Max Efficiency possible
#initialization of varaibles
T1=1050+460. #R
T2=90+460.   #R
#calculations
eta=(T1-T2)/T1
#results
print '%s %d %s' %("Max. possible efficiency = ",eta*100,"percent")

Max. possible efficiency =  63 percent


## Example 3 - Pg 130¶

In [3]:
#calculate the change in entropy
#initialization of varaibles
import math
T1=50+460. 	#R
T2=150+460. #R
m=1.
cp=0.240
#calculations
ds=m*cp*(math.log(T2) - math.log(T1))
#results
print '%s %.4f %s' %("Change in entropy =",ds,"B/ F abs")

Change in entropy = 0.0430 B/ F abs


## Example 4 - Pg 131¶

In [4]:
#calculate the change in entropy
#initialization of varaibles
import math
T1=50+460. #R
T2=150+460. #R
m=1
cp=0.240
#calculations
ds=m*cp*(math.log(T2) - math.log(T1))
#results
print '%s %.4f %s' %("Change in entropy = ",ds,"B/ F abs")

Change in entropy =  0.0430 B/ F abs


## Example 5 - Pg 131¶

In [5]:
#Calculate the total change in entropy
#initialization of varaibles
import math
Q=826. #B/lb
T=860. #R
T1=2000+460. #R
T2=1000+460. #R
#calculations
ds=Q/T
dsgas=Q*(math.log(T2)-math.log(T1))/(T1-T2)
dst=ds+dsgas
#results
print '%s %.3f %s' %("Total entropy change =",dst,"B/R")

Total entropy change = 0.530 B/R


## Example 6 - Pg 132¶

In [4]:
#Calculate the loss in energy and increase in unavailable energy
#initialization of varaibles
T0=540. #R
Q=826. #B/lb
ds=0.534
ds2=0.431
#calculations
tds=T0*ds
tds2=T0*ds2
H=Q-tds2
Loss=tds/H
#results
print '%s %.1f %s' %("Increase in unavailable energy = ",tds,"Btu")
print '%s %.1f %s' %("Loss =",Loss*100,"percent")

Increase in unavailable energy =  288.4 Btu
Loss = 48.6 percent