# Second Law of Thermodynamics

This is a topic from Thermodynamics:

## Contents |

## Introduction (Entropy)

- Systems tend towards an equilibrium state, just as a a hot cup of tea cools until it is in equilibrium with its surroundings.
- As long as a system is unbalanced (not in equilibrium) however there exists a possibility to produce work, for example hot gas in a cylinder may expand as it tends towards equilibrium with the surroundings, and in doing so may push a piston, producing work which can be harnessed.
- The greater the magnitude of the imbalance the greater the amount of work which can be obtained, however there is always some energy wasted in the process.
- This wasted energy, the energy unavailable to perform work, is known as entropy.

## Statement

The second law of thermodynamics states that **the entropy of the universe tends to increase with time**. This means that as the many thermodynamic systems in the universe tend toward equilibrium the amount of energy unavailable to do work increases. This unavailability (entropy) increases, or in a perfectly efficient process stays constant, but never decreases in value.

The 2nd law is of key importance in practice of gaining useful work from heat transfers, which is in many ways the goal of thermodynamics and is exemplified in the analysis of the basic engine. For that reason engine efficiency and the Carnot cycle are examined in this section of the notes.

## Context

### Reversible Processes

- A process can only be reversible if some infinitesimal change external to the system causes that process to proceed in the reverse direction.
- A process is said to be
**totally**reversible if the properties of both the system*and*the surroundings can be reversed to their initial states due to an infinitesimal change in the surroundings. - A process is said to be
**internally**reversible if the properties of the system*only*can be reversed to its initial state due to an infinitesimal change in the surroundings. - All real processes have a degree of irreversibility associated with them. Some sources of irreversibility are:

