Second Law

Theorem

Second Law of Thermodynamics — Macroscopic and Microscopic Foundations

Scope: rigorous derivation and engineering application of the second law, unifying macroscopic statements (Clausius, Kelvin–Planck, Carnot, exergy) with microscopic/statistical mechanics (Boltzmann, Gibbs ensembles, partition functions). Includes control-mass and control-volume balances, entropy generation, availability, and links to information entropy.


1. Macroscopic Statements and Their Equivalence

1.1 Kelvin–Planck Statement

No device operating in a cycle can receive heat from a single reservoir and produce an equivalent amount of work with no other effect.

1.2 Clausius Statement

No process is possible whose sole result is the transfer of heat from a colder body to a hotter body.

1.3 Equivalence Sketch

  • If a Clausius-violating refrigerator moves heat from cold to hot with no work input, couple it to a heat engine to produce net work from a single reservoir → violates Kelvin–Planck.
  • If a Kelvin–Planck-violating engine produces work from a single reservoir, use work to drive a refrigerator to move heat cold→hot with no other effect → violates Clausius. Hence the two statements are equivalent.

2. Carnot Cycle and Absolute Temperature

2.1 Reversible Heat Engine Model

A reversible engine (Carnot) operating between two reservoirs at temperatures THT_H and TCT_C executes: isothermal expansion at THT_H, adiabatic expansion to TCT_C, isothermal compression at TCT_C, adiabatic compression to THT_H.

2.2 Carnot Theorems

  1. No engine operating between the same two reservoirs is more efficient than a reversible engine.
  2. All reversible engines operating between TH,TCT_H, T_C have the same efficiency, independent of working fluid.

2.3 Efficiency and Absolute Temperature

From reversibility and cyclic integrals:

ηrev=1QCQH=1TCTH.\eta_{rev} = 1 - \frac{Q_C}{Q_H} = 1 - \frac{T_C}{T_H}.

This defines the absolute temperature scale up to a constant that is fixed by assigning the triple point of water to 273.16 K.


3. Clausius Inequality and Entropy Definition

3.1 Clausius Inequality

For any closed system undergoing a cycle:

δQTb0,\oint \frac{\delta Q}{T_b} \le 0,

where TbT_b is the boundary temperature at the heat interaction location. Equality holds for fully reversible cycles.

3.2 Entropy as a Property

Consider two states 1→2. Construct a reversible path and use path-independence of state functions to define entropy SS:

ΔS=12δQrevT.\boxed{\Delta S = \int_{1}^{2} \frac{\delta Q_{rev}}{T}}.

Because δQrev/T=0\oint \delta Q_{rev}/T = 0 for any reversible cycle, dSdS is an exact differential.

3.3 Entropy Balance for Closed Systems

General process with internal irreversibility Sgen0S_{gen}\ge 0:

ΔS=12δQTb+Sgen,Sgen0.\boxed{\Delta S = \int_{1}^{2} \frac{\delta Q}{T_b} + S_{gen}}, \qquad S_{gen} \ge 0.

3.4 Entropy Rate Balance for Control Volumes

For control volume (CV) with mass flow and heat at boundary segments kk with temperature TkT_k:

dSCVdt=kQ˙kTk+inm˙soutm˙s+S˙gen,S˙gen0.\boxed{\frac{dS_{CV}}{dt} = \sum_k \frac{\dot Q_k}{T_k} + \sum_{in} \dot m\, s - \sum_{out} \dot m\, s + \dot S_{gen}}, \qquad \dot S_{gen}\ge 0.

Steady state: dSCV/dt=0dS_{CV}/dt=0.


4. Useful Differential Identities and Maxwell Relations

From the fundamental relation of a simple compressible system:

dU=TdSPdV.\boxed{dU = T\,dS - P\,dV}.

Legendre transforms give:

dH=TdS+VdP,\dA=SdTPdV,\dG=SdT+VdP.\begin{aligned} dH &= T\,dS + V\,dP,\dA &= -S\,dT - P\,dV,\dG &= -S\,dT + V\,dP. \end{aligned}

