Category Archives: Basic Gas Dynamics

Definition of the Speed of Sound

Deriving the speed of sound is a main component of any undergraduate textbook in gas dynamics and is very important to understanding more complicated concepts! Here, I will give an honest attempt to explain and provide definitions of what it is and why it is important .I will go through the derivation of the speed of sound mathematically.

First, I’ll attempt to explain what the speed of sound is. Most simply put, it is the speed at which sound propagates in a medium. But in fact, it is not just sound. All disturbances and motions are communicated throughout a medium at the speed of sound. For example, ever notice how streamlines around a vehicle begin to bend far upstream from the vehicle itself? This occurs because the presence of the vehicle has been communicated upstream (at the speed of sound) and the gas is forced to move out of the way. The speed of sound is dependent on the properties of the fluid being described, and the fluid itself. For instance the speed of sound in air at standard conditions is ~343 m/s whereas the speed of sound in water is ~1482 m/s. Additionally, and very importantly, the speed of sound represents the coupling of the pressure and density fields in a gas. In an incompressible fluid, the density is constant and therefore not a function of pressure. So we can call these fields uncoupled. But in real flows this is not the case. In fact, it is this couple of the pressure and density fields that make important and interesting changes to the conservation of momentum equation! (More on that in another post)

So why is the speed of sound important? Well let’s think about the vehicle example again. The streamlines upstream are able to bend in response to the oncoming vehicle. This is because the vehicle is travelling less than the speed of sound. But what if it were travelling faster than the speed of sound? Now the streamlines do not see what is coming and are suddenly struck by the car. This results in a shock-wave, and a very different aerodynamic scenario. In my related post regarding (subsonic vs. supersonic flow) I will re-enforce this discussion mathematically.

Now let’s make use of an example to define the speed of sound mathematically. The most straight forward approach to defining the speed of sound is with a piston example:

Piston
Fig: Schematic of the piston example

In the scenario depicted above, a piston is suddenly accelerated to a velocity of dV. This then causes a pressure increase of dp, and sends a compression wave (at the speed of sound) down the channel. The gas in the channel that has not yet been reached by the wave sits at the initial conditions of zero velocity, and initial pressure and density p_o and \rho_o respectively. As the wave moves down stream it causes the velocity of the gas to increase to dV and the pressure and density to increase by dp and dρ, respectively.

Remember: In an incompressible fluid, a piston motion would instantaneously cause all of the fluid in the tube to change velocity to dV. But recall that in a compressible fluid the motion of the piston does NOT do this. It sends a message downstream at the speed of sound telling the gas that the piston has moved. The wave then causes the fluid downstream to respond so as to ensure that the governing laws of fluid mechanics are held.

We are going to use this scenario and solve for the speed of sound, a. In order to analyze this problem we are going to perform a control volume analysis of the compression wave itself. To accomplish this, we are using a control volume that is in the frame of reference of the wave (ie moving to the right at velocity a). This is shown in the following figure:

CV
Fig: Control Volume Schematic

Notice that when we put the control volume in the reference frame of the wave how the problem is simplified? We now have a simple control volume with an inflow and outflow and we need only apply conservation of mass and momentum to solve the problem.

First we start with conservation of mass (Note: A-> cross sectional area of channel):

\dot{m}_{out}-\dot{m}_{in}=0

\left(\rho_o+d\rho\right)\left(a-dV\right)A-\rho_o a A = 0

If we expand, and simplify by removing the high order terms we get:

a d\rho-\rho_o dV=0

Now we can add the momentum equation:

\Sigma F = \dot{m}V_{out}-\dot{m}V_{in}

p_oA-\left(p_o+dp\right)A = \rho_o a A \left[\left(a-dV\right)-a\right]

We can simplify this to:

dp=\rho_oa dV

This equation, and the simplified conservation of mass are then easily combined to achieve:

a^2=\left(\frac{dp}{d\rho}\right)

This is the definition of the speed of sound! However, we must recognize that a sound wave is an isentropic process. And this is not always the case. So the correct definition of the speed of sound uses partial derivatives and a subscript s to denote that it is for an isentropic wave.

a^2=\left(\frac{\partial p}{\partial \rho}\right)_s

So then how do we calculate the speed of sound for a medium! Well, this comes from simply recalling that in an isentropic process the relation between pressure and density is:

\frac{p}{\rho^\gamma} = \textnormal{constant}

From this we can show that:

\frac{\partial p}{\partial \rho} = \frac{\gamma p}{\rho}

And then finally by using the ideal gas law we end up at

a= \sqrt{\gamma R T}

The above relation is the most commonly used formula for the speed of sound.

Conclusion

Thanks for reading! Hopefully this provided some clarification and assistance to those who needed it! As always, please comment if you notice any mistakes, or even little semantic errors. It is important to me to be completely correct!

