# Chapter 6 : Thermodynamics¶

## Example 6.1 Page No : 292¶

In [1]:
# Input data
H = 80.  # The Heat flows into the system in joules
W = 30.  # The Work done by the system in joules

# Calculations
U = H - W  # The internal energy of the system in joules
W1 = 10.  # The work done along the path ADB in joules
H1 = W1 + U  # The heat flows into the system along the path ADB in joules
W2 = -20  # The work done on the system from B to A in joules
H2 = W2 - U  # The heat liberated from B to A in joules
Ua = 0.  # Internal energy at A in joules
Ud = 40.  # Internal energy at D in joules
Wa = 10.  # Work done from A to D in joules
Wd = 0.  # Work done from D to B in joules
Uc = 50.  # Internal energy at C in joules
Had = (Ud - Ua) + Wa  # Heat absorbed in the process AD in joules
Hdb = Uc - Ud + Wd  # Heat absorbed in the process DB in joules

# Output
print '(a)Heat flows into the system along the path ADB is H = %3.0f joules \n (b)The heat liberated by the system is H = %3.0f joules \n (c)The heat absorbed in the process AD is H = %3.0f joules   and  \n The heat absorbed in the process DB is H = %3.0f joules ' % (H1, H2, Had, Hdb)

(a)Heat flows into the system along the path ADB is H =  60 joules
(b)The heat liberated by the system is H = -70 joules
(c)The heat absorbed in the process AD is H =  50 joules   and
The heat absorbed in the process DB is H =  10 joules


## Example 6.2 Page No : 296¶

In [2]:
# Input data
p = 2.  # Given Pressure of a motor car tyre in atms
t = 27.  # The room temperature in degree centigrade
g = 1.4  # Adiabatic index

# Calculations
P1 = p  # The pressure of a motor car tyre in atms
T1 = t + 273  # The room temperature in K
P2 = 1.  # The surrounding pressure in atms
T2 = ((P2 / P1)**((g - 1) / g)) * T1  # The resulting temperature in K
T21 = T2 - 273  # The resulting temperature in degree centigrade

# Output
print 'The resulting temperature is T2 = %3.1f K  (or)  %3.1f degree centigrade ' % (T2, T21)

The resulting temperature is T2 = 246.1 K  (or)  -26.9 degree centigrade


## Example 6.3 Page No : 302¶

In [3]:
# Input data
t = 27.  # The room temperature of air in degree centigrade
g = 1.4  # Adiabatic index

# Calculations
V1 = 1.  # Let the Original volume in cc
V2 = V1 / 2  # The final volume i.e half the original volume in cc
P1 = 1.  # The atmospheric pressure in atms
P2 = P1 * (V1 / V2)**g  # The final pressure in atms
T1 = t + 273  # The room temperature in K
T2 = T1 * (V1 / V2)**(g - 1)  # The final temperature in K
T21 = T2 - 273  # The final temperature in degree centigrade

# Output
print '(1)The final pressure is P2 = %3.3f atmospheres \n (2)The final temperature is T2 = %3.1f K  (or)  %3.1f degree centigrade ' % (P2, T2, T21)

(1)The final pressure is P2 = 2.639 atmospheres
(2)The final temperature is T2 = 395.9 K  (or)  122.9 degree centigrade


## Example 6.4 Page No : 306¶

In [4]:
# Input data
g = 1.4  # Adiabatic index

# Calculations
V1 = 1.  # Let the initial volume be in cc
V2 = V1 / 2  # The final volume is half the initial volume in cc
T1 = 1.  # Let the initial temperature of air be in K
T2 = T1 * (V1 / V2)**(g - 1)  # The final temperature of air in K
T = T2 - T1  # The change in temperature of air in K

# Output
print 'The change in the temperature is %3.3fT1 K ' % (T)

The change in the temperature is 0.320T1 K


## Example 6.5 Page No : 308¶

In [5]:
# Input data
g = (5. / 3)  # Adiabatic index for monoatomic
t = 27.  # The room temperature in degree centigrade
P1 = 1.  # The initial pressure in atmosphere
P2 = 50.  # The final pressure in atmosphere

# Calculations
T1 = t + 273  # The room temperature in K
T2 = ((P2 / P1)**((g - 1) / g)) * T1  # The final temperature in K
T21 = T2 - 273  # The final temperature in degree centigrade

# Output
print 'The Final temperature is T2 = %3.0f K  (or)  %3.0f degree centigrade ' % (T2, T21)

The Final temperature is T2 = 1435 K  (or)  1162 degree centigrade


## Example 6.6 Page No : 314¶

In [6]:
# Input data
t = 27.  # The temperature of dry air in degree centigrade
g = 1.4  # Adiabatic index

