Buildings.ThermalZones.EnergyPlus.Examples.SmallOffice.BaseClasses

Package with base classes

Information

This package contains base classes that are used to construct the models in Buildings.ThermalZones.EnergyPlus.Examples.SmallOffice.

Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).

Package Content

Name Description
Buildings.ThermalZones.EnergyPlus.Examples.SmallOffice.BaseClasses.Floor Floor Model of a floor of the building
Buildings.ThermalZones.EnergyPlus.Examples.SmallOffice.BaseClasses.IdealHeaterCooler IdealHeaterCooler Model of ideal heater or cooler

Buildings.ThermalZones.EnergyPlus.Examples.SmallOffice.BaseClasses.Floor Buildings.ThermalZones.EnergyPlus.Examples.SmallOffice.BaseClasses.Floor

Model of a floor of the building

Buildings.ThermalZones.EnergyPlus.Examples.SmallOffice.BaseClasses.Floor

Information

Model of one floor of the DOE reference office building.

Implementation

Compared to the base class, which has been built for the models in Buildings.Examples.VAVReheat which are for a larger building, the instances of Buildings.Airflow.Multizone.DoorOpen are made smaller. Their length has been reduced proportionally to the difference in length of the walls of the core zone of the two buildings. See also Buildings.ThermalZones.EnergyPlus.Examples.SmallOffice for a description of the differences in these buildings.

Extends from Buildings.Examples.VAVReheat.BaseClasses.PartialFloor (Interface for a model of a floor of a building).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium model for air
Booleanuse_windPressuretrueSet to true to enable wind pressure
RealkIntNor1Gain factor to scale internal heat gain in north zone
VolumeVRooCor456.455Room volume corridor [m3]
VolumeVRooSou346.022Room volume south [m3]
VolumeVRooNor346.022Room volume north [m3]
VolumeVRooEas205.265Room volume east [m3]
VolumeVRooWes205.265Room volume west [m3]
AreaAFloCorcor.AFloFloor area corridor [m2]
AreaAFloSousou.AFloFloor area south [m2]
AreaAFloNornor.AFloFloor area north [m2]
AreaAFloEaseas.AFloFloor area east [m2]
AreaAFloWeswes.AFloFloor area west [m2]

Connectors

TypeNameDescription
VesselFluidPorts_bportsSou[2]Fluid inlets and outlets
VesselFluidPorts_bportsEas[2]Fluid inlets and outlets
VesselFluidPorts_bportsNor[2]Fluid inlets and outlets
VesselFluidPorts_bportsWes[2]Fluid inlets and outlets
VesselFluidPorts_bportsCor[2]Fluid inlets and outlets
output RealOutputTRooAir[5]Room air temperatures [K]
output RealOutputp_relRelative pressure signal of building static pressure
BusweaBusWeather bus
HeatPort_aheaPorSouHeat port to air volume South
HeatPort_aheaPorEasHeat port to air volume East
HeatPort_aheaPorNorHeat port to air volume North
HeatPort_aheaPorWesHeat port to air volume West
HeatPort_aheaPorCorHeat port to air volume corridor

Modelica definition

