Challenge

Numerical simulation of shock wave dynamics in a shock tube

I. Aim: 3D CFD analysis of shock waves in a shock tube using Converge CFD.

II. Problem Statement: Perform 3D transient analysis of shock waves generating in a tube due to rupture of barrier between high pressure and low-pressure regions. The case setup is done using ConvergeCFD and simulation is run in the CYGWIN terminal. Further, post-processing is done using Converge CFD and ParaView. The main objective of this project is to check how shock waves are generated and rebound in a closed tube using ConvergeCFD.

III Objectives:

  • Setup a transient shock tube simulation
  • Plot the pressure and temperature history in the entire domain - Explain the result
  • Plot the cell count as a function of time - Explain the result
  • Upload a shock wave animation on Youtube and provide the Youtube link for animation in your report.

IV: Solving & Modelling approach:

3D transient CFD analysis of shock waves generated in a closed rectangular tube due to pressure barrier rupture case is set up in ConvergeCFD and then running the solution in CYGWIN terminal. Nitrogen(N2) is used as the high-pressure fluid and Oxygen(O2) is used as the low-pressure fluid. Postprocessing is done using ConvergeCFD and ParaView.

1. Geometry/Domain:

A 3D solid geometry (.stl file) of the typical rectangular tube is imported into Converge CFD. The following figure shows the imported geometry. In ConvergeCFD triangles are the basic building blocks. Hence the surfaces of the geometry are a combination of triangles. The geometry is then simplified by removing the interface surface triangles at the middle section of the tube. The geometry and bounding box dimensions of the geometry are shown in the following figure:

2. Boundary Flagging:

The boundary zones in ConvergeCFD are created by flagging boundaries. This can be done by creating boundary flags in the boundary tab as shown below:

Only two boundary zones are created since the fluids are initially at rest and separated. The walls of low pressure and high-pressure region are assigned a boundary zone as shown above.

3. Case setup:

After assigning boundary zones as mentioned above, the solution case setup is to be done. ConvergeCFD has a dedicated menu to completely set up the solution. Details are as follows:

In the application type option, Time-based is selected.

- The materials option are selected as shown in the below images:

N2 is chosen for high-pressure region fluid and O2 for low-pressure region fluid.

- Simulation Parameters:

Since the shock generation process is a transient phenomenon, the transient solver option is selected and the respective setting for the solver are shown below:

The Solve species option in Misc. tab of Run parameters is turned on to capture species changes in the domain.

- Boundary Conditions:

All the boundary zones are set to slip walls for both high pressure and low-pressure regions. The applied boundary conditions are as follows:

Boundary Zone Boundary condition
N2_HP@

Wall

- Stationary, Slip

-Temperature BC = 300 K

O2_LP@

Wall

- Stationary, Slip

-Temperature BC = 300 K

The above boundary conditions can be defined only after defining a region in the Initial conditions and Events section of the case setup as shown below:

The events option is turned on to create the event of interface rupture between the high-pressure region (N2) and low-pressure region (O2). The event occurrence timing during the simulation is also shown above. The high-pressure region is assigned an initial pressure value of 600000 Pa and the low-pressure region is assigned an initial pressure value of 101325 Pa. The initial temperature for both the regions was set to 300 K.

The turbulence in the flow is modeled using the RNG-K-ε RANS model with standard wall function as shown below:

- Grid control:

The mesh size for the domain is defined in this tab as shown below:

Adaptive mesh refinement (AMR) in terms of species SGS is defined to accurately capture the species interactions.

- Output and post-processing:

The flow variables of interest, which are to be post-processed after the solution are selected in this option, and also at how many intervals these are written to the output file.

After all the above setup is completed final validation option is selected to check for the case setup is free of setup errors. After validation, the case setup files are exported using the export option in the File menu to the working folder. These files will be used by the CGYWIN terminal to run the solution.

Solution in CYGWIN :

The solution is run in the CYGWIN terminal. First, we have to navigate to the respective working folder in the CYGWIN terminal, where case setup files are present. Then by executing the following command, the solution can be run:

Executing the converge.exe using 4 parallel processors to run the solution:

The solution will run up to the total transient time defined in the run setup and the output files are saved to the respective folders.

V Post-Processing Results:

After the solution is complete, post-processing of the results is done using CONVERGE CFD and ParaView.

The plots are plotted in CONVERGE CFD, whereas to visualize the flow variables using contour plots the output files need to be converted to ParaView compatible files. This can be done in the CONVERGE CFD Post-Processing 3D tab as shown below:

Graph plots in Converge CFD:

The graphs are plotted for various flow variables using the line plotting tab in Converge CFD:

Cell count:

The above graphs show the oscillation total cell count during the simulation due to adaptive mesh refinement defined in terms of species SGS to accurately capture the interface dynamics between the high-pressure region and low-pressure region.

Temperature changes in the domain:

The below graph shows the average temperature of high and low-pressure regions in the domain. It can be seen that initially, the average temperature is zero due to the same temperature assigned to both regions. After the barrier ruptures at around 0.0005 sec, the shock wave oscillation induces temperatures to change in both regions, and the average temperature in the domain changes in a dynamic manner.

Pressure changes in the domain:

Similar to temperature changes the Static pressure in the domain also changes in a dynamic manner due to shock wave travel as shown in the below graph:

Visualization in ParaView:

The converted ParaView compatible output files are opened in ParaView and the grid, contour plots for Pressure, Velocity, and velocity streamlines are visualized:

Shock wave Dynamics:

The above animation shows the dynamics of the high pressure and low-pressure species interface dynamics. It can be seen as the interface barrier ruptures the high-pressure fluid (N2) tries to expand into the low-pressure region of O2 leading to compression of the low-pressure region. This leads to shock wave generation and the shock travels back to the high-pressure region after rebounding from the walls of the low-pressure region. The high pressure of the N2 once again rebounds the shock wave towards the low-pressure regio and this to and fro motion (oscillation) of shock wave travel continues until a steady state is reached between the two fluids if the simulation time is increased.

Pressure Changes in the domain:

The above animation shows the shock wave travel in the domain once the barrier between the high pressure and low-pressure fluids is removed. The contour shows the pressure variation in the entire domain due to the shock wave propagation.

The above animation shows the velocity changes in the domain along with mesh refinement due the course of the simulation. The AMR at the species interface in terms of SGS of species variation can be also seen.

Conclusion:

In this project, the transient simulation of shock wave dynamics in a shock tube is carried out in ConvergeCFD. The effect of barrier rupture between high pressure and low-pressure regions is studied in terms of generated shock wave dynamics, pressure and temperature changes in the domain. The AMR using species SGS is used to accurately capture the interface dynamics between the low and high-pressure fluids.

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.