# Calculations
V1 = 1.  # Let us assume the initial volume in cc
V2 = V1 / 3  # Then the final volume is 1/3 of the initial volume in cc
T1 = t + 273  # The initial temperature of dry air in K
T2 = ((V1 / V2)**(g - 1)) * T1  # The final temperature of air in K
T21 = T2 - 273  # The final temperature of air in degree centigrade
T = T21 - t  # The change in temperature in degree centigrade

# Output
print '(1)When the process is slow the temperature of the system remains constant so, there is no change in the temperature \n (2)When the compression is sudden then, \n The temperature of the air increases by T = %3.1f degree centigrade  (or) %3.1f K' % (T, T)

(1)When the process is slow the temperature of the system remains constant so, there is no change in the temperature
(2)When the compression is sudden then,
The temperature of the air increases by T = 165.6 degree centigrade  (or) 165.6 K


## Example 6.7 Page No : 316¶

In [7]:
# Input data
g = 1.4  # Adiabatic index

# Calculations
V1 = 1.  # Let the initial volume of the gas in cc
V2 = 3. * V1  # Then the final volume of the gas is 3 times the initial volume of the gas in cc
T1 = 273.  # Initial temperature of the gas at NTP in K
T2 = ((V1 / V2)**(g - 1)) * T1  # The resulting temperature in K
T21 = T2 - 273  # The resulting temperature in degree centigrade
P1 = 1.  # The atmospheric pressure in atms
P2 = ((V1 / V2)**(g)) * P1  # The resulting atmospheric pressure in atmosphere

# Output
print '(1)The resulting temperature is T2 = %3.0f K  (or)  %3.0f degree centigrade \n (2)The resulting pressure is P2 = %3.4f atmosphere ' % (T2, T21, P2)

(1)The resulting temperature is T2 = 176 K  (or)  -97 degree centigrade
(2)The resulting pressure is P2 = 0.2148 atmosphere


## Example 6.8 Page No : 321¶

In [8]:
# Input data
t1 = 100.  # The temperature at steam point in degree centigrade
t2 = 0.  # The temperature at ice point in degree centigrade

# Calculations
T1 = t1 + 273  # The temperature at steam point in K
T2 = t2 + 273  # The temperature at ice point in K
n = (1 - (T2 / T1)) * 100  # The efficiency of the carnots engine in percent

# Output
print 'The efficiency of the Carnot engine is %3.2f percent ' % (n)

The efficiency of the Carnot engine is 26.81 percent


## Example 6.9 Page No : 325¶

In [9]:
# Input data
t1 = 127.  # The temperature at initial point in degree centigrade
t2 = 27.  # The temperature at final point in degree centigrade

# Calculations
T1 = t1 + 273  # The temperature at initial point in K
T2 = t2 + 273  # The temperature at final point in K
n = (1 - (T2 / T1)) * 100  # The efficiency of the carnots engine in percent

# Output
print 'The efficiency of the Carnot engine is %3.0f percent ' % (n)

The efficiency of the Carnot engine is  25 percent


## Example 6.10 Page No : 329¶

In [10]:
# Input data
T1 = 400.  # The temperature of the source in k
H1 = 200.  # The amount of heat taken by the engine at T1 in calories
H2 = 150.  # The amount of heat rejected by the engine to the sinkk in calories

# Calculations
T2 = (H2 / H1) * T1  # The temperature of the sinkk in K
n = (1 - (T2 / T1)) * 100  # The efficiency of the engine in percent

# output
print 'The temperature of the sinkk is T2 = %3.0f K  The efficiency of the engine is %3.0f percent ' % (T2, n)

The temperature of the sinkk is T2 = 300 K  The efficiency of the engine is  25 percent


## Example 6.11 Page No : 333¶

In [11]:
# Input data
T1 = 450.  # The temperature of the source in k
H1 = 1000.  # The amount of heat taken by the engine at T1 in calories
T2 = 350.  # The temperature of the sinkk in K

# Calculations
# The amount of heat rejected to the sinkk in each cycle in calories
H2 = (T2 / T1) * H1
n = (1 - (T2 / T1)) * 100  # The efficiency of the engine in percent
W = H1 - H2  # The work done by the engine in each cycle in calories
W1 = W * 4.2  # The work done by the engine in each cycle in joules

# Output
print 'The amount of heat rejected to the sinkk in each cycle is H2 = %3.2f cals  The efficiency of the engine is %3.2f percent  The work done by the engine in each cycle is W = %3.2f joules' % (H2, n, W1)

The amount of heat rejected to the sinkk in each cycle is H2 = 777.78 cals  The efficiency of the engine is 22.22 percent  The work done by the engine in each cycle is W = 933.33 joules


## Example 6.12 Page No : 337¶

In [12]:
# Input data
T1 = 300.  # The higher temperature of the reservoir in K
T2 = 260.  # The lower temperature of the reservoir in K
H2 = 500.  # The amount of heat from the reservoir at the lower temperature in calories

