🐍 Interactive Jupyter Notebook: lecture_28_tds_relations.ipynb
📥 Download Page as .ipynb (Python Notebook) 📑 Download Blank Slides (PDF)

28. The Fundamental Thermodynamic Property Relations (The T ds Equations)

Term: Spring 2026
Instructor: Mukhamad Suhermanto
Primary References:


Learning Objectives:

  1. Derive the First and Second Gibbs (T ds) equations from the First and Second Laws (Moran et al. 2014).
  2. Explain why the T ds relations hold universally for ANY process (reversible or irreversible) between equilibrium states (Wassgren 2025).
  3. Prove that constant-volume lines are steeper than constant-pressure lines on the \(T\)-\(s\) plane: \((\partial T/\partial s)_v > (\partial T/\partial s)_P\) (Waitz and Spakovszky 2008).
  4. Derive and verify the saturation phase-change relation \(s_{fg} = h_{fg} / T_{\text{sat}}\) from the second \(T\,ds\) equation (Yan 2022).
  5. Evaluate entropy changes across multi-phase states (Purdue ME 200 Example SecondLaw_08 (Wassgren 2021)).

28.1 Derivation of the Fundamental Property Relations (\(T\,ds\) Equations)

The First Law connects heat and work (\(du = \delta q - \delta w\)), while the Second Law connects heat and entropy (\(dS = \delta Q_{\text{int,rev}} / T\)). By combining them for an internally reversible process of a simple compressible substance, we obtain the fundamental thermodynamic property relations (often called the Gibbs equations or \(T\,ds\) equations) (Moran et al. 2014), (Wassgren 2025).

28.1.1 The First \(T\,ds\) Relation

Consider a closed, homogeneous simple compressible substance undergoing an internally reversible process in the absence of chemical reactions and external fields (Yan 2022):

Substituting these into the First Law on a per-unit-mass basis:

\[ du = \delta q_{\text{int,rev}} - \delta w_{\text{int,rev}} = T\,ds - P\,dv \tag{28.1} \]

Rearranging to isolate \(T\,ds\) yields the First \(T\,ds\) Equation:

\[ T\,ds = du + P\,dv \tag{28.2} \]

Solving for the specific entropy differential \(ds\):

\[ ds = \frac{du}{T} + \frac{P}{T}\,dv \tag{28.3} \]

28.1.2 The Second \(T\,ds\) Relation

Specific enthalpy is defined as \(h \equiv u + Pv\). Differentiating \(h\):

\[ dh = du + P\,dv + v\,dP \tag{28.4} \]

Notice that the first two terms on the right-hand side are identically \(T\,ds\) from Equation (28.2): \(du + P\,dv = T\,ds\). Therefore:

\[ dh = T\,ds + v\,dP \tag{28.5} \]

Rearranging yields the Second \(T\,ds\) Equation:

\[ T\,ds = dh - v\,dP \tag{28.6} \]

Solving for \(ds\):

\[ ds = \frac{dh}{T} - \frac{v}{T}\,dP \tag{28.7} \]

28.2 Universal Validity and Important Consequences

Key Idea: Universal Path-Independence of the \(T\,ds\) Relations

Although we invoked an internally reversible process to derive Equations (28.2) and (28.6), all variables in these equations (\(T, s, u, h, P, v\)) are thermodynamic state properties (Moran et al. 2014), (Waitz and Spakovszky 2008). The relationship between state properties does not depend on how a system moves from one state to another. Therefore, the \(T\,ds\) equations hold for ANY process—reversible or irreversible, open or closed, steady or transient—between equilibrium states!

28.2.1 Slopes of Constant-Volume and Constant-Pressure Lines on \(T\)-\(s\) Diagrams

The \(T\,ds\) equations reveal the geometric behavior of property contours on the \(T\)-\(s\) plane (Wassgren 2025):

  1. Constant-Volume Line (\(dv = 0\)): From Equation (28.2), with \(du = c_v\,dT\):

\[ T\,ds = c_v\,dT \implies \left( \frac{\partial T}{\partial s} \right)_v = \frac{T}{c_v} \tag{28.8} \]

  1. Constant-Pressure Line (\(dP = 0\)): From Equation (28.6), with \(dh = c_p\,dT\):

\[ T\,ds = c_p\,dT \implies \left( \frac{\partial T}{\partial s} \right)_P = \frac{T}{c_p} \tag{28.9} \]

Because \(c_p > c_v\) for all substances (\(c_p - c_v = R > 0\) for ideal gases, \(c_p - c_v = v T \beta^2 / \kappa_T > 0\) for real substances):

