Week 7 - Simulation of a 1D Supersonic nozzle flow simulation using Macormack Method
Aim: Stimulation of a one-dimensional super-sonic nozzle flow simulation using Maccormack method.
Objective:
To simulate the isentropic flow through a quasi 1D subsonic-supersonic nozzle by deriving both the conservation and non-conservation forms of the governing equations and solving them using Maccormack's technique. And also determine the steady-state temperature distribution for the flow-field variables and investigate the difference between the two forms of governing equations by comparing their solutions, and plot the following:
- Steady-state distribution of primitive variables inside the nozzle.
- Time-wise variation of the primitive variables.
- Variation of Mass flow rate distribution inside the nozzle at different time steps during the time-marching process.
- Comparison of Normalized mass flow rate distributions of both forms.
Theory:
We consider the steady, isentropic flow through a convergent-divergent nozzle as sketched below. The flow at the inlet to the nozzle comes from a reservoir where the pressure and temperature are denoted by Po, and To, respectively. The cross-sectional area of the reservoir is large (theoretically, A→ ∞), and hence the velocity is very small (V → 0). Thus, po and to are the stagnation values, or total pressure and total temperature, respectively. The flow expands entropically to supersonic speeds at the nozzle exit, where the exit pressure, temperature, velocity, and Mach number are denoted by Pe, Te, Ve, and Me, respectively. The flow is locally subsonic in the convergent section of the nozzle, sonic at the throat (minimum area), and supersonic at the divergent section. The sonic flow (M = 1) at the throat means that the local velocity at this location is equal to the local speed of sound. Using an asterisk to denote sonic flow values, we have at the throat V = V* = a*. Similarly, the sonic flow values of pressure and temperature are denoted by p* and T*, respectively. The area of the sonic throat is denoted by A*. We assume that at a given section, where the cross-sectional area is A, the flow properties are uniform across that section. Hence, although the area of the nozzle changes as a function of distance along the nozzle, x, and therefore in reality the flow field is two-dimensional (the flow varies in the two-dimensional xy space), we make the assumption that the flow properties vary only with x; this is tantamount to assuming uniform flow properties across any given cross section. Such flow is defined as quasi-one-dimensional flow.

The governing flow equations will be couched in terms of partial differential equations suitable for the time-marching solution of quasi-one-dimensional flow using conservative or non-conservative equations. The continuity, momentum, and energy equations in the conservative and non-conservative form are given below.
Solving using non-Conservation method:
- Continuity equation:

- Momentum equation:

- Energy equation:

Here, we define the dimensionless length as

Denoting the speed of sound in the reservoir as a0, where

we define a dimensionless velocity as

Also, the quantity L/a0 has the dimension of time, and we define a dimensionless time as

Finally, we ratio the local area A to the sonic throat area A* and define a dimensionless area as

Maccormack's technique is a Predictor-Corrector method. First, consider the predictor step. Now, we set up the spatial derivatives as forward differences. Also, to reduce the complexity of the notation, we will drop the use of the prime to denote a dimensionless variable. In what follows, all variables are the nondimensional variables, denoted earlier by the prime notation.
Continuity Equation:

Momentum Equation:

Energy Equation:

The predicted parameters values like ρ, V and T are

Then moving to Corrector step:
Continuity Equation:

Momentum Equation:

Energy Equation:
Then, the average Time derivatives are given by


Boundary conditions:
Subsonic inflow boundary conditions:

Supersonic outflow boundary conditions:

Initial conditions: At t = 0

Nozzle shape: The nozzle shape, A = A(x), is specified and held fixed, independent of time.

Solving using Conservation method:
The equations in Conservation form are
Continuity Equation:

Momentum equation:
.
Energy Equation:

Let us define the elements of the solutions vector U, the flux vector F, and the source term J as follows.

Then, the non-dimensional conservation form equations are written as

To setup the numerical solution at each time step by writing the F1, F2, F3, J2 in term of U1, U2, U3 is




Boundary conditions:
The boundary conditions for the subsonic-supersonic isentropic flow solution using the conservation form of the governing equations are the same. And also

Initial conditions:

