I have to write a code with using these formulas. (Gama=1.4 M1=3.4) Then I have to reach p02/p01~= 1. So beta in the code should be changable. At the end M2 will also found

조회 수: 2 (최근 30일)

채택된 답변

Torsten
Torsten 2022년 6월 10일
편집: Torsten 2022년 6월 10일
fun = @(beta,p02divp01,M1,gamma)p02divp01-((gamma+1)*M1.^2.*sin(beta).^2./...
(2+(gamma-1)*M1.^2.*sin(beta).^2)).^(gamma/(gamma-1)).*...
((gamma+1)./(2*gamma*M1.^2.*sin(beta).^2-(gamma-1))).^1/(gamma-1);
p02divp01 = 1.0;
M1 = 3.4;
gamma = 1.4;
beta0 = pi/4;
beta = fzero(@(beta)fun(beta,p02divp01,M1,gamma),beta0);
beta_degree = beta*180/pi
beta_degree = 13.1745
theta = atan(2*cot(beta).*M1.^2.*sin(beta).^2./(M1.^2.*(gamma+cos(2*beta))+2.0));
theta_degree = theta*180/pi
theta_degree = 10.1904
M2 = sqrt((2+(gamma-1)*M1.^2.*sin(beta).^2)./...
((2.0*gamma*M1.^2.*sin(beta).^2-(gamma-1)).*sin(beta-theta).^2))
M2 = 25.3984
  댓글 수: 3
Torsten
Torsten 2022년 6월 13일
I assumed p02/p01 and M1 as given. From these inputs, I calculated beta from the second equation, theta from the first equation and at last M2 from the third equation.
So with the above code, you could vary p02/p01 and M1 as inputs and get different beta, theta and M2 as output.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Import and Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by