\[ \frac{T}{c_v} > \frac{T}{c_p} \implies \left( \frac{\partial T}{\partial s} \right)_v > \left( \frac{\partial T}{\partial s} \right)_P \tag{28.10} \]

Key Idea: Isochore vs Isobar Slopes

At any specified state on a \(T\)-\(s\) diagram, the constant-volume line has a steeper slope than the constant-pressure line passing through that same state.

28.2.2 Saturation Phase-Change Verification

During liquid-vapor phase change inside the saturation dome, temperature and pressure remain strictly constant (\(T = T_{\text{sat}}\), \(dP = 0\)). The Second \(T\,ds\) equation (28.6) reduces to:

\[ T_{\text{sat}}\,ds = dh \implies \int_f^g ds = \frac{1}{T_{\text{sat}}} \int_f^g dh \tag{28.11} \]

\[ s_g - s_f = \frac{h_g - h_f}{T_{\text{sat}}} \implies s_{fg} = \frac{h_{fg}}{T_{\text{sat}}} \tag{28.12} \]

This provides a direct consistency check across thermodynamic saturation tables.

28.3 Worked Examples (Purdue ME 200)

Example 28.1: State Transitions of Steam (SecondLaw_08)

Water vapor undergoes a process from state 1 (\(P_1 = 1.0\text{ bar}\), \(T_1 = 150^\circ\text{C}\)) to state 2 (\(P_2 = 10.0\text{ bar}\), \(T_2 = 400^\circ\text{C}\)) (Wassgren 2021). Determine:

  1. The initial and final specific internal energy, enthalpy, and entropy from steam tables.
  2. The property changes \(\Delta u = u_2 - u_1\), \(\Delta h = h_2 - h_1\), and \(\Delta s = s_2 - s_1\).
  3. Verify that \(\Delta s\) can be obtained regardless of whether the process connecting state 1 and state 2 is reversible or irreversible.

Solution / Analysis

Both states are superheated vapor:

State 1 (\(1.0\text{ bar}, 150^\circ\text{C}\)):

\(u_1 = 2582.8\text{ kJ/kg}\), \(h_1 = 2776.4\text{ kJ/kg}\), \(s_1 = 7.6134\text{ kJ/(kg}\cdot\text{K)}\).

State 2 (\(10.0\text{ bar}, 400^\circ\text{C}\)):

\(u_2 = 2957.3\text{ kJ/kg}\), \(h_2 = 3263.9\text{ kJ/kg}\), \(s_2 = 7.4651\text{ kJ/(kg}\cdot\text{K)}\).

Property Changes:

\(\Delta u = 2957.3 - 2582.8 = +374.5\text{ kJ/kg}\). \(\Delta h = 3263.9 - 2776.4 = +487.5\text{ kJ/kg}\). \(\Delta s = 7.4651 - 7.6134 = -0.1483\text{ kJ/(kg}\cdot\text{K)}\). Because entropy is a thermodynamic property governed by the \(T\,ds\) relations, \(\Delta s = s_2 - s_1\) is identical whether the process was adiabatic throttling, rapid paddle stirring, or reversible compression!

import kilojoule.realfluid as realfluid
from kilojoule.units import Quantity

water = realfluid.Properties('Water')

# State 1: 1 bar, 150 C
P1 = Quantity(1.0, 'bar')
T1 = Quantity(150.0, 'degC')
u1 = water.u(p=P1, T=T1)
h1 = water.h(p=P1, T=T1)
s1 = water.s(p=P1, T=T1)
v1 = water.v(p=P1, T=T1)

# State 2: 10 bar, 400 C
P2 = Quantity(10.0, 'bar')
T2 = Quantity(400.0, 'degC')
u2 = water.u(p=P2, T=T2)
h2 = water.h(p=P2, T=T2)
s2 = water.s(p=P2, T=T2)
v2 = water.v(p=P2, T=T2)

delta_u = (u2 - u1).to('kJ/kg')
delta_h = (h2 - h1).to('kJ/kg')
delta_s = (s2 - s1).to('kJ/(kg*K)')

