6. Entropy and the Second Law of Thermodynamics

# 6.8 Applications of the second law of thermodynamics in closed systems

The first and second laws of thermodynamics are often used together with the thermodynamic tables or ideal gas equations in thermal analysis. The following strategy may be adapted when solving problems requiring the second law of thermodynamics:

1. Identify the process(es), e.g., isobaric, isothermal, isochoric, or isentropic process.
2. Determine the initial, final, and any intermediate states. Find the properties, such as, $P, T, v, u, s$, by using the thermodynamic tables or equations, e.g., for an ideal gas, solid, or liquid.
3. Determine the heat transfer, $Q$, or other unknowns by applying the first law of thermodynamics for closed systems.
4. Determine the entropy generation, $S_{gen}$, or other unknowns by applying the second law of thermodynamics for closed systems.

Example 1

A piston-cylinder contains ammonia at 2000 kPa, 80°C. The piston is loaded with a linear spring, see Figure 6.8.e1. The outside ambient is at 15°C. The ammonia is now cooled down to saturated liquid at 15°C. Assuming the cylinder is always at the ambient temperature during the cooling process, determine the specific boundary work, the specific heat transfer, and the specific entropy generation in the process.

Solution:

Analysis:

• Ammonia in the piston-cylinder device can be treated as a closed system.
• As the piston is loaded with a linear spring, the pressure of ammonia changes linearly with its specific volume, see the $P-v$ diagram, Figure 6.8.e2. Please refer to example 5 in Section 4.3 for a detailed analysis.  The specific boundary work can be found from

${}_{1}w_{2}=\displaystyle \int_{1}^{2}{Pd{v}\ } = \dfrac{1}{2}(P_{1} + P_{2})(v_2 - v_1)$

• Apply both the first and second laws of thermodynamics to ammonia, we can then find the specific heat transfer and specific entropy generation.

The first law: $\Delta u = {}_{1}q_{2} - {}_{1}w_{2}$

The second law: $\Delta s =\sum\dfrac{{}_{1}q_{2}}{T_{surr}}+s_{gen}$

• We will need to determine the following properties to complete the calculations.

State 1: $P_1, v_1, u_1, s_1$

State 2: $P_2, v_2, u_2, s_2$

Now let us solve the problem in detail.

From Table B1: T1 = 80°C, Psat = 4.14197 MPa. Ammonia in state 1 is a superheated vapour because P1 = 2000 kPa = 2 MPa < Psat. From Table B2: for state 1 at T1 = 80°C, P1 = 2000 kPa, $v_1$ = 0.075952 m3/kg, $u_1$ = 1583.81 kJ/kg, $s_1$ = 5.8292 kJ/kgK

State 2 is a saturated liquid at T2 = 15°C. From Table B1, P2 = 728.53 kPa, $v_2 = v_f$ = 0.001619 m3/kg, $u_2$ = 412.06 kJ/kg, $s_2 = s_f$ = 1.7197 kJ/kgK

The specific boundary work is

\begin{align*} {}_{1}w_{2} &= \dfrac{1}{2}(P_{1} + P_{2})(v_2 - v_1) \\&= \dfrac{1}{2}(2000 + 728.53)(0.001619 - 0.075952) = -101.41 \ \rm{kJ/kg} \end{align*}

The specific heat transfer is

\begin{align*} {}_{1}q_{2} &= \Delta u + {}_{1}w_{2} \\&= (412.06 - 1583.81) + (-101.41) = -1273.16 \ \rm{kJ/kg} \end{align*}

The specific entropy generation is

\begin{align*} s_{gen} &=\Delta s - \sum\dfrac{{}_{1}q_{2}}{T_{surr}} \\&=(s_2-s_1)- \sum\dfrac{{}_{1}q_{2}}{T_{surr}} \\&= (1.7197 - 5.8292) - \dfrac{-1273.16}{(273.15 + 15)} = 0.3089 \ \rm{kJ/kgK} > 0\end{align*}

Comment:

• The cooling process is irreversible; therefore, the specific entropy generation, $s_{gen}>0$.
• When applying the second law of thermodynamics, it is important to note that $T_{surr}$ is the absolute temperature (in Kelvin) of the system boundary or the surroundings if the boundary is in thermal equilibrium with the surroundings.

Example 2

Three kilograms of CO2 at 150 kPa, 300 K is mixed with two kilograms of CO2 at 220 kPa, 500 K, in a rigid, well-insulated tank, see Figure 6.8.e3. Find the final state (PT) and the entropy generation in this process. Assume CO2 is an ideal gas in this mixing process.

Solution:

Analysis:

