modelTwoRoomsWithStorage
Extends from Modelica.Icons.Example (Icon for runnable examples).
Information
This example demonstrates the implementation of a building that has the following properties:
There are two rooms. (For simplicity, we only modeled two rooms, but more could be added.)
Each room is modeled using a dynamic model for the heat transfer through the opaque constructions.
The room roo1 has a south- and west-facing window, the room roo2 has a south- and
east-facing window.
The rooms are modeled as if they were in an intermediate floor, with the same temperature above and below
the room. The rooms share one common wall. The north facing wall is modeled as a partition wall, i.e., both
surfaces have the same boundary conditions.
Weather data are used from Chicago.
There is a hydronic heating system with a boiler, a storage tank and a radiator with a thermostatic valve in each room. The supply water temperature setpoint is reset based on the outside temperature. A three-way-valve mixes the water from the tank with the water from the radiator return. The pump has a variable frequency drive that controls the pump head.
A finite state machine is used to switch the boiler and its pump on and off. The boiler and pump are switched on when the temperature at the top of the tank is less then 1 Kelvin above the setpoint temperature for the supply water temperature of the radiator loop. The boiler and pump are switched off when the temperature at the bottom of the tank reaches 55 degree Celsius. The state transition of the finite state machine is such that first the pump of the boiler is switched on. Ten seconds later, the boiler will be switched on. When the tank reaches its temperature, the boiler is switched off, and ten seconds later, the pump will be switched off.
The building has a controlled fresh air supply. A heat recovery ventilator is used to preheat the outside air. Each room has a model for the leakage of the facade. If supply and exhaust air are unbalanced, then the difference in air supply will flow through this leakage model.
The hydronic heating system is connected to an expansion vessel. Some medium models for water compute the density as a function of temperature, while others assume a constant density. If the density is modeled as a function of temperature, then the water volume will increase when heated, and the expansion vessel will accumulate the added volume. As the water cools, this volume will flow from the expansion vessel into the hydronic heating system. If the medium model assumes the density to be constant, then the expansion vessel provides a reference pressure for the hydronic heating system.
The cooling of the two rooms is controlled using the
temperature of roo1.
The set point for mechanical cooling is 25 degree Celsius,
with a proportional band of 1 Kelvin.
If the room air temperature is above 22 degree Celsius, the free cooling is enabled by opening the bypass damper of the heat recovery. Free cooling is only allowed if the outside air temperature is above 16 degree Celsius and 1 Kelvin below the room air temperature.
The cooling control is implemented in the model Buildings.Examples.HydronicHeating.TwoRoomsWithStorage.CoolingControl.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | nRoo | 2 | Number of rooms |
| Modelica.Units.SI.Volume | VRoo | 4*6*3 | Volume of one room |
| Modelica.Units.SI.Power | Q_flow_nominal | 2200 | Nominal power of heating plant |
| Real | scaFacRad | 1.5 | Scaling factor to scale the power (and mass flow rate) of the radiator loop |
| Modelica.Units.SI.Temperature | TSup_nominal | 273.15 + 50 + 5 | Nominal supply temperature for radiators |
| Modelica.Units.SI.Temperature | TRet_nominal | 273.15 + 40 + 5 | Nominal return temperature for radiators |
| Modelica.Units.SI.Temperature | dTRad_nominal | TSup_nominal - TRet_nominal | Nominal temperature difference for radiator loop |
| Modelica.Units.SI.Temperature | dTBoi_nominal | 20 | Nominal temperature difference for boiler loop |
| Modelica.Units.SI.MassFlowRate | mRad_flow_nominal | scaFacRad*Q_flow_nominal/dTRad_nominal/4200 | Nominal mass flow rate of radiator loop |
| Modelica.Units.SI.MassFlowRate | mBoi_flow_nominal | scaFacRad*Q_flow_nominal/dTBoi_nominal/4200 | Nominal mass flow rate of boiler loop |
| Modelica.Units.SI.PressureDifference | dpPip_nominal | 10000 | Pressure difference of pipe (without valve) |
| Modelica.Units.SI.PressureDifference | dpVal_nominal | 6000 | Pressure difference of valve |
| Modelica.Units.SI.PressureDifference | dpRoo_nominal | 6000 | Pressure difference of flow leg that serves a room |
| Modelica.Units.SI.PressureDifference | dpThrWayVal_nominal | 6000 | Pressure difference of three-way valve |
| Modelica.Units.SI.PressureDifference | dp_nominal | dpPip_nominal + dpVal_nominal + dpRoo_nominal + dpThrWayVal_nominal | Pressure difference of loop |
| HeatTransfer.Data.OpaqueConstructions.Insulation100Concrete200 | matLayExt | Construction material for exterior walls | |
| HeatTransfer.Data.OpaqueConstructions.Brick120 | matLayPar | Construction material for partition walls | |
| HeatTransfer.Data.OpaqueConstructions.Generic | matLayFlo | Construction material for floor | |
| HeatTransfer.Data.GlazingSystems.DoubleClearAir13Clear | glaSys | Data record for the glazing system |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.BoundaryConditions.WeatherData.Bus | weaBus | Bus with weather data |
Components
Contents
| Name | Description |
|---|---|
| Medium model for air | |
| Medium model | |
| Controller for the free cooling and the mechanical cooling |
Revisions
-
September 15, 2023, by Michael Wetter:
Changed tank to tank with enhanced stratification, and added junctions at the tank inlet and outlet. -
February 24, 2023, by Michael Wetter:
Changed test to enable heating system which is now based on the outside air temperature, rather than the room air temperature, as the latter can fall below the threshold such as during window ventilation. -
August 22, 2022, by Hongxiang Fu:
ReplacedpumRadwith a preconfigured pump model. This is for issue #2668. -
June 9, 2022, by Michael Wetter:
Corrected outdoor temperature in instanceTOutSwiat which system switches on and off.
This is for issue 3059. -
September 21, 2021, by Michael Wetter:
Updated controls to use blocks from the CDL package. Replaced PID controller with CDL version.
This is for issue 2638. -
September 16, 2021, by Michael Wetter:
Removed assignment of parameterlatas this is now obtained from the weather data reader.
This is for IBPSA, #1477. -
March 4, 2021, by David Blum:
ChangeddpVal_nominalto 6 kPa. This is for issue 2378. -
April 6, 2016, by Michael Wetter:
ReplacedModelica_StateGraph2withModelica.StateGraph. This is for issue 504. -
March 1, 2016, by Michael Wetter:
Removed parameterdynamicBalance. This is for #484. -
January 22, 2016, by Michael Wetter:
Corrected type declaration of pressure difference. This is for #404. -
September 24, 2015 by Michael Wetter:
Set default temperature for medium to avoid conflicting start values for alias variables of the temperature of the building and the ambient air. This is for issue 426. -
January 12, 2015 by Michael Wetter:
Made media instances replaceable. This was done to simplify the numerical benchmarks. -
December 22, 2014 by Michael Wetter:
RemovedModelica.Fluid.Systemto address issue #311. -
October 15, 2013, by Michael Wetter:
Added free cooling and mechanical cooling. -
October 14, 2013, by Michael Wetter:
Corrected wrong pump head for radiator and for boiler pump. -
March 1, 2013, by Michael Wetter:
Removed assignment ofKv_SIbecause this is now a protected parameter. -
December 6, 2011, by Michael Wetter:
Added internal heat gains, which were set to zero in the previous version. -
January 30, 2009, by Michael Wetter:
First implementation.