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

3 visualizzazioni (ultimi 30 giorni)

Risposta accettata

Torsten
Torsten il 10 Giu 2022
Modificato: Torsten il 10 Giu 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 Commenti
Torsten
Torsten il 13 Giu 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.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Data Import and Analysis in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by