**Package with models for rooms**

This package contains models for the heat transfer in rooms and through the building envelope.

Extends from Modelica.Icons.Package (Icon for standard packages).

Name | Description |
---|---|

UsersGuide | User's Guide |

CFD | Model of a room in which the air is computed using Computational Fluid Dynamics (CFD) |

MixedAir | Model of a room in which the air is completely mixed |

Constructions | Package with models for constructions that are used in the room model |

FLEXLAB | Models that can be used to model the FLEXLAB |

Types | Package with type definitions |

Examples | Collection of models that illustrate model use and test models |

Validation | Collection of validation models |

BaseClasses | Package with base classes for Buildings.Rooms |

**Model of a room in which the air is computed using Computational Fluid Dynamics (CFD)**

Room model that computes the room air flow using computational fluid dynamics (CFD). The CFD simulation is coupled to the thermal simulation of the room and, through the fluid port, to the air conditioning system.

Currently, the supported CFD program is the Fast Fluid Dynamics (FFD) program (Zuo 2010). See Buildings.Rooms.UsersGuide.CFD for detailed explanations.

Wangda Zuo. Advanced simulations of air distributions in buildings. Ph.D. Thesis, School of Mechanical Engineering, Purdue University, 2010.

Extends from Buildings.Rooms.BaseClasses.RoomHeatMassBalance (Base model for a room).

Type | Name | Default | Description |
---|---|---|---|

ParameterConstruction | datConExt[NConExt] | Data for exterior construction | |

ParameterConstructionWithWindow | datConExtWin[NConExtWin] | Data for exterior construction with window | |

ParameterConstruction | datConPar[NConPar] | Data for partition construction | |

ParameterConstruction | datConBou[NConBou] | Data for construction boundary | |

OpaqueSurface | surBou[NSurBou] | Record for data of surfaces whose heat conduction is modeled outside of this room | |

Brick120 | dummyCon | Dummy construction to assign a parameter to the instance | |

SingleClear3 | dummyGlaSys | Dummy construction to assign a parameter to the instance | |

replaceable package Medium | PartialMedium | Medium in the component | |

Angle | lat | Latitude [rad] | |

Area | AFlo | Floor area [m2] | |

Length | hRoo | Average room height [m] | |

Boolean | linearizeRadiation | true | Set to true to linearize emissive power |

Real | uSha_fixed[nConExtWin] | zeros(nConExtWin) | Constant control signal for the shading device (0: unshaded; 1: fully shaded) |

Exterior constructions | |||

Integer | nConExt | Number of exterior constructions | |

Integer | nConExtWin | Number of window constructions | |

Partition constructions | |||

Integer | nConPar | Number of partition constructions | |

Boundary constructions | |||

Integer | nConBou | Number of constructions that have their outside surface exposed to the boundary of this room | |

Integer | nSurBou | Number of surface heat transfer models that connect to constructions that are modeled outside of this room | |

Convective heat transfer | |||

InteriorConvection | intConMod | Buildings.HeatTransfer.Types... | Convective heat transfer model for room-facing surfaces of opaque constructions |

CoefficientOfHeatTransfer | hIntFixed | 3.0 | Constant convection coefficient for room-facing surfaces of opaque constructions [W/(m2.K)] |

ExteriorConvection | extConMod | Buildings.HeatTransfer.Types... | Convective heat transfer model for exterior facing surfaces of opaque constructions |

CoefficientOfHeatTransfer | hExtFixed | 10.0 | Constant convection coefficient for exterior facing surfaces of opaque constructions [W/(m2.K)] |

Nominal condition | |||

MassFlowRate | m_flow_nominal | V*1.2/3600 | Nominal mass flow rate [kg/s] |

CFD | |||

Boolean | useCFD | true | Set to false to deactivate the CFD computation and use instead yFixed as output |

String | sensorName[:] | Names of sensors as declared in the CFD input file | |