• CO2 in the whole tank can be treated as a closed system.
• The mixing occurs after the partition is removed. As the tank is well-insulated, the heat transfer between the system and the surroundings is zero in this mixing process: ${}_{1}Q_{2}=0$
• Since the tank is rigid, the total volume of CO2 remains constant; therefore, the boundary work is zero in the mixing process: ${}_{1}W_{2}=0$
• Apply the first law to the system (whole tank)

$\Delta U = {}_{1}Q_{2} - {}_{1}W_{2}=0$

• The entropy generation can be found by applying the second law to the system.

$\because \Delta S =\sum\dfrac{{}_{1}Q_{2}}{T_{surr}}+S_{gen}$   and   ${}_{1}Q_{2} = 0$

$\therefore S_{gen} = \Delta S$

• To complete the calculation, we will apply the ideal gas relations to determine the final pressure, temperature, $\Delta u$, and $\Delta s$.

Now let us solve the problem in detail.

From Table G1 for CO2: $R$ = 0.1889 kJ/kgK, $C_p$ = 0.846 kJ/kgK, $C_v$ = 0.657 kJ/kgK.

First, the volumes of compartments A and B at the initial state, state 1, can be found from the ideal gas law.

$\because P\mathbb{V} = mRT$

$\therefore \mathbb{V}_A = \dfrac{m_{1A}RT_{1A}}{P_{1A}} = \dfrac{3 \times 0.1889 \times 300}{150} = 1.1334 \ \rm{m^3}$

$\therefore \mathbb{V}_B = \dfrac{m_{1B}RT_{1B}}{P_{1B}} = \dfrac{2 \times 0.1889 \times 500}{220} = 0.8586 \ \rm{m^3}$

The total volume of the tank is

$\mathbb{V}_{tot} = \mathbb{V}_A + \mathbb{V}_B = 1.1334 + 0.8586 = 1.992 \ \rm{m^3}$

Next, the final temperature can be calculated by applying the first law to the whole tank. Note that the tank is rigid and well insulated; therefore, $\Delta U = 0$.

$\because \Delta U = (m_{1A} + m_{1B})u_2 - (m_{1A}u_{1A} + m_{1B}u_{1B})=0$

$\therefore m_{1A}(u_2 - u_{1A}) + m_{1B}(u_2 - u_{1B}) = 0$    and    $\Delta u =C_v \Delta T$

$\therefore m_{1A}C_{v}(T_2 - T_{1A}) + m_{1B}C_{v}(T_2 - T_{1B}) = 0$

\begin{align*} \therefore T_2 &= \dfrac{m_{1A}T_{1A} + m_{1B}T_{1B}}{m_{1A} + m_{1B}} \\&= \dfrac{3 \times 300 + 2 \times 500}{3 + 2} = 380 \ \rm{K} \end{align*}

Then, the final pressure can be determined from the ideal gas law.

\begin{align*} P_2 &= \dfrac{(m_{1A} + m_{1B})RT_2}{\mathbb{V}_{tot}} \\&= \dfrac{(3+2) \times 0.1889 \times 380}{1.992} = 180.17 \ \rm{kPa} \end{align*}

Last, the entropy generation can be calculated from the second law.

\begin{align*} S_{gen} &= \Delta S \\&= (m_{1A} + m_{1B})s_2 - (m_{1A}s_{1A} + m_{1B}s_{1B}) \\&= m_{1A}(s_2 - s_{1A}) + m_{1B}(s_2 - s_{1B}) \end{align*}

\begin{align*} s_2 - s_{1A} &= C_pln\dfrac{T_2}{T_{1A}} - Rln\dfrac{P_2}{P_{1A}} \\&= 0.846ln\dfrac{380}{300} - 0.1889ln\dfrac{180.17}{150} = 0.16536 \ \rm{kJ/kgK} \ >\ 0\end{align*}

\begin{align*} s_2 - s_{1B} &= C_pln\dfrac{T_2}{T_{1B}} - Rln\dfrac{P_2}{P_{1B}} \\&= 0.846ln\dfrac{380}{500} - 0.1889ln\dfrac{180.17}{220} = -0.19445 \ \rm{kJ/kgK} \ < \ 0\end{align*}

\begin{align*} \therefore S_{gen} &= m_{1A}(s_2 - s_{1A}) + m_{1B}(s_2 - s_{1B}) \\&= 3 \times 0.16536 + 2 \times (-0.19445) = 0.1072 \ \rm{kJ/K}\end{align*}

Comment:

The entropy in a process can increase or decrease. In this example, the entropy of CO2 originally in compartment A increases and the entropy of CO2 originally in compartment B decreases in this mixing process, but the entropy generation $S_{gen} \ge 0$ because the mixing process is irreversible.

Practice Problems 