Buildings.ThermalZones.Detailed

Package with models for rooms

Information

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

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

Package Content

Name Description
Buildings.ThermalZones.Detailed.UsersGuide UsersGuide User's Guide
Buildings.ThermalZones.Detailed.CFD CFD Model of a room in which the air is computed using Computational Fluid Dynamics (CFD)
Buildings.ThermalZones.Detailed.MixedAir MixedAir Model of a room in which the air is completely mixed
Buildings.ThermalZones.Detailed.Constructions Constructions Package with models for constructions that are used in the room model
Buildings.ThermalZones.Detailed.FLEXLAB FLEXLAB Models that can be used to model the FLEXLAB
Buildings.ThermalZones.Detailed.Types Types Package with type definitions
Buildings.ThermalZones.Detailed.Examples Examples Collection of models that illustrate model use and test models
Buildings.ThermalZones.Detailed.Validation Validation Collection of validation models
Buildings.ThermalZones.Detailed.BaseClasses BaseClasses Package with base classes for Buildings.ThermalZones.Detailed

Buildings.ThermalZones.Detailed.CFD Buildings.ThermalZones.Detailed.CFD

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

Buildings.ThermalZones.Detailed.CFD

Information

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.ThermalZones.Detailed.UsersGuide for detailed explanations.

References

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

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

Parameters

