User's Guide
The package Buildings.Rooms contains models for heat transfer through the building envelope. Multiple instances of these models can be connected to create a multi-zone building model. To compute the air exchange between rooms and between a room and the exterior, the room models can be connected to multi-zone air exchange models from the package Buildings.Airflow. The room models can also be linked to models of HVAC systems that are composed of the components in the package Buildings.Fluid.
Extends from Modelica.Icons.Information (Icon for general information packages).
Name | Description |
---|---|
MixedAir | Room model with instantaneously mixed air |
CFD | Room model with air heat and mass balance computed using Computational Fluid Dynamics |
Room model with instantaneously mixed air
The model Buildings.Rooms.MixedAir is a model of a room with completely mixed air. The room can have any number of constructions and surfaces that participate in the heat exchange through convection, conduction, infrared radiation and solar radiation.
A description of the model assumptions and the implemention and validation of this room model can be found in Wetter et al. (2011). Note that this paper describes a previous version of the room model. The equations have not changed. However, what is shown in Figure 2 in the paper has in this version of the model been integrated directly into what is shown in Figure 1.
The room models the following physical processes:
The next paragraphs describe how to instantiate a room model. To instantiate a room model,
Entering parameters may be easiest in a textual editor.
In the here presented example, we assume we made several instances of data records for the construction material by dragging them from the package Buildings.HeatTransfer.Data to create the following list of declarations:
Buildings.HeatTransfer.Data.OpaqueConstructions.Insulation100Concrete200 matLayExt "Construction material for exterior walls" annotation (Placement(transformation(extent={{-60,140},{-40,160}}))); Buildings.HeatTransfer.Data.OpaqueConstructions.Brick120 matLayPar "Construction material for partition walls" annotation (Placement(transformation(extent={{-20,140},{0,160}}))); Buildings.HeatTransfer.Data.OpaqueConstructions.Generic matLayRoo( material={ HeatTransfer.Data.Solids.InsulationBoard(x=0.2), HeatTransfer.Data.Solids.Concrete(x=0.2)}, final nLay=2) "Construction material for roof" annotation (Placement(transformation(extent={{20,140},{40,160}}))); Buildings.HeatTransfer.Data.OpaqueConstructions.Generic matLayFlo( material={ HeatTransfer.Data.Solids.Concrete(x=0.2), HeatTransfer.Data.Solids.InsulationBoard(x=0.1), HeatTransfer.Data.Solids.Concrete(x=0.05)}, final nLay=3) "Construction material for floor" annotation (Placement(transformation(extent={{60,140},{80,160}}))); Buildings.HeatTransfer.Data.GlazingSystems.DoubleClearAir13Clear glaSys( UFra=2, shade=Buildings.HeatTransfer.Data.Shades.Gray(), haveExteriorShade=false, haveInteriorShade=true) "Data record for the glazing system" annotation (Placement(transformation(extent={{100,140},{120,160}})));
Note that construction layers are assembled from the outside to the room-side. Thus, the construction
matLayRoo
has an exterior insulation. This constructions can then be used in the room model.
Before we explain how to declare and parametrize a room model, we explain the different models that can be used to compute heat transfer through the room enclosing surfaces and constructions. The room model Buildings.Rooms.MixedAir contains the constructions shown in the table below. The first row of the table lists the name of the data record that is used by the user to assign the model parameters. The second row lists the name of the instance of the model that simulates the equations. The third column provides a reference to the class definition that implements the equations. The forth column describes the main applicability of the model.
Record name | Model instance name | Class name | Description of the model |
---|---|---|---|
datConExt | modConExt | Buildings.Rooms.Constructions.Construction | Exterior constructions that have no window. |
datConExtWin | modConExtWin | Buildings.Rooms.Constructions.ConstructionWithWindow |
Exterior constructions that have a window. Each construction of this type must have one window.
Within the same room, all windows can either have an interior shade, an exterior shade or no shade. Each window has its own control signal for the shade. This signal is exposed by the port uSha , which
has the same dimension as the number of windows. The values for uSha must be between
0 and 1 . Set uSha=0 to open the shade, and uSha=1
to close the shade.Windows can also have an overhang, side fins, both (overhang and sidefins) or no external shading device. |
datConPar | modConPar | Buildings.Rooms.Constructions.Construction | Interior constructions such as partitions within a room. Both surfaces of this construction are inside the room model and participate in the infrared and solar radiation balance. Since the view factor between these surfaces is zero, there is no infrared radiation from one surface to the other of the same construction. |
datConBou | modConBou | Buildings.Rooms.Constructions.Construction |
Constructions that expose the other boundary conditions of the other surface to the outside of this room model.
The heat conduction through these constructions is modeled in this room model.
The surface at the port opa_b is connected to the models for convection, infrared and solar radiation exchange
with this room model and with the other surfaces of this room model.
The surface at the port opa_a is connected to the port surf_conBou of this room model. This could be used, for example,
to model a floor inside this room and connect to other side of this floor model to a model that computes heat transfer in the soil.
|
surBou | N/A | Buildings.HeatTransfer.Data.OpaqueSurfaces.Generic |
Opaque surfaces of this room model whose heat transfer through the construction is modeled outside of this room model.
This object is modeled using a data record that contains the area, solar and infrared emissivities and surface tilt.
The surface then participates in the convection and radiation heat balance of the room model. The heat flow rate and temperature
of this surface are exposed at the heat port surf_surBou .
An application of this object may be to connect the port surf_surBou of this room model with the port
surf_conBou of another room model in order to couple two room models.
Another application would be to model a radiant ceiling outside of this room model, and connect its surface to the port
surf_conBou in order for the radiant ceiling model to participate in the heat balance of this room.
|
With these constructions, we may define a room as follows:
Buildings.Rooms.MixedAir roo( redeclare package Medium = MediumA, AFlo=6*4, hRoo=2.7, nConExt=2, datConExt(layers={matLayRoo, matLayExt}, A={6*4, 6*3}, til={Buildings.Types.Tilt.Ceiling, Buildings.Types.Tilt.Wall}, azi={Buildings.Types.Azimuth.S, Buildings.Types.Azimuth.W}), nConExtWin=nConExtWin, datConExtWin(layers={matLayExt}, A={4*3}, glaSys={glaSys}, hWin={2}, wWin={2}, fFra={0.1}, til={Buildings.Types.Tilt.Wall}, azi={Buildings.Types.Azimuth.S}), nConPar=1, datConPar(layers={matLayPar}, each A=10, each til=Buildings.Types.Tilt.Wall), nConBou=1, datConBou(layers={matLayFlo}, each A=6*4, each til=Buildings.Types.Tilt.Floor), nSurBou=1, surBou(each A=6*3, each absIR=0.9, each absSol=0.9, each til=Buildings.Types.Tilt.Wall), linearizeRadiation = true , energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, lat=0.73268921998722) "Room model" annotation (Placement(transformation(extent={{46,20},{86,60}})));
The following paragraphs explain the different declarations.
The statement
redeclare package Medium = MediumA, AFlo=20, V=20*2.5,
declares that the medium of the room air is set to MediumA
,
that the floor area is 20 m2 and that
the room air volume is 20*2.5 m3.
The floor area is used to scale the internal heat
gains, which are declared with units of W/m2
using the input signal qGai_flow
.
The next entries specify constructions and surfaces that participate in the heat exchange.
The entry
nConExt=2,
declares that there are two exterior constructions.
The lines
datConExt(layers={matLayRoo, matLayExt}, A={6*4, 6*3}, til={Buildings.Types.Tilt.Ceiling, Buildings.Types.Tilt.Wall}, azi={Buildings.Types.Azimuth.S, Buildings.Types.Azimuth.W}),
declare that the material layers in these constructions are
set the records matLayRoo
and matLayExt
.
What follows are the declarations for the surface area,
the tilt of the surface and the azimuth of the surfaces. Thus, the
surface with construction matLayExt
is 6*3 m2 large
and it is a west-facing wall.
Next, the declaration
nConExtWin=nConExtWin, datConExtWin(layers={matLayExt}, A={4*3}, glaSys={glaSys}, hWin={2}, wWin={2}, fFra={0.1}, til={Buildings.Types.Tilt.Wall}, azi={Buildings.Types.Azimuth.S}),
declares the construction that contains a window. This construction is built
using the materials defined in the record matLayExt
. Its total area,
including the window, is 4*3 m2.
The glazing system is built using the construction defined in the record
glaSys
. The window area is hwin=2 m high
and
wwin=2 m wide.
The ratio of frame
to total glazing system area is 10%.
Optionally, each window can have an overhang, side fins or both. If the above window were to have an overhang of 2.5 m width that is centered above the window, and hence extends each side of the window by 0.25 m, and has a depth of 1 m and a gap between window and overhang of 0.1 m, then its declaration would be
ove(wL={0.25}, wR={0.25}, gap={0.1}, dep={1}),
This line can be placed below the declaration of wWin
.
This would instanciate the model
Buildings.HeatTransfer.Windows.Overhang to model the overhang. See this class for a picture of the above dimensions.
If the window were to have side fins that are 2.5 m high, measured from the bottom of the windows, and hence extends 0.5 m above the window, are 1 m depth and are placed 0.1 m to the left and right of the window, then its declaration would be
sidFin(h={0.5}, gap={0.1}, dep={1}),
This would instanciate the model Buildings.HeatTransfer.Windows.SideFins to model the side fins. See this class for a picture of the above dimensions.
The lines
til={Buildings.Types.Tilt.Wall}, azi={Buildings.Types.Azimuth.S}),
declare that the construction is a wall that is south exposed.
Note that if the room were to have two windows, and one window has side fins and the other window has an overhang, the
following declaration could be used, which sets the value of dep
to 0
for the non-present side fins or overhang, respectively:
sidFin(h = {0.5, 0}, gap = {0.1, 0.0}, dep = {1, 0}), ove(wL = {0.0, 0.25}, wR = {0.0, 0.25}, gap = {0.0, 0.1}, dep = {0, 1}),
What follows is the declaration of the partition constructions, as declared by
nConPar=1, datConPar(layers={matLayPar}, each A=10, each til=Buildings.Types.Tilt.Wall),
Thus, there is one partition construction. Its area is 10 m2 for each surface, to form a total surface area inside this thermal zone of 20 m2.
Next, the declaration
nConBou=1, datConBou(layers={matLayFlo}, each A=6*4, each til=Buildings.Types.Tilt.Floor),
declares one construction whose other surface boundary condition is exposed by this
room model (through the connector surf_conBou
).
The declaration
nSurBou=1, surBou(each A=6*3, each absIR=0.9, each absSol=0.9, each til=Buildings.Types.Tilt.Wall),
is used to instantiate a model for a surface that is in this room.
The surface has an area of 6*3 m2, absorptivity in the infrared and the solar
spectrum of 0.9 and it is a wall.
The room model will compute infrared radiative heat exchange, solar radiative heat gains
and infrared radiative heat gains of this surface. The surface temperature and
heat flow rate are exposed by this room model at the heat port
surf_surBou
.
A model builder may use this construct
to couple this room model to another room model that may model the construction.
The declaration
linearizeRadiation = true,
causes the equations for radiative heat transfer to be linearized. This can reduce computing time at the expense of accuracy.
The declaration
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
is used to initialize the air volume inside the thermal zone.
Finally, the declaration
lat=0.73268921998722) "Room model"
sets the latitude of the building which needs to correspond with the latitude of the weather data file.
Michael Wetter, Wangda Zuo and Thierry Stephane Nouidui.
Modeling of Heat Transfer in Rooms in the Modelica "Buildings" Library.
Proc. of the 12th IBPSA Conference, p. 1096-1103. Sydney, Australia, November 2011.
Extends from Modelica.Icons.Information (Icon for general information packages).
Room model with air heat and mass balance computed using Computational Fluid Dynamics
The model Buildings.Rooms.CFD is a room model in which the room air heat and mass balance is computed using the Computational Fluid Dynamics (CFD).
The model is identical with Buildings.Rooms.MixedAir, except for the following points:
sensorName
.
This parameter is an array of strings. The same strings must be used
in the CFD input file when declaring the sensor in order to send the
CFD results to the output signal of Modelica.
ports
using the parameter
portName
.
This parameter is an array of strings. The same strings must be used
in the CFD input file when declaring the inlet and outlet boundary conditions.
The following conventions are made:
The port heaPorAir
contains the average room air temperature, defined as
Ta = 1 ⁄ V ∫V T(dV) dV,
where Ta is the average room air temperature, V is the room air volume and T(dV) is the room air temperature in the control volume dV. The average room air temperature Ta is computed by the CFD program.
heaPorAir
, then the heat will be distributed to all
cells. The amount of heat flow rate that each cell exchanges with heaPorAir
is
proportional to its volume.
The quantities that are exchanged between the programs are defined as follows:
Xi
.
It does not do a moisture balance for each cell.
However, for trace substances C
, CFD does a contaminant balance for each cell
and return C_outflow
to be the contaminant concentration of that cell.
This section explains how the data exchange between Modelica and CFD is implemented. The section is only of interest to developers. Users may skip this section.
Interfacing CFD with the Modelica room air heat and mass balance is done in the model Buildings.Rooms.BaseClasses.AirHeatMassBalanceCFD. To interface variables from Modelica and CFD, the following classes and conventions are used in this model.
ports
,
then no variables are exchanged for this quantity with the block cfd
.
bouCon
, two of these ports are conditionally removed.
This allows to use the parameter bouCon
to specify whether
the surface should be used with a temperature or a heat flow rate
boundary condition.
Therefore, the inputs and outputs to the instance cfd
are either temperatures or heat flow rates.
The parameter surIde
of this model, which is also
propagated to the instance cfd
, declares what
type of boundary condition is used.
ports
are exchanged with the CFD block
through the instance intFlu
.
This interface is implemented in
Buildings.Rooms.BaseClasses.CFDFluidInterface.
Its output and input signals are connected to the cfd
block as follows:
cfd
block is a vector
[p, m_flow[nPorts], T_inflow[nPorts], X_inflow[nPorts*Medium.nXi],
C_inflow[nPorts*Medium.nC]]
.
The quantity p
is the total pressure of the fluid ports (all fluid ports have the same
total pressure).
Therefore, the flow resistance of the diffusor or exhaust grill must be computed in the
Modelica HVAC system that is connected to the room model.
The quantities X_inflow
and C_inflow
(or X_inflow
and C_inflow
)
are vectors with components X_inflow[1:Medium.nXi]
and C_inflow[1:Medium.nC]
.
For example, for moist air, X_inflow
has one element which is equal to the mass fraction of air,
relative to the total air mass and not the dry air.
[T_outflow[nPorts], X_outflow[nPorts*Medium.nXi], C_outflow[nPorts*Medium.nC]]
.
The quantities *_outflow
are the fluid properties of the cell to which the port is
connected.
Medium.nXi=0
(e.g., for dry air) or Medium.nC=0
,
then these signals are not present as input/output signals of the CFD block.
The data exchange with the CFD interface is done through the instance
cfd
, and implemented in
Buildings.Rooms.BaseClasses.CFDExchange.
This block exchanges the following data with the CFD simulation:
During the initialzation, the following data are sent from Modelica to CFD:
name
.
The orders of elements in this array are as follows:
nConExt
elements are the names of the exterior constructions
declared as datConExt
. The order is the same as
in the declaration of datConExt
.
nConExtWin
elements are the names of the exterior constructions
declared as datConExtWin
. These constructions embed windows
and a frame. Therefore, what follows are
nConExtWin
elements where each string is the same as above,
but ' (glass, unshaded)'
has been appended,
then -- if and only if the window has a shade --
nConExtWin
elements follow with
' (glass, shaded)'
appended, and,
finally,
nConExtWin
elements follow with ' (frame)'
appended.
nConPar
elements for the surface a
of datConPar
.
To these names, the string ' (surface a)'
is appended.
Next, there are nConPar
elements with ' (surface b)'
appended.
nConBou
elements for the surfaces of datConBou
.
nSurBou
elements for the surfaces of nSurBou
.
A
,
an array for the surface tilt til
and the type of the boundary conditions bouCon
for each of these surfaces.
If bouCon[i] = 1
,
then temperature is sent from Modelica to CFD.
If bouCon[i] = 2
, then
heat flow rate is sent from Modelica to CFD.
sensorName
that contains the names of all sensors,
in the same order as they are declared when instantiating the model
Buildings.Rooms.CFD.
If no sensors are declared in Modelica, then this array will have zero elements.
How many sensor are declared in Modelica can be checked through the variable nSen
,
which is sent from Modelica to CFD.
AirProperty
that contains the properties of the air.
The orders of elements in this array are as follows:
During the time integration, and array u
is sent from Modelica to CFD, and Modelica
receives an array y
from CFD.
The elements of the array u
are as follows:
name
. The units are [K] or [W].
The array bouCon
that is sent during the
initialization declares the type of boundary
condition.
There are nSur
elements for surfaces.
nConExtWin
elements are the shading control signals. u=0
means
that the shade is not deployed,
and u=1
means that the shade is
completely deployed (blocking solar radiation).
If there is no window in the room, then these elements are not present.
nConExtWin
elements are the radiations in [W] that are absorbed by the
respective shades.
If there is no window in the room, then these elements are not present.
nPorts
elements are the mass flow rates
into the room in [kg/s].
A positive value is used if the air flows into the room,
otherwise the value is negative.
The first element is connected to ports[1]
, the second to
ports[2]
etc.
nPorts
elements are the air temperatures
that the medium has
if it were flowing into the room, e.g., the "inflowing medium"
computed based on inStream(h_outflow)
.
nPorts*Medium.nXi
elements are the
species concentration of the inflowing
medium.
The first Medium.nXi
elements are for port 1, then for
port 2 etc.
The units are in [kg/kg] total mass, and not in [kg/kg] dry air.
nPorts*Medium.nC
elements are the trace substances
of the inflowing
medium.
The first Medium.nC
elements are for port 1, then for
port 2 etc.
y
that is sent from CFD to Modelica are as follows:
name
.
The array bouCon
that is sent during the
initialization declares the type of boundary
condition.
If bouCon[i] = 1
, then heat flow rate in [W]
is sent from CFD to Modelica.
If bouCon[i] = 2
, then temperature in [K]
is sent from CFD to Modelica.
There are nSur
elements for surfaces.
nConExtWin
elements are the temperature of the
shade in [K].
nPorts
elements are the air temperatures
in [K]
of the cells that are connected to the inlet or outlet diffusor
of ports[1], ports[2], etc.
.
nPorts*Medium.nXi
elements are the
species concentration of the cells to which the ports are
connected.
The first Medium.nXi
elements are for port 1, then for
port 2 etc.
The units are in [kg/kg] total mass, and not in [kg/kg] dry air.
nPorts*Medium.nC
elements are the trace substances
of the cells to which the ports are connected to.
The first Medium.nC
elements are for port 1, then for
port 2 etc.
Wangda Zuo, Michael Wetter, Dan Li, Mingang Jin, Wei Tian, Qingyan Chen.
Coupled Simulation of Indoor Environment, HVAC and Control System by Using Fast Fluid Dynamics and the Modelica Buildings Library.
Proc. of the 2014 ASHRAE/IBPSA-USA Building Simulation Conference, Atlanta, GA, September 10-12, 2014.
Extends from Modelica.Icons.Information (Icon for general information packages).