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 Ansichten (letzte 30 Tage)

Akzeptierte Antwort

Torsten
Torsten am 10 Jun. 2022
Bearbeitet: Torsten am 10 Jun. 2022
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 Kommentare
Torsten
Torsten am 13 Jun. 2022
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.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Data Import and Analysis finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by