Chapter 8 : Entropy - Available and Unavailable Energy

Example 8.2 Page No : 211

In [3]:
			
# Variables
Q = 10. 			#kJ 			#heat transfered from reservoir
T = 100.+273 			#K 			#isothermal expansion temperature
T_res = 300.+273 			#K 			#reservoir temperature
			
# Calculations and Results
delta_S_sys = (Q/T) 			#kJ/K 			#delta S for the system
print "Change in entropyDelta S) for the system = %.2e kJ/K"%(delta_S_sys);

delta_S_res = -1*(Q/T_res) 			#kJ/K 			#delta S for the reservoir
print "Change in entropyDelta S) for the reservoir = %.4e kJ/K"%(delta_S_res);
Change in entropyDelta S) for the system = 2.68e-02 kJ/K
Change in entropyDelta S) for the reservoir = -1.7452e-02 kJ/K

Example 8.3 Page No : 212

In [4]:
			
# Variables
Q = 10. 			#kJ 			#heat transfered from reservoir
T = 100.+273 			#K 			#isothermal expansion temperature
T_res = 100.+273 			#K 			#reservoir temperature
			
# Calculations and Results
delta_S_sys = (Q/T) 			#kJ/K 			#delta S for the system
print "Change in entropyDelta S) for the system = %.2e kJ/K"%(delta_S_sys)

delta_S_res = -1*(Q/T_res) 			#kJ/K 			#delta S for the reservoir
print "Change in entropyDelta S) for the reservoir = %.2e kJ/K"%(delta_S_res);
Change in entropyDelta S) for the system = 2.68e-02 kJ/K
Change in entropyDelta S) for the reservoir = -2.68e-02 kJ/K

Example 8.4 Page No : 212

In [5]:
			
# Variables
Q = 1.; 			#kJ 			#heat transfered from reservoir
T = 100.+273; 			#K 			#isothermal expansion temperature
T_res = 100.+273; 			#K 			#reservoir temperature
			
# Calculations and Results
delta_S_res = -1*(Q/T_res); 			#kJ/K 			#delta S for the reservoir
print "Change in entropyDelta S) for the reservoir = %.2e kJ/K"%(delta_S_res);
Change in entropyDelta S) for the reservoir = -2.68e-03 kJ/K

Example 8.12 Page No : 225

In [5]:
import math

# Variables
pA = 120. 			#kPa 			#Pressure at location A
TA = 50.+273 			#K 			#Temperature at location A
VA = 150. 			#m/s 			#Velocity at location A

pB = 100. 			#kPa 			#Pressure at location B
TB = 30.+273 			#K 			#Temperature at location B
VB = 250. 			#m/s 			#Velocity at location B

Cp = 1.005 			#kJ/kg
R = 0.287 			#kJ/kgK
			
# Calculations and Results
delta_S_sys = (Cp*math.log(TB/TA))-(R*math.log(pB/pA)) 			#kJ/kgK 			#Entropy of system
if delta_S_sys < 0 :
    print "Flow is from B to A.";
else:
    print "Flow is from A to B."    
Flow is from B to A.

Example 8.13 Page No : 226

In [3]:
import math

# Variables
mi = 5. 			#kg 			#mass of ice
Ti = 273. - 10 			#K 			#Temperature of ice
ci = 2.1 			#kJ/kgK 			#specific heat of ice
L = 330. 			#kJ/kg 			#Latent heat
mw = 20. 			#kg 			#mass of water
Tw = 273.+80 			#K 			#Temperatur of water
cw = 4.2 			#kJ/kgK 			#specific heat of water

# calculatins and results

#Part(a)
print "Part a";
Tmix = ((mi*ci*(Ti-273))-(L*mi)+(mw*cw*Tw)+(mi*cw*273))/(mw*cw+mi*cw)
print "Temperature of the mixture when equilibrium is established between ice and water = %.f K"%(Tmix)
#Part (b)
print "Part b";
delta_S_ice = mi*(ci*math.log(273/Ti)+L/273+cw*math.log(Tmix/273))			#kJ/K 			#Entropy of ice
print "Entropy of ice = %.2f kJ/K"%(delta_S_ice)
#Part (c)
print "Part c";
delta_S_water = mw*(cw*math.log(Tmix/Tw))			#kJ/K 			#Entropy of water
print "Entropy of water = %.2f kJ/K"%(delta_S_water)
#Part (d)
print "Part d";
delta_S_uni = delta_S_water+delta_S_ice			#kJ/K 			#Entropy of universe
print "Entropy of universe = %.2f kJ/K"%(delta_S_uni)

# note : rounding off error
Part a
Temperature of the mixture when equilibrium is established between ice and water = 320 K
Part b
Entropy of ice = 9.79 kJ/K
Part c
Entropy of water = -8.17 kJ/K
Part d
Entropy of universe = 1.62 kJ/K

Example 8.14 Page No : 230

In [14]:
			
# Variables
Q1 = 100. 			#kJ 			#Heat input
T0 = 300. 			#K 			#Surrounding temperature

			#Part(a)
print "Part a";
T1 = 1000. 			#K 			#reservoir temperature
print "Avalable enery of 100 kJ of heat from a reservoir at 1000K = %.f kJ"%(Q1*1-T0/T1)
print "Unvalable enery of 100 kJ of heat from a reservoir at 1000K = %.1f kJ"%(Q1*(1-(T0/T1)))
			#Part(b)
print "Part b";
T1 = 600 			#K 			#reservoir temperature
print "Avalable enery of 100 kJ of heat from a reservoir at 1000K = %.f kJ"%(Q1*1-T0/T1)
print "Unvalable enery of 100 kJ of heat from a reservoir at 1000K = %.1f kJ"%(Q1*(1-(T0/T1)))
Part a
Avalable enery of 100 kJ of heat from a reservoir at 1000K = 100 kJ
Unvalable enery of 100 kJ of heat from a reservoir at 1000K = 70.0 kJ
Part b
Avalable enery of 100 kJ of heat from a reservoir at 1000K = 100 kJ
Unvalable enery of 100 kJ of heat from a reservoir at 1000K = 50.0 kJ

Example 8.15 Page No : 231

In [16]:
			
# Variables
T0 = 300. 			#K 			#Surrounding temperature
T1 = 1000. 			#K 			#Temperature of final reservoir
T2 = 600. 			#K 			#Temperature of intermediate reservoir
Q1 = 100. 			#kJ 			#Heat input
			
# Calculations and Results
print "Increase in unavaliable energy due to irreversible heat transfer = %.1f kJ"%(Q1*(1-T0/T1)-Q1*(1-T0/T2))
Increase in unavaliable energy due to irreversible heat transfer = 20.0 kJ

Example 8.16 Page No : 234

In [20]:
			
# Variables
T1 = 500. 			#K
T0 = 300. 			#K
T2 = 350. 			#K
W = 250. 			#kJ
Q1 = 1000. 			#kJ

# Results
print "Available energy = %.1f kJ"%(((1-T0/T1))*Q1);
print "Unavailable energy = %.1f kJ"%(Q1 - (((1-T0/T1))*Q1));
Available energy = 400.0 kJ
Unavailable energy = 600.0 kJ