# Calculations
# The amount of heat rejected to the reservoir at the higher temperature
# in calories
H1 = (T1 / T2) * H2
# The amount of work done in each cycle to operate the refrigerator in joules
W = (H1 - H2) * 4.2

# Output
print 'The amount of heat rejected to the reservoir at the higher temperature is H1 = %3.2f cal  The amount of work done in each cycle to operate the refrigerator is W = %3.2f joules ' % (H1, W)

The amount of heat rejected to the reservoir at the higher temperature is H1 = 576.92 cal  The amount of work done in each cycle to operate the refrigerator is W = 323.08 joules


## Example 6.13 Page No : 340¶

In [13]:
# Input data
T2 = 273.  # The lower temperature of the reservoir for a carnot refrigerator in K
T1 = 27. + 273  # The higher temperature of the reservoir for a carnot refrigerator in K
H2 = 1000. * 80  # The amount of heat from the reservoir to the lower temperature in cal
J = 4.2  # The one calorie in joules

# Calculations
H1 = (T1 / T2) * H2  # The amount of heat discarded to the room in calories
W = J * (H1 - H2)  # The work done by the refrigerator in joules
C = H2 / (H1 - H2)  # The coefficient of performance

# output
print 'The amount of heat discarded to the room is H1 = %3.0f cal  The work done by the refrigerator is W = %3.4g joules  The coefficient of performance of the machine is %3.2f ' % (H1, W, C)

The amount of heat discarded to the room is H1 = 87912 cal  The work done by the refrigerator is W = 3.323e+04 joules  The coefficient of performance of the machine is 10.11


## Example 6.14 Page No : 344¶

In [14]:
# Input data
t2 = 7.  # The lower temperature of the reservoir in degree centigrade
n = 50.  # The efficiency of the carnot engine in percent
n1 = 70.  # It is desired to increase the efficiency in percent

# Calculations
T2 = t2 + 273  # The lower temperature of the reservoir in K
# The higher temperature of the reservoir for 50% efficiency of the engine in K
T1 = T2 / (1 - (n / 100))
# The higher temperature of the reservoir for 70% efficiency of the engine in K
T11 = T2 / (1 - (n1 / 100))
T = T11 - T1  # Increase in temperature for the change in efficiencies in K

# Output
print 'The temperature of the high temperature reservoir should be increased by %3.0f K ' % (T)

The temperature of the high temperature reservoir should be increased by 373 K


## Example 6.15 Page No : 348¶

In [15]:
# Input data
T1 = 600.  # The higher temperature of the reservoir in K
T2 = 300.  # The lower temperature of the reservoir in K
n1 = 52.  # The efficiency claimed by the inventor in percent

# Calculations
n = (1 - (T2 / T1)) * 100  # The efficiency of the carnot engine in percent

# Output
print 'The efficiency of the carnot engine is %3.0f percent \n The efficiency claimed is %3.0f percent \n The efficiency of the engine is more than the efficiency of the carnot engine \n .But no engine can have an efficiency more than a carnots engine, \n so his claim is invalid' % (n, n1)

The efficiency of the carnot engine is  50 percent
The efficiency claimed is  52 percent
The efficiency of the engine is more than the efficiency of the carnot engine
.But no engine can have an efficiency more than a carnots engine,
so his claim is invalid


## Example 6.16 Page No : 350¶

In [16]:
# Input data
P = 10.**5  # The average pressure of the steam in a double acting steam engine in newtons/m**2
L = 1.  # The length of the stroke in m
A = 0.15  # The area of the piston in m**2
N = 5.  # Number of strokes in strokes per second

# Calculations
P = (2 * P * L * A * N) / 1000  # The power of the engine in kilowatts

# Output
print 'The power of the engine is %3.0f kilowatts ' % (P)

The power of the engine is 150 kilowatts


## Example 6.17 Page No : 352¶

In [17]:
# Input data
l = 80.  # The latent heat of ice in calories per gram
V1 = 1.091  # The specific volume of 1 gram of ice at 0 degree centigrade in cm**3
V2 = 1.000  # The specific volume of 1 gram of water at 0 degree centigrade in cm**3
p = 1.  # The pressure in atm
T = 273.  # The temperature at 0 degree centigrade in K

# Calculations
L = 80. * 4.2 * 10**7  # The latent heat of ice in ergs
P = 76. * 13.6 * 980  # The pressure in dynes/cm**2
# The depression in the melting point of ice produced by one atmosphere
# increase of pressure in K
T = (P * T * (V2 - V1)) / L
T1 = -T  # The decrease in the melting point of ice with an increase in pressure of one atmosphere

# Output
print 'The decrease in the melting point of ice with an increase, \n in pressure of one atmosphere is %3.4f K  (or) %3.4f degree centigrade ' % (T1, T1)