Some Useful References

… Any Undergraduate Gas Dynamics textbook but my preferred ones are:

[1] Anderson, J. D. (1990). Modern compressible flow: with historical perspective (Vol. 12). McGraw-Hill.

[2] John, J. E. A., & Keith, T, G. (2006) Gas Dynamics, 3rd Edition, Pearson Prentice Hall

[4] Zucrow, M. J., & Hoffman, J. D. (1976). Gas dynamics. New York: Wiley, 1976, 1.

Stationary Normal Shock Waves

Shock-waves are a common topic covered in undergraduate thermodynamics, fluid mechanics, and gas dynamics courses. Because shock-waves are awesome, I figured I would do one of my first posts on their basic theory. I’m going to try to cover the topic by first providing some context and a clear picture of what a shock wave is (and why it forms)… followed by how we analyze it. I try to include general features of shockwaves and the things that are particularly “important to know” … selon moi.

Contents

Here are the sections you’ll find in this post:

  1. Introduction to the normal shock
    • Simple example: shock-wave in diverging nozzle
  2. Analysis of the normal shock
  3. Important properties of a normal shock
  4. Conclusions and Useful References

Introduction to the stationary normal shock

So first, what is a shock wave? Well, in order to understand this, you must first recall that in supersonic flow the flow is moving faster than the speed of sound. Also, recall that the speed of sound is the speed at which information is transmitted throughout the continuum. Thus, if you are a small person riding along a fluid particle that is supersonic, neither you nor the fluid particle you are hitching a ride on can see what is coming up ahead of you. There is no mechanism for you to see what is ahead and gradually slow down or correct course. You are now committed to a sudden, discontinuous change resulting in an increase in pressure and temperature, and a loss of speed. So, basically the idea of shockwaves is this: they are a discontinuity that forms in order for the flow to meet some downstream condition. If a supersonic flow never encounters something downstream, like an obstacle or a back pressure, it will never shock. And likewise, a subsonic flow can never form a shock wave (unless it is first accelerated to supersonic somewhere within the flow field). In subsonic flows, downstream obstacles and pressures are communicated upstream at a speed that allows for the curving of streamlines and/or deceleration. You can observe this by picturing the streamlines around an airfoil that curve around its shape but never contact it.

Simple example of a shock-wave

Let’s look at (probably) the most common learning example: a shockwave forming in a supersonic nozzle.

Nozzle_noshock
Fig 1) Nozzle flow schematic

In Figure 1 we see the classic nozzle example. Hopefully this example is not extremely new to you. The main concept is this: When the back pressure is high enough, the flow through the nozzle never goes supersonic (including at the throat) and is simply compressed to the throat and then expanded in the diverging section (and in these cases Pe=Pb). These are the cases shown by Region a in the figure. When the back pressure (Pb) is low enough that the flow in the nozzle throat is choked (Mach 1 is achieved) there are now two possible solutions. The first solution is the subsonic solution. Here, the flow decelerates from Mach 1 to the exit and flow exits at M<1. The second solution is the supersonic solution. Here, the flow continues to accelerate and exits at M>1. So, which solution is the right solution? From the graph in Figure 1, you can probably guess… the back pressure! When Pb is equal the supersonic back pressure, the flow will obey the supersonic solution. And similarly, when Pb is equal to the subsonic back pressure the flow will remain subsonic.

But, what if the back pressure is somewhere in-between? The back pressure is too high for the supersonic solution… but too low for the subsonic solution? This situation is what exists in Region b. This is where the concept of the shockwave is really apparent. When the back pressure is in this region, the flow starts out by accelerating to supersonic after the nozzle throat. Once the flow is supersonic, it cannot receive any communication from the flow ahead of it. Why? Because (again) communication between fluid particles is at the speed of sound! So here we have a fluid particle being accelerated in a diverging section, with a downstream boundary condition that it cannot meet (because it can’t see it coming). So, what happens? A normal shock is produced at some point in the diverging section of the nozzle. The resulting scenarios are shown in the next figure.

Nozzle_shocks
Fig 2) Nozzle flow shematic (with shocks)

Fig 2 shows what happens in Region b. As the back pressure is increased, the shock-wave that is formed moves upstream and is formed earlier in the nozzle. This continues until Pe=Pb(subsonic) and the shock disappears. Can you have a shock in the converging section?  No. Not unless you had supersonic flow in the converging section in the first place.

Because I love CFD… To illustrate this example I have simulated it using OpenFOAM and the solver rhoCentralFoam (hopefully I’ll write post about it’s setup at some point). As you can see the flow accelerates from the reservoir (through the converging-diverging nozzle) but due to the back pressure, a shock-wave forms in the diverging section.

