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.
For this example, we will be assuming a nozzle area ratio of 3 () and a specific heat ratio of 1.4 (). In the subsequent equations, there are lots of terms that include , 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 and , 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 () and exit Mach number (). 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)
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)
Because the flow is isentropic throughout the nozzle, we know that the exit stagnation pressure is equal to the reservoir pressure (). 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)
After plugging in the appropriate values, we get the pressure ratio to be:
(4)
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)
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)
Plugging in the appropriate supersonic Mach number, we get the following:
(7)
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, . 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)
It may not look like the pressure ratios cancel out correctly, but note that , and what we are doing with this equation is trying to find how much the static pressure increases across the shock. The new 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 ().
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)
(10)
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)
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)
(13)
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
Your work is impressive. Thanks for sharing. Best regards
Thank you!
thank you for all the *.m file that you share to us, it save me a lot of time to learn everystep.
You’re welcome! Glad they’re helpful.
Pingback: Klefer
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