Saturday, 4 October 2025

Visualization of Mach Number at Supersonic and Sonic Speeds

Topic: Mach Number
Subject: Fluid Mechanics
Tool: Scilab

By: Gani Comia, October 2025

  • Definition of Mach Number

The Mach number is a dimensionless parameter in fluid dynamics that expresses the ratio between the flow velocity and the local speed of sound. It is named in honor of Austrian physicist and philosopher Ernst Mach.

$$M = \frac{u}{c}$$

where:
\(M\) – Mach number
\(u\) – local flow velocity with respect to the boundaries
\(c\) – speed of sound in the medium

The speed of sound depends on the square root of the thermodynamic temperature. By definition, \(\text{Mach} \; 1\) corresponds to a flow velocity \(u\) equal to the local speed of sound. At \(\text{Mach} \; 0.5\), \(u\) is half the speed of sound (subsonic), while at \(\text{Mach} \; 2.0\), \(u\) is twice the speed of sound (supersonic). Flow at \(\text{Mach} \; 5.0\) or higher is classified as hypersonic.

At standard atmospheric conditions – dry air at mean sea level and a temperature of \(15^\circ C\) – the speed of sound is approximately \(340.3 \; m/s\) or \(1,225.1 \; km/h\). The speed of sound is not constant; in gases, it increases in proportion to the square root of the absolute temperature. Since atmospheric temperature generally decreases with altitude above sea level, the speed of sound correspondingly decreases as well. 

Flight can be roughly classified in six speed categories:

  1. Subsonic: Mach < 0.8
  2. Transonic: Mach 0.8 - 1.2
  3. Sonic: Mach 1.0
  4. Supersonic: Mach 1.5 - 5.0
  5. Hypersonic: Mach 5.0 - 10.0
  6. Hypervelocity: Mach > 8.8

When an object moves faster than the speed of sound (Mach 1), a sudden change in air pressure forms in front of it. This change, called a shock wave, spreads backward in a cone shape known as the Mach cone. The shock wave creates the sonic boom we hear when a fast aircraft passes by. As the object goes faster, the cone becomes narrower; just above Mach 1, it looks almost flat.

For further information on the Mach number, refer to the article “Mach number” in Wikipedia: The Free Encyclopedia.

  • Understanding Mach Number Through Visualization

Figure 1 shows a fighter jet flying at a supersonic speed of \(Mach \; 2.0\). The cloud that forms around the aircraft at this speed is called a vapor cone or shock collar. It appears as a visible cloud of condensed water vapor caused by a sudden drop in air pressure and temperature as the jet nears the speed of sound.

Figure 1. Eurofighter Jet at Supersonic Speed Showing Vapor Cone (Shock Collar).

This article provides a Scilab script to visualize the relative speed of an object and the propagation of sound waves, as shown in Figure 2, where the object moves at Mach 2.0. The dashed circle represents the propagation of the shock wave from its center and the object’s previous position.

Figure 2. Supersonic Speed Simulation at Mach 2.0.

For comparison, Figure 3 illustrates an object moving at the speed of sound along with the resulting shock wave propagation.

Figure 3. Sonic Speed Simulation (Mach 1.0).

  • Scilab Code for Figure 2.

// Copyright (C) 2025 - Gani Comia
// Date of creation: 19 Sep 2025
// Script: Supersonic Speed Simulation and Mach Cone
clear;clc;

// primary parameters
M = 2;                      // Mach number (supersonic > 1)
S = 1;                      // speed of sound
mu = asind(S./M);           // angle of mach cone
dist = 1:10;                // object position by a factor of speed of sound
N = length(dist);           // number of positions

// secondary parameters
a = 1:10                    // object position at x-direction
b = 0                       // object position at y-direction

// visualization of object's position and shock wave propagation
clf;
g = gcf()
g.figure_size = [700,700]
for i = 1:N
    plot(dist,0,"ko","linewidth",5)
    theta = 1:360
    r(i) = sind(mu).*(N-i)
    x(i,:) = r(i)*cosd(theta) + a(i);
    y(i,:) = r(i)*sind(theta) + b;  
    plot(x(i,:),y(i,:),"r--") 
    a1 = legend(["Moving Object","Shock Wave"],with_box=%f)
    a1.font_size = 2.5
end

title("Supersonic Speed Simulation at Mach 2.0 in 1D", "fontsize",4)
xlabel("Object Position / Shock Wave Propagation","fontsize",3.5)
ylabel("Shock Wave Propagation","fontsize",3.5)
xgrid(color("grey"),1,7)
a2 = xstring(6.5,4,"https://gani-mech-toolbox.blogspot.com")
a2.font_size = 2.5

// mach cone plot and visualization
x_val = [a(1)+r(1).*cosd(90-mu) a($)]
y_val = [r(1).*sind(90-mu) 0]
slope = diff(y_val)./diff(x_val)
disp(slope)
// straight line using slope-intercept formula, y = mx + b, and
// solve for y-intercept, b, at x = 0
y_int = y_val(1) - slope.*x_val(1)
disp(y_int)

x_val_new = [0 a($)]
y_val_new_1 = [y_int 0]
y_val_new_2 = [-y_int 0]
plot(x_val_new,y_val_new_1,"b-","linewidth",3)
plot(x_val_new,y_val_new_2,"b-","linewidth",3)
a3 = xstring(x_val(1),y_val(1),"Mach Cone",mu-6)
a3.font_size = 3
a4 = xstring(x_val(1),-y_val(1)-0.7,"Mach Cone",mu-56)
a4.font_size = 3

ax = gca()
ax.data_bounds = [0 -5 ; 12 6];
//disp(r)

Feel free to comment for inquiry, clarification, correction or suggestion for improvement. Drop your email to make a request to the author.

Disclaimer: The formulas and calculations presented are for technical reference only. Users must verify the accuracy and ensure compliance with applicable engineering standards, codes, and safety requirements before practical application.

References

  1. “Mach number”. Wikipedia The Free Encyclopedia. 10 September 2025.  https://en.wikipedia.org/wiki/Mach_number
  2. Eurofigther Typhoon Jets at Mach 2. ChatGPT Image. 20 September 2025.

No comments:

Post a Comment

Visualization of Mach Number at Supersonic and Sonic Speeds

Topic: Mach Number Subject: Fluid Mechanics Tool: Scilab By: Gani Comia, October 2025 Definition of Mach Number The Mach number ...