Polytropic Process Simulator Back
Thermodynamics

Polytropic Process Simulator

Visualise a polytropic process — a gas changing state along the law P·Vⁿ = constant. Move the polytropic exponent n with a slider and the isobaric, isothermal, adiabatic and isochoric processes switch continuously within one model, while the final pressure, temperature ratio, work, heat and internal-energy change update in real time.

Parameters
Polytropic exponent n
Sweeps continuously: 0 = isobaric, 1 = isothermal, γ = adiabatic, ∞ = isochoric
Initial pressure P₁
kPa
Pressure at state 1. Around 100 kPa for naturally aspirated air
Initial specific volume v₁
m³/kg
Volume per unit mass at state 1
Volume ratio V₂/V₁
Below 1 means compression, 1 means no change. Sets the final volume
Specific-heat ratio γ
c_p/c_v. About 1.40 for air, about 1.67 for a monatomic gas
Results
Final pressure P₂ (kPa)
Temperature ratio T₂/T₁
Work W (kJ/kg)
Heat Q (kJ/kg)
Internal-energy change ΔU (kJ/kg)
Process type
P-V diagram — process animation

The bold curve is the polytropic process for the current exponent n (state 1 → 2). The faint curves are the isothermal (n = 1) and adiabatic (n = γ) processes through the same start point for comparison. The shaded area is the work done by the gas.

P-V curve (pressure vs volume)
Work vs polytropic exponent n
Theory & Key Formulas

$$P\,V^{n}=\text{const},\qquad \frac{T_2}{T_1}=\left(\frac{V_1}{V_2}\right)^{n-1}$$

The defining law of a polytropic process and the temperature ratio. n is the polytropic exponent, V is specific volume, T is absolute temperature. A compression (V₂<V₁) raises the temperature.

$$W=\frac{P_1V_1-P_2V_2}{n-1}\quad(n\ne1)$$

Work done by the gas (n≠1). For the isothermal case n=1, the 0/0 limit gives W=P₁V₁·ln(V₁/V₂).

$$\Delta U=c_v(T_2-T_1),\qquad Q=\Delta U+W$$

Internal-energy change and the heat from the first law of thermodynamics. c_v=R/(γ−1), R=287 J/(kg·K). n=0,1,γ,∞ recover the isobaric, isothermal, adiabatic and isochoric processes.

What is the Polytropic Process Simulator?

🙋
In thermodynamics class we learned four separate processes — isobaric, isothermal, adiabatic and isochoric. Is the "polytropic process" a fifth, different one?
🎓
Good question — it is actually the opposite. The polytropic process is a kind of "parent" that wraps all four into one. Its law is the simple expression P·Vⁿ = constant, and by changing a single number n, the polytropic exponent, you move continuously between the four. Try sweeping n from 0 to 3 with the slider on the left: n = 0 gives isobaric, n = 1 gives isothermal, n = γ gives adiabatic, and a very large n approaches isochoric. Picture the four separate "dots" being joined by a single "line".
🙋
Wow — one number switches between all of them? Then why does the work formula change only at n = 1? I can see the shaded area under the P-V curve is the work.
🎓
Sharp eye. Look at the general formula W = (P₁V₁ − P₂V₂)/(n − 1). If you plug in n = 1 the denominator becomes n − 1 = 0, so substituting directly gives 0 ÷ 0, which cannot be evaluated. But take the limit properly and at n = 1 the expression turns into the logarithmic form W = P₁V₁·ln(V₁/V₂) — the work of an isothermal process. This tool automatically switches to that logarithmic formula when n is very close to 1, so even setting the slider exactly to n = 1 never shows a strange value (NaN).
🙋
I see. But do real engines and compressors ever land exactly on n = 1 or n = γ?
🎓
That is exactly why the polytropic process is so useful. Real machines almost never land "exactly" on either. Take an air compressor. To make it perfectly isothermal (n = 1) you would need to cool it infinitely while compressing — impossible. To make it perfectly adiabatic (n = γ) not a single joule of heat may escape through the walls — but in reality some always does. So a real compressor is a "polytropic" with n somewhere between 1 and γ, say around 1.25 or 1.3. A reality that matches none of the ideals can be captured with an n between 1 and γ.
🙋
Then how do you find the n of a real machine? Is it fixed automatically when you design it?
🎓
You measure it. You record pressure and volume on the real machine and fit that P-V data to P·Vⁿ = constant. Take the logarithm of both sides and log P versus log V becomes a straight line, whose slope is n. Once you have n, the work, heat and temperature rise all follow by calculation — exactly what this tool does. Rating compressors and engines by their "polytropic efficiency" is completely standard in practice. Describing a whole reality with one exponent is the strength of the polytropic process.
🙋
One last thing — when I compress the gas, the "Work W" comes out negative. That is not a bug, right?
🎓
Not a bug — it is physically correct. The W in this tool uses the sign convention "work done by the gas". In a compression you push the gas in from outside, so the gas is on the receiving end of the work. Therefore the work done by the gas W comes out negative. With the default settings W ≈ −123 kJ/kg, meaning you supplied about 123 kJ from outside to compress one kilogram of air by this ratio. Expand the gas instead and the sign flips to positive. Which direction of work the sign refers to is always the first thing to check in thermodynamics.