print(f"State 1: u1 = {u1.to('kJ/kg').magnitude:.2f} kJ/kg, h1 = {h1.to('kJ/kg').magnitude:.2f} kJ/kg, s1 = {s1.to('kJ/(kg*K)').magnitude:.4f} kJ/(kg*K)")
print(f"State 2: u2 = {u2.to('kJ/kg').magnitude:.2f} kJ/kg, h2 = {h2.to('kJ/kg').magnitude:.2f} kJ/kg, s2 = {s2.to('kJ/(kg*K)').magnitude:.4f} kJ/(kg*K)")
print(f"Property Changes: Delta u = {delta_u.magnitude:.2f} kJ/kg, Delta h = {delta_h.magnitude:.2f} kJ/kg, Delta s = {delta_s.magnitude:.4f} kJ/(kg*K)")
--- State 1 (1 bar, 150 C) ---
u1 = 2582.75 kJ/kg, h1 = 2776.38 kJ/kg, s1 = 7.6134 kJ/(kg·K)

--- State 2 (10 bar, 400 C) ---
u2 = 2957.30 kJ/kg, h2 = 3263.88 kJ/kg, s2 = 7.4651 kJ/(kg·K)

--- Property Changes ---
Delta u: 374.55 kJ/kg
Delta h: 487.50 kJ/kg
Delta s: -0.1483 kJ/(kg·K)

28.3.2 Phase-Change Entropy Verification

Example 28.2: Verifying \(s_{fg} = h_{fg}/T_{\text{sat}}\) for R-134a

Verify the Second Law identity \(s_{fg} = h_{fg}/T_{\text{sat}}\) for Refrigerant-134a at \(T_{\text{sat}} = 0^\circ\text{C} = 273.15\text{ K}\) using saturation table data (Moran et al. 2014).

Solution / Analysis

At \(0^\circ\text{C}\) for R-134a: \(h_f = 200.00\text{ kJ/kg}\), \(h_g = 398.60\text{ kJ/kg} \implies h_{fg} = 198.60\text{ kJ/kg}\). \(s_f = 1.0000\text{ kJ/(kg}\cdot\text{K)}\), \(s_g = 1.7271\text{ kJ/(kg}\cdot\text{K)} \implies s_{fg} = 0.7271\text{ kJ/(kg}\cdot\text{K)}\). Computing the ratio: \(h_{fg} / T_{\text{sat}} = 198.60 / 273.15 = 0.7271\text{ kJ/(kg}\cdot\text{K)}\). The computed value matches \(s_{fg}\) exactly, confirming the fundamental relation!

import kilojoule.realfluid as realfluid
from kilojoule.units import Quantity

r134a = realfluid.Properties('R134a')
T_sat = Quantity(0.0, 'degC')

h_f = r134a.h(T=T_sat, x=Quantity(0.0, ''))
s_f = r134a.s(T=T_sat, x=Quantity(0.0, ''))
h_g = r134a.h(T=T_sat, x=Quantity(1.0, ''))
s_g = r134a.s(T=T_sat, x=Quantity(1.0, ''))

h_fg = (h_g - h_f).to('kJ/kg')
s_fg_table = (s_g - s_f).to('kJ/(kg*K)')
s_fg_calc = (h_fg / T_sat.to('K')).to('kJ/(kg*K)')
discrepancy = float(abs(s_fg_table - s_fg_calc).magnitude)

print(f"R-134a at T_sat = {T_sat.magnitude:.1f} degC ({T_sat.to('K').magnitude:.2f} K):")
print(f"  h_fg = h_g - h_f = {h_fg.magnitude:.3f} kJ/kg")
print(f"  s_fg (from table) = {s_fg_table.magnitude:.6f} kJ/(kg*K)")
print(f"  s_fg = h_fg / T   = {s_fg_calc.magnitude:.6f} kJ/(kg*K)")
print(f"  Discrepancy:        {discrepancy:.2e} kJ/(kg*K) (Perfect Gibbs Agreement!)")
Saturation Temperature: 273.15 K
Latent heat h_fg:       198.60 kJ/kg
Table value s_fg:       0.7271 kJ/(kg·K)
Calculated h_fg/T_sat:  0.7271 kJ/(kg·K)
Difference:             0.000000 kJ/(kg·K)

Engineering Practice Problems (Self-Study Exercises)

Try each problem on paper first using the principles from this chapter, then expand the step-by-step solution to check your derivation.

Practice Problem 1 — Equivalence of the First and Second \(T\,ds\) Equations for an Ideal Gas

Nitrogen gas (\(R = 0.2968\), constant \(c_v = 0.743\), \(c_p = 1.0398\text{ kJ}/(\text{kg}\cdot\text{K})\)) is compressed from \(P_1 = 120\text{ kPa}\), \(T_1 = 300\text{ K}\) to \(P_2 = 480\text{ kPa}\), \(T_2 = 550\text{ K}\). (a) Integrate the first \(T\,ds\) relation (\(T\,ds = du + P\,dv\)) using specific volumes \(v_1, v_2\) to obtain \(\Delta s\). (b) Independently integrate the second \(T\,ds\) relation (\(T\,ds = dh - v\,dP\)) using pressures \(P_1, P_2\) and verify exact numerical equality.