The decrease in the melting point of ice with an increase,
in pressure of one atmosphere is 0.0075 K  (or) 0.0075 degree centigrade


## Example 6.18 Page No : 358¶

In [18]:
# input data
p = 1.  # The pressure in atm
V1 = 1.000  # The specific volume of one gram of water in cm**3
V2 = 1677.  # The specific volume of one gram of steam in cm**3
l = 540.  # Latent heat of vaporisation of steam in cal/gram

# Calculations
P = 76. * 13.6 * 980  # The pressure in dynes/cm**2
T = 100. + 273  # The temperature at 100 degree centigrade in K
L = l * 4.2 * 10**7  # The latent heat of vapourisation in ergs
# The increase in the boiling point of water with an increase in pressure
# of one atmosphere in degree centigrade
T = (P * T * (V2 - V1)) / L

# Output
print 'The increase in the boiling point of water with an increase , \n in pressure of one atmosphere is %3.2f degree centigrade  (or)  %3.2f K ' % (T, T)

The increase in the boiling point of water with an increase ,
in pressure of one atmosphere is 27.92 degree centigrade  (or)  27.92 K


## Example 6.19 Page No : 361¶

In [19]:
# Input data
l = 537.  # Latent heat of steam in cal/g
V2 = 1674.  # The specific volume of one gram of steam in cm**3
V1 = 1.000  # The specific volume of one gram of water in cm**3
p = 2.712  # The increase in the pressure in cm of Hg
t = 100.  # The boiling point of water in degree centigrade

# Calculations
T = t + 273  # The boiling point of water in K
P = p * 13.6 * 980  # The increase in the pressure in dynes/cm**2
L = l * 4.2 * 10**7  # Latent heat of steam in ergs
# The change in the temperature of the boiling water when the pressure is
# increased in K
T1 = (P * T * (V2 - V1)) / L

# Output
print 'The change in temperature of boiling water is %3.0f K  (or)  %3.0f degree centigrade ' % (T1, T1)

The change in temperature of boiling water is   1 K  (or)    1 degree centigrade


## Example 6.20 Page No : 368¶

In [20]:
# Input data
l = 4563.  # The latent heat of fusion of naphthalene in cal/mol
V = 18.7  # The increase in volume of fusion in cm**3/mol
p = 1.  # The pressure in atm
t = 80.  # The melting point of naphthalene in degree centigrade

# Calculations
L = l * 4.2 * 10**7  # The latent heat of fusion of naphthalene in ergs/mol
T = t + 273  # The melting point of naphthalene in K
P = 76. * 13.6 * 980  # The pressure in dynes/cm**2
# The increase in the melting point of naphthalene with an increase in
# pressure of one atmosphere in K
T1 = (P * T * (V)) / L

# Output
print 'The increase in the melting point of naphthalene with an increase,\n in pressure of one atmosphere is %3.5f K  (or)  %3.5f degree centigrade ' % (T1, T1)

The increase in the melting point of naphthalene with an increase,
in pressure of one atmosphere is 0.03489 K  (or)  0.03489 degree centigrade


## Example 6.21 Page No : 372¶

In [21]:
# Input data
p1 = 80.  # The under pressure of benzene in cm of Hg
t = 80.  # The normal boiling point of benzene in degree centigrade
l = 380.  # The latent heat of vapourisation in joules/g
d2 = 4.  # Density of vapour at boiling point in g/litre
d1 = 0.9  # Density of liquid in g/cm**3

# Calculations
p = p1 - 76  # The change in pressure in cm of Hg
P = p * 13.6 * 980  # The change in pressure in dynes/cm**2
T = t + 273  # The normal boiling point of benzene in K
L = l * 10**7  # Latent heat of vapourisation in ergs/g
V1 = 1. / d1  # The specific volume of liquid in cm**3
V2 = 1000. / d2  # The specific volume of vapour in cm**3
# The increase in the boiling point of benzene in K
T1 = (P * T * (V2 - V1)) / L
T2 = t + T1  # The boiling point of benzene at a pressure of 80 cm of Hg in degree centigrade

# Output
print 'The boiling point of benzene at a pressure of 80 cm of Hg is  %3.3f degree centigrade ' % (T2)

The boiling point of benzene at a pressure of 80 cm of Hg is  81.233 degree centigrade


## Example 6.22 Page No : 378¶

In [22]:
# Input data
t = 100.  # The boiling point of water in degree centigrade
p1 = 1.  # Initial pressure in atm
p2 = 1.10  # Final pressure in atm
l = 537.  # Latent heat of water at 100 degree centigrade in cal/g
V1 = 1.  # The specific volume of one gram of water in cm**3
V2 = 1676.  # The specific volume of one gram of steam in cm**3