String | portName[nPorts] | {"port_" + String(i) for i i... | Names of fluid ports as declared in the CFD input file |

String | cfdFilNam | CFD input file name | |

Sampling | |||

Time | samplePeriod | Sample period of component [s] | |

Advanced | |||

Boolean | homotopyInitialization | true | = true, use homotopy method |

Dynamics | |||

Equations | |||

Dynamics | massDynamics | Modelica.Fluid.Types.Dynamic... | Formulation of mass balance |

Initialization | |||

AbsolutePressure | p_start | Medium.p_default | Start value of pressure [Pa] |

Type | Name | Description |
---|---|---|

VesselFluidPorts_b | ports[nPorts] | Fluid inlets and outlets |

HeatPort_a | heaPorAir | Heat port to air volume |

HeatPort_a | heaPorRad | Heat port for radiative heat gain and radiative temperature |

HeatPort_a | surf_conBou[nConBou] | Heat port at surface b of construction conBou |

HeatPort_a | surf_surBou[nSurBou] | Heat port of surface that is connected to the room air |

input RealInput | qGai_flow[3] | Radiant, convective and latent heat input into room (positive if heat gain) [W/m2] |

Bus | weaBus | |

output RealOutput | yCFD[nSen] | Sensor for output from CFD |

model CFD
"Model of a room in which the air is computed using Computational Fluid Dynamics (CFD)"
extends Buildings.Rooms.BaseClasses.RoomHeatMassBalance(
redeclare BaseClasses.CFDAirHeatMassBalance air(
final massDynamics = massDynamics,
final cfdFilNam = cfdFilNam,
final useCFD=useCFD,
final samplePeriod=samplePeriod,
final haveSensor=haveSensor,
final nSen=nSen,
final sensorName=sensorName,
final portName=portName,
final uSha_fixed=uSha_fixed,
final p_start=p_start));
// Assumptions
parameter Modelica.Fluid.Types.Dynamics massDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial
"Formulation of mass balance";
// Initialization
parameter Medium.AbsolutePressure p_start = Medium.p_default
"Start value of pressure";
parameter Boolean useCFD = true
"Set to false to deactivate the CFD computation and use instead yFixed as output";
parameter Modelica.SIunits.Time samplePeriod(min=100*Modelica.Constants.eps)
"Sample period of component";
parameter Real uSha_fixed[nConExtWin] = zeros(nConExtWin)
"Constant control signal for the shading device (0: unshaded; 1: fully shaded)";
parameter String sensorName[:]
"Names of sensors as declared in the CFD input file";
parameter String portName[nPorts] = {"port_" + String(i) for i in 1:nPorts}
"Names of fluid ports as declared in the CFD input file";
parameter String cfdFilNam "CFD input file name";
Modelica.Blocks.Interfaces.RealOutput yCFD[nSen] if
haveSensor "Sensor for output from CFD";
protected
BaseClasses.CFDHeatGain heaGai(final AFlo=AFlo)
"Model to convert internal heat gains";
protected
final parameter Boolean haveSensor = Modelica.Utilities.Strings.length(sensorName[1]) > 0
"Flag, true if the model has at least one sensor";
final parameter Integer nSen(min=0) = size(sensorName, 1)
"Number of sensors that are connected to CFD output";
Modelica.Blocks.Sources.Constant conSha[nConExtWin](final k=uSha_fixed) if
haveShade "Constant signal for shade";
equation
connect(qGai_flow, heaGai.qGai_flow);
connect(heaGai.QRad_flow, add.u2);
connect(air.QCon_flow, heaGai.QCon_flow);
connect(air.QLat_flow, heaGai.QLat_flow);
connect(air.yCFD, yCFD);
connect(conSha.y, conExtWin.uSha);
connect(conSha.y, bouConExtWin.uSha);
connect(conSha.y, conExtWinRad.uSha);
connect(irRadGai.uSha,conSha.y);
connect(conSha.y, radTem.uSha);
connect(conSha.y, shaSig.u);
connect(air.uSha,conSha.y);
end CFD;

**Model of a room in which the air is completely mixed**

Room model that assumes the air to be completely mixed.

See Buildings.Rooms.UsersGuide for detailed explanations.

Extends from Buildings.Rooms.BaseClasses.RoomHeatMassBalance (Base model for a room), Buildings.Fluid.Interfaces.LumpedVolumeDeclarations (Declarations for lumped volumes).

Type | Name | Default | Description |
---|---|---|---|

OpaqueSurface | surBou[NSurBou] | Record for data of surfaces whose heat conduction is modeled outside of this room | |

Brick120 | dummyCon | Dummy construction to assign a parameter to the instance | |

SingleClear3 | dummyGlaSys | Dummy construction to assign a parameter to the instance | |

replaceable package Medium | PartialMedium | Medium in the component | |

Angle | lat | Latitude [rad] | |

Area | AFlo | Floor area [m2] | |

Length | hRoo | Average room height [m] | |

Boolean | linearizeRadiation | true | Set to true to linearize emissive power |

Exterior constructions | |||

Integer | nConExt | Number of exterior constructions | |

Integer | nConExtWin | Number of window constructions | |

Partition constructions | |||

Integer | nConPar | Number of partition constructions | |

Boundary constructions | |||

Integer | nConBou | Number of constructions that have their outside surface exposed to the boundary of this room | |

Integer | nSurBou | Number of surface heat transfer models that connect to constructions that are modeled outside of this room | |

Convective heat transfer | |||

InteriorConvection | intConMod | Buildings.HeatTransfer.Types... | Convective heat transfer model for room-facing surfaces of opaque constructions |

CoefficientOfHeatTransfer | hIntFixed | 3.0 | Constant convection coefficient for room-facing surfaces of opaque constructions [W/(m2.K)] |

ExteriorConvection | extConMod | Buildings.HeatTransfer.Types... | Convective heat transfer model for exterior facing surfaces of opaque constructions |

CoefficientOfHeatTransfer | hExtFixed | 10.0 | Constant convection coefficient for exterior facing surfaces of opaque constructions [W/(m2.K)] |

Nominal condition | |||

MassFlowRate | m_flow_nominal | V*1.2/3600 | Nominal mass flow rate [kg/s] |

Advanced | |||

Boolean | homotopyInitialization | true | = true, use homotopy method |

Dynamics | |||

Equations | |||

Dynamics | energyDynamics | Modelica.Fluid.Types.Dynamic... | Formulation of energy balance |

Dynamics | massDynamics | energyDynamics | Formulation of mass balance |

Real | mSenFac | 1 | Factor for scaling the sensible thermal mass of the volume |

Initialization | |||

AbsolutePressure | p_start | Medium.p_default | Start value of pressure [Pa] |

Temperature | T_start | Medium.T_default | Start value of temperature [K] |

MassFraction | X_start[Medium.nX] | Medium.X_default | Start value of mass fractions m_i/m [kg/kg] |

ExtraProperty | C_start[Medium.nC] | fill(0, Medium.nC) | Start value of trace substances |

ExtraProperty | C_nominal[Medium.nC] | fill(1E-2, Medium.nC) | Nominal value of trace substances. (Set to typical order of magnitude.) |

Type | Name | Description |
---|---|---|

VesselFluidPorts_b | ports[nPorts] | Fluid inlets and outlets |

HeatPort_a | heaPorAir | Heat port to air volume |

HeatPort_a | heaPorRad | Heat port for radiative heat gain and radiative temperature |

HeatPort_a | surf_conBou[nConBou] | Heat port at surface b of construction conBou |

HeatPort_a | surf_surBou[nSurBou] | Heat port of surface that is connected to the room air |

input RealInput | qGai_flow[3] | Radiant, convective and latent heat input into room (positive if heat gain) [W/m2] |

Bus | weaBus | |

input RealInput | uSha[nConExtWin] | Control signal for the shading device (removed if no shade is present) |

model MixedAir "Model of a room in which the air is completely mixed"
extends Buildings.Rooms.BaseClasses.RoomHeatMassBalance(
redeclare Buildings.Rooms.BaseClasses.MixedAirHeatMassBalance air(
final energyDynamics=energyDynamics,
final massDynamics = massDynamics,
final p_start=p_start,
final T_start=T_start,
final X_start=X_start,
final C_start=C_start,
final C_nominal=C_nominal,
final m_flow_nominal=m_flow_nominal,
final homotopyInitialization=homotopyInitialization,
final conMod=intConMod,
final hFixed=hIntFixed),
datConExt(
each T_a_start = T_start,
each T_b_start = T_start),
datConExtWin(
each T_a_start = T_start,
each T_b_start = T_start),
datConBou(
each T_a_start = T_start,
each T_b_start = T_start),
datConPar(
each T_a_start = T_start,
each T_b_start = T_start));
extends Buildings.Fluid.Interfaces.LumpedVolumeDeclarations;
protected
Buildings.Rooms.BaseClasses.MixedAirHeatGain heaGai(
redeclare package Medium = Medium, final AFlo=AFlo)
"Model to convert internal heat gains";
public
Modelica.Blocks.Interfaces.RealInput uSha[nConExtWin](each min=0, each max=1) if
haveShade
"Control signal for the shading device (removed if no shade is present)";
equation
connect(heaGai.qGai_flow, qGai_flow);
connect(heaGai.QRad_flow, add.u2);
connect(heaGai.QLat_flow, air.QLat_flow);
connect(air.heaPorAir, heaGai.QCon_flow);
connect(uSha, conExtWin.uSha);
connect(uSha, bouConExtWin.uSha);
connect(uSha, conExtWinRad.uSha);
connect(irRadGai.uSha,uSha);
connect(uSha, radTem.uSha);
connect(uSha, shaSig.u);
connect(air.uSha,uSha);
end MixedAir;

Automatically generated Mon Jul 13 14:27:19 2015.