Sie sind auf Seite 1von 6

# LAB 4 Report

## Shivam Sanjay Wankhede

2012ME10723
Wednesday group

Aim
To find the pressure distribution in a converging diverging nozzle using Matlab for various back
pressures.

Algorithm
First we need to check if the throat is choked or not. In case the throat is not choked, the flow
in the whole nozzle is subsonic. Once the throat is choked, the flow in the converging part is
subsonic and doesnt change for decrease in back pressure, but the in the diverging section the
flow could either be isentropic or there could be a shock.
To check if the throat is choked, we find the maximum back pressure at which the throat
chokes (lets call it pc) using the relation between pressure and A/As.

2
( + 1 )

(0.5)(+1)
1

(0.5)(+1)

()

[ 1 (( )

1
2

1)]

Where A, As, po and p are area of nozzle, sonic area, inlet stagnation pressure and pressure at
area A respectively. To find the pc, we substitute A, As and po with exit area, throat area and
inlet stagnation pressure respectively.
Now, if given back pressure is more than pc then the flow in the whole nozzle is subsonic. The
pressure distribution can be found using equation 1 as we have the geometry of nozzle, inlet
stagnation pressure and A* can be found using the same equation.
If the back pressure is less than pc, then first we need to check if the shock is present in the
diverging section of nozzle.
First we find the mach no. at the exit using

2 =

1
+1

1
1
2
2
+[
+
(
)
(
)
( 1)2
1
1 +1

1
2 2

(
) ]

From exit mach no. we find stagnation pressure after shock (po2) using following relation

1
= (1 +
2 )

In this equation, we have exit pressure (pb) and exit mach no. (Me), so we can find po2.
Now we can find mach no. just before the shock (M1) using equation 3 and following equations.
2
2
(12 1)
=1+
1
+1
22 =

1 + ( 1)12 /2
12 ( 1)/2

4
5

3.5

## (1 + 0.212 )(1.412 0.2)

(1 + 1.167(12 1)) = [
]
2
1.4412

After we get the mach no. just before the shock (M1), we can find the area at which that mach
no. occurs using area mach no. relationship.

1
2
1 2 (1/2)(+!)/(1)
= [
(1 +
)]
+ 1
2

Once we have the area, we get the position of the shock. If the position of the shock is inside
the nozzle, the shock exists else the flow is fully isentropic.

Graphs-

## Figure 3 Fully isentropic supersonic flow

Figure 4 Mass flow rate v/s Back pressure

Code
function P = pressure(x)
%Given conditions
p0 = 1; %inlet stagnation pressure
pb = x; %back pressure
g=1.4; % value of gamma for air
%first we check if the conditions are in the nozzle are subsonic or
supersonic
%we find the maximum back pressure at which nozzle chokes
pc = fsolve (@(x) - area(1)/area(0.3) + ((2/(g+1)).^(0.5*(g+1)/(g1)))*(p0/x).^(0.5*(g+1)/g) /((2/(g-1))*((p0/x).^((g-1)/g) -1)).^0.5 ,0.7);
% flow in throat will be sonic if pressure is <pc else it will be
subsonic
if pc<pb %subsonic conditions
% finding a* from given conditions
As = fsolve (@(x) -area(1)/x +(2/(g+1)).^(0.5*(g+1)/(g-1))
*(p0/pb).^(0.5*(g+1)/g) /((2/(g-1))*((p0/pb).^((g-1)/g) -1)).^0.5,1);
pr_dist = zeros(1,101); % array to plot pressure distribution
l=0:0.01:1; % array for length
n=0; m=1;
% now we make a loop to fill the 'pr_dist' array with the pressure
values
while n<1.01;
% solving for pressure using the area pressure relation
pr_dist(m) = fsolve (@(x) - area(n)/As +
((2/(g+1)).^(0.5*(g+1)/(g-1)))*(p0/x).^(0.5*(g+1)/g) /((2/(g1))*((p0/x).^((g-1)/g) -1)).^0.5 ,0.7);
m=m+1;
n=n+0.01;
end
plot (l,pr_dist);

