필터 지우기
필터 지우기

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

조회 수: 1 (최근 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
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 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