TypeNameDefaultDescription
ParameterConstructiondatConExt[NConExt] Data for exterior construction
ParameterConstructionWithWindowdatConExtWin[NConExtWin] Data for exterior construction with window
ParameterConstructiondatConPar[NConPar] Data for partition construction
ParameterConstructiondatConBou[NConBou] Data for construction boundary
OpaqueSurfacesurBou[NSurBou] Record for data of surfaces whose heat conduction is modeled outside of this room
Brick120dummyCon Dummy construction to assign a parameter to the instance
SingleClear3dummyGlaSys Dummy construction to assign a parameter to the instance
replaceable package MediumPartialMediumMedium in the component
AreaAFlo Floor area [m2]
LengthhRoo Average room height [m]
BooleanlinearizeRadiationtrueSet to true to linearize emissive power
RealuSha_fixed[nConExtWin]zeros(nConExtWin)Constant control signal for the shading device (0: unshaded; 1: fully shaded)
Exterior constructions
IntegernConExt Number of exterior constructions
IntegernConExtWin Number of window constructions
Partition constructions
IntegernConPar Number of partition constructions
Boundary constructions
IntegernConBou Number of constructions that have their outside surface exposed to the boundary of this room
IntegernSurBou Number of surface heat transfer models that connect to constructions that are modeled outside of this room
Convective heat transfer
InteriorConvectionintConModBuildings.HeatTransfer.Types...Convective heat transfer model for room-facing surfaces of opaque constructions
CoefficientOfHeatTransferhIntFixed3.0Constant convection coefficient for room-facing surfaces of opaque constructions [W/(m2.K)]
ExteriorConvectionextConModBuildings.HeatTransfer.Types...Convective heat transfer model for exterior facing surfaces of opaque constructions
CoefficientOfHeatTransferhExtFixed10.0Constant convection coefficient for exterior facing surfaces of opaque constructions [W/(m2.K)]
Nominal condition
MassFlowRatem_flow_nominalV*1.2/3600Nominal mass flow rate [kg/s]
CFD
BooleanuseCFDtrueSet to false to deactivate the CFD computation and use instead yFixed as output
StringsensorName[:] Names of sensors as declared in the CFD input file
StringportName[nPorts]{"port_" + String(i) for i i...Names of fluid ports as declared in the CFD input file
StringcfdFilNam CFD input file name
Sampling
TimesamplePeriod Sample period of component [s]
Dynamics
Glazing system
BooleansteadyStateWindowfalseSet to false to add thermal capacity at window, which generally leads to faster simulation
Conservation equations
DynamicsmassDynamicsModelica.Fluid.Types.Dynamic...Formulation of mass balance
Experimental (may be changed in future releases)
BooleansampleModelfalseSet to true to time-sample the model, which can give shorter simulation time if there is already time sampling in the system model
Initialization
AbsolutePressurep_startMedium.p_defaultStart value of pressure [Pa]

Connectors

TypeNameDescription
VesselFluidPorts_bports[nPorts]Fluid inlets and outlets
HeatPort_aheaPorAirHeat port to air volume
HeatPort_aheaPorRadHeat port for radiative heat gain and radiative temperature
input RealInputuWin[nConExtWin]Control signal for window state (used for electrochromic windows, removed otherwise) [1]
HeatPort_asurf_conBou[nConBou]Heat port at surface b of construction conBou
HeatPort_asurf_surBou[nSurBou]Heat port of surface that is connected to the room air
input RealInputqGai_flow[3]Radiant, convective and latent heat input into room (positive if heat gain) [W/m2]
BusweaBusWeather data
output RealOutputyCFD[nSen]Sensor for output from CFD

Modelica definition

model CFD "Model of a room in which the air is computed using Computational Fluid Dynamics (CFD)" extends Buildings.ThermalZones.Detailed.BaseClasses.RoomHeatMassBalance( redeclare BaseClasses.CFDAirHeatMassBalance air( final massDynamics = massDynamics, final cfdFilNam = absCfdFilNam, 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.Units.SI.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 final parameter String absCfdFilNam = Buildings.BoundaryConditions.WeatherData.BaseClasses.getAbsolutePath(cfdFilNam) "Absolute path to the CFD file"; 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(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;

Buildings.ThermalZones.Detailed.MixedAir Buildings.ThermalZones.Detailed.MixedAir

Model of a room in which the air is completely mixed

Buildings.ThermalZones.Detailed.MixedAir

Information

Room model that assumes the air to be completely mixed.

See Buildings.ThermalZones.Detailed.UsersGuide for detailed explanations.

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

Parameters

TypeNameDefaultDescription
OpaqueSurfacesurBou[NSurBou] Record for data of surfaces whose heat conduction is modeled outside of this room
Brick120dummyCon Dummy construction to assign a parameter to the instance
SingleClear3dummyGlaSys Dummy construction to assign a parameter to the instance
replaceable package MediumPartialMediumMedium in the component
AreaAFlo Floor area [m2]
LengthhRoo Average room height [m]
BooleanlinearizeRadiationtrueSet to true to linearize emissive power
Exterior constructions
IntegernConExt Number of exterior constructions
IntegernConExtWin Number of window constructions
Partition constructions
IntegernConPar Number of partition constructions
Boundary constructions
IntegernConBou Number of constructions that have their outside surface exposed to the boundary of this room
IntegernSurBou Number of surface heat transfer models that connect to constructions that are modeled outside of this room
Convective heat transfer
InteriorConvectionintConModBuildings.HeatTransfer.Types...Convective heat transfer model for room-facing surfaces of opaque constructions
CoefficientOfHeatTransferhIntFixed3.0Constant convection coefficient for room-facing surfaces of opaque constructions [W/(m2.K)]
ExteriorConvectionextConModBuildings.HeatTransfer.Types...Convective heat transfer model for exterior facing surfaces of opaque constructions
CoefficientOfHeatTransferhExtFixed10.0Constant convection coefficient for exterior facing surfaces of opaque constructions [W/(m2.K)]
Nominal condition
MassFlowRatem_flow_nominalV*1.2/3600Nominal mass flow rate [kg/s]
Ports
Booleanuse_C_flowfalseSet to true to enable input connector for trace substance that is connected to room air
Dynamics
Glazing system
BooleansteadyStateWindowfalseSet to false to add thermal capacity at window, which generally leads to faster simulation
Zone air
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance for zone air: dynamic (3 initialization options) or steady state
RealmSenFac1Factor for scaling the sensible thermal mass of the zone air volume
Experimental (may be changed in future releases)
BooleansampleModelfalseSet to true to time-sample the model, which can give shorter simulation time if there is already time sampling in the system model
Initialization
AbsolutePressurep_startMedium.p_defaultStart value of zone air pressure [Pa]
TemperatureT_startMedium.T_defaultStart value of zone air temperature [K]
MassFractionX_start[Medium.nX]Medium.X_defaultStart value of zone air mass fractions m_i/m [kg/kg]
ExtraPropertyC_start[Medium.nC]fill(0, Medium.nC)Start value of zone air trace substances
ExtraPropertyC_nominal[Medium.nC]fill(1E-2, Medium.nC)Nominal value of zone air trace substances. (Set to typical order of magnitude.)

Connectors

TypeNameDescription
VesselFluidPorts_bports[nPorts]Fluid inlets and outlets
HeatPort_aheaPorAirHeat port to air volume
HeatPort_aheaPorRadHeat port for radiative heat gain and radiative temperature
input RealInputuWin[nConExtWin]Control signal for window state (used for electrochromic windows, removed otherwise) [1]
HeatPort_asurf_conBou[nConBou]Heat port at surface b of construction conBou
HeatPort_asurf_surBou[nSurBou]Heat port of surface that is connected to the room air
input RealInputqGai_flow[3]Radiant, convective and latent heat input into room (positive if heat gain) [W/m2]
BusweaBusWeather data
replaceable package MediumMedium in the component
input RealInputuSha[nConExtWin]Control signal for the shading device (removed if no shade is present)
input RealInputC_flow[Medium.nC]Trace substance mass flow rate added to the room air. Enable if use_C_flow = true

Modelica definition

model MixedAir "Model of a room in which the air is completely mixed" extends Buildings.ThermalZones.Detailed.BaseClasses.RoomHeatMassBalance( redeclare Buildings.ThermalZones.Detailed.BaseClasses.MixedAirHeatMassBalance air( final energyDynamics=energyDynamics, final massDynamics = energyDynamics, 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 mSenFac=mSenFac, final m_flow_nominal=m_flow_nominal, final homotopyInitialization=homotopyInitialization, final conMod=intConMod, final hFixed=hIntFixed, final use_C_flow = use_C_flow), 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)); //////////////////////////////////////////////////////////////////////////// // Media declaration. This is identical to // Buildings.Fluid.Interfaces.LumpedVolumeDeclarations, except // that the comments have been changed to avoid a confusion about // what energyDynamics refers to. replaceable package Medium = Modelica.Media.Interfaces.PartialMedium "Medium in the component"; // Ports parameter Boolean use_C_flow=false "Set to true to enable input connector for trace substance that is connected to room air"; // Assumptions parameter Modelica.Fluid.Types.Dynamics energyDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial "Type of energy balance for zone air: dynamic (3 initialization options) or steady state"; parameter Real mSenFac(min=1)=1 "Factor for scaling the sensible thermal mass of the zone air volume"; // Initialization parameter Medium.AbsolutePressure p_start = Medium.p_default "Start value of zone air pressure"; parameter Medium.Temperature T_start=Medium.T_default "Start value of zone air temperature"; parameter Medium.MassFraction X_start[Medium.nX]( quantity=Medium.substanceNames) = Medium.X_default "Start value of zone air mass fractions m_i/m"; parameter Medium.ExtraProperty C_start[Medium.nC]( quantity=Medium.extraPropertiesNames)=fill(0, Medium.nC) "Start value of zone air trace substances"; parameter Medium.ExtraProperty C_nominal[Medium.nC]( quantity=Medium.extraPropertiesNames) = fill(1E-2, Medium.nC) "Nominal value of zone air trace substances. (Set to typical order of magnitude.)"; //////////////////////////////////////////////////////////////////////////// // Input connectors 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)"; Modelica.Blocks.Interfaces.RealInput C_flow[Medium.nC] if use_C_flow "Trace substance mass flow rate added to the room air. Enable if use_C_flow = true"; equation 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); connect(C_flow, air.C_flow); end MixedAir;