T ds Relations for Thermodynamic Processes
The T ds relations connect temperature, entropy, and other thermodynamic properties in a single equation. They're your main tool for calculating entropy changes during processes, and they show up constantly in problems involving ideal gases, steam, and other working fluids.
Derivation of the T ds Relations
The starting point is the first law for a simple compressible system undergoing an internally reversible process. Combining the first law with the definition of entropy gives the first T ds relation (also called the Gibbs equation):
where is the change in specific internal energy, is pressure, and is the change in specific volume. This equation holds for any process between equilibrium states, not just reversible ones, because it relates state properties.
The second T ds relation comes from substituting the enthalpy definition into the first relation. Differentiating gives , so . That yields:
Both relations are always valid between equilibrium states. You pick whichever one is more convenient based on the information you have.
Applying T ds Relations to Specific Processes
Each special process simplifies one of the T ds relations:
- Constant volume (): The first relation reduces to . For an ideal gas, , so .
- Constant pressure (): The second relation reduces to . For an ideal gas, , so .
- Isothermal (): Temperature is constant, so you can pull out. From the first relation, , and from the second, .
- Isentropic (): Both relations set their right-hand sides to zero. For an ideal gas, this leads to the familiar relations like and , where .
To find the total entropy change for an ideal gas between two states, integrate the T ds relations directly. For example, using the first relation with constant specific heats:
Or using the second relation:
These two expressions give the same answer for the same pair of states.
Entropy Generation and Real Processes
What Entropy Generation Means
Entropy generation () is the entropy produced within a system due to irreversibilities. It quantifies how far a real process deviates from an ideal, reversible one.
Common sources of irreversibility include:
- Friction (fluid viscosity, sliding surfaces)
- Heat transfer across a finite temperature difference (heat flowing from hot to cold through a wall)
- Unrestrained expansion (gas expanding into a vacuum)
- Mixing of fluids at different temperatures or compositions
- Inelastic deformation and chemical reactions
Every one of these phenomena destroys some of the system's potential to do useful work. Entropy generation is the measure of that destroyed potential. The larger is, the more work potential has been wasted.

Why It Matters for Engineering
The second law of thermodynamics requires that entropy generation is always non-negative:
It equals zero only for a fully reversible process, which is an idealization. In every real device, . This is why no real heat engine reaches Carnot efficiency and no real refrigerator reaches the Carnot COP. The gap between ideal and actual performance is directly tied to the entropy generated.
Minimizing entropy generation is therefore a central goal in engineering design. Lower means less wasted energy and higher efficiency, whether you're designing a turbine, a heat exchanger, or a compressor.
Quantifying Entropy Generation
The Entropy Balance Equation
Just as the first law gives an energy balance, the second law gives an entropy balance. For a closed system:
where is the rate of heat transfer at boundary location and is the boundary temperature at that location. The term is the rate of entropy generation inside the system.
For an open (control volume) system, mass carries entropy in and out, so additional terms appear:
where is mass flow rate and is specific entropy of each stream.
Steps for Calculating Entropy Generation
- Draw the system boundary and identify all heat transfers, their locations, and the boundary temperatures at those locations.
- Identify all mass flows crossing the boundary (for open systems) and look up or calculate their specific entropies.
- Determine the entropy change of the system. For steady-state problems, , which simplifies things considerably.
- Plug into the entropy balance and solve for .
- Check your answer: must be positive (or zero). A negative result means you've made an error somewhere, likely in sign conventions or boundary temperatures.
For a process that occurs over a finite time, the total entropy generated is:
Common mistake: Using the system temperature instead of the boundary temperature in the term. The entropy transfer by heat is evaluated at the temperature of the boundary where the heat crosses, not at the average system temperature.

Entropy Generation and the Second Law
How Entropy Generation Enforces the Second Law
The second law, stated in terms of entropy, says the total entropy of an isolated system can never decrease. Entropy generation is the mechanism that makes this happen. For any real process:
- Reversible process: , so total entropy stays constant. This is the theoretical best case.
- Irreversible process: , so total entropy increases. This is every real process.
- Impossible process: would mean total entropy decreases, which violates the second law. It can't happen.
The Clausius Inequality
The Clausius inequality is a compact mathematical statement of the second law for cyclic processes:
The equality holds for reversible cycles, and the strict inequality holds for irreversible ones. You can derive this directly from the entropy balance by recognizing that a system returns to its initial state after a complete cycle (), so all the entropy transferred in by heat must be offset by entropy transferred out, plus whatever entropy was generated internally.
Practical Implications
The second law sets hard upper limits on device performance. For example, a heat engine operating between reservoirs at and can never exceed the Carnot efficiency . Every irreversibility (friction in the piston, heat transfer through finite temperature differences in the boiler) generates entropy and pushes the actual efficiency below this limit.
In practice, engineers target the largest sources of irreversibility first. A poorly insulated heat exchanger with a large temperature difference across it might generate far more entropy than bearing friction in a turbine. Identifying where is largest tells you where design improvements will have the biggest payoff.