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 件のコメント
KAJAL KUMARI
KAJAL KUMARI 2021 年 7 月 26 日
Okay, Thank you so much...
Rik
Rik 2021 年 7 月 26 日
@Marcel Kreuzberg Please move your comment to the answer section (by re-posting it). That way Kajal can accept it.

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

採用された回答

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFoundation 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