Converging-Diverging Nozzle Pressure Delineations

In this post, I will be explaining (and providing) some code that I use to find the pressure ratio delineations for converging-diverging (CD) nozzles.  If you are new to the subject of CD nozzles, it would be helpful to check out this video that I have made regarding CD nozzle operating states.  The math behind this blog post can be found in this video.  You can download the code used in the example by clicking on the download form below.  You will also need to download the ISENTROPIC_FLOW and NORMAL_SHOCK functions listed below, or you can get them from my GitHub repository.

CD_Nozzle_Delineations.m
CD_Nozzle_Delineations.m
ISENTROPIC_FLOW.m
ISENTROPIC_FLOW.m
NORMAL_SHOCK.m
NORMAL_SHOCK.m

For this example, we will be assuming a nozzle area ratio of 3 (A_e/A_t = 3) and a specific heat ratio of 1.4 (\gamma = 1.4).  In the subsequent equations, there are lots of terms that include \gamma, and the location of parentheses can be sort of confusing.  What I like to do is to define some of those convenient parameters before we move on in the program.  In the code below, you can see where we define A_e/A_t and \gamma, and below that, the convenient parameters.

% Knowns
Ae_At = 3;
g     = 1.4;

% Convenient parameters
gm1   = g-1;
gp1   = g+1;
gogm1 = g/gm1;
gm1o2 = gm1/2;
gogp1 = g/gp1;

We will be solving for two things for each of these nozzle operating conditions: back-to-reservoir pressure ratio (P_b/P_0) and exit Mach number (M_e).  The reservoir pressure is in fact a stagnation pressure, since we are assuming the reservoir is infinitely large and has a Mach number of zero.  We will start with solving for these two parameters for the subsonic isentropic case. We first need the exit Mach number, which we can find using the area-Mach number relation. I have a detailed post about how to solve this equation, which you can find here.  The equation we are solving can be seen below.

(1)   \begin{equation*} \left( \frac{A}{A^*} \right) ^2 = \frac{1}{M^2} \left[ \frac{2}{\gamma + 1} \left(1+\frac{\gamma -1}{2} M^2 \right] \right]^{\frac{\gamma + 1}{\gamma -1}} \end{equation*}

We can note that if we want to solve for the Mach number, it is only a function of the area ratio and ratio of specific heats, both of which we know.  Note that two values of the Mach number will satisfy the equation: a subsonic Mach number and a supersonic Mach number.  Using a root-finding method to solve for the subsonic root of the exit Mach number, we get the following solution.

(2)   \begin{equation*} M_{e,sub} = 0.1975 \end{equation*}

Because the flow is isentropic throughout the nozzle, we know that the exit stagnation pressure is equal to the reservoir pressure (P_{0e} = P_0).  This means that we can find the back-to-reservoir pressure by using only the exit Mach number and the ratio of specific heats.

(3)   \begin{equation*} \frac{P_b}{P_0}|_{sub} = \left[1+\frac{\gamma-1}{2}M_{e,sub}^2\right]^{\frac{-\gamma}{\gamma-1}} \end{equation*}

After plugging in the appropriate values, we get the pressure ratio to be:

(4)   \begin{equation*} \frac{P_b}{P_0}|_{sub} = 0.9732 \end{equation*}

The code to get these results is given here.

% Subsonic isentropic
Me_Sub    = ISENTROPIC_FLOW(Ae_At,'Asub',g,'M');
Pb_P0_Sub = (1 + gm1o2*Me_Sub^2)^(-gogm1);

Now we can move on to the isentropic supersonic case, which proceeds in very much the same way.  First we need to find the supersonic root of the Mach number from the area-Mach number relation (whereas we used the subsonic root before).

(5)   \begin{equation*} M_{e,sup} = 2.6374 \end{equation*}

Again, since the flow is isentropic through the entire nozzle, the exit stagnation pressure is equal to the reservoir pressure, and we can use the following equation to solve for the desired back-to-reservoir pressure ratio.

(6)   \begin{equation*} \frac{P_b}{P_0}|_{sub} = \left[1+\frac{\gamma-1}{2}M_{e,sup}^2\right]^{\frac{-\gamma}{\gamma-1}} \end{equation*}

Plugging in the appropriate supersonic Mach number, we get the following:

(7)   \begin{equation*} \frac{P_b}{P_0}|_{sup} = 0.04730 \end{equation*}

As a quick check, we note that this pressure ratio is indeed less than the subsonic pressure ratio. The code to get these results is given here.

% Supersonic isentropic
Me_Sup    = ISENTROPIC_FLOW(Ae_At,'Asup',g,'M');
Pb_P0_Sup = (1 + gm1o2*Me_Sup^2)^(-gogm1);

