필터 지우기
필터 지우기

Area Mach Number Relation

조회 수: 5 (최근 30일)
Steven Castrillon
Steven Castrillon 2019년 9월 30일
댓글: Steven Castrillon 2019년 9월 30일
I need to plot Mach number (M) as a function of Area ratios (A/A*) for subsonic and supersonic cases. I am trying to use newton-raphson method to iterate and find a converging solution for Mach number (M) at specific area ratios (A/A*), however i would like to be able to call in an array of A/A* inputs. The values for this array would from 0.1 to 10 (or 0.1:0.1:10) .
The function in question is
@(M) (1/M^2)*(((2+gm1*M^2)/gp1)^(gp1/gm1))-ARatio^2;
the variables for this function are;
g = 1.4;
gm1 = g-1;
gp1 = g+1;
Any help would be greatly appreciated!!!

답변 (1개)

darova
darova 2019년 9월 30일
Here is what i reached using polyxpoly
g = 1.4;
gm1 = g-1;
gp1 = g+1;
F = @(M) 1./M.^2.*((2+gm1*M.^2)/gp1).^(gp1/gm1);%-ARatio^2;
M = linspace(0.1,3.5); % Mach number
A = sqrt( F(M) ); % A ratio
plot(M,A) % draw function
hold on
% find Mach number of each A
for a = linspace(0.1,5,10)
mm = [0 4]; % just horizontal line
aa = [a a];
[xm,ya] = polyxpoly(mm,aa,M,A);
plot(xm,ya,'.-r')
end
hold off
  댓글 수: 5
darova
darova 2019년 9월 30일
I like it
Steven Castrillon
Steven Castrillon 2019년 9월 30일
yes but can you please help me to introduce an array of values for ARatio?
in the code i provided, ARatio is set as : ARatio = 1.5
when i set it as: ARatio = [0.1:0.1:10] i get an error at
Error in AREAMACH2 (line 62)
if (fj*fjp1 > 0)
Please help

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Newton-Raphson Method에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by