Week 7: Shock tube simulation project
Aim: To set up a transient shock tube simulation using Converge.
Theory: Shock tubes are devices used for studying the flow of high temperature and high-velocity compressible gas. High-temperature supersonic gas flow is initiated in a shock tube as a result of the rupture of a diaphragm which is separating two gases in high-pressure and low-pressure chambers. This leads to the formation of compression waves which then gets converted into shock waves affecting the fluid properties like temperature and pressure. Due to this expansion waves are created in the high-pressure region. As time progresses the motion created by the primary waves gets canceled due to reflected shock waves. Basically shock tubes are used to study chemical kinetics. In the figure below we can see various processes happening inside a shock tube.
The main objective of this simulation is:
- Setup a transient shock tube simulation.
- Plot the pressure and temperature.
- Plot the cell count as a function of time.
Methodology:
1) Pre-Processing:
We will be importing the geometry into Converge studio whose dimension will be scaled into meters and the dimensions are as follows:
- Length along x-direction (l_x) = 0.2 m.
- Length along y-direction (l_y) = 0.01 m.
- Length along z-direction (l_z) = 0.01 m.
We will be flagging the domain into 2 different boundaries namely High Pressure and Low Pressure. The brown color region in the above figure represents the High pressure and the violet color region represents the low-pressure boundaries.
The next step is we will be moving on to the case setup where we will be setting up all the parameters required for the simulation.
- For this simulation, we will be using a time-based application type with transient analysis.
- Moving on to the Materials Tab we will be adding species 'N2' and 'O2' and other properties are kept as default settings.
- Simulation parameters are set in which the required transient solver is set up with a full hydrodynamic simulation mode. Also, simulation time parameters are set accordingly.
- Start time : 0 sec.
- End time : 0.003 sec.
- Initial time step : 1e-9 sec.
- Minimum time step : 1e-9 sec.
- Maximum time step : 1 sec.
- In the tab Initial condition and Events, we will be selecting 'Regions and Initialization' and 'Events'. Under the sub-tab 'Regions and Initialization', we will be creating regions in order to group various boundaries to define a volumetric region. In this case, we will be creating high pressure and low-pressure region.
- High-Pressure Region
Species: N2=1
Temperature: 300 K
Pressure: 600000 Pa
- Low-Pressure Region
Species: O2=1
Temperature: 300 K
Pressure: 101325 Pa
Events: In order to identify a boundary between two regions (i.e. in this case diaphragm), we need to use events. The event flag creates triangles in the place between the 2 regions which can be used to connect/disconnect these regions. Events are of different types as shown below and based on the application and requirement we use respective types. In this case, we will be using a sequential event with the parameters as shown below.
- Moving on, we flag different boundaries and assign respective boundary conditions to create a meaningful Volumetric region.
- High_Pressure
Boundary Type: Wall
Velocity wall condition: Law of wall
Temperature: 300 K
- Low_Pressure
Boundary Type: Wall
Velocity wall condition: Law of wall
Temperature: 300 K
- Turbulence Model: RNG k-epsilon.
- Grid Control:
-Element Size: dx = 0.0025 m, dy = 0.0025 m, dz = 0.0025 m.
-Adaptive Mesh refinement: Adaptive mesh refinement is used to capture the information accurately were the shock occurs, in order to capture this information we need refinement of mesh in that particular area while keeping the mesh size of other areas similar to the base grid. This indeed reduces the overall computational time compared to refining the overall domain. Converge adaptive mesh refinement has various techniques based on different parameters and in our case we will use species based sub-grid-criterion with Max.embedding level set to 3. Converge will monitor the species property provided in the AMR and refines the mesh when the property of temperature curvature between the consecutive grid is greater than the defined SGS value.
- Finally, we will be setting up the parameters for printing the 3D and other output files in the post-processing tab. - Time interval for writing 3D output data files: 1e-5 sec. - Time interval for writing text output:1e-6 sec. - Time interval for writing restart output:0.001 sec.
2) Running the solver:
- Once the case is setup we export the input files from the converge studio and save in a designated location.
- Then using Cygwin we will run the simulation.
3) Post-Processing:
- The output files are converted to a format in which ParaView can understand using Cygwin or converge studio.
- These converted files can be used for visualizing contours, animations, etc. using Paraview which is the post-processing software.
Post-Processing Results:
Geometry Mesh Plots:
From the above geometry mesh contour, we can see the local refinement in the area where shock waves are captured in detail with the help of adaptive mesh refinement.
Total Cell Count Plot:
From the above plot, we can see that initially, the cell counts are constant and very small as the element size in the boundary is set to 0.0025 m along all the direction. The cell count starts to vary and increase once the diaphragm is broken due to which high-pressure region enters the low-pressure region where shock waves are produced. In order to capture the detailed movement of the shock waves, we use AMR and hence the element size refines automatically at the required area peaking the total cell count.
Pressure Plot:
From the above pressure plot, we can see that the high-pressure region pressure was initially set to 6 bar and for the low-pressure region pressure was set to 0.1 bar. We can see that after a time step of approximately 0.0011 sec the diaphragm breaks and the pressure starts decreasing due to entrainment into the low-pressure region.
Pressure Contour:
Pressure Animation:
Temperature Plot:
In the above figure, we are plotting the mean temperature at the high-pressure region and low-pressure region as the function of time. We can observe that the mean temperature of the high-pressure region decreases slightly and the low-pressure region increases slightly once the diaphragm is broken. This is because of the entrainment of the fluids into other regions respectively.
Temperature Contour:
Temperature Animation:
Velocity Contour:
Velocity Animation:
From the above velocity contour and animation, we can see that the maximum velocity for this case is 80.6 m/s.
N2 Mass Fraction:
N2 Mass Fraction Animation:
From the above contour and animation, we can see that once the diaphragm is ruptured the N2 gas is pushed from the high-pressure region into the lower pressure region. Before the N2 gas reaches the end of the shock tube, the shock waves are reflected in the opposite direction changing the flow direction of N2 gas. This process repeats until the intensity of the shock waves reduces.
Conclusion:
- The Shock Tube problem was successfully simulated.
- Mean temperature, velocity, N2 mass fraction, and the pressure was observed and analyzed.
- Initially, shock waves are observed and the fluid on the low-pressure region doesn't allow the fluids from the high-pressure region to reach the end of the tube instead it gets reflected back and the process repeats until the intensity is decreased.
- These Shock Tube problems can be used to study chemical kinetics