Exactness yields Maxwell relations, e.g. from dGdG: (V/T)P=(S/P)T\left(\partial V/\partial T\right)_P = -\left(\partial S/\partial P\right)_T. These are used to derive property relations and calibrate equations of state.


5. Irreversibilities and Entropy Generation

5.1 Sources

Friction, viscous dissipation, finite ΔT\Delta T heat transfer, mixing, chemical reaction, diffusion, inelastic deformation, electrical resistance, mass transfer across finite chemical potential differences.

5.2 Quantification Near Equilibrium (Continuum Thermodynamics)

Clausius–Duhem inequality for local specific entropy ss:

ρs˙+ ⁣ ⁣(qT)ρrT0,\rho\,\dot s + \nabla\!\cdot\!\left(\frac{\mathbf q}{T}\right) - \frac{\rho r}{T} \ge 0,

where q\mathbf q is heat flux, rr volumetric heat source. With Fourier and Newtonian laws, the local entropy production rate density is

σ=q ⁣ ⁣abla ⁣act ⁣act(1T)+τ:uT+iJi ⁣ ⁣abla ⁣act ⁣act(μiT)+ξ˙AT0,\sigma = \mathbf q\!\cdot\! abla\! act\! act\left(\frac{1}{T}\right) + \frac{\boldsymbol\tau: \nabla \mathbf u}{T} + \sum_i \mathbf J_i\!\cdot\! abla\! act\! act\left(\frac{\mu_i}{T}\right) + \frac{\dot{\xi}\,\mathcal A}{T} \ge 0,

with viscous stress τ\boldsymbol\tau, species fluxes Ji\mathbf J_i, chemical affinity A\mathcal A, and reaction rate ξ˙\dot{\xi}.


6. Exergy (Availability) and the Gouy–Stodola Theorem

6.1 Environment and Dead State

Define environment (superscript 0) at T0,P0T_0, P_0. The dead state is the state in mutual equilibrium with the environment.

6.2 Specific Flow Exergy and Nonflow Exergy

  • Nonflow exergy (per mass):
ψ=(uu0)+P0(vv0)T0(ss0).\boxed{\psi = (u - u_0) + P_0(v - v_0) - T_0(s - s_0)}.
  • Flow exergy (per mass) includes kinetic and potential terms:
Ψ=(hh0)T0(ss0)+v22+gz.\boxed{\Psi = (h - h_0) - T_0(s - s_0) + \frac{v^2}{2} + gz}.

6.3 Exergy Balance for Control Volumes

At steady state with heat at boundary segments kk at temperature TkT_k:

W˙useful=k(1T0Tk)Q˙k+inm˙Ψoutm˙ΨX˙dest,\boxed{\dot W_{useful} = \sum_k \left(1 - \frac{T_0}{T_k}\right)\,\dot Q_k + \sum_{in} \dot m\,\Psi - \sum_{out} \dot m\,\Psi - \dot X_{dest}},

where X˙dest=T0S˙gen\dot X_{dest} = T_0\,\dot S_{gen} is exergy destruction.

6.4 Gouy–Stodola

For any steady device:

X˙dest=T0S˙gen.\boxed{\dot X_{dest} = T_0\,\dot S_{gen}}.

This gives a direct cost of irreversibility and is the basis of entropy generation minimization in design.


7. Engineering Efficiencies and Bounds

  • Heat engine: η=Wout/Qin1TC/TH\eta = W_{out}/Q_{in} \le 1 - T_C/T_H.
  • Refrigerator: COPR=QL/WinTL/(THTL)\mathrm{COP}_R = Q_L/W_{in} \le T_L/(T_H - T_L).
  • Heat pump: COPHP=QH/WinTH/(THTL)\mathrm{COP}_{HP} = Q_H/W_{in} \le T_H/(T_H - T_L).
  • Turbine/Compressor isentropic efficiency: ηt=(h1h2s)/(h1h2),  ηc=(h2sh1)/(h2h1)\eta_t = (h_1 - h_{2s})/(h_1 - h_2),\; \eta_c = (h_{2s} - h_1)/(h_2 - h_1).

