This part of the system model adds a radiator with a prescribed mass flow rate to the system that is implemented in Buildings.Examples.Tutorial.Boiler.System1.


This model was built as follows:

  1. First, we copied the model Buildings.Examples.Tutorial.Boiler.System1 and called it Buildings.Examples.Tutorial.Boiler.System2.

  2. Since this model uses water as the medium, we declared the water medium model at the top-level of the model by adding the lines

      replaceable package MediumW =
          Buildings.Media.Water "Medium model";
  3. To model the pump, a temperature sensor which we will need later for the control, and a flow sink, we made instances of the models Buildings.Fluid.Movers.FlowControlled_m_flow (instance pumRad for the pump that serves the radiators), Buildings.Fluid.Sensors.TemperatureTwoPort (instance temSup), Buildings.Fluid.HeatExchangers.Radiators.RadiatorEN442_2 (instance rad), and Buildings.Fluid.Sources.Boundary_pT (instance sou and sin for the sink and source reservoirs, which will later be replace by the boiler loop).

    In all of these instances, we set the medium model to MediumW. We also made an instance of the model Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor (instance temRoo) to measure the room temperature. We connected the model as shown in the figure below.


    Note that there are two connections from the radiator to the room volume: One connection is for the convective heat flow rate, and the other is for the radiative heat flow rate. For simplicity, we assumed that the air and radiative temperature of the room are equal. Furthermore, we simplified the model by using only one radiator instead of multiple radiators, although this radiator will be quite large as it needs to provide a heat flow rate of 20 kW.

  4. Next, we computed the design mass flow rate for the radiator. According to the schematic drawing, the radiator should have at the design conditions a supply water temperature of 50°C and a return water temperature of 40°C. Thus, we define the radiator mass flow rate as

      parameter Modelica.Units.SI.HeatFlowRate Q_flow_nominal = 20000
        "Nominal heat flow rate of radiator";
      parameter Modelica.Units.SI.Temperature TRadSup_nominal = 273.15+50
        "Radiator nominal supply water temperature";
      parameter Modelica.Units.SI.Temperature TRadRet_nominal = 273.15+40
        "Radiator nominal return water temperature";
      parameter Modelica.Units.SI.MassFlowRate mRad_flow_nominal =
        "Radiator nominal mass flow rate";
  5. Now, we set the mass flow rate of pumRad and temSup to mRad_flow_nominal. We also set the temperature of the fluid that flows out of sou to TRadSup_nominal. We configured the parameters of the radiator model as

      Buildings.Fluid.HeatExchangers.Radiators.RadiatorEN442_2 rad(
        redeclare package Medium = MediumW,
        T_b_nominal=TRadRet_nominal) "Radiator";

    We configured the parameters of the pump model as

      Buildings.Fluid.Movers.FlowControlled_m_flow pumRad(
        redeclare package Medium = MediumW,
        "Pump for radiator";
  6. To enable the pump when the room temperature is below 19°C and to switch it off when the room temperature is below 21°C, we implemented the control blocks as shown in the figure below.


    In this control sequence, the first block is a hysteresis element, which is modeled by Buildings.Controls.OBC.CDL.Reals.Hysteresis. It is configured as

      Buildings.Controls.OBC.CDL.Reals.Hysteresis hysPum(
        uLow=273.15 + 19,
        uHigh=273.15 + 21)
        "Pump hysteresis";

    to output false when the input signal falls below 19°C, and true when the input signal raises above 21°C. Next, we send the output to the instance not1, which outputs

      y= not u

    to negate the signal. The output of this signal is a boolean value, but the pump input signal is the required mass flow rate. Thus, we used the block Buildings.Controls.OBC.CDL.Conversions.BooleanToReal to convert the signal. We set the parameters of the boolean to real converter as

      Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToReaRad(
            realFalse=0) "Radiator pump signal";

    For numerical reasons, in particular in large system models, it is recommended to continuously change the mass flow rate, as opposed to having a step change. Therefore, in the instance pumRad, we leave the parameter use_inputFilter at its default value true. This will approximate a continuous change in mass flow rate when the pump is switched on or off. Finally, we closed the control loop between the room temperature sensor and the pump input signal.

This completes the initial version of the model. When simulating the model for 2 days, or 172800 seconds, the response shown below should be seen.


The figure shows that the room temperature is maintained at 20°C when the internal heat gain is zero, and controlled around 19°C to 21°C when there is an internal heat gain. The temperature is slightly outside this temperature range because of the time lag that is caused by the thermal capacity of the radiator.


For a more realistic model of a room, the model Buildings.ThermalZones.Detailed.MixedAir could have been used. For transient heat conduction, models from the package Buildings.HeatTransfer.Conduction could have been used.


MediumWMedium model


Generated at 2024-07-21T18:15:58Z by OpenModelicaOpenModelica 1.23.1 using GenerateDoc.mos