How to solve it?

1 回表示 (過去 30 日間)
Syed Muhammad Hassan Mehdi
Syed Muhammad Hassan Mehdi 2017 年 12 月 17 日
I am getting nothing in the plot(T,PA)
for T=120:10:230
Ao=4.2968;A1=-3.4709*10^-1;A2=-1.1008*(10^-1);A3=1.4812*(10^-2);
A4=-1/1150*(10^-3);b1=1.29*(10^-5); b2=4.86*(10^3);
l=100;
l1=l/1000; %conversion in meters
D=25;
R=D/2000; %conversion in meters and radius
m=10;
T1=T+273.15; %conversion to Kelvins
roh=0.7;
Q=m/roh;
Q1=Q/(100^3);
St=((4*Q1)/(pi*R.^3));
aT=b1*exp(b2./T1);
lA1=log10(aT.*St);
n=1+A1+2*A2*lA1+3*A3*(lA1.^2)+4*A4*(lA1.^3);
n1=1./n;
eta=log10(aT)+Ao+A1.*lA1+A2*(lA1.^2)+A3.*(lA1.^3)+A4.*(lA1.^4);
eta1=10.^eta;
ShSt=eta1.*St;
K=St./(ShSt.^n1);
B1=(3+n1)./n1;
B2=(pi/4).^1./n1;
G=B2.*((R').^B1)./(2.*l1);
P1=(Q1.^(1./n1));
P2=(K.^(1./n1));
PA=P1./(P2.*G); end
  1 件のコメント
Syed Muhammad Hassan Mehdi
Syed Muhammad Hassan Mehdi 2017 年 12 月 17 日
I am frustrated finding the right syntax. Help will be very much appreciated.

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2017 年 12 月 17 日
Tvals = 120:10:230;
numT = length(Tvals);
PA = zeros(1, numT);
for Tidx = 1 : numT
T = Tvals(Tidx);
Ao = ...
etc
PA(Tidx) = P1./(P2.*G);
end
plot(Tvals, PA);
  1 件のコメント
Syed Muhammad Hassan Mehdi
Syed Muhammad Hassan Mehdi 2017 年 12 月 17 日
Thank you very much. It worked.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeNumeric Solvers についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by