8. Statistical Mechanics Foundations

8.1 Microstate, Macrostate, and Postulate of Equal A Priori Probabilities

A microstate specifies positions and momenta of all particles. A macrostate is defined by macroscopic constraints (U,V,NU,V,N). For an isolated system at equilibrium, all accessible microstates are equally probable.

8.2 Boltzmann Entropy (Microcanonical Ensemble)

For an isolated system with energy UU and multiplicity Ω(U,V,N)\Omega(U,V,N):

S(U,V,N)=kBlnΩ(U,V,N).\boxed{S(U,V,N) = k_B \ln \Omega(U,V,N)}.

Temperature arises from

1T=(SU)V,N.\boxed{\frac{1}{T} = \left(\frac{\partial S}{\partial U}\right)_{V,N}}.

Pressure and chemical potential follow from derivatives of SS:

PT=(SV)U,N,μT=(SN)U,V.\frac{P}{T} = \left(\frac{\partial S}{\partial V}\right)_{U,N}, \qquad -\frac{\mu}{T} = \left(\frac{\partial S}{\partial N}\right)_{U,V}.

8.3 Canonical Ensemble via Weak Coupling to a Reservoir

System S weakly coupled to a large reservoir R at total energy UtotU_{tot}. Probability of S in microstate ii with energy εi\varepsilon_i:

PiΩR(Utotεi)exp[1kB(SR(Utot)εiT)]Pi=eβεiZ,P_i \propto \Omega_R(U_{tot}-\varepsilon_i) \approx \exp\left[\frac{1}{k_B}\left(S_R(U_{tot}) - \frac{\varepsilon_i}{T}\right)\right] \Rightarrow P_i = \frac{e^{-\beta \varepsilon_i}}{Z},

with β=1/(kBT)\beta = 1/(k_BT) and partition function

Z(T,V,N)=ieβεi.\boxed{Z(T,V,N) = \sum_i e^{-\beta \varepsilon_i}}.

8.4 Thermodynamic Potentials from ZZ

Helmholtz free energy:

A(T,V,N)=kBTlnZ.\boxed{A(T,V,N) = -k_BT \ln Z}.

From AA:

S=(AT)V,N,P=(AV)T,N,μ=(AN)T,V.S = -\left(\frac{\partial A}{\partial T}\right)_{V,N}, \quad P = -\left(\frac{\partial A}{\partial V}\right)_{T,N}, \quad \mu = \left(\frac{\partial A}{\partial N}\right)_{T,V}.

Energy:

U=βlnZ=iPiεi.U = -\frac{\partial}{\partial \beta} \ln Z = \sum_i P_i\,\varepsilon_i.

Fluctuations: CV=(U/T)V=kBβ2(ε2ε2)C_V = (\partial U/\partial T)_{V} = k_B \beta^2 (\langle \varepsilon^2\rangle - \langle \varepsilon\rangle^2).

8.5 Gibbs and Grand Canonical Ensembles

  • Isothermal–isobaric (Gibbs) ensemble: partition function Δ=stateseβ(ε+PV)\Delta = \sum_{states} e^{-\beta (\varepsilon + PV)}, gives G=kBTlnΔG = -k_BT \ln Δ.
  • Grand canonical ensemble: Ξ=NeβμNZN\Xi = \sum_{N} e^{\beta \mu N} Z_N, gives grand potential Φ=kBTlnΞ=pV\Phi = -k_BT \ln Ξ = -pV. These connect directly to engineering free energies and equations of state.

8.6 Gibbs Entropy and Information Form

For discrete microstates with probabilities {pip_i}:

S=kBipilnpi.\boxed{S = -k_B \sum_i p_i \ln p_i}.