# Calculations
p = p2 - p1  # The change in pressure in atm
P = p * 76 * 13.6 * 980  # The change in pressure in dynes/cm**2
T = t + 273  # The boiling point of water in K
L = l * 4.2 * 10**7  # The latent heat of water at 100 degree centigrade in ergs/g
# The change in boiling point of water in K (or) degree centigrade
T1 = (P * T * (V2 - V1)) / L

# Output
print 'The increase in the boiling point of water with an increase,\n of 0.1 atmosphere pressure is %3.3f K  (or)  %3.3f degree centigrade ' % (T1, T1)

The increase in the boiling point of water with an increase,
of 0.1 atmosphere pressure is 2.806 K  (or)  2.806 degree centigrade


## Example 6.23 Page No : 382¶

In [23]:
# Input data
p1 = 1.  # The atmospheric pressure in atm
p2 = 100.  # The given pressure in atm
d1 = 0.917  # The density of ice in g/cm**3
l = 336.  # The latent heat of ice in j/g

# Calculations
p = p2 - p1  # The change in pressure in atms
P = p * 76 * 13.6 * 980  # The change in pressure in dynes/cm**2
L = l * 10**7  # The latent heat of ice in ergs/g
T = 273.  # The temperature of melting point of ice in K
V2 = 1.  # The specific volume of one gram of water in cm**3
V1 = 1. / d1  # The specific volume of ice in cm**3
T1 = (T * P * (V2 - V1)) / L  # The change in the melting point of ice in K
# The decrease in the melting point of ice in K (or) degree centigrade
T2 = -T1

# Output
print 'The decrease in the melting point of ice,\n with a pressure of 100 atmospheres is %3.4f degree centigrade ' % (T2)

The decrease in the melting point of ice,
with a pressure of 100 atmospheres is 0.7375 degree centigrade


## Example 6.24 Page No : 385¶

In [24]:
# Input data
l = 79.6  # latent heat of ice in cal/g
V2 = 1.  # The specific volume of water at 0 degree centigrade in cm**3
V1 = 1.091  # The specific volume of ice at 0 degree centigrade in cm**3
p = 1.013 * 10**6  # One atmospheric pressure in dynes/cm**3
T = -1  # The change in temperature in K
T1 = 273.  # The temperature of water at 0 degree centigrade in K
p1 = 1.  # The atmospheric pressure in atm

# Calculations
L = l * 4.18 * 10**7  # The latent heat of ice in ergs/g
P = ((L * T) / (T1 * (V2 - V1) * p))  # The change in pressure in atmospheres
P1 = P + p1  # The pressure required in atmospheres

# Output
print 'The pressure required to lower melting point of ice,\n by 1 degree centigrade is  %3.1f atmospheres ' % (P1)

The pressure required to lower melting point of ice,
by 1 degree centigrade is  133.2 atmospheres


## Example 6.25 Page No : 392¶

In [25]:
# Input data
t = 100.  # The temperature at which water boils in degree centigrade
p2 = 787.  # The pressure at which water boils in mm of Hg
J = 4.2 * 10**7  # Joule in ergs/cal
p1 = 760.  # The atmospheric pressure in mm of Hg
V2 = 1601.  # The specific volume of 1 g of water at 100 degree centigrade in cm**3
V1 = 1.  # The specific volume of 1 g of water at 0 degree centigrade in cm**3

# Calculations
T = t + 273  # The temperature at which water boils in K
T1 = 1.  # The difference in the temperature in K
p = p2 - p1  # The difference in the pressure in mm of Hg
P = (p / 10) * 13.6 * 980  # The difference in the pressure in dynes/cm**2
L = (T * P * (V2 - V1)) / T1  # The latent heat of steam in ergs/g
L1 = L / J  # The latent heat of steam in cal/g

# Output
print 'The Latent heat of steam is L = %3.1f cal/g ' % (L1)

The Latent heat of steam is L = 511.3 cal/g


## Example 6.26 Page No : 394¶

In [26]:
# Input data
T = 600.  # The melting point of lead in K
d1 = 11.01  # Initial density of the lead in g/cm**3
d2 = 10.65  # The final density of the lead in g/cm**3
l = 24.5  # The latent heat of fusion of lead in j/g
p1 = 1.  # The atmospheric pressure in atmospheres
p2 = 100.  # The given pressure in atmospheres

# Calculations
p = p2 - p1  # The change in pressure in atmospheres
P = p * 76 * 13.6 * 980  # The change in pressure in dynes/cm**2
L = l * 10**7  # The latent heat of fusion of lead in ergs/g
V1 = 1. / d1  # The initial specific volume of the lead in cm**3
V2 = 1. / d2  # The final specific volume of the lead in cm**3
T1 = (T * P * (V2 - V1)) / L  # The change in the temperature in K
T2 = T + T1  # Melting point of lead at 100 atmospheres pressure in K

