Buildings.ThermalZones.Detailed.Examples

Collection of models that illustrate model use and test models

Information

This package contains examples for the use of models that can be found in Buildings.ThermalZones.Detailed.

Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).

Package Content

Name Description
Buildings.ThermalZones.Detailed.Examples.ElectroChromicWindow ElectroChromicWindow Model that illustrates the use of electrochromic windows
Buildings.ThermalZones.Detailed.Examples.MixedAirFreeResponse MixedAirFreeResponse Free response of room model
Buildings.ThermalZones.Detailed.Examples.Controls Controls Package with control models
Buildings.ThermalZones.Detailed.Examples.FFD FFD Package that tests the models for coupled simulation between Modelica and Fast Fluid Dynamics

Buildings.ThermalZones.Detailed.Examples.ElectroChromicWindow Buildings.ThermalZones.Detailed.Examples.ElectroChromicWindow

Model that illustrates the use of electrochromic windows

Buildings.ThermalZones.Detailed.Examples.ElectroChromicWindow

Information

This model illustrates the use of an electrochromic window. It uses a model of the test cell 71T, room B at LBNL, and controls the window state based on room air temperature and solar irradiation.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
IntegernConExtWin1Number of constructions with a window
IntegernConExt0Number of constructions without a window
IntegernConBou5Number of surface that are connected to constructions that are modeled inside the room
IntegernSurBou0Number of surface that are connected to the room air volume
IntegernConPar0Number of surface that are partitions
GenericmatExtWal 71T: South Wall
GenericmatCeil 71T: Ceiling
GenericmatFlo 71T: Floor
GenericmatEWWal 71T: East West Wall
GenericmatNWal 71T: North Wall
DoubleElectrochromicAir13ClearglaSys Data record for the glazing system

Connectors

TypeNameDescription
BusweaBus 

Modelica definition