Maximizing SS under constraints of normalization and mean energy yields the canonical distribution. This mirrors Shannon information entropy H = -\sum_i p_i g_2 p_i.


9. Micro–Macro Consistency: Recovering Clausius

For a quasi-static heat transfer at temperature TT while the system remains canonical,

δQrev=dUδW=dU+PdV.\delta Q_{rev} = dU - \delta W = dU + P\,dV.

From dA=SdTPdVdA = -S\,dT - P\,dV, at constant TT: δQrev=TdS\delta Q_{rev} = T\,dS. Thus,

dS=δQrevT,\boxed{dS = \frac{\delta Q_{rev}}{T}},

matching the macroscopic definition. For any real process, convexity and Liouville dynamics imply ΔStotal0\Delta S_{total} \ge 0, reproducing Clausius inequality.


10. Entropy of Ideal Gases and Mixing

10.1 Ideal Monatomic Gas (Outline)

The Sackur–Tetrode equation (quantum-corrected) for molar entropy:

Sˉ=R[ln ⁣(VN(4πmU3Nh2)3/2)+52].\bar S = R\left[\ln\!\left(\frac{V}{N}\left(\frac{4\pi m U}{3Nh^2}\right)^{3/2}\right) + \frac{5}{2}\right].

This recovers classical results and resolves the Gibbs paradox via indistinguishability (1/N!1/N! in Ω\Omega).

10.2 Entropy Change for Ideal Gas (Engineering Form)

For any ideal gas with temperature-dependent cp(T)c_p(T):

Δs(T,P)=T1T2cp(T)TdTRln ⁣(P2P1),\Delta s(T,P) = \int_{T_1}^{T_2} \frac{c_p(T)}{T} dT - R\ln\!\left(\frac{P_2}{P_1}\right), Δs(T,V)=T1T2cv(T)TdT+Rln ⁣(V2V1).\Delta s(T,V) = \int_{T_1}^{T_2} \frac{c_v(T)}{T} dT + R\ln\!\left(\frac{V_2}{V_1}\right).

10.3 Entropy of Mixing (Ideal Gas Mixtures)

For isothermal, isobaric mixing of ideal gases:

ΔSmix=Rinilnyi,\Delta S_{mix} = -R \sum_i n_i \ln y_i,

where yiy_i are mole fractions.


11. Chemical Equilibrium, Affinity, and K(T)K(T)

11.1 Gibbs Free Energy and Spontaneity

At constant T,PT,P: ΔG<0\Delta G < 0 for spontaneous change; equilibrium when ΔG=0\Delta G = 0.

11.2 Chemical Potential and Reaction Progress

For reaction iνiAi=0\sum_i \nu_i A_i = 0 with extent ξ\xi:

(Gξ)T,P=iνiμi=A,\left(\frac{\partial G}{\partial \xi}\right)_{T,P} = \sum_i \nu_i \mu_i = -\mathcal A,

where A\mathcal A is the chemical affinity. Equilibrium: A=0\mathcal A=0.

11.3 Equilibrium Constant

For ideal gases or solutions with standard state μi=μi+RTlnai\mu_i = \mu_i^\circ + RT\ln a_i (activity aia_i):

ΔrG(T)=RTlnK(T),K(T)=iaiνi.\boxed{\Delta_r G^\circ(T) = -RT\ln K(T)},\qquad K(T) = \prod_i a_i^{\nu_i}.

Temperature dependence via van ’t Hoff:

dlnKdT=ΔrHRT2.\boxed{\frac{d\ln K}{dT} = \frac{\Delta_r H^\circ}{RT^2}}.

12. Non-Equilibrium and Finite-Rate Effects

12.1 Finite Heat Transfer

Entropy generation for heat flow QQ between reservoirs at TH>TCT_H>T_C: Sgen=Q(1TC1TH)S_{gen}=Q\left(\tfrac{1}{T_C}-\tfrac{1}{T_H}\right).

12.2 Viscous Dissipation