# Output
print 'The melting point of lead at a pressure of 100 atmospheres is  %3.4f K ' % (T2)

The melting point of lead at a pressure of 100 atmospheres is  600.7540 K


## Example 6.28 Page No : 397¶

In [27]:
# Input data
t2 = 120.  # The given temperature for the water to boil in degree centigrade
t1 = 100.  # The actual boiling point of water in degree centigrade
V = 1676.  # The change in specific volume in cm**3
l = 540.  # Latent heat of steam in cal/g
J = 4.2 * 10**7  # joule in ergs/cal

# Calculations
T1 = t2 - t1  # The change in temperature in degree centigrade (or) K
T = t1 + 273  # The boiling point of water in K
L = l * J  # The latent heat of steam in ergs/g
p = 1.  # The atmospheric pressure in atmospheres
P = (L * T1) / (T * V)  # The change in pressure in dynes/cm**2
P1 = P / 10**6  # The change in pressure in atmospheres
P2 = P1 + p  # The required pressure in atmospheres

# Output
print 'The required pressure is %3.4f atmospheres ' % (P2)

The required pressure is 1.7256 atmospheres


## Example 6.29 Page No : 400¶

In [28]:
# Input data
l = 80.  # Latent heat of ice in cal/g
m = 10.  # Mass of ice in g
T = 273.  # The temperature of ice in K

# Calculations
H = m * l  # Heat absorbed by 10 g of ice at 273 K when it is converted into water at 273 K in cal
S = H / T  # The gain in entropy in cal/K

# Output
print 'The gain in entropy is  %3.2f cal/K' % (S)

The gain in entropy is  2.93 cal/K


## Example 6.30 Page No : 404¶

In [29]:
# Input data
m = 5.  # Mass of water in kg
t = 100.  # The temperature of water in degree centigrade
l = 540.  # Latent heat of water at 100 degree centigrade in cal/g

# Calculations
T = t + 273  # The temperature of water in K
M = m * 1000  # Mass of water in g
H = M * l  # Heat absorbed by 5 kg of water at 100 degree centigrade when it is converted into steam at 100 degree centigrade in cal
S = H / T  # The gain in entropy in cal/K

# Output
print 'The gain in entropy is  %3.0f cal/K ' % (S)

The gain in entropy is  7239 cal/K


## Example 6.31 Page No : 411¶

In [30]:
import math
# Input data
m = 1.  # mass of ice in g
t1 = -10  # The given temperature of ice in degree centigrade
t2 = 100.  # The given temperature of steam in degree centigrade
S = 0.5  # Specific heat of ice
s = 1.  # Specific heat of water
l1 = 80.  # Latent heat of ice in cal/g
l2 = 540.  # Latent heat of steam in cal/g

# Calculations
T = 273.  # The temperature of ice at 0 degree centigrade in K
T1 = t1 + 273  # The given temperature of ice in K
T2 = t2 + 273  # The given temperature of steam in K
# Increase in entropy when the temperature of 1 gram of ice increases from
# -10 to 0 degree centigrade in cal/K
S1 = m * S * 2.3026 * math.log10(T / T1)
S2 = l1 / T  # Increase in entropy when 1 g of ice at 0 degree centigrade is converted into water at 0 degree centigrade in cal/K
# Increase in entropy when 1 g of water raised from 0 to 100 degree
S3 = m * s * 2.3026 * math.log10(T2 / T)
S4 = l2 / T2  # Increase in entropy when 1g water at 100 degree centigrade is converted into steam at 100 degree centigrade in cal/K
S5 = S1 + S2 + S3 + S4  # Total increase in entropy in cal/K

# Output
print 'The total increase in entropy is  %3.5f cal/K' % (S5)

The total increase in entropy is  2.07153 cal/K


## Example 6.32 Page No : 413¶

In [31]:
import math
# Input data
V1 = 1.  # Let us assume the initial volume be one in cc
V2 = 4. * V1  # Then the final volume is four times the initial volume in cc

# Calculations
# The gain in entropy in terms of the gas constant in cal/K
S = 2.3026 * (math.log10(V2 / V1))

# Output
print 'The gain in entropy in terms of the gas constant is  %3.3f (R/J)cal/K' % (S)

The gain in entropy in terms of the gas constant is  1.386 (R/J)cal/K


## Example 6.33 Page No : 420¶

In [32]:
import math
# Input data
m1 = 50.  # Mass of water at 0 degree centigrade in g
m2 = 50.  # Mass of water at 83 degree centigrade in g
t1 = 0.  # The temperature of water in degree centigrade
t2 = 83.  # The temperature of water in degree centigrade

