Thermodynamics for CAE Engineers
Laws, Entropy, Thermodynamic Cycles & Exergy Analysis

Category: Fundamental Theory | Updated: 2026-03-25 | サイトマップ
NovaSolver Contributors

Thermodynamics is the science of energy, its transformations, and its fundamental limits. For CAE engineers working on internal combustion engines, gas turbines, HVAC systems, or any energy-converting device, thermodynamics sets the hard ceiling on what is physically achievable — no simulation can violate the second law. Understanding these principles deeply transforms how you interpret simulation results and design more efficient systems.

1. The Four Laws of Thermodynamics

🧑‍🎓

I've heard there are actually four laws, numbered 0, 1, 2, and 3. Why does it start at zero? Did someone forget one?

🎓

Classic question. The zeroth law was actually recognized after the first and second, but physicists realized it was so fundamental it had to logically precede them — so they numbered it zero. It establishes that thermal equilibrium is transitive: if body A is in equilibrium with body C, and body B is also in equilibrium with body C, then A and B are in equilibrium with each other. That's what makes temperature a consistent, measurable quantity at all. Without it, thermometers wouldn't work.

1.1 Zeroth Law — Thermal Equilibrium

If $A \sim C$ and $B \sim C$ (where $\sim$ denotes thermal equilibrium), then $A \sim B$. This defines temperature as an equivalence class and justifies the use of thermometers.

1.2 First Law — Conservation of Energy

Energy cannot be created or destroyed, only converted between forms. For a closed system:

$$\Delta U = Q - W$$

For an open system (control volume), the steady-flow energy equation is:

$$\dot{Q} - \dot{W}_s = \dot{m}\left[(h_2 - h_1) + \frac{V_2^2 - V_1^2}{2} + g(z_2 - z_1)\right]$$

where $h = u + pv$ is the specific enthalpy, $\dot{W}_s$ is shaft work, and kinetic/potential energy terms are often negligible in most engineering devices except nozzles and pumps.

🧑‍🎓

In a CFD simulation of a gas turbine, how does the first law actually show up? The solver doesn't explicitly write $Q - W$...

🎓

In CFD, the first law becomes the energy transport equation. The solver solves for total energy $E = u + V^2/2$ (internal plus kinetic) at each cell. The flux of this energy across cell faces — including pressure-work terms — plus viscous dissipation and heat conduction are all included. When you specify an adiabatic wall in Fluent or OpenFOAM, you're setting the heat flux $q = 0$, enforcing the first law boundary condition. The temperature you see in post-processing is a result of solving this energy equation consistently with mass and momentum.

1.3 Second Law — Irreversibility and Entropy

Every spontaneous process increases the total entropy of the universe:

$$dS_{\text{universe}} = dS_{\text{system}} + dS_{\text{surroundings}} \geq 0$$

The equality holds only for reversible (idealized) processes. This law dictates that heat cannot spontaneously flow from cold to hot, and that no heat engine can be 100% efficient.

1.4 Third Law — Absolute Zero

The entropy of a perfect crystal at absolute zero is zero:

$$\lim_{T \to 0} S = 0$$

This provides the absolute reference for entropy calculations and explains why achieving exactly 0 K is impossible — it would require infinite work to remove the last quantum of thermal energy.

LawStatementCAE Implication
ZerothThermal equilibrium is transitiveJustifies temperature boundary conditions
FirstEnergy is conservedEnergy equation in CFD/FEM solvers
SecondEntropy of universe always increasesSets efficiency limits; direction of processes
ThirdEntropy → 0 as T → 0 KLow-temperature material property baseline

2. Entropy: The Second Law in Depth

🧑‍🎓

Entropy is always described as "disorder," but that feels too vague. In an engine simulation, how do I actually think about entropy generation?

🎓

Forget "disorder" — that's a pop-science simplification. In engineering, entropy generation is directly proportional to lost work. Every irreversibility in your system — viscous friction in the fluid, heat transfer across a finite temperature difference, mixing of two different fluids — creates entropy, and that created entropy represents useful work that you've permanently lost. In an engine, the big entropy generators are: combustion (irreversible chemical reaction), heat transfer through the cylinder walls, exhaust blow-down, and throttle losses. A second-law analysis tells you exactly which of these costs you the most efficiency.

2.1 Clausius Inequality and Entropy

For any cycle, the Clausius inequality states:

