Simulating the Prandtl- Meyer Shock problem in Converge CFD
Objective:
1. To explain the physics behind the formation of a shock wave and to perform a literature search on the type of boundary conditions used for shock flow problems.
2. To simulate the Prandtl-Meyer shock problem and to study the effect of the Sub-Grid Scaling (SGS) temperature value on cell count and shock location.
1A. Formation of Shock Wave
When a body moves through a fluid medium, it creates a disturbance that propagates inside that medium in all directions at the speed of sound. When the body moves at subsonic speed, a part of the physical disturbance (or information) is moving ahead of the body which tends to modify the flow field upstream of the body. But when the body is moving with a velocity equal to or greater than the speed of sound, this information (in the form of pressure pulses) cannot travel upstream of the body as the body is travelling faster than the propagation itself. As these disturbances are lagging behind the body, they build-up in intensity and cause an abrupt change in the flow field as the supersonic body passes. This phenomenon is shown in the picture below;
When encountering a shock wave, the temperature, pressure, velocity, and density all change abruptly. For these reasons, a shockwave is sometimes treated as a discontinuity.
In the above picture, when the body is moving at sonic speed, the shockwave forms at the front tip of the body. This shock is called a bow-shock as it is curved. When the body is moving at supersonic speed, the shockwave (outlined in red) forms at an angle to the flow (Mach angle). This is called an oblique shock.
1B. Boundary Conditions for shock flow problems
In general, there are 3 types of boundary conditions. These are
1. Dirichlet BC, where the value of the dependent variable is specified at the boundary
2. Neumann BC, where the normal derivative of the dependent variable is specified at the boundary
3. Mixed BC, where a combination of value and the normal derivative is specified at the boundary
Different flow variables can have different boundary conditions. They depend on the nature of the problem. The supersonic shock problem is hyperbolic in nature and it is important to look at the characteristic curves to determine the appropriate boundary conditions for each boundary. In general hyperbolic problems have two characteristic lines termed left-running characteristic and right-running characteristics that determine the region of influence and the region of dependence of a point P inside the domain.
In the above picture, the direction is assumed to be from left to right. At a point P in the domain, it can be seen that both characteristics lines are running along the direction of the flow. If the same is applied for the outlet boundary node N, the characteristic lines can be visualized as follows;
In general (for subsonic flow) the right-running characteristic tends to move in the direction of the flow and the left-running characteristic moves in the opposite direction of the flow. Both characteristics represent the travel of information (physical disturbance) to a node in the flow field with the velocity of sound. Therefore, in subsonic flow, the value of flow variables at a node is influenced by nodes at either of its sides. However, in the case of supersonic flow, a node N is only influenced by the inner nodes (N-1), (N-2). This is because, after the flow crosses the point N, the left running characteristic moving at the speed of sound cannot travel to node N against the flow\'s supersonic speed. Due to this reason, the outlet boundary node is calculated only as a function of the inner nodes using a Neumann boundary condition. This means that the value of all three flow variables at point P is determined using the slope between the values of the inner two nodes.
`V_N = 2V_(N-1) - V_(N-2)`
`rho_N = 2 rho_(N-1) - rho_(N-2)`
`T_N = 2T_(N-1) - T_(N-2)`
2A. Simulating the Prandtl-Meyer shock problem
The case was simulated with the gometry shown below;
At the inlet, the air is flowing with a velocity of 680 m/s at a temperature of 286.1 K (Mach no. = 2). At the supersonic outlet, all three flow variables, temperature, pressure, and velocity are floated. The Adaptive Mesh Refinement (AMR) was enabled. This feature automatically embeds new smaller grids of specified scale in the regions where the curvature of a particular quantity exceeds the specified limit. The density-based steady-state solver was used as the flow is high-speed and compressible.
Simulation results
The steady-state simulation was performed for 25000 cycles. The velocity and temperature distribution are as shown below;
The above simulation shows the formation of a Prandtl-Meyer expansion fan when a supersonic flow encounters a convex corner. This expansion fan comprises an infinite number of weak Mach waves. These Mach waves turn the supersonic flow gradually along the convex corner. Across the expansion fan, the velocity and Mach number increase, and the temperature, density, and static pressure decrease. The angle made by the leading Mach wave with the inlet flow direction (mu_1) and the angle made by the trailing Mach wave with the final flow direction (mu_2) are given by the relations;
`mu_1 = arcsin(1/M_1)`
`mu_2 = arcsin(1/M_2)`
2B. Effect of Sub-Grid Scaling parameter
The Adaptive Mesh Refinement (AMR) is done based on the value specified as the sub-grid scaling parameter. The SGS criterion refers to the curvature of a quantity between two cells. Whenever that curvature crosses the specified limit, the AMR feature embeds new smaller cells between the earlier cells to increase resolution in the high slope region.
A range of values was tried as SGS criterion from 0.05 to 0.8. It was observed that when this value was greater than or equal to 0.15. The supersonic expansion fan seemed to change its Mach angles. For SGS >= 0.15, the Mach angles increased to a certain value. This can be witnessed from the temperature distribution pictures below;
SGS = 0.05
SGS = 0.1
SGS = 0.2
SGS = 0.4
In the above pictures that show the development of supersonic expansion fan in the problem for four different SGS parameters. When SGS < 0.15 (first two cases), the Mach angles are smaller and the Mach waves are oblique. When SGS >= 0.15 (latter two cases), the Mach angles are relatively larger. This can be explained as a result of the lack of resolution in the shock-wave development region in the latter two cases. In the first two cases, it can be seen that there are a large number of embedded cells due to AMR. So there are enough cells to capture the gradient changes more precisely. However, as SGS increases, the number of embedded cells decreases and this results in inadequate resolution in the shock region. Therefore, the shock wave changes its location.
The comparison between total cell counts for each SGS value is shown below. It is obvious that, with increasing SGS value, the number of embed cells decreases and therefore, the total cell count also decreases.
The animation of the entire simulation with Adaptive Mesh Generation can be seen in the video below;