For Newtonian fluid with viscosity μ\mu and strain-rate tensor D\mathbf D: Φ=2μD:D\Phi=2\mu\,\mathbf D:\mathbf D is the dissipation rate density. Local σvisc=Φ/T\sigma_{visc}=\Phi/T.

12.3 Diffusion and Heat Conduction Coupling

Onsager reciprocal relations near equilibrium link fluxes and forces; symmetry of phenomenological coefficients reduces modeling burden.


13. Worked Engineering Examples

Example 1: Steam Turbine, Entropy Balance and Exergy Loss

Given inlet p1,T1p_1, T_1, outlet p2p_2, mass flow m˙\dot m, and negligible heat transfer. Steps:

  1. From property tables compute h1,s1h_1, s_1. For isentropic outlet, get h2sh_{2s} at p2,s2=s1p_2, s_2=s_1.
  2. Measured outlet has h2>h2sh_2 > h_{2s}. Isentropic efficiency ηt=(h1h2)/(h1h2s)\eta_t=(h_1-h_2)/(h_1-h_{2s}).
  3. Entropy generation rate: S˙gen=m˙(s2s1)\dot S_{gen}=\dot m(s_2-s_1).
  4. Exergy destruction: X˙dest=T0S˙gen\dot X_{dest}=T_0\,\dot S_{gen}. This is the avoidable power loss upper bound.

Example 2: Refrigerator COP Upper Bound

For a refrigerator operating between TL=263KT_L=263\,\text{K} and TH=303KT_H=303\,\text{K}: COPCarnot=TL/(THTL)=263/40=6.575\mathrm{COP}_{Carnot}=T_L/(T_H-T_L)=263/40=6.575. Any real design must have COP <6.575<6.575 at these terminal temperatures.

Example 3: Ideal Gas Entropy Change with Variable cp(T)c_p(T)

Use a polynomial fit cp/R=a+bT+cT2+dT2c_p/R = a + bT + cT^2 + dT^{-2}. Integrate to obtain Δs\Delta s and compare to tabulated s(T)s^\circ(T).


14. Summary Equations

  • Clausius inequality: δQ/T0\displaystyle \oint \delta Q/T \le 0.
  • Entropy definitions: dS=δQrev/TdS=\delta Q_{rev}/T; S=kBpilnpiS=-k_B\sum p_i\ln p_i; S=kBlnΩS=k_B\ln Ω.
  • Control volume entropy rate: dSCV/dt=Q˙/T+inm˙soutm˙s+S˙gen\displaystyle dS_{CV}/dt = \sum \dot Q/T + \sum_{in} \dot m s - \sum_{out} \dot m s + \dot S_{gen}.
  • Exergy rate balance: W˙=(1T0/Tk)Q˙k+inm˙Ψoutm˙ΨT0S˙gen\displaystyle \dot W = \sum (1-T_0/T_k)\,\dot Q_k + \sum_{in} \dot m\Psi - \sum_{out} \dot m\Psi - T_0\dot S_{gen}.
  • Canonical ensemble: Z=eβεi,  A=kBTlnZ,  U=βlnZ,  S=(A/T)V,NZ=\sum e^{-\beta\varepsilon_i},\; A=-k_BT\ln Z,\; U=-\partial_{\beta}\ln Z,\; S=-(\partial A/\partial T)_{V,N}.

15. References and Standards

  • H. B. Callen, Thermodynamics and an Introduction to Thermostatistics.
  • R. K. Pathria and P. D. Beale, Statistical Mechanics.
  • A. Bejan, Advanced Engineering Thermodynamics.
  • Moran, Shapiro, et al., Fundamentals of Engineering Thermodynamics.
  • ASME PTCs and IAPWS for water/steam property standards.

  • See First Law: ../first-law.md for energy balances and definitions of U,H,A,GU, H, A, G.
  • See Fluid Dynamics/01_Control_Volumes.md for Reynolds Transport Theorem and local balances.
  • See Appendix C for mathematical identities and integral transforms useful in entropy generation minimization.