$$\oint \frac{\delta Q}{T} \leq 0$$

This leads to the definition of entropy as a state function. For a reversible process:

$$dS = \frac{\delta Q_{\text{rev}}}{T}$$

For any real (irreversible) process between states 1 and 2:

$$S_2 - S_1 \geq \int_1^2 \frac{\delta Q}{T}$$

2.2 Entropy Generation Rate

The volumetric entropy generation rate $\dot{s}_{\text{gen}}$ in a fluid is:

$$\dot{s}_{\text{gen}} = \frac{\mu}{T}\left(\frac{\partial u_i}{\partial x_j} + \frac{\partial u_j}{\partial x_i}\right)\frac{\partial u_i}{\partial x_j} + \frac{k}{T^2}\left|\nabla T\right|^2 \geq 0$$

The first term comes from viscous dissipation (velocity gradients) and the second from heat conduction through a temperature gradient. Both are always non-negative, confirming the second law locally. Modern CFD post-processors can compute $\dot{s}_{\text{gen}}$ field maps to visualize where losses are concentrated — a powerful design optimization tool.

2.3 The T–s Diagram

The $T$–$s$ diagram is the engineer's lens for cycle analysis. On a $T$–$s$ diagram:

$$\eta_{\text{thermal}} = 1 - \frac{|q_{\text{out}}|}{q_{\text{in}}} = \frac{w_{\text{net}}}{q_{\text{in}}}$$

3. Ideal Gas & Real Gas Models

🧑‍🎓

When does the ideal gas assumption break down in practice? I'm working on a high-pressure hydrogen storage simulation and someone said I need a real gas model.

🎓

Good instinct to question it. The ideal gas law assumes molecules have zero volume and zero interaction forces. For hydrogen at 700 bar (typical for vehicle tanks), those assumptions fail badly — the compressibility factor Z deviates from 1 by 20–40%. You'd need a real-gas equation like Peng-Robinson or the Redlich-Kwong. The rule of thumb: if reduced pressure $P_r = P/P_c > 0.1$ or reduced temperature $T_r = T/T_c < 2$, real-gas effects are significant. For air at atmospheric conditions, $T_r \approx 10$ and $P_r \approx 0.001$, so ideal gas is perfectly fine.

3.1 Ideal Gas Law

$$Pv = RT, \qquad R = \frac{\bar{R}}{M}$$

where $\bar{R} = 8.314$ J/(mol·K) is the universal gas constant and $M$ is the molar mass. For air: $R_{\text{air}} = 287$ J/(kg·K).

Internal energy and enthalpy of an ideal gas depend only on temperature:

$$du = c_v\,dT, \qquad dh = c_p\,dT, \qquad \gamma = \frac{c_p}{c_v}, \qquad c_p - c_v = R$$

For air: $\gamma \approx 1.4$, $c_p \approx 1005$ J/(kg·K), $c_v \approx 718$ J/(kg·K).

3.2 Isentropic Relations

For a reversible adiabatic process with an ideal gas:

$$\frac{T_2}{T_1} = \left(\frac{P_2}{P_1}\right)^{(\gamma-1)/\gamma} = \left(\frac{v_1}{v_2}\right)^{\gamma-1}$$

These relations govern the isentropic efficiency of compressors and turbines. For an axial compressor stage with pressure ratio $\pi$:

$$\eta_{c,s} = \frac{T_{01}(\pi^{(\gamma-1)/\gamma} - 1)}{T_{02} - T_{01}}$$

3.3 Van der Waals & Peng-Robinson Equations

The Van der Waals equation accounts for molecular volume ($b$) and attraction ($a$):

$$\left(P + \frac{a}{v^2}\right)(v - b) = RT$$

The more accurate Peng-Robinson equation used in industrial CFD (ANSYS Fluent, STAR-CCM+ real-gas models):

$$P = \frac{RT}{v - b} - \frac{a(T)}{v(v+b) + b(v-b)}, \qquad a(T) = 0.45724\frac{R^2 T_c^2}{P_c}\alpha(T)$$

4. Thermodynamic Cycles

🧑‍🎓

I'm simulating a car engine in GT-Power. The software mentions the Otto cycle as the "ideal" reference. But real engines look nothing like an Otto cycle on a P-V diagram. Why bother with the ideal cycles?

🎓