Matlab code:
main code
clear allclose allclc% Stimulation of a one-dimensional super-sonic nozzle flow simulation using Maccormack method% input parametersL=5;n=31;nt=1:10:1400;for i = 1:length(n)x=linspace(0,L,n(i));c=0.5; %countour numberthroat=((n-1)/2)+1;<!-- [if mso]>
<![endif]-->[mfr_nc, rho_nc, v_nc, T_nc, M_nc, p_nc, mfr_nc_throat, rho_nc_throat, v_nc_throat, T_nc_throat, p_nc_throat, M_nc_throat,a,g] = non_conservative_function (L,n(i),nt,c,throat);[mfr_c, rho_c, v_c,T_c, M_c,p_c, mfr_c_throat, rho_c_throat, v_c_throat, T_c_throat, p_c_throat, M_c_throat,a] = conservative_fun (nt,n(i),g,c,throat);<!-- [if mso]>
<![endif]-->% Time step variation of Mass flow rate in both the formsfigure(7)subplot(2,1,1)plot(nt,mfr_nc_throat,'LineWidth',1,Marker='.',Color='b')hold onplot(nt,mfr_c_throat,'LineWidth',1,Marker='.',Color='r')xlabel('Time steps (nt)')ylabel('Mass flow rate')legend('non-Conservative form','Conservative form')title('Mass flow rate using "Non-Conservative form vs Conservative form" at throat point')<!-- [if mso]>
<![endif]-->subplot(2,1,2)plot(x,mfr_c,'linewidth',1,'Color','b')hold onplot(x,mfr_nc,'linewidth',1,'Color','r')xlabel('Time steps (nt)')ylabel('Mass flow rate')title('Mass flow rate using "Non-Conservative form vs Conservative form" in the nozzle')<!-- [if mso]>
<![endif]-->figure(8)subplot (2,1,1)plot(x,mfr_c,'linewidth',1,'Color','b')hold onxlabel('length of nozzle')ylabel('Mass flow rate')title('Conservative form: Grid independency test at throat point')<!-- [if mso]>
<![endif]-->subplot (2,1,2)plot(x,mfr_nc,'linewidth',1,'Color','r')hold onxlabel('length of nozzle')ylabel('Mass flow rate')title('Non-Conservative form: Grid independency test at throat poin')<!-- [if mso]>
<![endif]-->% Steady state simulation for primitve values for both Non-Conservative form and Conservative formfigure(9)%mass flow ratesubplot (4,1,1)plot(x,T_c,'linewidth',1)hold onplot(x,T_nc,'linewidth',1)xlabel('Length of nozzle')ylabel('Temperature')title('Temperature variation in both forms')legend('Temperature of conservation form','mfr of non-conservation form')<!-- [if mso]>
<![endif]-->%pressuresubplot (4,1,2)plot (x,p_c,'LineWidth',1)hold onplot (x,p_nc,'LineWidth',1)xlabel('Length of nozzle')ylabel('pressure')title('presure variation in both forms')legend('pressure of Conservative form','pressure of non-Conservative form')<!-- [if mso]>
<![endif]-->�nsitysubplot (4,1,3)plot(x,rho_c,'LineWidth',1)hold onplot(x,rho_nc,'linewidth',1)ylabel('density')xlabel('length of nozzle')title('Density variation in both forms')legend('densiity of Conservative form','density of non-Conservative form')<!-- [if mso]>
<![endif]-->%velocitysubplot (4,1,4)plot(x,v_c,'linewidth',1)hold onplot(x,v_nc,'linewidth',1)ylabel('velocity')xlabel('Length of nozzle')title('velocity variation in both forms')legend('velocity of Conservative form','velocity of non-Conservative form')endFor conservation form
% conservative function<!-- [if mso]>
<![endif]-->function [mfr_c, rho_c, v_c,T_c, M_c,p_c, mfr_c_throat, rho_c_throat, v_c_throat, T_c_throat, p_c_throat, M_c_throat,a] = conservative_fun (nt,n,g,c,throat)<!-- [if mso]>
<![endif]-->%input variables<!-- [if mso]>
<![endif]-->L=3;n=31;nt=1400;throat=((n-1)/2)+1;g = 1.4; %gamma valuex=linspace(0,L,n);dx=x(2)-x(1);c=0.5;<!-- [if mso]>
<![endif]--><!-- [if mso]>
<![endif]--><!-- [if mso]>
<![endif]-->for i=1:length(x)if (x(i) <= 0.5)rho_c(i)=1;T_c(i)=1;elseif (x(i)>0.5 && x(i)<=1.5)rho_c(i) = 1 - 0.366*(x(i) - 0.5);T_c(i) = 1 - 0.167*(x(i) - 0.5);elseif (x(i)>1.5 && x(i)<=3.5)rho_c(i) = 0.634-0.3879*(x(i)-1.5);T_c(i)= 0.833-0.3507*(x(i)-1.5);endend% Initial conditiona = 1+2.2*(x - 1.5).^2; %areav_c = 0.59./(rho_c.*a); %velocitymfr_c = rho_c.*a.*v_c; % mass flow rateM_c = v_c./(T_c.^0.5); %mach numberp_c = rho_c.*T_c; %pressure% intial solution vecors U1,U2,U3U1 = rho_c.*a;U2 = rho_c.*a.*v_c;U3 = rho_c.*a.*(T_c./(g-1)) + ((g/2).*v_c.^2);<!-- [if mso]>
<![endif]-->%outer time loopfor z=1:nt% time step dtdt = min(c.*(dx./((T_c.^0.5)+v_c)));for p=1:length (nt)% saving initial valuesU1_old = U1;U2_old = U2;U3_old = U3;for j=2:n-1% Flux vectors(F)F1 = U2;F2 = ((U2.^2)./U1)+((g-1)/g)*(U3-(g/2)*((U2.^2)./U1));F3 = ((g*U2.*U3)./U1) - (g*(g-1)*((U2.^3)./(2*U1.^2)));<!-- [if mso]>
<![endif]-->% predictor method<!-- [if mso]>
<![endif]-->%source term (J)J1(j) = (1/g)*rho_c(j)*T_c(j)*((a(j+1)-a(j))/dx);<!-- [if mso]>
<![endif]-->% continuty equationdU1_dt_p(j) = -((F1(j+1) - F1(j))/dx);<!-- [if mso]>
<![endif]-->%Momentum equationdU2_dt_p(j) = -((F2(j+1) - F2(j))/dx) + J1(j);<!-- [if mso]>
<![endif]-->%energy equationdU3_dt_p(j) = -((F3(j+1) - F3(j))/dx);<!-- [if mso]>
<![endif]-->% updating soluton vectorsU1(j) = U1(j) + dU1_dt_p(j)*dt;U2(j) = U2(j) + dU2_dt_p(j)*dt;U3(j) = U3(j) + dU3_dt_p(j)*dt;end% updating primitivesrho_c = U1./a;T_c = (g-1).*(U3./U1-(g/2).*(U2./U1).^2);<!-- [if mso]>
<![endif]-->% updating flux vectorsF1 = U2;F2 = ((U2.^2)./U1)+((g-1)/g)*(U3-(g/2)*((U2.^2)./U1));F3 = ((g*U2.*U3)./U1) - (g*(g-1)*((U2.^3)./(2*U1.^2)));<!-- [if mso]>
<![endif]-->%correction methodfor j=2:n-1<!-- [if mso]>
<![endif]-->% updating the source termJ2(j) = (1/g)*rho_c(j)*T_c(j)*((a(j)-a(j-1))/dx);% continuty equationdU1_dt_c(j) = -(F1(j)-F1(j-1))/dx;<!-- [if mso]>
<![endif]-->% momentum equationdU2_dt_c(j) = -(F2(j)-F2(j-1))/dx + J2(j);<!-- [if mso]>
<![endif]-->% energy equationdU3_dt_c(j) = -(F3(j)-F3(j-1))/dx;<!-- [if mso]>
<![endif]-->end%average time derivativesdU1_dt_avg = 0.5*(dU1_dt_p + dU1_dt_c);dU2_dt_avg = 0.5*(dU2_dt_c + dU2_dt_p);dU3_dt_avg = 0.5*(dU3_dt_p + dU3_dt_c);<!-- [if mso]>
<![endif]-->% Final solution upadatefor k=2:n-1U1(k) = U1_old(k) + dU1_dt_avg(k)*dt;U2(k) = U2_old(k) + dU2_dt_avg(k)*dt;U3(k) = U3_old(k) + dU3_dt_avg(k)*dt;end<!-- [if mso]>
<![endif]-->% Boundary conditions% subsonic Boundary conditionU1(1) = rho_c(1)*a(1);U2(1) = 2*U2(2) - U2(3);v_c(1) = U2(1)./U1(1);U3(1) = U1(1)*((T_c(1)/(g-1)) + ((g/2)*(v_c(1)).^2));%supersonic boundry conditionsU1(n) = 2*U1(n-1) - U1(n-2);U2(n) = 2*U2(n-1) - U2(n-2);U3(n) = 2*U3(n-1) - U3(n-2);<!-- [if mso]>
<![endif]-->% Updating final primitives valuerho_c = U1./a;v_c = U2./U1;T_c = (g-1)*((U3./U1 - (g/2)*(v_c).^2));mfr_c = rho_c.*a.*v_c; % mass flow rateM_c = v_c./(T_c.^0.5); %mach numberp_c = rho_c.*T_c; %pressure<!-- [if mso]>
<![endif]-->% values at throatrho_c_throat(p) = rho_c(throat);p_c_throat(p) = p_c(throat);T_c_throat(p) = T_c(throat);v_c_throat(p) = v_c(throat);M_c_throat(p) = M_c(throat);mfr_c_throat(p) = mfr_c(throat);<!-- [if mso]>
<![endif]-->% Plotting% comparison of non-dimensional mass flow rate at diff time stepsif n == 31figure(4)if z == 25plot(x, mfr_c, 'm', 'linewidth', 1.25);hold onelseif z == 100plot(x, mfr_c, 'c', 'linewidth', 1.25);hold onelseif z == 400plot(x, mfr_c, 'g', 'linewidth', 1.25);hold onelseif z == 750plot(x, mfr_c, 'y', 'linewidth', 1.25);hold onelseif z == 1400plot(x, mfr_c, 'k', 'linewidth', 1.25);hold onendtitle('mass flow rate at dufferent timesteps of conservation form')xlabel('distance')ylabel('mass flow rate')legend('25th timesteps','100th timestep','400th timestep','750th timestep','1400th timestep')axis([0 3 0.4 1])grid onendif n==31figure(5)plot(x,v_c,'b',x,p_c,'r',x,T_c,'k',x,rho_c,'m',x,M_c,'g',x,mfr_c,'c')ylim([-1 4])title (sprintf('Time step = %d',i))xlabel('Length of nozzle')ylabel('Non dimensional parameters')legend('Velocity','Pressure','Temperature','Density','Mach number','Mass flow rate')title('Conservative form - Steady-state distribution of primitive variables inside the nozzle')endif n==31figure(6)plot(z,rho_c_throat,'LineWidth',1,'Marker','.')hold onplot(z,v_c_throat,'linewidth',1,'Marker','.')plot(nt,p_c_throat,'linewidth',1,'Marker','.')plot(z,T_c_throat,'linewidth',1,'Marker','.')plot(z,M_c_throat,'linewidth',1,'Marker','.')plot(z,mfr_c_throat,'linewidth',1,'Marker','.')xlabel('Time steps (nt)')ylabel('Non dimensional parameters')legend('Velocity','Pressure','Temperature','density','Mach number','Mass flow rate')title('Conservative form Time-wise variation of the primitive variables at throat point')endendendend<![endif]-->
For Non-Conservation form
% non-conservative function<!-- [if mso]>
<![endif]-->function [mfr_nc, rho_nc, v_nc, T_nc, M_nc, p_nc, mfr_nc_throat, rho_nc_throat, v_nc_throat, T_nc_throat, p_nc_throat, M_nc_throat,a,g] = non_conservative_function (L,n,nt,c,throat)g=1.4;L=5;n=31;nt=1400;throat=((n-1)/2)+1;c=0.5;x=linspace(0,L,n);dx= x(2)-x(1);<!-- [if mso]>
<![endif]-->% initial conditionsrho_nc = 1-0.3146*x;T_nc= 1-0.2314*x;v_nc=(0.1+1.09*x).*T_nc.^0.5;a = 1+2.2*(x-1.5).^2;M_nc= v_nc./(T_nc.^0.5);mfr_nc = rho_nc.*a.*v_nc;p_nc = rho_nc.*T_nc;g=1.4;<!-- [if mso]>
<![endif]-->for z = 1:nt %time loopdt = min(c.*(dx./((T_nc.^0.5)+v_nc)));for p = 1:length(nt)rho_old = rho_nc;T_old = T_nc;v_old = v_nc;for j=2:n-1%predictor stepdrho_dx = (rho_nc(j+1)-rho_nc(j))/dx;dv_dx = (v_nc(j+1)-v_nc(j))/dx;dT_dx = (T_nc(j+1)-T_nc(j))/dx;da_dx = (log(a(j+1))-log(a(j)))/dx;drho_dt_p(j) = -rho_nc(j)*dv_dx - rho_nc(j)*v_nc(j)*da_dx - v_nc(j)*drho_dx; % continutydv_dt_p(j) = -v_nc(j)*dv_dx - (1/g)*(dT_dx + (T_nc(j)/rho_nc(j))*drho_dx); % momentumdT_dt_p(j) = -v_nc(j)*dT_dx - (g-1)*T_nc(j)*(dv_dx + v_nc(j)*da_dx); %energy<!-- [if mso]>
<![endif]-->% solution updaterho_nc(j) = rho_old(j)+drho_dt_p(j)*dt;v_nc(j) = v_old(j)+ dv_dt_p(j)*dt;T_nc(j) = T_old(j)+ dT_dt_p(j)*dt;<!-- [if mso]>
<![endif]-->%correction stepdrho_dx = (rho_nc(j)-rho_nc(j-1))/dx;dv_dx = (v_nc(j)-v_nc(j-1))/dx;dT_dx = (T_nc(j)-T_nc(j-1))/dx;da_dx = (log(a(j))-log(a(j-1)))/dx;<!-- [if mso]>
<![endif]-->drho_dt_c(j) = -rho_nc(j)*dv_dx - rho_nc(j)*v_nc(j)*da_dx - v_nc(j)*drho_dx; % continutydv_dt_c(j) = -v_nc(j)*dv_dx - (1/g)*(dT_dx + (T_nc(j)/rho_nc(j))*drho_dx); % momentumdT_dt_c(j) = -v_nc(j)*dT_dx - (g-1)*T_nc(j)*(dv_dx + v_nc(j)*da_dx); % energyend% average time derivativesdrho_dt_avg = 0.5*(drho_dt_p + drho_dt_c);dv_dt_avg = 0.5*(dv_dt_p + dv_dt_c);dT_dt_avg = 0.5*(dT_dt_p + dT_dt_c);<!-- [if mso]>
<![endif]-->% final solution updatefor k= 2:n-1rho_nc(k) = rho_old(k) + drho_dt_avg(k)*dt;v_nc(k) = v_old(k) + dv_dt_avg(k)*dt;T_nc(k) = T_old(k) + dT_dt_avg(k)*dt;end% boundary conditions% subsonic Boundary conditionv_nc(1) = 2.*v_nc(2)- v_nc(3);% supersonic Boundary conditionv_nc(n) = 2.*v_nc(n-1) - v_nc(n-2);T_nc(n) = 2.*T_nc(n-1) - T_nc(n-2);rho_nc(n) = 2.*rho_nc(n-1) - rho_nc(n-2);% final solutionmfr_nc = rho_nc.*a.*v_nc; % mass flow ratep_nc = rho_nc.*T_nc; % pressureM_nc = v_nc./(T_nc.^0.5); % mach number<!-- [if mso]>
<![endif]-->% Values at Throatrho_nc_throat(p) = rho_nc(throat);T_nc_throat(p) = T_nc(throat);v_nc_throat(p) = v_nc(throat);mfr_nc_throat(p) = mfr_nc(throat);p_nc_throat(p) = p_nc(throat);M_nc_throat(p) = M_nc(throat);<!-- [if mso]>
<![endif]-->% comparison of non-dimensional mass flow rate at diff time stepsfigure(1)if z == 25plot(x, mfr_nc, 'r', 'linewidth', 1.5);hold onelseif z == 100plot(x, mfr_nc, 'c', 'linewidth', 1.5);hold onelseif z == 400plot(x, mfr_nc, 'g', 'linewidth', 1.5);hold onelseif z == 750plot(x, mfr_nc, 'y', 'linewidth', 1.5);hold onelseif z == 1400plot(x, mfr_nc, 'k', 'linewidth', 1.5);hold ontitle('mass flow rate at different timesteps of non-conservation form')xlabel('length of nozzle')ylabel('mass flow rate')legend('25th timesteps','100th timestep','400th timestep','750th timestep','1400th timestep')grid onendif n==31figure(2)plot(x,v_nc,'b',x,p_nc,'r',x,T_nc,'k',x,rho_nc,'m',x,M_nc,'g',x,mfr_nc,'c')ylim([-1 4])title (sprintf('Time step = %d',1i))xlabel('Length of nozzle')ylabel('Non dimensional parameters')legend('Velocity','Pressure','Temperature','Density','Mach number','Mass flow rate')title('non-Conservative form - Steady-state distribution of primitive variables inside the nozzle')end<!-- [if mso]>
<![endif]--><!-- [if mso]>
<![endif]--><!-- [if mso]>
<![endif]-->if n==31figure (3)plot(z,rho_nc_throat,'linewidth',1,'Marker','o')hold onplot(z,v_nc_throat,'linewidth',1,'Marker','+')plot(z,p_nc_throat,'linewidth',1,'Marker','*')plot(z,T_nc_throat,'linewidth',1,'Marker','x')plot(z,M_nc_throat,'linewidth',1,'Marker','.')plot(z,mfr_nc_throat,'linewidth',1,'Marker','square')xlabel('Time steps (nt)')ylabel('Non dimensional parameters')legend('Density','Velocity','Pressure','Temperature','Mach number','Mass flow rate')title('Non-Conservative form Time-wise variation of the primitive variables at throat point')end<!-- [if mso]>
<![endif]--><!-- [if mso]>
<![endif]-->endend<!-- [if mso]>
<![endif]-->end<![endif]-->
<!-- [if mso]>
<![endif]--><![endif]-->
Explanation:
- In the main code first, defined the input parameters of the problem like x, dx, n, gamma, c, L, nt.
- Then, defined the non-conservation and conservation form functions that are mentioned separately with required details.
- In the conservation form function, we written the initial conditions of density, temperature, velocity, area, Mach number and mass flow rate. Then created the time loop, then defined the Predicted method by writing the continuity, momentum, and energy equations and at the end of the predicted method update the solution terms.
- Then defined the corrected term loop by writing the spatial term equations of continuity, momentum and energy terms.
- Then calculated the average of predictive and corrective methods and termed it as average time derivative. And update the old solution terms.
- Then, mention both subsonic and supersonic boundary conditions. Then define the final solution terms.
- Then, calculate solution term values inside the nozzle that means at the throat point where, throat =((n-1)/2) +1 = 16.
- Then, plot the graphs of mass flow rate at different timesteps, Steady-state distribution of primitive variables, Time-wise variation of the primitive variables at throat point.
- Now, coming to the non-conservation form function, the initial boundary conditions differ from the previous function, and here we define the initial solution vectors U1, U2, U3. Then determined the time step variable dt, and the remaining initial conditions of solution terms.
- Then, updated the initial solution vectors at the end of the loop. Then defined the Flux vectors F1, F2, F3. Then calculated the Predicted method terms and updated the solution vectors and primitive terms and Flux vectors at the end of the loop.
- Then, we calculated the corrective method terms and then calculated the average time derivatives by averaging the predictive and corrective terms. After that define the final boundary conditions, and update the final primitive terms.
- Then, calculate the primitive term values at the point of throat, then plot the mass flow rate at different timesteps, Steady-state distribution of primitive variables, and Time-wise variation of the primitive variables at throat point.
- And in the main code plot the figures of Mass flow rate using "non-Conservative form vs Conservative form" at throat point, and Conservative form and Non conservation form: Grid independence test at throat point and Steady state simulation for primitive values for both non-Conservative form and Conservative form.
Results:
conservative form
Figure 1.