model ElectroChromicWindow "Model that illustrates the use of electrochromic windows" extends Modelica.Icons.Example; package MediumA = Buildings.Media.Air(T_default=T_start) "Medium model"; constant Modelica.SIunits.Temperature T_start=273.15 + 20 "Initial value"; parameter Integer nConExtWin=1 "Number of constructions with a window"; parameter Integer nConExt=0 "Number of constructions without a window"; parameter Integer nConBou=5 "Number of surface that are connected to constructions that are modeled inside the room"; parameter Integer nSurBou=0 "Number of surface that are connected to the room air volume"; parameter Integer nConPar=0 "Number of surface that are partitions"; MixedAir roo( redeclare package Medium = MediumA, nConExt=nConExt, nConExtWin=nConExtWin, nConPar=nConPar, nConBou=nConBou, nSurBou=nSurBou, linearizeRadiation=false, T_start=T_start, datConExtWin( layers={matExtWal}, each A=10.22, glaSys={glaSys}, each hWin=3.13, each wWin=2.782751, each fFra=0.000001, each til=Buildings.Types.Tilt.Wall, azi={Buildings.Types.Azimuth.S}), datConBou( layers={matFlo,matCeil,matEWWal,matNWal,matEWWal}, A={13.94,13.94,15.33,10.22,15.33}, til={Buildings.Types.Tilt.Floor,Buildings.Types.Tilt.Ceiling,Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Wall,Buildings.Types.Tilt.Wall}), AFlo=13.94, hRoo=3.37, intConMod=Buildings.HeatTransfer.Types.InteriorConvection.Temperature, extConMod=Buildings.HeatTransfer.Types.ExteriorConvection.TemperatureWind, each conBou(opa(T(each start = T_start))), nPorts=2, lat=0.65484753534827, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) "Room model"; BoundaryConditions.WeatherData.ReaderTMY3 weaDat1( relHum=0, TDewPoi(displayUnit="K"), filNam= "modelica://Buildings/Resources/weatherdata/USA_CA_San.Francisco.Intl.AP.724940_TMY3.mos", pAtmSou=Buildings.BoundaryConditions.Types.DataSource.File, calTSky=Buildings.BoundaryConditions.Types.SkyTemperatureCalculation.HorizontalRadiation); Modelica.Blocks.Sources.Constant uSha(k=0) "Control signal for the shading device"; Modelica.Blocks.Routing.Replicator replicator(nout=max(1, nConExtWin)); parameter Buildings.HeatTransfer.Data.OpaqueConstructions.Generic matExtWal( nLay=3, absIR_a=0.9, absIR_b=0.9, absSol_a=0.6, absSol_b=0.6, material={Buildings.HeatTransfer.Data.Solids.Generic( x=0.000701, k=45.345, c=502.416, d=7833.028),Buildings.HeatTransfer.Data.Solids.Generic( x=0.0127, k=0.12, c=1210, d=540),Buildings.HeatTransfer.Data.Solids.Generic( x=0.133, k=0.047, c=1006, d=93.84)}) "71T: South Wall"; parameter Buildings.HeatTransfer.Data.OpaqueConstructions.Generic matCeil( nLay=3, absIR_a=0.9, absIR_b=0.9, absSol_a=0.6, absSol_b=0.6, material={Buildings.HeatTransfer.Data.Solids.Generic( x=0.009525, k=0.12, c=1210, d=540),Buildings.HeatTransfer.Data.Solids.Generic( x=0.133, k=0.047, c=1006, d=93.84),Buildings.HeatTransfer.Data.Solids.Generic( x=0.015875, k=0.17, c=1090, d=800)}) "71T: Ceiling"; parameter Buildings.HeatTransfer.Data.OpaqueConstructions.Generic matFlo( final nLay=4, absIR_a=0.9, absIR_b=0.9, absSol_a=0.6, absSol_b=0.6, material={Buildings.HeatTransfer.Data.Solids.Generic( x=5.28, k=1, c=0, d=0),Buildings.HeatTransfer.Data.Solids.Generic( x=0.01905, k=0.15, c=1630, d=608),Buildings.HeatTransfer.Data.Solids.Generic( x=0.01905, k=0.12, c=1210, d=540),Buildings.HeatTransfer.Data.Solids.Generic( x=0.22, k=1, c=0, d=0)}) "71T: Floor"; parameter Buildings.HeatTransfer.Data.OpaqueConstructions.Generic matEWWal( final nLay=2, absIR_a=0.9, absIR_b=0.9, absSol_a=0.6, absSol_b=0.6, material={Buildings.HeatTransfer.Data.Solids.Generic( x=0.133, k=0.047, c=1006, d=93.84),Buildings.HeatTransfer.Data.Solids.Generic( x=0.015875, k=0.17, c=1090, d=800)}) "71T: East West Wall"; parameter Buildings.HeatTransfer.Data.OpaqueConstructions.Generic matNWal( final nLay=4, absIR_a=0.9, absIR_b=0.9, absSol_a=0.6, absSol_b=0.6, material={Buildings.HeatTransfer.Data.Solids.Generic( x=0.015875, k=0.17, c=1090, d=800),Buildings.HeatTransfer.Data.Solids.Generic( x=0.009525, k=0.12, c=1210, d=540),Buildings.HeatTransfer.Data.Solids.Generic( x=0.133, k=0.047, c=1006, d=93.84),Buildings.HeatTransfer.Data.Solids.Generic( x=0.015875, k=0.17, c=1090, d=800)}) "71T: North Wall"; parameter HeatTransfer.Data.GlazingSystems.DoubleElectrochromicAir13Clear glaSys( UFra=2, haveInteriorShade=false, haveExteriorShade=false) "Data record for the glazing system"; BoundaryConditions.WeatherData.Bus weaBus; Modelica.Blocks.Routing.Multiplex3 multiplex3_1; Modelica.Blocks.Sources.Constant qRadGai_flow(k=0) "Radiative heat gain"; Modelica.Blocks.Sources.Constant qConGai_flow(k=0) "Convective heat gain"; Modelica.Blocks.Sources.Constant qLatGai_flow(k=0) "Latent heat gain"; Controls.ElectrochromicWindow conWin "Controller for windows"; Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor TRooAir "Room air temperature"; Fluid.Sources.MassFlowSource_T boundary( redeclare package Medium = MediumA, m_flow=-47*6/3600*1.2, T=293.15, nPorts=1) "Boundary condition"; Fluid.Sources.Outside freshAir(redeclare package Medium = MediumA, nPorts=1) "Boundary condition"; Fluid.FixedResistances.PressureDrop duc( redeclare package Medium = MediumA, allowFlowReversal=false, linearized=true, from_dp=true, dp_nominal=100, m_flow_nominal=47*6/3600*1.2) "Duct resistance (to decouple room and outside pressure)"; equation connect(uSha.y, replicator.u); connect(roo.uSha, replicator.y); connect(weaBus, roo.weaBus); connect(weaBus, weaDat1.weaBus); connect(qRadGai_flow.y, multiplex3_1.u1[1]); connect(qConGai_flow.y, multiplex3_1.u2[1]); connect(qLatGai_flow.y, multiplex3_1.u3[1]); connect(multiplex3_1.y, roo.qGai_flow); connect(roo.heaPorAir, TRooAir.port); connect(TRooAir.T, conWin.T); connect(conWin.H, weaBus.HGloHor); connect(conWin.y, roo.uWin[1]); connect(freshAir.weaBus, weaBus); connect(freshAir.ports[1], duc.port_a); connect(boundary.ports[1], roo.ports[1]); connect(duc.port_b, roo.ports[2]); end ElectroChromicWindow;