Ideal cycles give you two things: an upper bound on efficiency (so you know how far from ideal your real engine is) and analytical formulas for quick parameter studies. When you find your GT-Power simulation gives 38% thermal efficiency and Otto theory predicts 57% at the same compression ratio, that gap of 19 points tells you exactly how much irreversibility — heat losses, friction, non-instantaneous combustion — costs you. It's a structured way to assign blame to different loss mechanisms. Without the ideal reference, you're just looking at a number with no context.

4.1 Carnot Cycle — The Theoretical Maximum

The Carnot cycle operates between two thermal reservoirs at $T_H$ and $T_L$ and achieves the maximum possible efficiency for any heat engine:

$$\eta_{\text{Carnot}} = 1 - \frac{T_L}{T_H}$$

For a modern gas turbine with $T_H = 1600$ K and $T_L = 300$ K: $\eta_{\text{Carnot}} = 81.25\%$. Real turbines achieve 40–45% — the gap represents irreversibilities that thermodynamic analysis helps quantify and reduce.

The Carnot cycle on a $T$–$s$ diagram is a perfect rectangle: two isothermal processes (horizontal) and two isentropic processes (vertical).

4.2 Otto Cycle — Spark-Ignition Engines

The ideal Otto cycle models gasoline engines with four internally reversible processes: isentropic compression, constant-volume heat addition, isentropic expansion, constant-volume heat rejection.

$$\eta_{\text{Otto}} = 1 - \frac{1}{r_c^{\gamma-1}}$$

where $r_c = V_{\text{BDC}}/V_{\text{TDC}}$ is the compression ratio. For $r_c = 10$ and $\gamma = 1.4$: $\eta_{\text{Otto}} = 60.2\%$. Real engines achieve 30–38% due to heat transfer, friction, and imperfect combustion.

ProcessTypeDescription
1→2IsentropicPiston compression
2→3IsochoricCombustion (heat addition at constant volume)
3→4IsentropicPower stroke expansion
4→1IsochoricExhaust blow-down (heat rejection)

4.3 Diesel Cycle — Compression-Ignition Engines

In the Diesel cycle, heat is added at constant pressure (fuel injected as piston moves), not constant volume. The cutoff ratio $r_c$ characterizes the degree of constant-pressure combustion:

$$\eta_{\text{Diesel}} = 1 - \frac{1}{r^{\gamma-1}} \cdot \frac{r_c^\gamma - 1}{\gamma(r_c - 1)}$$

where $r = V_1/V_2$ is the compression ratio (typically 14–22 for Diesels). For the same compression ratio, $\eta_{\text{Diesel}} < \eta_{\text{Otto}}$, but Diesel engines use higher compression ratios, so in practice they often achieve better efficiency.

4.4 Brayton Cycle — Gas Turbines

The Brayton cycle underpins jet engines and industrial gas turbines. Processes: isentropic compression, constant-pressure heat addition (combustion), isentropic expansion in turbine, constant-pressure heat rejection (exhaust).

$$\eta_{\text{Brayton}} = 1 - \frac{T_1}{T_2} = 1 - \frac{1}{\Pi^{(\gamma-1)/\gamma}}$$

where $\Pi = P_3/P_2$ is the pressure ratio. For $\Pi = 20$ and $\gamma = 1.4$: $\eta_{\text{Brayton}} = 57.5\%$.

🧑‍🎓

For a combined cycle power plant, I see efficiencies above 60%. How does that beat the Brayton cycle limit?

🎓

The Brayton cycle rejects hot exhaust at 500–600°C — a massive waste. A combined cycle plant adds a Heat Recovery Steam Generator (HRSG) and a Rankine steam cycle to capture that waste heat. The overall system operates between the combustor temperature (~1600°C) and the steam condenser temperature (~30°C), getting much closer to Carnot. The efficiency formula becomes $\eta_{\text{combined}} = \eta_{\text{Brayton}} + (1 - \eta_{\text{Brayton}})\eta_{\text{Rankine}}$. This is why modern combined cycle plants reach 62–65% — it's not magic, it's stacking two cycles to use the full temperature range.

5. Exergy Analysis

Exergy (also called availability or work potential) is the maximum useful work obtainable from a system as it comes to equilibrium with its environment at the dead state $(T_0, P_0)$. While energy is always conserved, exergy is destroyed by irreversibilities.

5.1 Specific Exergy

$$\psi = (h - h_0) - T_0(s - s_0) + \frac{V^2}{2} + gz$$

