Virtual Expo 2025

Implementing ML-Based Shock Wave Detection in Supersonic Flows Using ANSYS Fluent

Envision Piston

GOOGLE MEET LINK: https://meet.google.com/ure-phms-nso

AIM:Implementing ML-Based Shock Wave Detection in Supersonic Flows Using ANSYS Fluent.

TECHNOLOGIES USED:

  • ANSYS FLUENT
  • PYTHON

LITERATURE SURVEY:

PYTHON: Python is a high-level, general-purpose programming language. Its design philosophy emphasizes code readability with the use of significant indentation. It supports multiple programming paradigms, including structured, object-oriented, and functional programming.

ANSYS Fluent : is a powerful, general-purpose Computational Fluid Dynamics (CFD) software. Its design philosophy emphasizes flexibility and accuracy in simulating fluid flow, heat transfer, and chemical reactions. Fluent supports multiple modeling approaches, including steady-state, transient, laminar, and turbulent flows, enabling engineers and researchers to analyze and optimize complex fluid systems with precision.

METHODOLOGY:

  • CFD Simulation in ANSYS Fluent

The geometry considered for the study is that of a Raptor-2 rocket nozzle. To accurately capture flow features, especially shock structures, a refined adaptive meshing strategy is employed, with higher resolution concentrated near shock regions. The simulations are carried out using a density-based, steady-state CFD solver, which is well-suited for compressible flows involving shocks. For shock identification, key flow metrics such as pressure and density gradients, Mach number contours, and velocity divergence are analyzed to detect and characterize shock waves within the nozzle flow field.

DIMENSIONS:

  • Chamber width = 0.3m

  • Chamber length= 1.3m 

  • End of chamber to throat end length = 0.3m

  • Throat diameter = 0.2 m 

  • Length from base = 0.1m (half nozzle)

  •  Throat to exit length = 1.5m

  • Total length=3.1m

BOUNDARY CONDITIONS:

  • INLET: Pressure inlet
    • static pressure=3000000

    • outlet pressure=2500000

    • thermal temp=3000K

  • OUTLET: 
    • static gauge pressure=0
    • thermal temp=300K
  • WALLS:

PROCEDURE:

  • The Raptor-2 nozzle was modeled using Design Modeler and refined adaptive meshing was applied near expected shock regions.
  • A density-based, steady-state CFD solver was configured with the k-ω SST turbulence model and appropriate boundary conditions.
  • Shock structures were identified and visualized by analyzing pressure/density gradients, Mach contours, and velocity divergence

RESULTS:

  • Contour of Velocity:

The Velocity/Mach number contour clearly reveals a transition from subsonic to supersonic flow after the throat. A localized change in gradient near the throat signals a shock or expansion wave, useful for detecting the shock position and flow regime.

  • Contour of Static Presssure:

The static pressure contour shows a sudden drop near the nozzle throat, indicating a shock transition region. This pressure gradient helps identify shock location and its strength within the supersonic expansion.

  • Temperature Contour:

A sharp temperature decrease is observed after the throat, consistent with the expansion through a shock. The gradient in static temperature provides additional evidence of rapid thermodynamic changes across the shock.

  • Artificial Neural Network(ANN) Modelling

DATASET COLLECTION:

  • The data were extracted from the Mach number contours.
  • The data were set as Mach Number versus Position.
  • The coordinates were defined from x_0 = 0 to x_1 = 3.1, with y = 0.1.
  • These definitions provided a dataset of values that were used to identify shock and no-shock regions.

SPLIT DATASET:

  • Split normalized data into 80% training and 20% testing using train_test_split.

BUILD ANN MODEL:

  • Initialize a Sequential model.
  • Add First Hidden Layer: 10 neurons, ReLU activation.
  • Add Second Hidden Layer: 10 neurons, ReLU activation.
  • Add Output Layer: 1 neuron , outputs a single continuous value of Mach Number

COMPILE MODEL:

  • Optimizer: Adam
  • Loss Function: Mean Squared Error (MSE)

TRAIN MODEL:

  • ANN was trained using 300 epochs each of batch size 32.

PLOT RESULTS:

  • The plot provides the Actual vs Predicted results for Mach Number.

RESULTS:

The final outcome of the project is a trained Artificial Neural Network (ANN) model that accurately predicts Mach number along the length of a rocket nozzle, effectively capturing shock wave behavior based on position data. The ANN demonstrated high accuracy in replicating CFD-derived Mach profiles, with sharp gradients indicating shock locations. 

This approach significantly reduces computational cost and post-processing time compared to traditional CFD methods, enabling faster and automated shock detection. The model provides a foundation for real-time aerodynamic optimization and can be integrated into control systems or extended for more complex 2D/3D analysis.

 

 

 

 

 

 

        

 

 

FUTURE SCOPES:

Future work can extend this 1D ANN shock-prediction to full 3D CFD data—training lightweight CNNs that handle complex nozzle and airframe geometries—and integrate them into real-time flight control or inlet-throat actuation systems. By combining ML with adaptive meshing and reinforcement-learning-based flow control, you could dynamically optimize nozzle performance or drag reduction in flight.

Transfer-learning techniques would let you apply a single shock-model across multiple geometries, while model quantization and TinyML approaches could deploy these predictors on embedded avionics for onboard, real-time shock detection and thermal-load estimation.

REFERENCES:

https://hal.science/hal-04536141

ACKNOWLEDGEMENT:

As executive members of IEEE NITK, we are incredibly grateful for the opportunity to mentor our juniors on this project under the prestigious name of the IEEE NITK Student Chapter. We want to extend our heartfelt thanks to IEEE for providing us with the funds to complete this project successfully.

 

 

 

 

 

Report Information

Explore More Projects

View All 2025 Projects