Shockwaves are a complex physical phenomenon. When an object’s velocity exceeds the speed of sound in a medium, shockwaves are generated at the places where the object’s surface changes. Shockwaves can occur in gases as well as liquids, although they are less common in liquids due to its higher speed of sound. One of the most common instances of a shockwave being generated is when an aircraft breaks the sound barrier (at approximately 340 meters per second) while flying within the Earth’s atmosphere. Additionally, shockwaves can be generated in other various situations, such as within supersonic aircraft engines and nozzles, explosives, and more.

When an aircraft is flying at supersonic speeds, the air in front of the aircraft experiences a sudden compression, forming a concentrated compression interface known as a shockwave. Shockwaves exhibit strong nonlinearity. When passing through a shockwave, the properties of the medium (typically gas) such as pressure, density, and temperature, undergo a sudden increase while the velocity abruptly decreases. Essentially, this is a process where kinetic energy is converted into pressure energy. Additionally, the rapid increase in pressure results in a loud sonic boom, as some of the energy is transformed into acoustic wave energy. Due to the abrupt change in gas density at the shockwave location, we can capture images of shockwaves. In modern designs of almost all supersonic wind tunnels, observation ports or recording positions are included.

The thickness of a shockwave depends on the type of gas, and the velocity of the moving object. In the case of an ideal gas, shockwaves have no thickness and are considered as physical discontinuities. However, real gases have viscosity and thermal conductivity, which makes shockwaves continuous but still very thin. In engineering, shockwaves are often approximated as discontinuities. Moreover, as the Mach number increases, the shockwave thickness decreases.

In engineering, we often need to consider the changes in pressure, and velocity of the fluid before and after a shockwave. The traditional approach uses the method of characteristics, along with consulting manuals and charts to find the pressure and velocity transformations for a specific gas. Nowadays, with the maturity of CFD (Computational Fluid Dynamics) technology, we can obtain preliminary numerical solutions on a computer within minutes. Furthermore, we can obtain more complex results involving multiple interacting shockwaves.

Numerically, due to the distinct discontinuities associated with shockwaves, traditional finite element methods may not be the most suitable. However, finite volume methods (FVM) with Riemann solvers as the core algorithms have shown great adaptability in the CFD field, especially in the realm of compressible fluid dynamics. Therefore, in the CFD field, particularly in compressible fluid CFD, FVM has excelled.

## Performing Supersonic CFD Simulations with SU2 and WELSIM

Below, we’ll demonstrate how to conduct transient CFD analysis for supersonic flow using examples.

(1) Open WELSIM to create a new project. We’re using a two-dimensional model as an example, so set the model as a 2D transient fluid model.

(2) Import the geometric model.

(3) Mesh the geometry with a maximum element size set to 0.001 m.

(4) Set the time step for the solver to 5e-7 seconds, with a total simulation time of 0.002 seconds.

(5) Utilize the SU2 solver.

(6) Employ the RANS equations for compressible fluid as the governing equation, and set Spalart-Allmaras as the turbulence model.

(7) Configure the solver’s parameters.

(8) Set the conditions for the free-stream field. Here, specify a Mach number of 1.5, zero angle of attack, a pressure of 5.38e4 Pa, temperature of 210K, and a Reynolds number of 1.35e6.

(9) Define the boundary conditions at the inlet, which are numerically similar to the free-stream conditions.

(10) Set the boundary conditions at the outlet.

(11) Specify the symmetry boundary conditions.

(12) Set the thermal boundary conditions to a value of zero, indicating no convective heat transfer. This condition is similar to a wall.

Click the Solve button. Since this is a transient simulation, it will require a significant amount of physical computation time based on the mesh density and duration. After the calculation is complete, add nodes for Mach number and pressure results. Also, display contour plots. The following figures show the Mach number in the flow field at 0.002 seconds and the pressure field at 0.00125 seconds. Clearly, shockwaves are generated and interact with each other.

The calculation results for this example are available in the following videos:

Pressure Field.

CFD for supersonic fluid with shock waves. Mach number is 1.5. Pressure result

Velocity Field.

CFD for supersonic fluid with shock waves. Mach number is 1.5. Pressure result

Additionally, this example includes automated regression testing in WELSIM, which is beneficial for long-term maintenance of the solver and front-end software. The test files have been open-sourced and shared on GitHub at the following address:

https://github.com/WelSimLLC/WelSimAutoTests

## Conclusion

Simulations of supersonic flow with shockwaves demand high mesh density, with certain areas requiring increased density and others needing lower density in order to save computational resources. Adaptive meshing can significantly improve computational efficiency. Modern CFD software also reduces physical computation time through GPU parallelization.

SU2 is an excellent open-source CFD solver with good performance and user-friendly protocols. It can rapidly solve transient supersonic flow problems with shockwaves. WELSIM simplifies the application of SU2 thanks to its user-friendly graphical interface. WELSIM seamlessly integrates with SU2 for solving and displaying results, or generating the SU2 input files that users need. Currently, WELSIM is one of the best pre-and post-processing software solutions for SU2 worldwide.

*WELSIM is the #1 engineering simulation CAE software for the open-source community.*