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 visualizaciones (últimos 30 días)

Respuesta aceptada

Torsten
Torsten el 10 de Jun. de 2022
Editada: Torsten el 10 de Jun. de 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 comentarios
Torsten
Torsten el 13 de Jun. de 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.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Data Import and Analysis en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by