# Calculations
T1 = t1 + 273  # Temperature of water in K
T2 = t2 + 273  # Tempearture of water in K
s = 1.  # The specific heat of water
# The final temperature of the mixture in K
T = ((m2 * s * T2) + (m1 * s * T1)) / ((m1 + m2) * s)
# The change in entropy by 50 g of water when its temperature rises from
# 273 K to 313 K in cal/K
S1 = (m1 * s * math.log(T / T1))
# The change in entropy by 50 g of water when its temperature falls from
# 353 K to 313 K in cal/K
S2 = (m2 * s * math.log(T / T2))
S3 = S1 + S2  # The total gain in the entropy of the system in cal/K

# Output
print 'The total gain in entropy of the system is  %3.3f cal/K ' % (S3)

The total gain in entropy of the system is  0.878 cal/K


## Example 6.34 Page No : 424¶

In [33]:
import math
# Input data
m1 = 50.  # Mass of water at 15 degree centigrade in g
m2 = 80.  # Mass of water at 40 degree centigrade in g
t1 = 15.  # The temperature of water in degree centigrade
t2 = 40.  # The temperature of water in degree centigrade

# Calculations
T1 = t1 + 273  # Temperature of water in K
T2 = t2 + 273  # Tempearture of water in K
s = 1.  # The specific heat of water
# The final temperature of the mixture in K
T = ((m2 * s * T2) + (m1 * s * T1)) / ((m1 + m2) * s)
# The change in entropy by 50 g of water when its temperature rises from
# 288 K to 303.4 K in cal/K
S1 = (m1 * s * math.log(T / T1))
# The change in entropy by 80 g of water when its temperature falls from
# 313 K to 303.4 K in cal/K
S2 = (m2 * s * math.log(T / T2))
S3 = S1 + S2  # The total gain in the entropy of the system in cal/K

# Output
print 'The net increase in the entropy of the system is  %3.3f cal/K ' % (S3)

The net increase in the entropy of the system is  0.106 cal/K


## Example 6.35 Page No : 429¶

In [34]:
import math
# Input data
m1 = 10.  # Mass of steam in g
t1 = 100.  # The temperature of the steam in degree centigrade
m = 90.  # mass of water in g
t2 = 0.  # The temperature of water in degree centigrade
m2 = m + m1  # The total mass of water in g
l = 540.  # The latent heat of steam in cal/g

# Calculations
T1 = t1 + 273  # The temperature of the steam in K
T2 = t2 + 273  # The temperature of the water in K
T = ((m1 * l) + (m1 * T1) + (m2 * T2)) / \
(m1 + m2)  # The final temperature in K
# The change in entropy when the temperature of water and calorimeter
# rises from 273 K to 331.2 K in cal/K
S1 = m2 * math.log(T / T2)
# The change in entropy when 10 grams of steam at 373 K condenses to water
# at 373K in cal/K
S2 = -(m1 * l) / T1
# Change in entropy when 10 g of water at 373 K is cooled to water at
# 331.2 K in cal/K
S3 = m1 * math.log(T / T1)
S4 = S1 + S2 + S3  # Net change in entropy in cal/K

# Output
print 'The net increase in the entropy of the system is  %3.3f cal/K ' % (S4)

The net increase in the entropy of the system is  3.653 cal/K


## Example 6.36 Page No : 431¶

In [35]:
import math
# Input data
m = 1.  # Mass of water in g
t1 = 20.  # The temperature of water in degree centigrade
t2 = -10  # The temperature of ice in degree centigrade
s1 = 4.2  # Heat capacity for one gram of water in J/g-K
s2 = 2.1  # Heat capacity for ice in J/g-K
li = 335.  # Latent heat of fusion of ice at 0 degree centigrade in J/g

# Calculations
T = 273.  # The temperature of water at 0 degree centigrade in K
T1 = t1 + 273  # The temperature of water in K
T2 = t2 + 273  # The temperature of ice in K
# Change in entropy when the temperature of 1 g of water at 293 K falls to
# 273 K in J/K
S1 = m * s1 * math.log(T / T1)
# Change in entropy when 1 g of water at 273 K is converted into ice at
# 273 K in J/K
S2 = -(m * li) / T
# Change in entropy when the temperature of 1 g of ice at 273 K falls to
# 263 K in J/K
S3 = m * s2 * math.log(T2 / T)
S4 = S1 + S2 + S3  # The total change in entropy of the system in J/K

# Output
print 'The total change in the entropy of the system is  %3.5f J/K \n  (Negative sign indicates that there is decrease in the entropy of the system)' % (S4)

The total change in the entropy of the system is  -1.60242 J/K
(Negative sign indicates that there is decrease in the entropy of the system)


## Example 6.37 Page No : 435¶

In [36]:
import math
# Input data
M = 1.  # Mass of water in kg
m = M * 1000  # Mass of water in g
T1 = 273.  # The temperature of the water in K
T2 = 373.  # The temperature of the heat reservoir in K
s = 1.  # Specific heat of water

