# Second Law of Thermodynamics

This is a topic from Thermodynamics:

## 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:
1. 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).
2. Unrestrained expansion
3. Friction/turbulence
4. Spontaneous mixing
5. 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 = Wnet / Qin

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

Qnet - Wnet = 0
(Qin - Qout) - Wnet = 0
Wnet = Qin - Qout

And so the efficiency can be rewritten:

ηth = (Qin - Qout) / Qin
ηth = 1 - Qout/ Qin
= 1 - QL/ QH

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
3→4: Reversible isothermal compression

Isothermal expansion 1→2:

• Q12 - W12 = ΔU = mCv(T2 - T1) = 0 (1st law of thermodynamics for an isothermal process)
• So Q12 = W12 = P1V1ln(V2/V1)
• Therefore QH = mRTHln(V2/V1)

Isothermal compression 3→4:

• Using the same logic as 1→2, QL = mRTLln(V4/V3)
• Therefore the ratio QH/ QL = mRTHln(V2/V1) / mRTLln(V4/V3)
• Simplifying gives:
QH/ QL = TH/TL * ln(V2/V1)/ln(V4/V3)

• T3/T2 = TL/TH = (V2/V3)k-1 (property of isentropic process)
• Rearranging:
TH/TL = (V3/V2)k-1

• T1/T4 = TH/TL = (V4/V1)k-1 (property of isentropic process)
• Rearranging:
TH/TL = (V4/V1)k-1
• Therefore, combining expressions:
(V3/V2)k-1 = (V4/V1)k-1
V3/V2 = V4/V1
• And so:
ln(V2/V1) = ln(V3/V4)
• Because the heat in and out are unsigned,
|ln(V2/V1)| = |ln(V3/V4)| = |-ln(V3/V4)| = |ln(V4/V3)|

Finally, the logarithmic terms in the ratio QH/ QL cancel to give:

QH/ QL = TH/TL

Such that

ηth = 1 - TL/TH

#### Carnot Principles

1. Efficiency is a function of TH and TL and is independent of other factors such as the type of working fluid, the size or the pressure.
2. 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/Tb≤ 0
where the Tb 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:  and so and thus (dQ/T)int rev is a property or state variable independent of path (and it so happens that the previously mentioned 'entropy', denoted S, is related to this new property:
dS = (dQ/T)int rev
• 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:
dS = (dQ/T)int rev, and so • For any other process however:
dS ≥ (dQ/T)int rev • 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 (δ): At this point we drop the subscript 'int rev' because it is assumed
• 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 = CV*dT), and a rearrangement of the ideal gas law (P/T = R/v)
ds = CV*dT/T + R*dv/v
• 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 = CP*dT, and a rearrangement of the ideal gas law (v/T = R/P)
ds = CP*dT/T + R*dP/P
• 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 = s2 - s1.
• 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 = (h2s - h1)/(h2a - h1) = (T2s - T1)/(T2a - T1) = Ẇ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 = (h2a - h1)/(h2s - h1) = (T2a - T1)/(T2s - T1) = Ẇ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:

h2 + V22/2 = h1 + V12/2

When V1 is taken to be small:

V22/2 = h1 - h2

And so:

ηn = (h1 - h2a)/ (h1 - h2s)

## 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.

COPR = Q̇in/Ẇout
= Q̇in / (Q̇out - Q̇in)
= 1 / (Q̇out/Q̇in - 1)

### 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.

COPHP = Q̇out/Ẇin
= Q̇out / (Q̇out - Q̇in)
= 1 / (1 - Q̇in/Q̇out)
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. (Wnet cannot be zero in this case): 