Buildings.ThermalZones.Detailed.Examples.MixedAirFreeResponse Buildings.ThermalZones.Detailed.Examples.MixedAirFreeResponse

Free response of room model

Buildings.ThermalZones.Detailed.Examples.MixedAirFreeResponse

Information

This model illustrates the use of the room model Buildings.ThermalZones.Detailed.MixedAir.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
Insulation100Concrete200matLayExt Construction material for exterior walls
Brick120matLayPar Construction material for partition walls
GenericmatLayRoo Construction material for roof
GenericmatLayFlo Construction material for floor
DoubleClearAir13ClearglaSys Data record for the glazing system
IntegernConExtWin1Number of constructions with a window
IntegernConBou1Number of surface that are connected to constructions that are modeled inside the room
IntegernSurBou1Number of surface that are connected to the room air volume

Modelica definition

model MixedAirFreeResponse "Free response of room model" extends Modelica.Icons.Example; package MediumA = Buildings.Media.Air "Medium model"; parameter Buildings.HeatTransfer.Data.OpaqueConstructions.Insulation100Concrete200 matLayExt "Construction material for exterior walls"; parameter Buildings.HeatTransfer.Data.OpaqueConstructions.Brick120 matLayPar "Construction material for partition walls"; parameter 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"; parameter Buildings.HeatTransfer.Data.OpaqueConstructions.Generic matLayFlo( material={ HeatTransfer.Data.Solids.Concrete(x=0.2), HeatTransfer.Data.Solids.InsulationBoard(x=0.15), HeatTransfer.Data.Solids.Concrete(x=0.05)}, final nLay=3) "Construction material for floor"; parameter Buildings.HeatTransfer.Data.GlazingSystems.DoubleClearAir13Clear glaSys( UFra=2, shade=Buildings.HeatTransfer.Data.Shades.Gray(), haveInteriorShade=false, haveExteriorShade=false) "Data record for the glazing system"; parameter Integer nConExtWin = 1 "Number of constructions with a window"; parameter Integer nConBou = 1 "Number of surface that are connected to constructions that are modeled inside the room"; parameter Integer nSurBou = 1 "Number of surface that are connected to the room air volume"; Buildings.ThermalZones.Detailed.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}, each A=4*3, glaSys={glaSys}, each hWin=2, each wWin=4, ove(wR={0},wL={0}, gap={0.1}, dep={1}), each fFra=0.1, each 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, each stateAtSurface_a = false), nSurBou=1, surBou(each A=6*3, each absIR=0.9, each absSol=0.9, each til=Buildings.Types.Tilt.Wall), energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, T_start=273.15+22, lat=0.73268921998722) "Room model"; Modelica.Blocks.Sources.Constant qConGai_flow(k=0) "Convective heat gain"; Modelica.Blocks.Sources.Constant qRadGai_flow(k=0) "Radiative heat gain"; Modelica.Blocks.Routing.Multiplex3 multiplex3_1; Modelica.Blocks.Sources.Constant qLatGai_flow(k=0) "Latent heat gain"; Buildings.BoundaryConditions.WeatherData.ReaderTMY3 weaDat( filNam="modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos", computeWetBulbTemperature=false); Modelica.Blocks.Sources.Constant uSha(k=0) "Control signal for the shading device"; Modelica.Blocks.Routing.Replicator replicator(nout=max(1,nConExtWin)); Buildings.HeatTransfer.Sources.FixedTemperature TSoi[nConBou](each T = 283.15) "Boundary condition for construction"; Buildings.HeatTransfer.Sources.FixedTemperature TBou[nSurBou](each T=288.15) "Boundary condition for construction"; HeatTransfer.Conduction.MultiLayer conOut[nSurBou]( each A=6*4, each layers=matLayPar, each steadyStateInitial=true, each stateAtSurface_a=true, each stateAtSurface_b=false) "Construction that is modeled outside of room"; equation connect(qRadGai_flow.y, multiplex3_1.u1[1]); connect(qConGai_flow.y, multiplex3_1.u2[1]); connect(qLatGai_flow.y, multiplex3_1.u3[1]); connect(multiplex3_1.y, roo.qGai_flow); connect(weaDat.weaBus, roo.weaBus); connect(uSha.y, replicator.u); connect(TBou.port,conOut. port_b); connect(roo.surf_surBou, conOut.port_a); connect(roo.uSha, replicator.y); connect(TSoi.port, roo.surf_conBou); end MixedAirFreeResponse;