% to find the mass flow rate we need the mach no. at throat
mach = fsolve(@(x) -area(0.3)/As + 1/x*(2/(g+1)*(1+(g1)/2*x^2))^(0.5*(g+1)/(g-1)),0.5)
mass = fsolve(@(x) -x + mach*((1+0.2*mach^2)*0.83)^-3,0.5);
P = mass
else % choked throat
% value of a* will be equal to area of throat
As = area(0.3);
pr_dist = zeros(1,101);% array to plot pressure distribution
l=0:0.01:1; % array for length
n=0; m=1;
%find mach no. at the exit if shock occurs
mes=fsolve(@(x) -x^2 - (g-1)^(-1) + ((g-1)^(-2)+(2 /(g1))*(2/(g+1))^((g+1)/(g-1))*((p0*area(0.3))/(pb*area(1)))^2)^0.5,0.1);
%stagnation pressure after shock
p02=fsolve(@(x) -x/pb + (1+((g-1)/2)*mes^2)^(g/(g-1)),0.1);
%stagnation pressure after shock
%mach no. just before shock
m1=fsolve(@(x) -p0/p02*(1+1.167*(x^2-1))+((1+0.2*x^2)*(1.4*x^20.2)/(1.44*x^2))^3.5,2);
% finding area at which shock is present from area - mach no.
relation
a1= fsolve(@(x) -x/area(0.3) + 1/m1*(2/(g+1)*(1+(g1)/2*m1^2))^(0.5*(g+1)/(g-1)),0.9);
%now we find the position of shock from the value of area
[shock_posi] = fsolve(@(x) area(x)-a1,1);
if shock_posi<1 % shock is present in the nozzle (practical solution
for position of shock)
% we find value of a* for flow after shock
As1 = fsolve (@(x) -area(1)/x+(2/(g+1)).^(0.5*(g+1)/(g-1))
*(p02/pb).^(0.5*(g+1)/g) /((2/(g-1))*((p02/pb).^((g-1)/g) -1)).^0.5,1);
while n<1.01;
% before throat, the solution for presuure will be near to 1
if n<=0.3
pr_dist(m) = fsolve (@(x) - area(n)/As +
((2/(g+1)).^(0.5*(g+1)/(g-1)))*(p0/x).^(0.5*(g+1)/g) /((2/(g1))*((p0/x).^((g-1)/g) -1)).^0.5 ,.7);
% after throat and before shock, pressure distribution will
be isentropic
elseif 0.3<n && n<shock_posi
pr_dist(m) = fsolve (@(x) - area(n)/As +
((2/(g+1)).^(0.5*(g+1)/(g-1)))*(p0/x).^(0.5*(g+1)/g) /((2/(g1))*((p0/x).^((g-1)/g) -1)).^0.5 ,0.1);
% after shock, solution will be according to new a*
else
pr_dist(m) = fsolve (@(x) - area(n)/As1 +
((2/(g+1)).^(0.5*(g+1)/(g-1)))*(p0/x).^(0.5*(g+1)/g) /((2/(g1))*((p0/x).^((g-1)/g) -1)).^0.5 ,0.7);
end
m=m+1;
n=n+0.01;
end
else % fully isentropic flow
while n<1.01;
if n<=0.3

## pr_dist(m) = fsolve (@(x) - area(n)/As +

((2/(g+1)).^(0.5*(g+1)/(g-1)))*(p0/x).^(0.5*(g+1)/g) /((2/(g1))*((p0/x).^((g-1)/g) -1)).^0.5 ,0.7);
else
pr_dist(m) = fsolve (@(x) - area(n)/As +
((2/(g+1)).^(0.5*(g+1)/(g-1)))*(p0/x).^(0.5*(g+1)/g) /((2/(g1))*((p0/x).^((g-1)/g) -1)).^0.5 ,0.1);
end
m=m+1;
n=n+0.01;
end
end
plot (l,pr_dist);
mass = 1;
P = mass
end
end
function [a] = area(x) % function for area
if x<= 0.3
a=12*(x-0.3)^2 + 1;
else
a=2*(x-0.3)^2 + 1;
end
end