Thermal mass variable beginning temperature
16 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hey guys,
I have one "Thermal Mass" block in Simulink, which represents a thermal mass, which is the ability of a material or combination of materials to store internal energy. In this standard block of Simulink, the initial temperature must be entered. Only one signal can be connected to the block.
I would like to build another component, whose initial temperature can come from another block. So, one input parameter and everything else should be the same. I have edited the block to have two signal able to connect; the node and the initial temperature. My idea was to define an input S and a node M, and then give the valor of S to T.
But when I define the variable 'T = {value = {S, 'K'}, priority = priority.high};', it fails.
component mass_v1
% 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 proportional to the mass and specific heat of the
% material.
inputs
S = {293.15, 'K'}; % S:bottom
end
nodes
M = foundation.thermal.thermal; % :top
end
parameters
mass = {1, 'kg' }; % Mass
sp_heat = {447, 'J/(kg*K)'}; % Specific heat
end
variables (Access=private)
T = {value = {S, 'K'}, priority = priority.high}; % Temperature
end
variables
Q = {0, 'W'}; % Heat flow rate
end
branches
Q : M.Q -> *;
end
equations
assert(mass > 0)
assert(sp_heat > 0)
T == M.T;
Q == mass * sp_heat * T.der;
assert(T > 0, 'Temperature must be greater than absolute zero')
end
end

I need to extract the initial temperature of the block because when I export the model to FMU, this parameter becomes in constant.
Any idea how this can be done?
Best regards,
0 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Sources in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!