🔍 Click to View Complete Step-by-Step Solution
  1. Specific Volumes & First Gibbs Integration (\(ds = c_v\,dT/T + R\,dv/v\)): \[v_1 = \frac{(0.2968)(300)}{120} = 0.74200\text{ m}^3/\text{kg}, \qquad v_2 = \frac{(0.2968)(550)}{480} = 0.34008\text{ m}^3/\text{kg}\] \[\Delta s = 0.743\ln\left(\frac{550}{300}\right) + 0.2968\ln\left(\frac{0.34008}{0.74200}\right) = 0.21881\text{ kJ}/(\text{kg}\cdot\text{K})\]

  2. Second Gibbs Integration (\(ds = c_p\,dT/T - R\,dP/P\)): \[\Delta s = 1.0398\ln\left(\frac{550}{300}\right) - 0.2968\ln\left(\frac{480}{120}\right) = 0.21881\text{ kJ}/(\text{kg}\cdot\text{K})\]

  3. Result: Both relations produce identically \(\Delta s = +0.21881\text{ kJ}/(\text{kg}\cdot\text{K})\) (compression cools vs. pressurizes nearly into an adiabatic balance!).


Practice Problem 2 — Verifying \(T\,ds = dh - v\,dP\) Along an Isobar for Real Superheated Steam

Superheated steam is heated at constant pressure \(P = 500\text{ kPa}\) from \(T_1 = 200^\circ\text{C}\) (\(h_1 = 2855.84\text{ kJ/kg}\), \(s_1 = 7.0610\text{ kJ}/(\text{kg}\cdot\text{K})\)) through \(T_m = 250^\circ\text{C}\) (\(h_m = 2961.04\text{ kJ/kg}\)) to \(T_2 = 300^\circ\text{C}\) (\(h_2 = 3064.55\text{ kJ/kg}\), \(s_2 = 7.4614\text{ kJ}/(\text{kg}\cdot\text{K})\)). Starting from \(T\,ds = dh - v\,dP\) at constant pressure (\(dP = 0\)), approximate \(\Delta s = \int dh/T\) by two-panel trapezoidal integration over \(1/T\) and compare with the exact steam-table difference \(s_2 - s_1\).

🔍 Click to View Complete Step-by-Step Solution
  1. Reduce the Second \(T\,ds\) Equation for Isobaric Heating (\(dP = 0\)): \(ds = dh / T\). Using Kelvin temperatures \(T_1 = 473.15\text{ K}\), \(T_m = 523.15\text{ K}\), \(T_2 = 573.15\text{ K}\):

  2. Two-Panel Trapezoidal Numerical Integration (\(\Delta s \approx \sum \Delta h \cdot \overline{1/T}\)): \[\Delta s_{\text{trap}} \approx (2961.04 - 2855.84)\frac{1/473.15 + 1/523.15}{2} + (3064.55 - 2961.04)\frac{1/523.15 + 1/573.15}{2} = 0.4010\text{ kJ}/(\text{kg}\cdot\text{K})\]

  3. Compare Against Exact Steam Table Difference: \[\Delta s_{\text{exact}} = s_2 - s_1 = 7.4614 - 7.0610 = 0.4004\text{ kJ}/(\text{kg}\cdot\text{K})\] The agreement to within \(0.0006\text{ kJ}/(\text{kg}\cdot\text{K})\) confirms how property tables construct \(s\) directly from \(h, P, T\)! Final Result: \(\Delta s_{\text{trap}} = 0.4010\) vs. \(\Delta s_{\text{exact}} = 0.4004\text{ kJ}/(\text{kg}\cdot\text{K})\).


Practice Problem 3 — Applying \(T\,ds = dh - v\,dP\) to Two-Phase Ammonia Vaporization

At \(T = -20^\circ\text{C}\), saturated ammonia (\(\text{NH}_3\)) boils at constant saturation pressure \(P_{\text{sat}} = 190.03\text{ kPa}\) with enthalpy of vaporization \(h_{fg} = 1328.80\text{ kJ/kg}\) and tabulated \(s_f = 1.1374\text{ kJ}/(\text{kg}\cdot\text{K})\). Use the second \(T\,ds\) relation to derive \(s_{fg} = h_{fg}/T_{\text{sat}}\) and calculate \(s_g\) of saturated ammonia vapor at \(-20^\circ\text{C}\).

