Control Room Omar
Menu

Case Study

Shock Wave Locator Tool for Converging-Diverging (CD) Ducts

Developed a high-fidelity MATLAB tool to predict shock wave locations and map fluid property distributions in CD ducts.

2024-11-28 Digital Tools & Analysis University
Cover for Shock Wave Locator Tool for Converging-Diverging (CD) Ducts

My Role

Lead Developer and System Integrator; designed the core shock detection algorithms and integrated multi-module conversion systems.

Outcome

Automated the identification of five distinct flow regimes and provided real-time visualization of Mach, pressure, and temperature gradients.

Tools

MATLAB Engineering Analysis

TL;DR

This project features a robust computational tool designed to analyze and predict shock wave behavior within converging-diverging (CD) ducts. By integrating complex fluid dynamics equations into a modular MATLAB environment, the tool enables engineers to simulate various duct geometries, pinpoint precise shock locations, and visualize critical flow properties—including Mach number, pressure, and temperature—in real-time.

Problem

In high-speed aerodynamics, determining the exact location of a traveling shock wave is critical for the design of engines and nozzles. Manually calculating these positions using Rankine-Hugoniot relations and area-Mach relations becomes computationally intensive and prone to error when navigating non-linear duct geometries. Engineers require a specialized tool capable of:

  1. Handling Variable Geometry: Supporting both linear and quadratic wall profiles to accommodate diverse engineering specifications.
  2. Automating Iteration: Solving complex transcendental equations for Mach numbers across varying cross-sections automatically.
  3. Identifying Regimes: Instantly classifying flow into specific categories, such as Venturi, Overexpanded, or Underexpanded states.

Design Iterations

The development followed a modular engineering methodology to ensure both scalability and precision:

  1. Geometry Modeling: The initial phase focused on the Duct_Area module. We implemented logic to calculate cross-sectional areas based on user-defined “Linear” or “Quadratic” profiles, ensuring that physical geometry was accurately modeled before fluid calculations commenced.
  2. Fluid Property Mapping: A solver utilizing fsolve was developed to determine Mach numbers from area ratios. This module calculates the distribution of pressure (PP), temperature (TT), and velocity (VV) along the duct, providing a continuous dataset for downstream analysis.
  3. Shock Detection Logic: A core innovation of the system is the iterative “Shock Detector.” By comparing calculated exit pressures against user-defined targets, the system identifies the specific point where a shock wave occurs and calculates the resulting jump in properties.
  4. Unit Standardization: To ensure industrial applicability, a dual-layer conversion system was implemented to handle both SI and Imperial units seamlessly, allowing for immediate integration into international engineering workflows.

Technical Details

The tool’s architecture is built upon several core computational pillars:

  • Area-Mach Relation Solver: Utilizing the relationship between the area ratio (A/AA/A^*) and the Mach number, the system solves for MaMa at every point along the duct profile.
  • Shockwave Detection Algorithm: The Shockwave_Detector module iterates backward from the exit to locate the precise point where pressure matches target conditions. It employs Rankine-Hugoniot relations to calculate the jump in properties across the shock wave.
  • Regime Classification (RPC Criterion): The SWcheck module implements a logic gate to determine the flow regime based on the pressure ratio at the exit (Pe/P0P_e/P_0). This allows users to instantly identify if the duct is in a Venturi, Overexpanded, or Underexpanded state.
  • Automated Visualization: The Properties_Plot module dynamically generates high-fidelity graphs for Mach number, pressure, and temperature, providing a comprehensive visual map of fluid behavior.

Results & Key Metrics

The final tool provides a high-fidelity analysis of internal flow dynamics:

  • Precision Mapping: Accurately calculates PP, TT, VV, and MaMa at both the throat and the shock wave location.
  • Automated Detection: Pinpoints the exact index of the shock wave within the duct’s geometry, removing manual calculation errors.
  • Multi-Regime Support: Correctly identifies and displays five primary flow regimes (Venturi, Overexpanded, Underexpanded, Shock at Exit, and Standard Shock).
  • Versatile Geometry: Supports both linear and quadratic profiles to accommodate complex engineering designs.

The following visualizations demonstrate the tool’s ability to map fluid properties and identify shock locations across various configurations.

A screenshot of the MATLAB tool's interface, showcasing the calculated Mach number distribution along a converging-diverging duct with a detected shock wave.
Frameworks & Tooling