How do I fix the error invalid use of operator?

4 次查看(过去 30 天)
T = 623;FAO = 29.9;CAO = 13114;VAO = 0.00228;Ko = 0.0000351;D = 0.5;
E = 72.38;x = 0.95;R = 8.314;dHr = 62.9;Dj = 0.6;Kh = 0.58;Dt = 0.5;
Kp = 0.145;Th1 =368;Th2 =296;Mp = 1.736;n = 5.2;nh = 0.932;nw = 0.281;
v = 0.0224; p = 790;Cp = 4.184;np = 20;ns =5.2;Tr =0.05;Kr =0.162;Ud = 0.764;
K = Ko*exp(-E/(R*T))
%Concentration of the feed
C = CAO*(1-x)@(x)1./(1-x);
%Parameters of the reactor
V = (FAO/(K*CAO))*quad(@(x)1./(1-x),0,0.95)
L = (4*V)/(pi*D^2)
St = V/VAO
Sv = 1./St
%Total heat load
Q = dHr*x*FAO
Hr = Q/V
Gp = Mp/(pi*(0.25^2))
NRE = (Gp*D)/n
% Friction factor
Jh = 0.027/(NRE^2)
%Pressure drop
P = (8*Jh*(L/D)*p*(v^2))/2
%Parameters of Reactor jacket
dT = Th1-Th2;Mh = Q/(Cp*dT)
%Mass Flow Rate of heating Fluid per Unit Volume of Reactor
Mhr = Mh/V
%Film Heat Transfer Coefficient for Reactor Jacket
Gh = Mh/(pi*0.3^2)
Zn = Kh/Dj;Rn =(Dj*Gh)/nh;Pr =(Cp*nh)/Kh;Vn =nh/nw
hj = 0.023*(Kh/Dj)*(Rn^0.8)*(Pr^(1/3))*(Vn^0.14)
%Film Heat Transfer Coefficient for Reactor Tank Side
Znt = Kp/Dt;Rnt =(Dt*Gp)/np; Prt =(Cp*np)/Kp; Vnt =np/ns
ht = 0.054*(Kp/D)*(Rnt^0.66)*(Prt^(1/3))*(Vnt^0.14)
% Overall Heat transfer coeffient
y=(1./ht)+(Tr/Kr)+(1./hj);Uo =(1./y)
%Log Mean Temperature
dT1=T-Th2; dT2=T-Th1; dTm = dT2/dT1
Tm = (dT2-dT1)/(log10(dTm))
%Heat Transfer Area
A = Q/(Uo*Tm)
%Clean Overall Film Transfer Coefficient
Uc = (hj*ht)/(hj+ht)
%Fouling Resistance
Rf =(Uc-Ud)/(Ud*Uc)
plot(V,T), xlabel('V (m^3)'), ylabel('T (k)'), title('Temperature against Volume Graph')

回答(1 个)

KSSV
KSSV 2023-5-3
You should change this line:
C = CAO*(1-x)@(x)1./(1-x);
to
C = @(x) CAO*(1-x).*1./(1-x);
  3 个评论
KSSV
KSSV 2023-5-3
It is becuase you are using only a single value. You need to input array of values to get graph.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Thermal Analysis 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by