Gas Dynamics Back
Compressible Flow

Gas Dynamics & Compressible Flow Calculator

Real-time calculation of all isentropic, normal shock, Rayleigh, and Fanno flow parameters from Mach number and specific heat ratio. Covers nozzle design, supersonic wind tunnels, and rocket propulsion.

Flow Parameters
Mach Number M
Subsonic M<1 / Supersonic M>1
Specific Heat Ratio γ
Air=1.40 / He=1.67 / CO₂=1.30
Stagnation Temperature T₀
K
Stagnation Pressure p₀
kPa
Display Mode
Mach M
Static T [K]
Static p [kPa]
Flow V [m/s]
Mach Number vs Pressure & Temperature Ratios
Main
Nozzle Area Ratio A/A*
Area

Isentropic relations:

$$\frac{T_0}{T}= 1 + \frac{\gamma-1}{2}M^2$$ $$\frac{p_0}{p}= \left(1 + \frac{\gamma-1}{2}M^2\right)^{\gamma/(\gamma-1)}$$ $$\frac{A}{A^*}= \frac{1}{M}\left[\frac{2}{\gamma+1}\left(1+\frac{\gamma-1}{2}M^2\right)\right]^{(\gamma+1)/(2(\gamma-1))}$$

Normal shock (Rankine-Hugoniot):

$$M_2^2 = \frac{M_1^2(\gamma-1)+2}{2\gamma M_1^2 - (\gamma-1)}$$ $$\frac{p_2}{p_1}= \frac{2\gamma M_1^2-(\gamma-1)}{\gamma+1}$$
CFD Integration These analytical solutions are used to verify (V&V) CFD solver results from OpenFOAM, Fluent, etc. For supersonic nozzles, shock tubes, and aircraft engine inlet analyses, comparison with analytical solutions is always required. Fanno and Rayleigh flow are used for 1D estimation of Rayleigh friction losses and combustion heating.

What is Compressible Flow?

