Challenge

Week 5: Prandtl Meyer Shock problem

Shock Wave: When sound waves travel through a medium, it can travel with a speed that is either less than speed of sound which is called subsonic, nearly equal to speed of sound which is transonic and greater than the speed of sound which is supersonic.

Suppose fluid is travelling along a particular direction and it encounters an obstacle, if the speed of the fluid that approached the obstacle is less than speed of sound, then its mach number is less than 1 and hence after encountering the obstacle, the fluid particles deflect and flow around the external path of the obstacle as shown in the below figure. In this case, the fluid doesnt overcome the sound barrier and hence the flow happens as seen in the below figure.

There is always a sound barrier that is former in front of the fluid and it propagates in such a way that it is more denser in the direction of motion of the fluid.

As the speed of the fluid increases to more than the speed of sound, it overcomes this sound barrier in doing so and now shock waves are produced in shape of a cone and emerge from behind the obstacle. That is the reason we caan hear the powerful sound or sonic boom of aeroplanes once they pass over our head and we dont hear any sounds as they are approaching towards us.

Types of boundary conditions:

1) Dirichlet boundary condition: This condition specifies the value that the unknown function needs to take along the boundary of the domain D.

For example: If there is a rod of length L fixed at both ends and u(x,t) is displacement of rod then u(0,t)=u(L,t)=0 this is the dirichlet boundary condition.

2) Neumann Boundary condition: This condition specifies the values that the derivative of a solution that is going to take in the direction normal to the boundary of the domain D.

For example: If there is a rod of length L and u(x,t) is temperature of the rod and both the ends are perfectly insulated then the flux at these points is 0

`(du(0,t))/dx = (du(L,t))/dx =0` this is a neumann boundary condition.

3) Robin boundary condition: This is a weighted combination of dirichlet and neumann boundary condition on all parts of the domain.

For example if the rod is poorly insulated at both the ends, then the conditon at both ends becomes

`u(x,o) + (du(0,t))/dx =0` and `u(L,0) + (du(L,t))/dx = 0.` this is robins boundary condition.

4) Mixed boundary condition: In this case dirichlet boundary conditions are prescribed in some parts of the bpundary and neumann conditions in the other.

For example: If there is a rod where one end is immersed in a water bath of constant temperature t1 and other end is connected to a heater of with constant heat transfer rate then the mixed boundary condition is `u(0,t)= t1` and `(du(L,t))/dx = C` where C is the constant heat transfer rate.

5) Cauchy Boundary conditions: In this condition both the neumann boundary condition and dirichlet boundary conditions are assigned to the boundaries.

For example: for the heat equation `(d(u))/dt = k*(d^2u)/dx^2` , the boundary conditions are

`u(0,t)= A and (du(0,t))/dx = B`

Why Neumann boundary condition are used in case of shock wave problems:

Neumann boudary conditions are typically used in supersonic cases where the mach number exceeds 1 and shocks are produced. This is becuase shocks by nature constantly keep changing their physical properties such as pressure, density etc. Therefore instead of directly giving the value of a quantity at the boundary we give the derivative of that value at the boundary so that the actual value of that quantity at the boundary is calculated based on the values at the inner points of the boundary.

Geometry:

The geometry of the prandtl meyer shock problem

Case setup:

Monitor start delay= 100 seconds

sample size= 100 seconds

tolerence= 1e-6

start time: 0 cycle

end time: 25000 cycle

initial time step= minimum time step= 1e-9

maximum time step= 1 second.

In this simulation we have used adaptive mesh refinement. Adaptive mesh refinement is changes happening in the mesh as the simulation progesses. This changes in mesh happens with respect to certain conditions that we give. The embed type, maximum embed levels and sub-grid criterion are specified and the refinement happens according to these values.

In this simulation the embed type is sub-grid scale. The maximum number of embed layers is 2 and for sub grid criterion 0.05,0.1,0.2 three values are taken. The sub grid criterion based on temperature means that as the flow progresses if the change in curvature of temperature (`d^2t/dx^2`) is greater than the sub grid criterion value, the mesh refinement happens for the first layer and if the change in curvature of temperature further gets more than 0.05, the second layer of refinement will happen and so on.

Refinement= (size of base grid)/(2^embed-level)

Boundary Conditions:

inlet: pressure- zero normal gradient, velocity is the specified value. For velocity, two cases are taken

100m/s and 680m/s.

100m/s is for subsonic case wherein the speed of fluid is less than the speed of sound.

At a temperature of 286k, the velocity of air is 340m/s hence a velocity of 680 at the inlet would mean that the flow is supersonic and the mach number at inlet is 2.

Outlet:

For both pressure and velocity, zero normal gradient which is the neuman boundary conditon for both pressure and velocity. Neuman condition is given because the values at the outlet are dependent of the values at inlet and other inner fluid particle velocity and pressure.

Left and Right 2D are given 2D boundary condition.

Top and bottom are kept stationary with slip condition for the wall surfaces.

Subsonic flow and sgc=0.05.

Mesh surface with edges

Temperature contour

Velocity contour

Mass flow rates at the inlet and outlet

Total pressure at inlet and outlet

Average temperature at inlet and outlet

mach number at inlet and outlet

https://youtu.be/-0WRV4_07SM

https://youtu.be/B4Mni92VB8o

The animations of temperature and velocity respectively for subsonic flow.

Supersonic flow ,sgc=0.05

Mesh

Temperature with mesh(surface with edges)

Temperature without mesh

Velocity contour

Average temperature of the fluid at inlet and outlet

Average Velocity comparision at inlet and outlet

Mach numbers at inlet and outlet

Total pressure at inlet and outlet

Mass flow rates at inlet and outlet

https://youtu.be/mK3jos82MvY

https://youtu.be/JHtGB8QebKI

The temperature and velocity animations for supersonic flow with sub grid criterion of 0.05

Supersonic flow, SGC=0.1:

Mesh

Temperature contour with mesh

Temperature contour without mesh

Velocity contour

Temperature at inlet and outlet

Velocity at inlet and outlet

Total pressure at inlet and outlet

Mach number comparison at inlet and outlet

https://youtu.be/dqRyl7JEEpA

https://youtu.be/S5FTWPOyqCE

The animations for temperature and velocity respectively.

Supersonic Flow with SGC=0.2

Mesh

Temperature contour with mesh

Temperature contour without mesh

Velocity contour

Temperature at inlet and outlet

Velocity at inlet and outlet

Total pressure at inlet and outlet

Mach number at inlet and outlet

Cell count

https://youtu.be/kTL7pJv9AK4

https://youtu.be/x7pt83-gqus

The animations for temperature and velocity respectively are as above.

Conclusions:

1) As the value of the sub grid criterion increases, the mesh refinement decreases, indicating that the change in curvature of temperature is not very large.

2) Subsonic flow is unaffected no matter what the initial conditions are provided that thy are not unphysical.

3) AMR is an extremely useful feature as it refines key areas of the mesh as the flow is progressing. It is mportant these areas in order to capture the physics of the solution properly at the sharp edge.

4) The mach number increases as the fluid passes by the bent edge whereas other quantities such as temperature decrease, the velocity also increases as a result of which the mach number increases.

5) In case of subsonic flow no matter how small the SGC value is we cannot observe any adaptive mesh refinement. This indicates that the curvature of temperature is not chaging as the flow progresses.

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.