Now let’s move on to the normal shock at the exit.  In this case, the flow follows the same path as the supersonic isentropic case all the way up to the nozzle exit plane, where it then encounters a normal shock that brings the static pressure up to the back pressure, P_b.  So we can use the exit Mach number and pressure ratio from the supersonic isentropic case as the inputs directly before the normal shock.  We are looking for the following pressure ratio (NSE = normal shock exit), which we can write as follows:

(8)   \begin{equation*} \frac{P_b}{P_0}|_{NSE} = \left(\frac{P_2}{P_1}\right)\left(\frac{P_b}{P_0}|_{sup}\right) \end{equation*}

It may not look like the pressure ratios cancel out correctly, but note that P_b|_{sup} = P_1, and what we are doing with this equation is trying to find how much the static pressure increases across the shock.  The new P_b will be the static pressure after the normal shock.  We can compute the static pressure jump across this normal shock with the following equation, given that we know the upstream Mach number right before the shock is the exit Mach number from the supersonic isentropic case (M_{e,sup}).
About half of men who have ED problems due to increasing blood pressure, you may opt for ayurveda to get lost spark back in sildenafil 100mg price life. Like a PDE5 inhibitor, Vardenafil is closely associated in both function and advertising to Sildenafil and Tadalafil however; it provides a comparatively brief successful time with viagra bulk buy a smaller amount circumstances of failure. Company’s may automatically assume that they viagra sample canada want the touch of a professional hand. Who knows what extent this order viagra Clicking Here to the problem of erectile dysfunction, as well as to the problems of your life.

(9)   \begin{equation*} \frac{P_2}{P_1} = 1 + \frac{2\gamma}{\gamma + 1}\left(M_{e,sup}^2-1\right) \end{equation*}

(10)   \begin{equation*} \frac{P_2}{P_1} = 7.9486 \end{equation*}

Plugging the two known pressure ratios into the equation above, we can solve for the back-to-reservoir pressure ratio in order to have a normal shock at the exit of the nozzle.

(11)   \begin{equation*} \frac{P_b}{P_0}|_{NSE} = 0.3760 \end{equation*}

The exit Mach number will be the Mach number immediately after the normal shock (and thus will need to be subsonic).  We can compute this using the normal shock relations by using the upstream Mach number (which is also the exit Mach number for the isentropic supersonic case).

(12)   \begin{equation*} M_{e,NSE} = \left[\frac{1+\left[\frac{\gamma -1}{2}M_{e,sup}^2\right]}{\gamma M_{e,sup}^2-\left(\frac{\gamma -1}{2}\right)}\right]^{1/2} \end{equation*}

(13)   \begin{equation*} M_{e,NSE} =0.5007 \end{equation*}

We can see that this exit Mach number post-normal shock is indeed subsonic.  The code used to compute these results can be seen below.

% Normal shock at nozzle exit
P2_P1     = 1 + ((2*gogp1)*(Me_Sup^2-1));
Pb_P0_NSE = (P2_P1)*(Pb_P0_Sup);
Me_NSE    = NORMAL_SHOCK(Me_Sup,'M1',g,'M2');

We can then print the solutions to the command window in MATLAB by using the following code.

fprintf('====================================\n');
fprintf('===== PRESSURE and MACH NUMBER =====\n');
fprintf('====================================\n');
fprintf('Subsonic Isentropic\n');
fprintf('\tPb_P0_Sub: %g \n',Pb_P0_Sub);
fprintf('\tMe_Sub   : %g \n',Me_Sub);
fprintf('Normal Shock at Exit\n');
fprintf('\tPb_P0_NSE: %g \n',Pb_P0_NSE);
fprintf('\tMe_NSE   : %g \n',Me_NSE);
fprintf('Supersonic Isentropic\n');
fprintf('\tPb_P0_Sup: %g \n',Pb_P0_Sup);
fprintf('\tMe_Sup   : %g \n',Me_Sup);

Here are the results.

====================================
===== PRESSURE and MACH NUMBER =====
====================================
Subsonic Isentropic
  Pb_P0_Sub: 0.973182
  Me_Sub   : 0.197448
Normal Shock at Exit
  Pb_P0_NSE: 0.375959
  Me_NSE   : 0.500692
Supersonic Isentropic
  Pb_P0_Sup: 0.0472987
  Me_Sup   : 2.63742

6 Replies to “Converging-Diverging Nozzle Pressure Delineations”

  1. Pingback: Klefer

  2. helo
    think you for all what you give as
    please can you make a video to explain how to compile this tree matlab code
    thinks

Leave a Reply

Your email address will not be published.

*