clear; close all; clc;
Vau = 43;
theta_u = 71.8;
gamma = 5/3;
Vsu = 47.45;
tic
unu_f = [];
for r = 0:0.2:4
if r>3.9
r = 3.88;
end
syms Unu
A = r*Vau^2*cosd(theta_u)^2;
B = 2*r*Vsu^2/(r+1-gamma*(r-1));
C = r*Vau^2*sind(theta_u)^2;
D = (2*r - gamma*(r-1))/(r+1 - gamma*(r - 1));
x = Unu^2;
z2 = real(double(solve((x - A)^2*(x - B) - C*x*(D*x - A))));
unu_f = [unu_f;z2'];
end
toc
r2 = 0:0.2:3.9;
r1 = 3.88;
r = [r2 r1];
figure;
subplot(2,2,4)
x = abs(unu_f(:,1));
y = r;
yyaxis left
plot(x,y,'ob')
ylim([0 4]); xlim([0 1200]);
ylabel('r (Shock Strength)','FontWeight','bold','FontSize',10);
xlabel('Shock Speed (km/s)','FontWeight','bold','FontSize',10);
box on; grid on;
set(gca,'XMinorTick','on','YMinorTick','on','FontSize',12,'FontWeight','bold')
set(gca,'LineWidth',2.25,'TickLength',[0.010 0.010],'YColor',[0 0 0]);
0 Comments
Sign in to comment.