model Floor "Model of a floor of the building" extends Buildings.Examples.VAVReheat.BaseClasses.PartialFloor( final VRooCor=456.455, final VRooSou=346.022, final VRooNor=346.022, final VRooEas=205.265, final VRooWes=205.265, final AFloCor=cor.AFlo, final AFloSou=sou.AFlo, final AFloNor=nor.AFlo, final AFloEas=eas.AFlo, final AFloWes=wes.AFlo, opeWesCor( wOpe=4), opeSouCor( wOpe=9), opeNorCor( wOpe=9), opeEasCor( wOpe=4), leaWes( s=18.46/27.69), leaSou( s=27.69/18.46), leaNor( s=27.69/18.46), leaEas( s=18.46/27.69)); final parameter Modelica.SIunits.Area AFlo=AFloCor+AFloSou+AFloNor+AFloEas+AFloWes "Total floor area"; Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a heaPorSou "Heat port to air volume South"; Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a heaPorEas "Heat port to air volume East"; Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a heaPorNor "Heat port to air volume North"; Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a heaPorWes "Heat port to air volume West"; Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a heaPorCor "Heat port to air volume corridor"; Modelica.SIunits.Temperature TAirCor=cor.TAir "Air temperature corridor"; Modelica.SIunits.Temperature TAirSou=sou.TAir "Air temperature south zone"; Modelica.SIunits.Temperature TAirNor=nor.TAir "Air temperature north zone"; Modelica.SIunits.Temperature TAirEas=eas.TAir "Air temperature east zone"; Modelica.SIunits.Temperature TAirWes=wes.TAir "Air temperature west zone"; ThermalZone sou( redeclare package Medium=Medium, nPorts=5, zoneName="Perimeter_ZN_1") "South zone"; ThermalZone eas( redeclare package Medium=Medium, nPorts=5, zoneName="Perimeter_ZN_2") "East zone"; ThermalZone nor( redeclare package Medium=Medium, nPorts=5, zoneName="Perimeter_ZN_3") "North zone"; ThermalZone wes( redeclare package Medium=Medium, nPorts=5, zoneName="Perimeter_ZN_4") "West zone"; ThermalZone cor( redeclare package Medium=Medium, nPorts=11, zoneName="Core_ZN") "Core zone"; ThermalZone att( redeclare package Medium=Medium, zoneName="Attic", T_start=275.15) "Attic zone"; protected parameter String idfName=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/Data/ThermalZones/EnergyPlus/Examples/RefBldgSmallOffice/RefBldgSmallOfficeNew2004_Chicago.idf") "Name of the IDF file"; parameter String weaName=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos") "Name of the weather file"; inner Buildings.ThermalZones.EnergyPlus.Building building( idfName=idfName, weaName=weaName, computeWetBulbTemperature=false) "Building-level declarations"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant qGai_flow[3]( k={0,0,0}) "Internal heat gain (computed already in EnergyPlus"; initial equation assert( abs( cor.V-VRooCor) < 0.01, "Volumes don't match. These had to be entered manually to avoid using a non-literal value."); assert( abs( sou.V-VRooSou) < 0.01, "Volumes don't match. These had to be entered manually to avoid using a non-literal value."); assert( abs( nor.V-VRooNor) < 0.01, "Volumes don't match. These had to be entered manually to avoid using a non-literal value."); assert( abs( eas.V-VRooEas) < 0.01, "Volumes don't match. These had to be entered manually to avoid using a non-literal value."); assert( abs( wes.V-VRooWes) < 0.01, "Volumes don't match. These had to be entered manually to avoid using a non-literal value."); assert( abs( opeWesCor.wOpe-4) < 0.01, "wOpe in west zone doesn't match"); equation connect(sou.heaPorAir,temAirSou.port); connect(eas.heaPorAir,temAirEas.port); connect(nor.heaPorAir,temAirNor.port); connect(wes.heaPorAir,temAirWes.port); connect(cor.heaPorAir,temAirCor.port); connect(sou.ports[1],portsSou[1]); connect(sou.ports[2],portsSou[2]); connect(eas.ports[1],portsEas[1]); connect(eas.ports[2],portsEas[2]); connect(nor.ports[1],portsNor[1]); connect(nor.ports[2],portsNor[2]); connect(wes.ports[1],portsWes[1]); connect(wes.ports[2],portsWes[2]); connect(cor.ports[1],portsCor[1]); connect(cor.ports[2],portsCor[2]); connect(leaSou.port_b,sou.ports[3]); connect(leaEas.port_b,eas.ports[3]); connect(leaNor.port_b,nor.ports[3]); connect(leaWes.port_b,wes.ports[3]); connect(opeSouCor.port_b1,cor.ports[3]); connect(opeSouCor.port_a2,cor.ports[4]); connect(opeSouCor.port_a1,sou.ports[4]); connect(opeSouCor.port_b2,sou.ports[5]); connect(opeEasCor.port_b1,eas.ports[4]); connect(opeEasCor.port_a2,eas.ports[5]); connect(opeEasCor.port_a1,cor.ports[5]); connect(opeEasCor.port_b2,cor.ports[6]); connect(opeNorCor.port_b1,nor.ports[4]); connect(opeNorCor.port_a2,nor.ports[5]); connect(opeNorCor.port_a1,cor.ports[7]); connect(opeNorCor.port_b2,cor.ports[8]); connect(opeWesCor.port_b1,cor.ports[9]); connect(opeWesCor.port_a2,cor.ports[10]); connect(opeWesCor.port_a1,wes.ports[4]); connect(opeWesCor.port_b2,wes.ports[5]); connect(cor.ports[11],senRelPre.port_a); connect(sou.qGai_flow,qGai_flow.y); connect(wes.qGai_flow,qGai_flow.y); connect(eas.qGai_flow,qGai_flow.y); connect(cor.qGai_flow,qGai_flow.y); connect(nor.qGai_flow,qGai_flow.y); connect(att.qGai_flow,qGai_flow.y); connect(sou.heaPorAir,heaPorSou); connect(eas.heaPorAir,heaPorEas); connect(nor.heaPorAir,heaPorNor); connect(wes.heaPorAir,heaPorWes); connect(cor.heaPorAir,heaPorCor); end Floor;

