I am calculating the needed mass flow from a source to heat up water from 10°C to 35°C from the heat demand at any given moment.
Introducing this model to my simulation increased the simulation time a lot!
model m_flow_calc
"A simple model to calculated the primary mass flow needed to heat up space heating water "
import SI = Modelica.SIunits;
parameter SI.Temperature T_SHW_out = 30+273.15 "Temperature of the space heating water supply temperature";
parameter SI.Temperature T_SHW_in = 10+273.15 "Temperature of the space heating water return temperature";
Modelica.Blocks.Interfaces.RealInput Q_demand;
equation
m_flow =-Q_demand/(4120*(T_SHW_out-T_SHW_in)); //"Calculating the primary mass flow for a given Heating demand to heat the space heating water to the set temperature"
end m_flow_calc;
With the calculated mass flow a boundary draws the mass flow through a heat exchanger. The Temperature after the HEX is then carried over to another boundary that "pushes" out the same mass flow like in the first boundary.
Is there something i am missing that is slowing down the simulation?