movie
Nozzle flow with shock in diverging section (simulated in rhoCentralFoam – See Related Blog Post Under OpenFOAM)

Analysis of Normal Shock-waves

So how do we analyze a shockwave? Well, normal shock waves are a one-dimensional, adiabatic, discontinuous phenomena that are governed by the equations of fluid mechanics (conservation of mass, momentum and energy). Thus, it makes sense that we simply analyze them with a 1D control volume analysis. We will have an inlet (side 1) and an outlet (side 2) and in between is the (practically) discontinuous normal shock wave.

CV
Fig 3) Normal Shock Control Volume Layout

The governing equations for the control volume above are:

Conservation of mass:       \rho_2 U_2 =\rho_2 U_2

Conservation of momentum:       p_2+\rho_2 U_2^2 =p_1+\rho_1 U_1^2

Conservation of energy:       h_2+\frac{U_2^2}{2}=h_1+\frac{U_1^2}{2}

Perfect gas equation of state assuming constant specific heats:

h=\int_0^T c_p dT \, = \left(\frac{\gamma R}{\gamma-1}\right)T

and       p = \rho RT

With the above equations the problem is fully defined. It is then just a matter of an exercise in algebra. From various combinations of the above equations (its worth it to derive them yourself at some point… especially if you are studying for a PhD candidacy)  the normal shock relations are obtained.

The normal shock relations are defined here:

  • Temperature Ratio:     \frac{T_2}{T_1}=\frac{\left(1+\frac{\gamma-1}{2}M_1^2\right)\left(\frac{2\gamma}{\gamma-1}M_1^2-1\right)}{\left[\frac{\left(\gamma+1\right)^2}{2\left(\gamma-1\right)}M_1^2\right]}
  • Pressure Ratio:        \frac{p_2}{p_1}=\frac{2\gamma M_1^2}{\gamma+1}-\frac{\gamma-1}{\gamma+1}
  • Density and velocity ratio:       \frac{\rho_2}{\rho_1}=\frac{U_1}{U_2}=\frac{\left(\gamma+1\right)M_1^2}{\left(\gamma-1\right)M_1^2+2}
  • Stagnation Pressure Ratio:        \frac{p_{o2}}{p_{o1}}=\left[\frac{\left(\gamma+1\right)M_1^2}{\left(\gamma-1\right)M_1^2+2}\right]^\frac{\gamma}{\gamma-1}\left[\frac{\gamma+1}{2\gamma M_1^2-\left(\gamma-1\right)}\right]^\frac{1}{\gamma-1}
  • Post-shock Mach number:       M_2^2=\frac{M_1^2+\frac{2}{\gamma-1}}{\frac{2\gamma}{\gamma-1}M_1^2-1}

Properties of the Normal Shock

There is lots to know about shock-waves, but here is a summary of what I think is  important to know and what sticks out in my mind. Hopefully I’m not missing anything… but I can always add stuff later!

  • Normal shock-waves obey conservation of mass, momentum, and energy, AND the 2nd law of thermodynamics. It may seem obvious but it should be re-stated. A shock-wave obeys the usual laws of fluid mechanics.
  • Shock-waves are adiabatic. By this I mean to say that when we analyze the control volume shown in Figure 3, Energy in=Energy out.
  • When you have a perfect gas with constant specific heats stagnation temperature does not change across the shock. Sometimes students forget this and it’s quite important. This is really an extension of the last point. Note: As stated, when the gas does not have constant specific heats, energy is still conserved but the stagnation temperature across the shock will change.
  • Stagnation pressure always decreases across a shock.
  • The Mach number always decreases across a shock. Additionally, for a normal shock the post-shock Mach number is always subsonic. However as you will see later if I make a post on oblique shocks, the post-shock Mach number can remain supersonic.

Conclusions and Useful References

Well I hope you found this post helpful! … And not confusing. As usual if someone spots a mistake or something I missed then I would very much appreciate a comment and I will fix it. I am not perfect obviously, and this is both an exercise in sharing knowledge, but an exercise in strengthening and confirming knowledge through the act of sharing… or something like that.

There is no shortage of books that cover normal shocks. But I have found that not all are created equal. These are the books that I are always sitting on my desk and have great sections covering this topic:

[1] Anderson, J. D. (1990). Modern compressible flow: with historical perspective (Vol. 12). McGraw-Hill.

[2] John, J. E. A., & Keith, T, G. (2006) Gas Dynamics, 3rd Edition, Pearson Prentice Hall

[3] Çengel, Y. A., & Boles, M. A. (2015). Thermodynamics: an engineering approach. M. Kanoğlu (Ed.). McGraw-Hill Education.

[4] Zucrow, M. J., & Hoffman, J. D. (1976). Gas dynamics. New York: Wiley, 1976, 1.