Frequently Asked Questions

A polytropic process is any process in which a gas changes state while keeping P·Vⁿ = constant. Here n is a single number called the polytropic exponent, and by varying just this n you continuously recover the four idealised processes taught separately in a first thermodynamics course: n = 0 is constant-pressure (isobaric), n = 1 is constant-temperature (isothermal), n = γ (the specific-heat ratio) is reversible adiabatic, and n → ∞ is constant-volume (isochoric). Because real compressions and expansions behave somewhere between isothermal and adiabatic, the polytropic process is the model most used to describe reality.
For the general case where n ≠ 1, the work done by the gas is W = (P₁V₁ − P₂V₂)/(n − 1), with pressures in Pa and specific volumes in m³/kg. When n is exactly 1 (isothermal) this formula becomes 0/0, so a special expression W = P₁V₁·ln(V₁/V₂) is used instead. For a compression (V₂ < V₁) the gas has work done on it, so the work done by the gas W is negative. This tool automatically switches to the isothermal formula near n = 1, so the result stays continuous and never returns NaN.
You fit measured pressure-volume data to P·Vⁿ = constant: take the logarithm of both sides and read n from the slope of the resulting straight line. For an air compressor, n lies between 1 (perfectly isothermal, requiring infinite cooling) and γ ≈ 1.4 (perfectly adiabatic, zero heat loss), and in practice is often around n = 1.2 to 1.35. The better the cooling, the closer n is to 1; the more adiabatic, the closer it is to γ. Once n is known, the work, heat and temperature rise all follow by calculation.
At n = 0, P·V⁰ = P = constant, so the pressure does not change — a constant-pressure (isobaric) process. At n = 1, P·V = constant, so the temperature does not change — an isothermal process (Boyle's law). At n = γ the process is reversible and adiabatic (isentropic), with no heat crossing the boundary. As n → ∞, P^(1/n)·V = constant forces the volume to stay fixed — a constant-volume (isochoric) process. Being able to sweep one exponent n continuously and cover all four basic processes in a single framework is the greatest strength of the polytropic model.

Real-World Applications

Performance rating of air compressors: A factory air compressor, which draws in air and raises it to high pressure, is a textbook polytropic machine. Ideally an isothermal compression (n = 1) would take the least work, but that needs infinite cooling and is impossible. Real compressors run at roughly n = 1.2 to 1.35 depending on how well wall cooling and intercoolers work. By fitting the measured P-V diagram to find n and computing the work as this tool does, engineers can quantify how far the machine is from the ideal, and how many kilowatts stronger cooling would save.

Compression and expansion strokes of internal-combustion engines: The compression and expansion inside a gasoline or diesel cylinder are not pure adiabatic processes either. During the pre-combustion compression stroke the charge loses heat to the cylinder walls, and the post-combustion expansion stroke also loses heat. Engine analysts therefore treat each stroke as a polytropic process, using measured values such as n ≈ 1.3 for the compression stroke and n ≈ 1.3 to 1.35 for the expansion stroke in cycle calculations. Capturing a heat-loss-inclusive reality with one exponent is the advantage.

Gas turbines and the design of compressor and turbine stages: In the axial compressor and turbine stages of a gas turbine, friction between the flow and the blades and the exchange of heat make each process deviate from the ideal adiabatic. The standard industry approach is to express this with a polytropic efficiency, an efficiency that can be treated as constant even when the machine is split into many stages. In this tool, nudging n away from γ makes the heat Q move away from zero, which signifies that "deviation from adiabatic".

A foundation for thermodynamics education and understanding cycles: The polytropic process is the best teaching device for understanding the isobaric, isothermal, adiabatic and isochoric processes not as "scattered facts to memorise" but as a "continuum of one exponent n". Each stroke of the Otto cycle, the Brayton cycle and others can be positioned as a special case of a polytropic process. Sweeping n continuously in this tool and watching how the curvature of the P-V diagram and the signs of the work and heat change deepens the understanding of an entire cycle.

Common Misconceptions and Pitfalls

A common misconception is that the polytropic exponent n is a constant fixed by the properties of the gas. The specific-heat ratio γ is a material property determined by the type of gas (air, carbon dioxide, helium and so on), but n is not a material property. n is a number describing a property of the process — how much heat crosses the boundary — and for the same air, strong cooling brings n close to 1 while a more adiabatic path brings it close to γ. Make the distinction clear from the start: n belongs to the process, not to the gas. That is exactly why this tool puts γ and n on separate sliders.

Next, confusing the sign conventions for work W and heat Q. The first law of thermodynamics is written as Q = ΔU + W (with W the work done by the gas) in the engineering convention, but also as ΔU = Q − W elsewhere, and some textbooks define W as the work done on the gas — sign conventions are mixed. This tool standardises on "W = work done by the gas", so W is negative for a compression, and the heat is found from Q = ΔU + W. With the default settings, ΔU is positive (a temperature rise increases the internal energy), W is negative (compression), and their sum Q is negative (net heat rejection). When comparing with figures from other sources, always confirm which sign convention is used.

Finally, assuming that any polytropic process is reversible. The law P·Vⁿ = constant implicitly assumes the gas is in equilibrium at every point of the process — that it is quasi-static. A real rapid compression, or a flow with strong turbulence or shocks, is strictly not quasi-static and involves irreversibility from friction. An n obtained by fitting real machine data is an "apparent polytropic exponent" with irreversible losses hidden behind it. While n = γ exactly means "reversible adiabatic (isentropic)", an n measured on a real machine being close to γ only means the heat loss is small — it does not guarantee the process is fully reversible.

How to Use

  1. Set the polytropic exponent n (0.8–1.4) using the slider: n=1.0 is isothermal, n=1.4 is adiabatic for diatomic gases like air.
  2. Enter initial pressure P₁ (50–500 kPa) and initial volume V₁ (0.1–2.0 m³/kg) for your working fluid state.
  3. Define the volume ratio V₂/V₁ (0.2–5.0) to specify expansion or compression; simulator calculates P₂, T₂/T₁, work W, heat Q, and ΔU automatically.

Worked Example

Compress air in a piston-cylinder with P₁=100 kPa, V₁=0.5 m³/kg, volume ratio 0.4, and n=1.3 (near-adiabatic): the simulator returns P₂≈284 kPa, T₂/T₁≈1.14, W≈−32 kJ/kg (work input), Q≈−8 kJ/kg (heat rejection), ΔU≈−24 kJ/kg. Use these for turbomachinery or engine cycle analysis.

Practical Notes

  1. For real reciprocating compressors, n typically ranges 1.25–1.30 due to wall friction and incomplete adiabatic conditions; avoid n=1.4 unless testing theoretical limits.
  2. When n equals the heat-capacity ratio γ, the process is reversible and adiabatic (no heat transfer); verify Q output approaches zero.
  3. Work calculated per unit mass is ideal for sizing compressor power: multiply W by mass flow rate (kg/s) to get shaft power (kW).
  4. Temperature ratio T₂/T₁ directly governs material stress and cooling requirements; exceed 1.3 for uninsulated processes only with caution.