Why am I getting error : "Line: 21 Column: 1 Illegal use of reserved keyword "variables".
4 次查看(过去 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 个评论
Rik
2021-7-26
@Marcel Kreuzberg Please move your comment to the answer section (by re-posting it). That way Kajal can accept it.
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Foundation and Custom Domains 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!