🙋
What exactly is "compressible" flow? I thought air was always a gas, so isn't it always compressible?
🎓
That's a great starting point. Basically, all gases can be compressed, but in many engineering flows, the density change is so tiny we ignore it. Compressible flow is when the gas speed is high enough—typically above Mach 0.3—that density changes become significant and must be accounted for. In this simulator, the key parameter is the Mach number (M), which you can adjust with the slider. Try setting it to 0.1 and then to 0.8, and watch how the calculated properties change much more dramatically at the higher speed.
🙋
Wait, really? So what's the big deal with the "stagnation" properties, like T₀ and p₀? Why are they always higher than the regular ones?
🎓
In practice, stagnation properties are super useful. They represent the temperature and pressure you would measure if you could magically slow the fast-moving fluid down to zero speed without losing any energy (that's the "isentropic" part). The energy from the motion gets converted into heat and pressure. For instance, the leading edge of a jet engine inlet is a stagnation point. In the simulator, you input T₀ and p₀ as your known reference conditions. When you increase the Mach number, you'll see the calculated static temperature (T) and pressure (p) drop because more energy is tied up in the fluid's velocity.
🙋
Okay, that makes sense. But what's the "Specific Heat Ratio" (γ) for? Why is it a separate input?
🎓
Ah, γ defines the "personality" of the gas! It's the ratio of specific heats ($c_p/c_v$) and depends on the molecular structure. For air (mostly diatomic), it's about 1.4. For monatomic gases like helium, it's 1.67. This value changes how the gas responds to compression. A common case is in rocket engines, where the exhaust gas might be mostly steam (γ ≈ 1.33). Change γ in the simulator and you'll see the pressure ratio $p_0/p$ change for the same Mach number. It's a powerful way to see how different gases behave.

Physical Model & Key Equations

The core of isentropic flow is the relationship between velocity (expressed as Mach number M) and thermodynamic properties. The total (stagnation) energy per unit mass is constant. This leads to the temperature ratio:

$$\frac{T_0}{T}= 1 + \frac{\gamma-1}{2}M^2$$

Where $T_0$ is the stagnation temperature, $T$ is the static temperature, $\gamma$ is the specific heat ratio, and $M$ is the Mach number. The term $\frac{\gamma-1}{2}M^2$ represents the conversion of kinetic energy into thermal energy.

Assuming an isentropic (reversible and adiabatic) process, we can relate pressure and density to temperature. The pressure ratio is derived from the temperature ratio and the isentropic relation:

$$\frac{p_0}{p}= \left(1 + \frac{\gamma-1}{2}M^2\right)^{\gamma/(\gamma-1)}$$

Here, $p_0$ is the stagnation pressure and $p$ is the static pressure. The exponent $\gamma/(\gamma-1)$ comes from the isentropic relation $p/\rho^\gamma = constant$. This equation shows that pressure changes are even more sensitive to Mach number than temperature changes.

Frequently Asked Questions

Please check whether the input values are in a physically invalid range (e.g., Mach number is negative, specific heat ratio is less than 1). Also, ensure that JavaScript is enabled in your browser. Enter numbers in half-width characters and use "." for the decimal point.
Isentropic flow is used for designing nozzles or accelerating flows without friction or heat. Normal shock waves are used to calculate pressure and temperature increases when supersonic flow decelerates abruptly. Use them to verify conditions such as shock wave occurrence at the nozzle exit.
Yes, it is possible. Using the isentropic flow relations, you can calculate the area ratio and pressure ratio corresponding to the nozzle exit Mach number. However, since actual design also requires consideration of the combustion gas specific heat ratio and chemical reaction effects, please use this tool for basic parameter understanding.
Rayleigh flow analyzes changes in flow due to heating or cooling (e.g., heat exchangers), while Fanno flow analyzes changes due to friction (e.g., long pipes). Both are constant-area flows and are useful for examining behavior as the Mach number approaches 1.

Real-World Applications

Jet Engine & Aircraft Inlet Design: Engineers use these isentropic relations to design the inlet diffuser that slows down incoming air from flight speed (e.g., Mach 0.8) to a lower speed suitable for the compressor. The calculated pressure rise ($p_0/p$) is critical for predicting engine performance and efficiency.

Supersonic Wind Tunnels & Nozzles: To achieve supersonic flow in a test section, a convergent-divergent (de Laval) nozzle is used. The design is entirely based on isentropic flow relations to expand the gas to the desired Mach number, ensuring the static pressure and temperature in the test section are correct for model testing.

Rocket Nozzle Expansion: In rocket engines, the hot gas expands isentropically through the nozzle to produce thrust. The exit Mach number and the corresponding pressure ratio determine the thrust efficiency. The specific heat ratio (γ) is crucial here as it changes with the combustion products.

CFD Solver Verification & Validation (V&V): Before running complex 3D simulations in software like ANSYS Fluent or OpenFOAM for a new intake design, engineers first calculate the 1D isentropic flow solution using these exact equations. The CFD results are then compared against this analytical benchmark to ensure the solver is set up correctly—a fundamental CAE practice.

Common Misunderstandings and Points to Note

First, note that the "stagnation temperature" is not the actual temperature you would feel. When you increase the Mach number in the simulator, T₀ (stagnation temperature) rises significantly, but this is the temperature at a hypothetical wall that completely stops the flow. Actual vehicle surfaces are not adiabatic, so they do not get that hot. For example, even if T₀ shows about 520K (approx. 250°C) at M=2, the vehicle's surface temperature is lower. In thermal design, failing to understand this difference can lead to over-engineered cooling systems.

Next, the pitfall of the "isentropic" assumption. This tool's basic calculations are for an "ideal flow," ignoring friction, shock waves, and heat transfer. In practice, it's crucial to discern where this assumption holds. For instance, friction at the nozzle wall (boundary layer) can cause actual thrust to be a few percent lower than the calculated value. The typical workflow is to first find the ideal solution with this tool, then apply loss coefficients to estimate the real-world value.

A common parameter-setting mistake is carelessly fixing the specific heat ratio γ. For air, 1.4 is generally fine, but rocket combustion gases can range from about 1.2 to 1.3 depending on composition. Changing γ significantly alters the achievable Mach number for the same area ratio. For example, with A/A*=4, M≈2.94 for γ=1.4, but M≈3.65 for γ=1.2. Try changing γ in the tool to see firsthand how sensitive nozzle design is to gas properties.