Buildings.ThermalZones.EnergyPlus.Examples.SmallOffice.BaseClasses.IdealHeaterCooler Buildings.ThermalZones.EnergyPlus.Examples.SmallOffice.BaseClasses.IdealHeaterCooler

Model of ideal heater or cooler

Buildings.ThermalZones.EnergyPlus.Examples.SmallOffice.BaseClasses.IdealHeaterCooler

Information

Model of an ideal heater or cooler that tracks a set point using a PI controller. The heater or cooler has a PID controller that regulates the heat added or removed.

To use this model, connect its heat port to the heat port of an air volume, for example, the heat port heaPorAir of Buildings.ThermalZones.EnergyPlus.ThermalZone.

Note that this model can only provide sensible cooling, but no latent cooling.

Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).

Parameters

TypeNameDefaultDescription
HeatFlowRateQ_flow_nominal Maximum heat flow rate (positive for heating; negative for cooling) [W]
Controller
SimpleControllercontrollerTypeBuildings.Controls.OBC.CDL.T...Type of controller
Realk1Gain of controller
RealTi120Time constant of integrator block [s]
RealTd0.1Time constant of derivative block [s]

Connectors

TypeNameDescription
input RealInputTSetSet point temperature
input RealInputTMeaMeasured temperature
output RealOutputQ_flowHeat flow rate [W]
HeatPort_bheaPorHeat port

Modelica definition

model IdealHeaterCooler "Model of ideal heater or cooler" extends Modelica.Blocks.Icons.Block; parameter Modelica.SIunits.HeatFlowRate Q_flow_nominal "Maximum heat flow rate (positive for heating; negative for cooling)"; parameter Buildings.Controls.OBC.CDL.Types.SimpleController controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI "Type of controller"; parameter Real k( min=100*Buildings.Controls.OBC.CDL.Constants.eps)=1 "Gain of controller"; parameter Real Ti( final quantity="Time", final unit="s", min=100*Buildings.Controls.OBC.CDL.Constants.eps)=120 "Time constant of integrator block"; parameter Real Td( final quantity="Time", final unit="s", min=100*Buildings.Controls.OBC.CDL.Constants.eps)=0.1 "Time constant of derivative block"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TSet "Set point temperature"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TMea "Measured temperature"; Buildings.Controls.OBC.CDL.Interfaces.RealOutput Q_flow( final unit="W") "Heat flow rate"; HeatTransfer.Sources.PrescribedHeatFlow preHeaFlo; Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_b heaPor "Heat port"; Buildings.Controls.OBC.CDL.Continuous.PID conPID( final controllerType=controllerType, final k=k, final Ti=Ti, final Td=Td, reverseActing=Q_flow_nominal > 0) "Controller for heat input"; protected Buildings.Controls.OBC.CDL.Continuous.Gain gai( final k=Q_flow_nominal) "Gain for heat flow rate"; equation connect(conPID.u_s,TSet); connect(conPID.u_m,TMea); connect(preHeaFlo.Q_flow,gai.y); connect(gai.u,conPID.y); connect(preHeaFlo.port,heaPor); connect(gai.y,Q_flow); end IdealHeaterCooler;