Week 7: Shock tube simulation project
Aim:- The aim of the project is to simulate the flow across a shock tube. We intend to study the pressure and temperature distribution over time. Also, we intend to study the variation of cell count over time.
Theory:-
The shock tube is an instrument used to replicate and direct blast waves at a sensor or a model in order to simulate actual explosions and their effects, usually on a smaller scale. Shock tubes (and related impulse facilities such as shock tunnels, expansion tubes, and expansion tunnels) can also be used to study aerodynamic flow under a wide range of temperatures and pressures that are difficult to obtain in other types of testing facilities. Shock tubes are also used to investigate compressible flow phenomena and gas-phase combustion reactions. More recently, shock tubes have been used in biomedical research to study how biological specimens are affected by blast waves

Basic Concept
- High-pressure driver gas expands upon the diaphragm opening, creating a shock wave
- Test gas is instantaneously compressed and heated to combustion temperatures
by the incident and reflected shocks. - High-temperature experiments monitored near end wall
Shock Tube Characteristics
- Instantaneous heating/compression from shock waves
- Accurately known incident- and reflected-shock conditions (from incident shock MS)
- Wide range of post-reflected shock Temperature and Pressure (600-4000 K, 0.1-1000 atm)
Case Setup
- Geometry:- STL file is imported into Converge. The geometry for consideration is given below

It consists of a tube which separated into two regions of different pressure. Nitrogen(dark brown) occupies a High-pressure region whereas oxygen occupies the low-pressure region (light brown).
2. Diagnosis:- Upon running a diagnosis check, it was noted that there were a number of Non-manifold edge problems.

This was due to the presence of a diaphragm inside the tube. This was deleted for the purpose of this analysis. With the deletion, the problem of non-manifold edges disappeared.

3. Transform Normal:- The normals of the geometry were pointing outwards. This was transformed to ensure the normals pointed inwards.

Normals pointing inwards

4. Case Setup
a) Materials:- Predefined mixture was set to Air, Gas, and species selected

b) Global Transport Properties:- Default values retained

c) Species:- O2 and N2 entered.

d) Simulation Parameters:-
i) Run Parameters:- Transiently enabled

ii) Simulation Time Parameters:- Values set as shown below.

iii) Solver Parameters:- Solver scheme set to PISO

Regions and Initialization
- High-Pressure Region:- Pressure set to 6 bar. The mass fraction of N2 is set to 1.

-Low-Pressure Region- Pressure set to atm, Mass fraction of O2 is 1.

- Events: Events are used when two boundaries are in contact with each other and there is no boundary between them. the event flag creates triangles in between two regions called disconnect triangles

Events can be cyclic, sequential, or permanent. Triangles are created when there is supposed to be no interaction between two regions and disconnected when there is supposed to be an interaction.
Boundary
High-Pressure region. Wall motion type set to Stationary. The surface movement is set to fixed.

Low-Pressure Region: Wall motion type set to Stationary. The surface movement set to fixed.

also, the Group color by region is enabled.
- Physical Models:- Turbulence modeling set to RNG K epsilon

-Adaptive Mesh Refinement:- Adaptive mesh refinement feature in Converge was enabled. This was done to increase mesh resolution in the vicinity of the boundary such that cell size is sufficient to predict the boundary layer effects.

- Post Variable selection

Output files writing time interval is set as shown below

In order to execute the simulation, the directory in which these input files were stored was accessed in Cygwin and the following command was typed "mpiexec.exe -n 4 converge.exe"
After the Simulation was executed, the results were converted into a form that would be compatible with Paraview. This was done using the post_convert.exe command.
Results
1) Base Mesh:- Mesh with dx=dy=dz=1mm is shown below.

Mesh with AMR:- Mesh with Adaptive Mesh refinement is shown below. Converge, monitors, the curvature properties and whenever it is more than the defined SGS criterion, it will refine the mesh

2) Mass Fraction of N2 contour:- In the below animation, we observe that N2 which occupies a high-pressure region pushes O2 from the low-pressure region when the diaphragm breaks. Also, the O2 region reflects and pushes it back to the N2 region This back-and-forth motion continues and eventually, it reaches converges to a steady state.

3) Pressure Contour:- A shock wave is generated once the diaphragm is ruptured. The creation of a shock wave is characterized by an abrupt decrease in pressure on the high-pressure side initially. The reflected waves generate a back pressure resulting in an increase in pressure on the low-pressure side, which then moves on to cover the high-pressure side. There is an alternate fluctuation in pressure between regions as can be observed from the below animation as well as the plot


4) Temperature Contour:- The temperature contour also follows the same pattern as pressure. Temperature initially decreases in the N2 region initially. Reflected waves generate backpressure causing increases in temperature on the O2 side which then covers the high-pressure side. Alternate fluctuation in Temperature can be observed in the animation as well as the line plot


Velocity:- A similar velocity profile characterized by fluctuations similar to pressure and temperature can be seen from the animation below.

Cell Count:- The plot below shows the variation of mesh size as a function of time. At 0.001sec when the diaphragm gets destroyed, the event is characterized by the destruction of disconnected cells. Therefore a sudden spike with rapid fluctuations is observed. Further variation post t=0.001sec can be explained due to the interaction of high and low-pressure regions during which AMR gets activated.

Conclusion:
In the above analysis, flow through shock wave is simulated,
The bursting of the diaphragm results in the creation of shock waves. Compression waves propagate in the low-pressure section whereas expansion waves in the high-pressure section. Shock waves get refracted back resulting in the mixing of the fluid.
The mixing is characterized by abrupt fluctuation in pressure, density, and velocity as can be observed from the plots.
Cell count varies once the shock wave is created. The variation is primarily due to adaptive mesh refinement and rupturing of the diaphragm.