- Heat transfer due to finite temperature difference (consider that an infinitesimal change in the temperature of the surroundings of a hot cup of coffee won't reverse the direction of heat transfer).
- Unrestrained expansion
- Friction/turbulence
- Spontaneous mixing
- Spontaneous chemical reactions

### Reservoirs

- A reservoir is a body that remains at constant temperature irrespective of how much energy is transferred either to or from it. As such a reservoir is an idealised construct.
- A body is approximated to be a reservoir when it is of sufficient mass that most energy transfers to or from it are negligible.

### Engine Thermal Efficiency

An engine converts thermal energy into mechanical energy (it converts the heat into the system into work out of the system). Efficiency always equals the useful output divided by the total input:

**η**_{th}= W_{net}/ Q_{in}

If an engine operates in a cycle then there is no change in system energy, and so:

- Q
_{net}- W_{net}= 0 - (Q
_{in}- Q_{out}) - W_{net}= 0 - W
_{net}= Q_{in}- Q_{out}

- Q

And so the efficiency can be rewritten:

- η
_{th}= (Q_{in}- Q_{out}) / Q_{in} **η**_{th}= 1 - Q_{out}/ Q_{in}**= 1 - Q**_{L}/ Q_{H}

- η

*In some cases the subtexts 'out' and 'in' will be replaced with 'L' and 'H' respectively, referring to the low and high temperatures of the reservoirs from/into which the heat flows.*

#### Analysis of Carnot Cycle (Ideal Gas)

The Carnot cycle is the 4 stage pistol cycle typical of an engine.

- 1→2: Reversible isothermal expansion
- 2→3: Reversible adiabatic expansion
- 3→4: Reversible isothermal compression
- 4→1: Reversible adiabatic compression

*Isothermal expansion 1→2:*

- Q
_{12}- W_{12}= ΔU = mC_{v}(T_{2}- T_{1}) = 0 (1st law of thermodynamics for an isothermal process) - So Q
_{12}= W_{12}= P_{1}V_{1}ln(V_{2}/V_{1}) - Therefore Q
_{H}= mRT_{H}ln(V_{2}/V_{1})

*Isothermal compression 3→4:*

- Using the same logic as 1→2, Q
_{L}= mRT_{L}ln(V_{4}/V_{3}) - Therefore the ratio Q
_{H}/ Q_{L}= mRT_{H}ln(V_{2}/V_{1}) / mRT_{L}ln(V_{4}/V_{3}) - Simplifying gives:

**Q**_{H}/ Q_{L}= T_{H}/T_{L}* ln(V_{2}/V_{1})/ln(V_{4}/V_{3})

*Adiabatic expansion 2→3:*

- T
_{3}/T_{2}= T_{L}/T_{H}= (V_{2}/V_{3})^{k-1}(property of isentropic process) - Rearranging:

- T
_{H}/T_{L}= (V_{3}/V_{2})^{k-1}

- T

*Adiabatic expansion 4→1:*

- T
_{1}/T_{4}= T_{H}/T_{L}= (V_{4}/V_{1})^{k-1}(property of isentropic process) - Rearranging:

- T
_{H}/T_{L}= (V_{4}/V_{1})^{k-1}

- T

- Therefore, combining expressions:

- (V
_{3}/V_{2})^{k-1}= (V_{4}/V_{1})^{k-1} - V
_{3}/V_{2}= V_{4}/V_{1}

- (V

- And so:

- ln(V
_{2}/V_{1}) = ln(V_{3}/V_{4})

- ln(V

- Because the heat in and out are unsigned,

- |ln(V
_{2}/V_{1})| = |ln(V_{3}/V_{4})| = |-ln(V_{3}/V_{4})| = |ln(V_{4}/V_{3})|

- |ln(V

Finally, the logarithmic terms in the ratio Q_{H}/ Q_{L} cancel to give:

**Q**_{H}/ Q_{L}= T_{H}/T_{L}

Such that

**η**_{th}= 1 - T_{L}/T_{H}

#### Carnot Principles

- Efficiency is a function of T
_{H}and T_{L}and is independent of other factors such as the type of working fluid, the size or the pressure. - When irreversible processes/factors are included the efficiency is reduced.

## The Clausius Inequality (Further Context for Entropy)

The Clausius inequality was discovered experimentally, and states that:

**∮dQ/T**_{b}≤ 0*where the T*_{b}refers the the boundary temperature (the temperature at the point of heat exchange, generally the temperature of the direct surroundings).

- The symbol ∮ refers to a cycle integral, which considers all the processes of a cycle which returns to its initial conditions, for example a compression and subsequent expansion to the original state:

- ∮
_{12}dQ/T + ∮_{21}dQ/T ≤ 0

- ∮

- The equals sign is valid for cycles in which all processes are internally reversible, and so considering two cycles along paths A-B and A-C:

- The inequality sign is valid for all other cycles, in which there are some irreversiblities processes/factors.
- The inequality is in a way, a statement of the second law, showing that the entropy generated is greater than or equal to zero (the amount of energy unavailable to perform work is greater than or equal to zero).

## Entropy

Entropy is a quantitative measure of the energy of a system which is unavailable to perform work, and as a result the entropy generated is always greater than or equal to zero (being equal to zero only in an ideal case when there are no irreversibilities). It is denoted the symbol S (or s for specific entropy) and has the unit of the Joule-per-Kelvin (J/K).

### Change in Entropy for an Ideal Gas

#### Integral Form from Clausius Inequality

- From the Clausius inequality for an internally reversible process:

- For any other process however:

- In order to create an equality for entropy rather than an inequality we need to add the discrepancy between the right hand side and the left, which is the
*entropy generation*for the process (δ):

- Entropy generation is not a property because it dependant upon the process path. The more irreversibilities exist in the process the greater its value.
- In essence, the second law of thermodynamics states that the entropy generation for any given process is greater than or equal to zero, and so the entropy of the universe tends to increase with time.

#### Derivation from the Helmholtz Equation

Deriving the Helmholtz Equation:

- From the first law of thermodynamics:

- dQ - dW = dU

- From the definitions of entropy and work:

- dQ = T*dS and dW = P*dV

- Therefore

- dU = T*dS - P*dV (and T*ds = du + P*dv)

- This gives us the Helmholtz equation:
**ds = du/T + P*dv/T**

Deriving the change in entropy:

- From the definition of U (du = C
_{V*}dT), and a rearrangement of the ideal gas law (P/T = R/v)

- ds = C
_{V}*dT/T + R*dv/v

- ds = C

- Integrating:

#### Derivation from the Gibbs Equation

- Recalling that h = u + Pv,

- dh = du + P*dv + v*dP
- du + P*dv = dh - v*dP

- Therefore substituting part of the Helmholtz equation (T*ds = du + P*dv):

- T*ds = dh - v*dP

- Rearranging gives we have the Gibbs equation:
**ds = dh/T - v*dP/T**

Deriving the change in entropy:

- From dh = C
_{P*}dT, and a rearrangement of the ideal gas law (v/T = R/P)

- ds = C
_{P}*dT/T + R*dP/P

- ds = C

- Integrating:

### Entropy Balance

#### Entropy Balance for Closed Systems

The entropy balance for closed systems, as derived in the integral form of the definition of change in entropy, is as follows:

#### Entropy Balance for Open Systems

In an open system however, mass flowing into and out of the system has energy, which has an associated entropy. And so:

*where k is the traditional subscript to denote the uniform temperature over the boundary at which heat transfer occurs (and δ· is used in these notes only because there is not ASCII symbol for a delta with a dot above it)*

For SSSF systems (those covered in this course), the balance equals zero.

### Solving Problems with Entropy

- The four main equations required to solve entropy problems are the entropy balances for open and closed systems, and the two change in entropy equations for an ideal gas.
- When you cannot assume an ideal gas, the steam table must be sued to find specific entropy values with which to calculate Δs = s
_{2}- s_{1}. - When the processes/cycles are described as 'ideal' or 'reversible', entropy generation δ = 0.
- If you are asked to determine whether a process/cycle is possible, you must solve the energy balance and determine whether δ ≥ 0 (possible) or δ < 0 (impossible).
- If you are asked to find the minimum/maximum work or heat in a process/cycle, you should assume δ ≥ 0 and rearrange the entropy balance to form an inequality. The minimum/maximum condition is met when δ = 0.

## Isentropic Efficiencies

Isentropic efficiency is inversely proportional to entropy generation.

### Compressor

The efficiency is as follows:

**η**_{c}= (h_{2s}- h_{1})/(h_{2a}- h_{1}) = (T_{2s}- T_{1})/(T_{2a}- T_{1}) = Ẇ_{s}/ Ẇ_{a}

*Where the subscript s is for the ideal reversible process and a is for the actual process*

### Turbine

The efficiency is as follows:

**η**_{t}= (h_{2a}- h_{1})/(h_{2s}- h_{1}) = (T_{2a}- T_{1})/(T_{2s}- T_{1}) = Ẇ_{a}/ Ẇ_{s}

### Nozzle

The efficiency is as follows:

**η**_{n}= (KE at exit)_{a}/(KE at exit)_{s}

The first law for a nozzle shows that:

- h
_{2}+ V_{2}^{2}/2 = h_{1}+ V_{1}^{2}/2

- h

When V_{1} is taken to be small:

- V
_{2}^{2}/2 = h_{1}- h_{2}

- V

And so:

**η**_{n}= (h_{1}- h_{2a})/ (h_{1}- h_{2s})

## Coefficient of Performance

### Refridgerators

The work into a refrigerator is equal to the difference in heat flows from the between the reservoirs and the system.

**COP**_{R}= Q̇_{in}/Ẇ_{out}- = Q̇
_{in}/ (Q̇_{out}- Q̇_{in}) **= 1 / (Q̇**_{out}/Q̇_{in}- 1)

- = Q̇

### Heat Pump

The work into a heat pump is also equal to the difference in heat flows from the between the reservoirs and the system.

**COP**_{HP}= Q̇_{out}/Ẇ_{in}- = Q̇
_{out}/ (Q̇_{out}- Q̇_{in}) **= 1 / (1 - Q̇**_{in}/Q̇_{out})

- = Q̇
*It is always greater than 1*

## Impossibility Statements

As a result of the second law, certain systems and processes are impossible, as they would violate the trend of increasing entropy. The Kelvin-Planck and Clausius statements are both statements of the second law, and definitions of certain impossible systems which one should be on the look out for during calculations.

### Kelvin-Planck Statement

Heat from a hotter reservoir cannot be converted completely into work without some heat being transferred to a colder reservoir. This means the following situation is impossible:

### Clausius Statement

Heat cannot travel from a colder reservoir to a hotter reservoir without some work being done. (W_{net} cannot be zero in this case):