simscape variable thermal mass - initial condition issue
5 次查看(过去 30 天)
显示 更早的评论
Hi everyone,
I have created a custom component representing a thermal mass, which mass is varying based on an input.
when I compare the results of a constant mass via the default simscape block and my custom block, the initial conditions are different, however the same initial temperature is specified. anyone experiencing the same issue? how can this be solved?
cheers
Benoit
here is the custom block code
component mass_custom
% Thermal Mass
% This block models internal energy storage in a thermal network. The rate
% of temperature increase is proportional to the heat flow rate into the
% material and inversely proportioanl to the mass and specific heat of the
% material.
% Copyright 2005-2016 The MathWorks, Inc.
inputs
S = {1, 'kg'}; % S:top
end
nodes
M = foundation.thermal.thermal; % :top
end
parameters
% mass_cu = {1, 'kg' }; % Mass Copper
% mass_iron = {1, 'kg' }; % Mass Stator Iron
sp_heat = {447, 'J/(kg*K)'}; % Specific heat
end
variables
% Differential variables
T = {value = {290, 'K'}, priority = priority.high}; % Temperature
Q = {0, 'W'}; % Heat flow rate
end
branches
Q : M.Q -> *;
end
equations
assert(S > 0)
assert(sp_heat > 0)
T == M.T;
Q == S * sp_heat * T.der;
assert(T > 0, 'Temperature must be greater than absolute zero')
end
end
0 个评论
回答(1 个)
Juan Sagarduy
2021-3-9
Hello Benoit,
It seems strange. Have you got the chance to share the files?
BR/Juan
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!