# Calculations
# Increase in entropy when the temperature of 1000 g of water is raised
# from 273 K to 373 k in cal/K
S1 = m * s * math.log(T2 / T1)
S2 = -(m * s * (T2 - T1)) / T2  # Change in entropy of the reservoir in cal/K
S = S1 + S2  # Change in entropy of the universe in cal/K

# Output
print '(1)The change in entropy of water when temperature reaches 373 K is  %3.0f cal/K \n (2) (i)The Change in entropy of the reservoir is  %3.1f cal/K  \n (ii)The Change in entropy of the universe is  %3.1f cal/K ' % (S1, S2, S)

(1)The change in entropy of water when temperature reaches 373 K is  312 cal/K
(2) (i)The Change in entropy of the reservoir is  -268.1 cal/K
(ii)The Change in entropy of the universe is  44.0 cal/K


## Example 6.42 Page No : 440¶

In [37]:
# Input data
l = 540.  # Latent heat of vapourisation of steam in cal/g
L = l * 4.2 * 10**7  # Latent heat of vapourisation of steam in ergs/g
V = 1676.  # The change in specific volume when 1 g of water is converted into steam in cc
t1 = 100.  # The actual boiling temperature of water in degree centigrade
t2 = 150.  # The given temperature at which water must boil in degree centigrade
p = 1.  # The atmospheric pressure in atmospheres

# Calculations
T1 = t1 + 273  # The actual boiling temperature of water in K
T2 = t2 + 273  # The given temperature at which water must boil in K
T = T2 - T1  # The change in temperature in K
P = (L * T) / (T1 * V)  # The pressure in dynes/cm**2
P1 = P / 10**6  # The pressure in atmospheres
P2 = P1 + p  # The pressure at which water would boil at 150 degree centigrade in atmospheres

# Output
print 'The pressure at which water would boil at 150 degree centigrade is  %3.3f atmospheres ' % (P2)

The pressure at which water would boil at 150 degree centigrade is  2.814 atmospheres


## Example 6.43 Page No : 447¶

In [38]:
# Input data
l = 80.  # Latent heat of fusion of ice in cal/g
L = l * 4.2 * 10**7  # Latent heat of fusion in ergs/g
V = 0.091  # The change in specific volume when 1 g of water freezes into ice in cc
t1 = 0.  # The actual freezing point of ice in degree centigrade
t2 = -1  # The given temperature at which ice must freeze in degree centigrade
p = 1.  # The atmospheric pressure in atmospheres

# Calculations
T1 = t1 + 273  # The actual freezing point of ice in K
T2 = t2 + 273  # The given temperature at which ice must freeze in K
T = T1 - T2  # The change in temperature in K
P = (L * T) / (V * T1)  # The pressure in dynes/cm**2
P1 = P / 10**6  # The pressure in atmospheres
P2 = P1 + p  # The pressure under which ice would freeze in atmospheres

# Output
print 'The pressure under which ice would freeze at -1 degree centigrade is  %3.1f atmospheres ' % (P2)

The pressure under which ice would freeze at -1 degree centigrade is  136.2 atmospheres


## Example 6.44 Page No : 451¶

In [39]:
# Input data
t = 100.  # The given temperature of water in degree centigrade
C1 = 1.01  # The specific heat of water at 100 degree centigrade in cal/g
L = -0.64  # The rate at which the latent heat of vapourisation decreases with rise in temperature in cal/K
l = 540.  # The latent heat of vapourisation of steam in cal

# Calculations
T = t + 273  # The given temperature of water in K
C2 = L - (l / T) + C1  # The specific heat of saturated steam in cal/g

# Output
print 'The specific heat of satureted steam is  %3.3f cal/g  The specific heat of saturated steam is negative)' % (C2)

The specific heat of satureted steam is  -1.078 cal/g  The specific heat of saturated steam is negative)


## Example 6.45 Page No : 454¶

In [40]:
# Input data
t = 100.  # The temperature of saturated steam in degree centigrade
L1 = 545.25  # The latent heat of saturated steam at 90 degree centigrade in cal
L2 = 539.30  # The latent heat of saturated steam at 100 degree centigrade in cal
L3 = 533.17  # The latent heat of saturated steam at 110 degree centigrade in cal
C1 = 1.013  # The specific heat of water at 100 degree centigrade in cal/g

# Calculations
T = t + 273  # The temperature of saturated steam in K
# The rate at which the latent heat of saturated steam decreases with rise
# in temperature in cal/K
L = (L3 - L1) / (110 - 90)
# The specific heat of saturated steam at 100 degree centigrade in cal/g
C2 = C1 + L - (L2 / T)

# Output
print 'The specific heat of saturated steam at 100 degree centigrade is  %3.3f cal/g' % (C2)

The specific heat of saturated steam at 100 degree centigrade is  -1.037 cal/g