Plots not showing up
7 ビュー (過去 30 日間)
古いコメントを表示
My plots are currently not showing up. Also, I was wondering if there's a way for me to put figures 1 & 2 in one graph. Thank you for the help! I've attached my code below.
alt=0
Ma=0.92
deltaH=18100
pa=14.69
mdot=100
Tt4=2450
Ta=518.7
gamma=1.4
R=0.2399565
%Diffuser
aa=sqrt(gamma*R*32.17*Ta);
ua=Ma*aa;
Tta_Ta=(1+0.5*(gamma-1).*Ma^2);
Tta=506.21 * 1.03872;
Tt2=Tta;
Pta_Pa=(Tta_Ta)^((gamma)/(gamma-1));
Pt2_Pa=Pta_Pa;
Pt2=Pta_Pa*pa;
pi_c=linspace(5,20);
%Compressor
P_t3=pi_c.*P_t2;
tau_c=pi_c.^((gamma-1)./gamma);
T_t3=tau_c*T_t2;
%Primary Combustor
P_t4=P_t3;
m_dotf=(m_dot*Cp*(T_t4-T_t3))./ deltaH;
%Turbine
T_t5=1707.751
tau_t=T_t5./T_t4;
pi_t=0.2827511
P_t5=pi_t.*P_t4;
T_t55=T_t5;
P_t55=pt_5;
%Primary Nozzle
T_t6=T_t55;
P_t6=P_t55;
T_8=T_t6.*((P_8./P_t6).^((gamma-1)/gamma));
u_8=[2*Cp.*(T_t6-T_8)*32.17*778.16].^0.5;
a_8=(gamma*R*T_8.*32.17).^0.5;
M_8=u_8./a_8;
A_8=m_dotf.*144./(rho_8.*u_8*32.17);
%Total Thrust and TSFC
F=mdot.*u_8-mdot.*u_a;
nDF=(F.*32.17)./(mdot.*a_a);
TSFC=mdot./F;
TSFCaa=TSFC.*aa;
%% Graphs
%1.
f1=figure(1);clf;
plot (pi_c,TSFCaa,'k')
title('Figure 1. TSFC_a vs. \pi_c');
xlabel('\pi_c')
ylabel('TSFC_a_a')
f2=figure(2);clf;
plot(pi_c,nDF,'k')
title ('Figure 2. nDF_a vs. \pi_c');
xlabel('\pi_c')
ylabel('nDF_a')
1 件のコメント
KSSV
2022 年 2 月 28 日
In the given code all the variables are not defined. Give us all the variables.
You can show up two graphs in one using hold on. Read about it.
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Characters and Strings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!