Why am I getting error : "Line: 21 Column: 1 Illegal use of reserved keyword "variables".

3 次查看(过去 30 天)
I am trying to model a Tablet coater thermodynamic model to account for the change in thermodynamic properties with temperature of moist air and thermal liquid (water). For this, I want to make a costumized block which will solve the balanced equation relating inlet temperature and exhaust temp. i.e., Taout = (Mai*Cpa*Tai+Xw*Mcoat*Cpw*Tcoat-Xw*Mcoat*Hlv+Xorg*Mcoat*Cporg*Tcoat-Xorg*Mcoat*Hvorg+HLF*Trt)/(Mai*Cpa+Xw*Mcoat*Cpw+Xorg*Mcoat*Cporg +HLF)
I am new to simscape. Please help me in solving this error.
component Tablet_coater
% This is a thermodynamic model of tablet film coater
% which gives the relationship between inlet temperature and exhaust
%temperature
parameters
% Add parameters here
HLF = { 150 , 'cal/min*C' }; % Heat Loss Factor
Trt = { 25 , 'degree celcius'}; % Ambient temperature
end
nodes
b = foundation.moist_air.moit_air; % b:left
c = foundation.thermal_liquid.thermal_liquid; %c:left
end
outputs
Taout = { 0 , 'deg'}; %exhaust temperature:right
variables
Tin_b = {value={0,'deg'},imin={0,'deg'},imax={100,'deg'}};
Tcoat_c = {value={0,'deg'},imin={0,'deg'},imax={100,'deg'}};
end
variables (balancing = true)
Mai_b = { 0 , 'g/min' };
Cpa_b = { 0 , 'cal/g*C' };
Xw_c = 0;
Xorg_c = 0;
Cporg_c = { 0 , 'cal/g*C' };
Cpw_c = {0 , 'cal/g*C' };
Mcoat_c = { 0 , 'g/min' };
Hlv_c = { 0 , 'cal/g' };
Hvorg_c = {0 , 'cal/min*C' };
end
branches
Mai_b : b.Mai -> *;
Cpa_b : b.Cpa -> *;
Xw_c : c.Xw -> *;
Xorg_c : c.Xorg -> *;
Cporg_c : c.Cporg -> *;
Cpw_c : c.Cpw -> *;
Mcoat_c : c.Mcoat -> *;
Hlv_c : c.Hlv -> *;
Hvorg_c : c.Hvorg -> *;
end
equations
% Add equations here
Taout == fcn(Mai,Cpa,Xw,Xorg,Cporg,Cpw,Mcoat,Tcoat,Tai,Hlv,Hvorg);
Taout == (Mai*Cpa*Tai+Xw*Mcoat*Cpw*Tcoat-Xw*Mcoat*Hlv+Xorg*Mcoat*Cporg*Tcoat-Xorg*Mcoat*Hvorg+HLF*Trt)/(Mai*Cpa+Xw*Mcoat*Cpw+Xorg*Mcoat*Cporg +HLF);
end
end
  3 个评论

请先登录,再进行评论。

采纳的回答

Marcel Kreuzberg
Marcel Kreuzberg 2021-7-27
'end' missing after outputs block (before variables)
regards
Marcel

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Foundation and Custom Domains 的更多信息

标签

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by