🔍 Click to View Complete Step-by-Step Solution
  1. Integrate Along a Two-Phase Isotherm/Isobar (\(dP = 0\), Constant \(T = T_{\text{sat}}\)): \[T\,ds = dh - v\,dP \implies T_{\text{sat}} \int_f^g ds = \int_f^g dh \implies s_{fg} = \frac{h_{fg}}{T_{\text{sat}}}\]

  2. Compute \(s_{fg}\) and \(s_g\) (\(T_{\text{sat}} = 253.15\text{ K}\)): \[s_{fg} = \frac{1328.80}{253.15} = 5.2491\text{ kJ}/(\text{kg}\cdot\text{K})\] \[s_g = s_f + s_{fg} = 1.1374 + 5.2491 = 6.3865\text{ kJ}/(\text{kg}\cdot\text{K})\]

  3. Verification: CoolProp directly returns \(s_g = 6.3865\text{ kJ}/(\text{kg}\cdot\text{K})\) (exact identity!). Final Result: \(s_{fg} = 5.2491\), \(s_g = 6.3865\text{ kJ}/(\text{kg}\cdot\text{K})\).


Practice Problem 4 — Entropy Change Formula for a Polytropic Ideal-Gas Process via \(T\,ds\)

Using \(T\,ds = du + P\,dv\) and the ideal-gas polytropic constraint \(P v^n = \text{const}\) (so \(T v^{n-1} = \text{const}\)), show that \(\Delta s = c_v \frac{n - k}{n - 1}\ln(T_2/T_1)\) for constant specific heats. Then evaluate \(\Delta s\) when helium (\(c_v = 3.116\text{ kJ}/(\text{kg}\cdot\text{K})\), \(k = 1.667\)) is compressed polytropically with \(n = 1.40\) from \(300\text{ K}\) to \(450\text{ K}\).

🔍 Click to View Complete Step-by-Step Solution
  1. Derive Polytropic \(\Delta s\) Relation: From \(T v^{n-1} = \text{const}\), taking logs yields \(\frac{dv}{v} = -\frac{1}{n - 1}\frac{dT}{T}\). Substituting \(du = c_v\,dT\) and \(R = c_v(k - 1)\) into \(ds = c_v\frac{dT}{T} + R\frac{dv}{v}\): \[\Delta s = \left[c_v - \frac{c_v(k-1)}{n-1}\right]\ln\left(\frac{T_2}{T_1}\right) = \mathbf{c_v \frac{n - k}{n - 1}\ln\left(\frac{T_2}{T_1}\right)}\]

  2. Evaluate for Helium Compression (\(n = 1.40 < k = 1.667\)): \[\Delta s = (3.1156)\frac{1.40 - 1.6667}{1.40 - 1}\ln\left(\frac{450}{300}\right) = -0.8420\text{ kJ}/(\text{kg}\cdot\text{K})\]

  3. Physical Check: Negative \(\Delta s\) shows cooling jacket heat rejection is required to keep \(n < k\) during compression! Final Result: \(\Delta s = -0.8420\text{ kJ}/(\text{kg}\cdot\text{K})\).

Summary & Key Takeaways


References, Suggested Reading & Video Lectures

Moran, Michael J., Howard N. Shapiro, Daisie D. Boettner, and Margaret B. Bailey. 2014. Fundamentals of Engineering Thermodynamics. 8th ed. Hoboken, NJ: John Wiley & Sons.
Waitz, Ian A., and Zoltan S. Spakovszky. 2008. 16.unified: Thermodynamics and Propulsion. Cambridge, MA: MIT OpenCourseWare, Massachusetts Institute of Technology.
Wassgren, Carl. 2021. Thermodynamics I (ME 200) Video Lecture Series. School of Mechanical Engineering, Purdue University. https://www.youtube.com/@cw2306/playlists.
———. 2025. Notes on Thermodynamics, Fluid Mechanics, and Gas Dynamics. West Lafayette, IN: School of Mechanical Engineering, Purdue University. https://engineering.purdue.edu/~wassgren/notes/NotesOnThermodynamicsFluidMechanicsAndGasDynamics_Wassgren.pdf.
Yan, Claire Yu. 2022. Introduction to Engineering Thermodynamics. BCcampus Open Education. https://open.umn.edu/opentextbooks/textbooks/introduction-to-engineering-thermodynamics.