In: Mechanical Engineering
Consider a pipe (diameter of 50 mm) with air flowing through it.
The inlet conditions are: Mach 3; total pressure = 1000 kPa and 550
K. The friction coefficient (f) is 0.004. The exit Mach number
decreases with the length of the pipe. Assume adiabatic, steady
flow.
Write a short Matlab code and plot the following,
while the exit Mach number changes from 2.5 to 0.99 with increments
of ?M=0.01. Find the length of the pipe that is going to give the
desired exit Mach number. Find the pipe exit pressure, pipe exit
temperature, and pipe exit total pressure.
For given problem flow is adiabatic and steady..Air is assumed as working fluied with constant =1.4 .
f is constant..This is a fanno flow problem where given relation can be used -
the given relation can be found easily for fanno flow..
other relation that are used -
Using these a matlab code is here -
y=1.4; %flow coefficent
Po1=1000 ;%inlet toal pressure (in kPa)
T1=550 ;%inlet temperature in kelvin
f=0.004; %friction coefficient
M1=3; %inlet mach number
D=50*10^-3; %Diameter of the pipe
M2=2.5:-0.01:0.99; %exit mach no.
%Fanno flow relation
jj=(y+1)/(2*y);
L=-(D/f)*((jj*log((1+(y-1)/2*M2.^2)/(1+(y-1)/2*M1^2)))-(1/y*(1./M2.^2-1/M1^2)-jj*log(M2.^2/M1^2)));
P1=Po1/(1+(y-1)/2*M1^2)^(y/(y-1)); %inlet pressure
tt=((1+(y-1)/2*M1^2)./(1+(y-1)/2*M2.^2)); %T2/T1 (temperature
ratio)
T2=tt*T1; %exit temperature
P2=P1*(M1./M2).*sqrt(tt); %exit pressure
Po2=P2.*(1+(y-1)/2*M2.^2).^(y/(y-1)); %exit total pressure
plot(M2,L);
xlabel('M2');
ylabel('L(in cm)')
title('Exit mach no. variation with length of pipe')
figure;
plot(M2,Po2);
xlabel('M2');
ylabel('Po2(in kPa)')
title('Exit mach no. variation with exit total pressure')
figure;
plot(M2,T2);
xlabel('M2');
ylabel('T2(in K)')
title('Exit mach no. variation with exit temperature')
figure;
plot(M2,P2);
xlabel('M2');
ylabel('P2(in K)')
title('Exit mach no. variation with exit pressure')