The term $(h - h_0) - T_0(s - s_0)$ is the thermomechanical (flow) exergy. For heat transfer from a reservoir at $T_R$, the exergy associated with heat $Q$ is:

$$X_{\text{heat}} = Q\left(1 - \frac{T_0}{T_R}\right)$$

This is the Carnot factor — heat at 1000°C has exergy equal to 77% of the heat itself; heat at 50°C has only 8% exergy relative to a 20°C environment.

5.2 Exergy Destruction

The Gouy-Stodola theorem relates exergy destruction directly to entropy generation:

$$\dot{X}_{\text{destroyed}} = T_0 \dot{S}_{\text{gen}} \geq 0$$

This is enormously powerful: wherever your CFD simulation shows high entropy generation — shock waves, separated flow regions, high-gradient combustion zones — that is exactly where you're destroying exergy and losing performance.

5.3 Second-Law Efficiency

$$\eta_{\text{II}} = \frac{\text{Exergy recovered}}{\text{Exergy supplied}} = 1 - \frac{\dot{X}_{\text{destroyed}}}{\dot{X}_{\text{in}}}$$
ComponentTypical $\eta_{\text{II}}$Main Loss Mechanism
Modern axial compressor stage88–92%Viscous blade boundary layer, tip clearance
Combustion chamber65–75%Chemical irreversibility, heat transfer
Turbine stage88–93%Tip clearance, secondary flows, cooling
Heat exchanger (industrial)50–80%Heat transfer through finite ΔT
Throttle valve0% (pure destruction)Pressure drop with no work recovery

6. CAE Applications of Thermodynamics

🧑‍🎓

In my CFD setup for a gas turbine combustor, how do I make sure the energy equation is physically correct? I'm worried about whether my combustion model conserves the right quantities.

🎓

Great question. First, check your enthalpy formulation — combustion CFD should use total enthalpy (static enthalpy plus kinetic energy) as the transported quantity, not static temperature. The heat release from combustion must be included as a source term based on the species consumption rates. Post-simulation, do an energy balance: integrate heat flux through all boundaries and check it matches the fuel heat input minus the work output. A mismatch of more than 1–2% suggests a setup error. Also verify your specific heat $c_p(T)$ curves are accurate — for combustion gases above 1000 K, $c_p$ increases significantly and using a constant value introduces substantial error.

6.1 Compressible Flow: Stagnation Properties

For high-speed flows, CAE engineers work with stagnation (total) properties that account for kinetic energy:

$$T_0 = T + \frac{V^2}{2c_p}, \qquad P_0 = P\left(\frac{T_0}{T}\right)^{\gamma/(\gamma-1)}$$

The stagnation temperature is conserved in adiabatic flows (even with friction). Stagnation pressure is conserved only in isentropic flows — any irreversibility reduces $P_0$. Total pressure loss is therefore a direct measure of flow irreversibility in compressors, turbines, and duct systems.

6.2 Engine Simulation (1D Thermodynamics)

Tools like GT-Power, Ricardo WAVE, and AVL BOOST model internal combustion engines as networks of control volumes connected by pipes. Each cylinder is modeled using the first law applied to the open system:

$$\frac{dU}{dt} = \dot{Q}_{\text{comb}} - \dot{Q}_{\text{wall}} - P\frac{dV}{dt} + \sum_i \dot{m}_i h_i$$

The Wiebe function models the rate of heat release (mass fraction burned) during combustion:

$$x_b(\theta) = 1 - \exp\!\left[-a\left(\frac{\theta - \theta_0}{\Delta\theta}\right)^{m+1}\right]$$

where $\theta$ is crank angle, $\theta_0$ is the start of combustion, $\Delta\theta$ is the combustion duration, and typical values are $a = 5$, $m = 2$ for SI engines.

6.3 Turbocharger Matching

Turbocharger matching uses thermodynamic relations to select the optimal compressor and turbine. The compressor power must equal turbine power (minus bearing losses):

$$\dot{m}_c c_p (T_{c2} - T_{c1}) = \dot{m}_t c_p (T_{t3} - T_{t4}) \cdot \eta_{\text{mech}}$$

Operating points are plotted on compressor maps ($\Pi$ vs. corrected mass flow $\dot{m}\sqrt{T_0}/P_0$) to verify surge margin and choke avoidance over the entire engine speed range.

6.4 Thermodynamic Consistency Checks for CFD