Week 5: Prandtl Meyer Shock problem
Objective:
Performing analysis to find out the effect of SGS temperature value on cell count in Prandtl Meyer Shock Problem
Performing Steady-state simulation. Steps involved in running 2D Steady-State Simulation
- Introduction
- Geometry Creation
- Boundary flagging
- Diagnosing the geometry
- Case Setup
- Solve
- Post-processing the results
Step 1
Introduction
Boundary Conditions
Both ordinary and partial differential equations need boundary conditions to be solved. Different types of boundary conditions can be imposed on the boundary of the domain. The choice of the boundary condition is fundamental for the resolution of the computational problem: a bad imposition of b.c. may lead to the divergence of the solution or to the convergence to a wrong solution.
>Dirichlet BC
>Neumann BC
>Mixed BC
1)Dirichlet boundary condition
In mathematics, the Dirichlet (or first-type) boundary condition is a type of boundary condition, when imposed on an ordinary or a partial differential equation, it specifies the values that a solution needs to take along the boundary of the domain. The question of finding solutions to such equations is known as the Dirichlet problem. In applied sciences, a Dirichlet boundary condition may also be referred to as a fixed boundary condition.
2)Neumann boundary condition
In mathematics, the Neumann boundary condition is a type of boundary condition When imposed on an ordinary or a partial differential equation, the condition specifies the values in which the derivative of a solution is applied within the boundary of the domain.
3)Mixed boundary condition
In mathematics, a mixed boundary condition for a partial differential equation defines a boundary value problem in which the solution of the given equation is required to satisfy different boundary conditions on disjoint parts of the boundary of the domain where the condition is stated. Precisely, in a mixed boundary value problem, the solution is required to satisfy a Dirichlet or a Neumann boundary condition in a mutually exclusive way on disjoint parts of the boundary.
4)Other BC
Cauchy boundary conditions and Robin boundary conditions are different types of combinations of the Neumann and Dirichlet boundary conditions just like Mixed BC.
Shock Wave
shock is a type of propagating disturbance that moves faster than the local speed of sound in the medium. Like an ordinary wave, a shock wave carries energy and can propagate through a medium but is characterized by an abrupt, nearly discontinuous, change in pressure, temperature, and density of the medium.
For the purpose of comparison, in supersonic flows, additional increased expansion may be achieved through an expansion fan, also known as a Prandtl–Meyer expansion fan. The accompanying expansion wave may approach and eventually collide and recombine with the shock wave, creating a process of destructive interference. The sonic boom associated with the passage of a supersonic aircraft is a type of sound wave produced by constructive interference.
Unlike solitons (another kind of nonlinear wave), the energy and speed of a shock wave alone dissipate relatively quickly with distance. When a shock wave passes through matter, energy is preserved but entropy increases. This change in the matter's properties manifests itself as a decrease in the energy which can be extracted as work, and as a drag force on supersonic objects; shock waves are strongly irreversible processes.
the shock on a sharp-nosed supersonic body
Prandtl Meyer Expansion
A supersonic expansion fan, technically known as Prandtl–Meyer expansion fan, a two-dimensional simple wave, is a centered expansion process that occurs when a supersonic flow turns around a convex corner. The fan consists of an infinite number of Mach waves, diverging from a sharp corner. When a flow turns around a smooth and circular corner, these waves can be extended backward to meet at a point.
Each wave in the expansion fan turns the flow gradually (in small steps). It is physically impossible for the flow to turn through a single "shock" wave because this would violate the second law of thermodynamics. Across the expansion fan, the flow accelerates (velocity increases) and the Mach number increases, while the static pressure, temperature, and density decrease. Since the process is isentropic, the stagnation properties (e.g. the total pressure and total temperature) remain constant across the fan.
When a supersonic flow encounters a convex corner, it forms an expansion fan, which consists of an infinite number of expansion waves centered at the corner. The figure shows one such ideal expansion fan.
Adaptive Mesh Refinement
In numerical analysis, adaptive mesh refinement (AMR) is a method of adapting the accuracy of a solution within certain sensitive or turbulent regions of simulation, dynamically and during the time the solution is being calculated. When solutions are calculated numerically, they are often limited to pre-determined quantified grids as in the Cartesian plane which constitutes the computational grid, or 'mesh'. Many problems in numerical analysis, however, do not require a uniform precision in the numerical grids used for graph plotting or computational simulation and would be better suited if specific areas of graphs which needed precision could be refined in quantification only in the regions requiring the added precision. Adaptive mesh refinement provides such a dynamic programming environment for adapting the precision of the numerical computation based on the requirements of a computation problem in specific areas of multi-dimensional graphs that need precision while leaving the other regions of the multi-dimensional graphs at lower levels of precision and resolution.
Sub-Grid Scale
Subgrid-scale modeling refers to the representation of important small-scale physical processes that occur at length-scales that cannot be adequately resolved on a computational mesh. In LES of turbulence, subgrid-scale (SGS) modeling is used to represent the effects of unresolved small-scale fluid motions (small eddies, swirls, vortices) in the equations governing the large-scale motions that are resolved in computer models. The formulation of physically realistic SGS models requires an understanding of the physics and the statistics of scale interactions in hydrodynamic turbulence and is an open research question owing to the fact that turbulence remains an unsolved problem in classical physics.
Step 2
Geomentry
Geomentry has imported as STL format. Geomentry cleaning such has unnecessary faces are cleared for example extra thickness is removed. After that boundary flagging is done by creating 4 boundaries namely Inlet,Outlet,elbow_surface, and Throttle.
then Diagnosis is performed to check any errors are present. If present necessary corrections are made. Then moved to case setup
Step 3
Boundary Flagging
Inlet: Air Inlet
Outlet: Air Outlet
F_2D: Front wall
B_2D: Rear or Back wall
T&B_W : Top & Bottom wall
Step 4
Diagnosing the geomentry
We will just run the diagnosis for a set of important problems which are going to affect the solution
After running the diagnosis we see that no errors are present let us proceed to the case setup
Step 5
Case Setup
=>In case of setup we choose the time-based model and then we leave the input parameters under material are kept default the only thing we select air as our fluid, Gas simulation, and Rection mechanism.
=>Going to the simulation parameter we are going to choose steady-state and hydrosimulation(The main difference between Hydro and non-hydro is that no Navier stokes equations are solved in non-hydro it is only used to check our mesh changes while running simulation). then the rest of then are set to default. Under Simulation time parameter cycles to run the simulation is set to start cycle to 0 and End cycle to 25000 with Initial and minimum time step of 1e-7 and maximum time step to 1 and rest are set to defaults
=>Coming to boundary there are 5 boundaries are flagged with different Boundary ID, they are
>Inlet: Set to inflow Here are we are specifying pressure as Neumann BC and velocity as Dirichlet BC
>Outlet: Set to outflow for pressure and velocity BC are set to Neumann
>Front and back walls: Set to 2D walls
>Top and bottom: Set to walls Neumann BC are applied
All the boundaries are set to region0 with air at 50000 pa and 300K
=>Region 0 is created at initial conditions and events. Here were are performing turbulence simulation. In turbulence model RNG k-epsilon is chosen
=>Base grid dx=dy=dz=0.8 and Adaptive mesh refinement is enabled for temperature.
=>Then postprocessing output files are set to defaults because the data which we are looking is already in default selections
Effect of Subgrid scale
While we enabled Adaptive mesh refinement we have the ability to change the sub-grid scale .so here we take three unique values such as 0.01,0.03,0.05 to observe how results are going to affected because of changing sub-grid criteria. When a shock occurs temperature and velocity changes a lot so we can choose anyone. So we choose temperature based Adaptive refinement. Whenever the subgrids scale temperature is greater than 0.05K the mesh is going to refine
Here we are choosing sequential timing control type because we want to start the AMR only after 500 cycle
Output/Post processing files
Post variable selection is set to default because all the information we needed is already there by default.
The time interval for writing 3D output data file:- 1000
The time interval for writing restarting output:- 1000
Step 6
Solve
Then we need to export the input files to a folder to start running a simulation.then by using Cygwin we are directing to the input file and simulation is stared by using an executable file and simulation ran by using two processors. After successfully running the simulation we can post-process the results and check the general outcomes whether simulation ran properly and are they making any sense.
Step7
Post Processing Results
Case1: Supersonic Flow = 680m/sec
At 0.05 SGS criteria
Mesh
if we look at the mesh we can clearly notice that only at the particular area the cell is refined and the rest of the area the mesh is the same. This is because the mesh is only refined where their sub-grid criteria is greater than 0.05K.
Total Cells
Coming to the cell generated plot we can see that cells got generated only after 500 cycles because during the case setup I have chosen sequential timing control type such that I need to mention when AMR sequence will begin.so I gave start time at 500 cycles so after that AMR comes into the picture. As we can see the fluctuation in the cell generation because at the shock zone the value of temperature is fluctuating abruptly so mesh is getting refined over and over creating a fluctuation in mesh generation. And cell generation depends on sub-grid criteria and embedding level because in embedding type we have chosen sub-grid scale. Here the embedded level is 2 and Sub-Grid scale as 0.05K. we ran the case for 25000 cycles and AMR end time 9*10^10 cycles so AMR is capture until it reaches 25000 Cycles for We will see the significance of the Sub-Grid Scale on mesh in the below explanation.
Temperature Contour
Contour always helps us to understand what exactly happens in the domain. For example, if we look at the temperature contour we can see at the shock region what is the temperature Drop. So here we can see that when fluid at a speed of 680m/sec (Supersonic speed)due to convex corner the air suddenly gets expanded creating shock waves. If we assume there is a shock wave zone it resembles a cone that contains infinite shock waves. In order to understand the contour more clearly it is better to go through the below youtube link
Velocity Contour
Our velocity contour looks totally fine because as per theory above the shock wave the speed is less than the velocity present under the shock wave. As per the range, the velocity ranges from 680m/sec to 720m/Sec
Pressure Contour
As per the range, the pressure ranges from 1.4e05 to 2.1e05 pa. Because of low SGC criteria such that 0.05K, finer cells are generated and more data is capture at the partitions of the shock wave, unlike the last case. we can say that pressure and velocity are inversely proportioning. if velocity increases pressure decreases the same thing applies over here also,
at 0.03 SGS criteria
Mesh
if we look at the mesh we can clearly notice that only at the particular area the cell is refined and the rest of the area the mesh is the same. This is because the mesh is only refined where their sub-grid criteria are greater than 0.03K. Mesh at 0.03 SGS is more refined compared to the 0.05K SGS because the criteria are reduced. If we reduce furthermore then more cells are created due to low SGS criteria
Total Cells
Coming to the cell generated plot we can see that cells got generated only after 500 cycles because during the case setup I have chosen sequential timing control type such that I need to mention when AMR sequence will begin.so I gave start time at 500 cycles so after that AMR comes into the picture. As we can see the fluctuation in the cell generation because at the shock zone the value of temperature is fluctuating abruptly so mesh is getting refined over and over creating a fluctuation in mesh generation. And cell generation depends on sub-grid criteria and embedding level because in embedding type we have chosen sub-grid scale. Here the embedded level is 2 and Sub-Grid scale as 0.03K. we ran the case for 25000 cycles and AMR end time 9*10^10 cycles so AMR is capture until it reaches 25000 Cycles for We will see the significance of the Sub-Grid Scale on mesh in the below explanation.
Temperature Contour
So here we can see that when fluid at a speed of 680m/sec (Supersonic speed)due to convex corner the air suddenly gets expanded creating shock waves same as the previous case where SGC is 0.05K but here SGC is 0.03K because of that the contour look more smother and can able to capture the shock wave more accurately than the previous case. If we assume there is a shock wave zone it resembles a cone that contains infinite shock waves. In order to understand the contour more clearly it is better to go through the below youtube link
Velocity Contour
Our velocity contour looks totally fine because as per theory above the shock wave the speed is less than the velocity present under the shock wave. As per the range, the velocity ranges from 680m/sec to 720m/Sec.Because of low SGC criteria, finer cells are generated and more data is capture at the partitions of shock wave unlike the last case
Pressure Contour
As per the range, the pressure ranges from 4.9e05 to 7.3805 pa. Because of low SGC criteria such that 0.03K, finer cells are generated and more data is capture at the partitions of the shock wave, unlike the last case. we can say that pressure and velocity are inversely proportioning. if velocity increases pressure decreases the same thing applies over here also, Unlike case 1 and case 2 there is more change in pressure value
at 0.01 SGS criteria
Mesh
if we look at the mesh we can clearly notice that only at the particular area the cell is refined and the rest of the area the mesh is the same. This is because the mesh is only refined where their sub-grid criteria are greater than 0.01K. Mesh at 0.01 SGS is more refined compared to the 0.03K SGS because the criteria are reduced. If we reduce furthermore then more cells are created due to low SGS criteria
Total Cells
Coming to the cell generated plot we can see that cells got generated only after 500 cycles because during the case setup I have chosen sequential timing control type such that I need to mention when AMR sequence will begin.so I gave start time at 500 cycles so after that AMR comes into the picture. As we can see the fluctuation in the cell generation because at the shock zone the value of temperature is fluctuating abruptly so mesh is getting refined over and over creating a fluctuation in mesh generation. And cell generation depends on sub-grid criteria and embedding level because in embedding type we have chosen sub-grid scale. Here the embedded level is 2 and Sub-Grid scale as 0.01K. we ran the case for 25000 cycles and AMR end time 9*10^10 cycles so AMR is capture until it reaches 25000 Cycles for We will see the significance of the Sub-Grid Scale on mesh in the below explanation.
Temperature Contour
So here we can see that when fluid at a speed of 680m/sec (Supersonic speed)due to convex corner the air suddenly gets expanded creating shock waves same as the previous case where SGC is 0.03K but here SGC is 0.01K because of that the contour looks more smother and can able to capture the shock wave more accurately than the previous case.
Velocity Contour
Our velocity contour looks totally fine because as per theory above the shock wave the speed is less than the velocity present under the shock wave. As per the range, the velocity ranges from 680m/sec to 720m/Sec. Because of low SGC criteria, finer cells are generated and more data is capture at the partitions of shock wave unlike the last case
Pressure Contour
As per the range, the pressure ranges from 1.1e05 to 1.7 pa. Because of low SGC criteria such that 0.05K, finer cells are generated and more data is capture at the partitions of the shock wave, unlike the last case. we can say that pressure and velocity are inversely proportioning. if velocity increases pressure decreases the same thing applies over here also
Case 2: Subsonic Flow = 100m/sec
In this simulation, no shock flows are getting generated because of subsonic flow
Mesh: dx=dy=dz=0.8m
SGS criteria = 0.01K and rest of the AMR parameters are the same
Total Cells
Here we can see that the mesh generation count is the same even after enabling the AMR that is because no new cells that are getting generated that are because the velocity is subsonic. Because the flow is subsonic the temperature change takes place slowly unlike the case of velocity at supersonic speed, So subsonic criteria of 0.01K is never achieved which do not create any new cells
Temperature Contour
This clearly represents that the temperature is dropping slowly due to expansion but we cannot see any shock waves because here the flow is subsonic
Velocity Contour
This clearly represents that the velocity is dropping slowly due to expansion but we cannot see any shock waves because here the flow is subsonic. Unlike in supersonic flows, in Subsonic flows the outlet velocity Drops. Velocity is peak at the convex corner in the geomentry
Pressure Contour
This clearly represents that the Pressure is rising slowly due to expansion but we cannot see any shock waves because here the flow is subsonic. The pressure is Low at convex Corner
Conclusion
- From the above analysis, we can confirm that shocks are created at supersonic velocities only.
- If SGS parameter criteria decrease more cells generated which results in better capture of shock waves thermodynamic properties.