Figure 2.

Figure 3.

Observations:
By increasing the nozzle length, the math number and velocity parameters increase and the density, mass flow rate, density terms are decreased. And the mass flow rate terms at different timesteps and at increasing rate of nozzle length gets increases up to a short length of nozzle then decreases. And in the time wise variation of primitives the variables consumed high time to stabilize.
Figure 4.

Figure 5.

Figure 6.

Observations:
The mass flow rate term acts stable at timestep greater than 400 with respect to high nozzle length and the non-dimensional parameters consumed less time to become stable and almost same at the point of throat
Figure 7.

observation:
in the subplot 1 the both forms plots are similar and stable at every timestep. And in subplot 2 the conservative form plots are stable gradually increased with respect to timestep, and the non-conservative plots are almost stable at every timestep.
Figure 8.

Observations:
The mass flow rate at throat point of non-conservative form is high at short length of nozzle and decreases up to a length of 1.5 then increases. And the mass flow rate at the throat point of conservative form increases with respect to increase of length of nozzle.
Figure 9.

Here the nondimensional variables are plotted in both conservative and non-conservative forms with respect to nozzles length, here the Temperature gradually decrease in both the forms and the pressure variant high at minimum nozzle length and decreases with respect to increase of nozzle length. And the density term is similar to pressure variant and the velocity term gradually increases w.r.t to nozzle length.