Buildings.Examples.ScalableBenchmarks.BuildingVAV.BaseClasses

Base classes

Information

Package with base classes for scalable building models implementation.

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

Package Content

Name Description
Buildings.Examples.ScalableBenchmarks.BuildingVAV.BaseClasses.ControlBus ControlBus Control bus that is adapted to the signals connected to it
Buildings.Examples.ScalableBenchmarks.BuildingVAV.BaseClasses.CoolSetpoint CoolSetpoint Schedule for cooling setpoint
Buildings.Examples.ScalableBenchmarks.BuildingVAV.BaseClasses.FanOnOffWithDP FanOnOffWithDP Controller for fan on/off and to provide prescribed dP
Buildings.Examples.ScalableBenchmarks.BuildingVAV.BaseClasses.HeatSetpoint HeatSetpoint Schedule for heating setpoint
Buildings.Examples.ScalableBenchmarks.BuildingVAV.BaseClasses.IntLoad IntLoad Schedule for time varying internal loads
Buildings.Examples.ScalableBenchmarks.BuildingVAV.BaseClasses.VAVBranch VAVBranch Supply branch of a VAV system

Buildings.Examples.ScalableBenchmarks.BuildingVAV.BaseClasses.ControlBus Buildings.Examples.ScalableBenchmarks.BuildingVAV.BaseClasses.ControlBus

Control bus that is adapted to the signals connected to it

Buildings.Examples.ScalableBenchmarks.BuildingVAV.BaseClasses.ControlBus

Information

This connector defines the expandable connector ControlBus that is used to connect control signals. Note, this connector is empty. When using it, the actual content is constructed by the signals connected to this bus.

Extends from Modelica.Icons.SignalBus (Icon for signal bus).

Contents

TypeNameDescription
TemperatureTRooMinMinimum temperature of multiple zones [K]
TemperatureTRooAveAverage temperature of multiple zones [K]
TemperatureTRooSetHeaRoom heating setpoint temperature [K]
TemperatureTRooSetCooRoom cooling setpoint temperature [K]
TemperatureTOutOutdoor air temperature [K]
TimedTNexOccTime to next occupancy period [s]
BooleanoccupiedOccupancy status
IntegercontrolModeSystem operation modes

Modelica definition

expandable connector ControlBus "Control bus that is adapted to the signals connected to it" extends Modelica.Icons.SignalBus; Modelica.SIunits.Temperature TRooMin "Minimum temperature of multiple zones"; Modelica.SIunits.Temperature TRooAve "Average temperature of multiple zones"; Modelica.SIunits.Temperature TRooSetHea "Room heating setpoint temperature"; Modelica.SIunits.Temperature TRooSetCoo "Room cooling setpoint temperature"; Modelica.SIunits.Temperature TOut "Outdoor air temperature"; Modelica.SIunits.Time dTNexOcc "Time to next occupancy period"; Boolean occupied "Occupancy status"; Integer controlMode "System operation modes"; end ControlBus;

Buildings.Examples.ScalableBenchmarks.BuildingVAV.BaseClasses.CoolSetpoint Buildings.Examples.ScalableBenchmarks.BuildingVAV.BaseClasses.CoolSetpoint

Schedule for cooling setpoint

Buildings.Examples.ScalableBenchmarks.BuildingVAV.BaseClasses.CoolSetpoint

Information

This block defines room air cooling setpoints.

Extends from Modelica.Blocks.Sources.CombiTimeTable (Table look-up with respect to time and linear/periodic extrapolation methods (data from matrix/file)).

Parameters

TypeNameDefaultDescription
Table data definition
BooleantableOnFilefalse= true, if table is defined on file or in function usertab
Realtable[:, :][0, 273.15 + 32.0; 8*3600, 2...Table matrix (time = first column; e.g., table=[0, 0; 1, 1; 2, 4])
StringtableName"NoName"Table name on file or in function usertab (see docu)
StringfileName"NoName"File where matrix is stored
BooleanverboseReadtrue= true, if info message that file is loading is to be printed
Table data interpretation
Integercolumns[:]{2}Columns of table to be interpolated
SmoothnesssmoothnessModelica.Blocks.Types.Smooth...Smoothness of table interpolation
ExtrapolationextrapolationModelica.Blocks.Types.Extrap...Extrapolation of data outside the definition range
TimetimeScale1Time scale of first table column [s]
Realoffset[:]{0}Offsets of output signals
TimestartTime0Output = offset for time < startTime [s]
TimeshiftTimestartTimeShift time of first table column [s]
TimeEventstimeEventsModelica.Blocks.Types.TimeEv...Time event handling of table interpolation
BooleanverboseExtrapolationfalse= true, if warning messages are to be printed if time is outside the table definition range

Connectors

TypeNameDescription
output RealOutputy[nout]Connector of Real output signals

Modelica definition

model CoolSetpoint "Schedule for cooling setpoint" extends Modelica.Blocks.Sources.CombiTimeTable( smoothness=Modelica.Blocks.Types.Smoothness.ConstantSegments, extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic, table=[ 0, 273.15+32.0; 8*3600, 273.15+27.0; 18*3600, 273.15+32.0; 24*3600, 273.15+32.0], columns={2}); end CoolSetpoint;

Buildings.Examples.ScalableBenchmarks.BuildingVAV.BaseClasses.FanOnOffWithDP Buildings.Examples.ScalableBenchmarks.BuildingVAV.BaseClasses.FanOnOffWithDP

Controller for fan on/off and to provide prescribed dP

Buildings.Examples.ScalableBenchmarks.BuildingVAV.BaseClasses.FanOnOffWithDP

Information

This model outputs ON/OFF signal to control fan operation. When the system is in mode like unoccupiedOff, safety, it outputs false so that fan should be OFF and provide 0 pressure rise; When the system is in mode like unoccupiedNightSetBack,occupied,unoccupiedWarmUp, unoccupiedPreCool, it outputs true so that fan should be ON and provide preRis pressure rise.

Parameters

TypeNameDefaultDescription
PressureDifferencepreRis850Prescribed pressure difference [Pa]

Connectors

TypeNameDescription
output RealOutputySupply fan requested pressure rise, or zero if fan should be off [Pa]
ControlBuscontrolBus 

Modelica definition

block FanOnOffWithDP "Controller for fan on/off and to provide prescribed dP" import Buildings.Examples.VAVReheat.Controls.OperationModes; parameter Modelica.SIunits.PressureDifference preRis=850 "Prescribed pressure difference"; Modelica.Blocks.Interfaces.RealOutput y(unit="Pa") "Supply fan requested pressure rise, or zero if fan should be off"; Buildings.Examples.VAVReheat.Controls.ControlBus controlBus; Modelica.Blocks.Routing.Extractor extractor( nin=6, index(start=1, fixed=true)) "Extractor for control signal"; Modelica.Blocks.Sources.Constant off(k=0) "Off signal"; Modelica.Blocks.Sources.Constant on(k=preRis) "On signal"; equation connect(off.y, extractor.u[Integer(OperationModes.unoccupiedOff)]); connect(off.y, extractor.u[Integer(OperationModes.safety)]); connect(on.y, extractor.u[Integer(OperationModes.unoccupiedNightSetBack)]); connect(on.y, extractor.u[Integer(OperationModes.occupied)]); connect(on.y, extractor.u[Integer(OperationModes.unoccupiedWarmUp)]); connect(on.y, extractor.u[Integer(OperationModes.unoccupiedPreCool)]); connect(controlBus.controlMode, extractor.index); connect(extractor.y, y); end FanOnOffWithDP;

Buildings.Examples.ScalableBenchmarks.BuildingVAV.BaseClasses.HeatSetpoint Buildings.Examples.ScalableBenchmarks.BuildingVAV.BaseClasses.HeatSetpoint

Schedule for heating setpoint

Buildings.Examples.ScalableBenchmarks.BuildingVAV.BaseClasses.HeatSetpoint

Information

This block defines room air heating setpoints.

Extends from Modelica.Blocks.Sources.CombiTimeTable (Table look-up with respect to time and linear/periodic extrapolation methods (data from matrix/file)).

Parameters

TypeNameDefaultDescription
Table data definition
BooleantableOnFilefalse= true, if table is defined on file or in function usertab
Realtable[:, :][0, 273.15 + 13.0; 8*3600, 2...Table matrix (time = first column; e.g., table=[0, 0; 1, 1; 2, 4])
StringtableName"NoName"Table name on file or in function usertab (see docu)
StringfileName"NoName"File where matrix is stored
BooleanverboseReadtrue= true, if info message that file is loading is to be printed
Table data interpretation
Integercolumns[:]{2}Columns of table to be interpolated
SmoothnesssmoothnessModelica.Blocks.Types.Smooth...Smoothness of table interpolation
ExtrapolationextrapolationModelica.Blocks.Types.Extrap...Extrapolation of data outside the definition range
TimetimeScale1Time scale of first table column [s]
Realoffset[:]{0}Offsets of output signals
TimestartTime0Output = offset for time < startTime [s]
TimeshiftTimestartTimeShift time of first table column [s]
TimeEventstimeEventsModelica.Blocks.Types.TimeEv...Time event handling of table interpolation
BooleanverboseExtrapolationfalse= true, if warning messages are to be printed if time is outside the table definition range

Connectors

TypeNameDescription
output RealOutputy[nout]Connector of Real output signals

Modelica definition

model HeatSetpoint "Schedule for heating setpoint" extends Modelica.Blocks.Sources.CombiTimeTable( smoothness=Modelica.Blocks.Types.Smoothness.ConstantSegments, extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic, table=[ 0, 273.15+13.0; 8*3600, 273.15+20.0; 18*3600, 273.15+13.0; 24*3600, 273.15+13.0], columns={2}); end HeatSetpoint;

Buildings.Examples.ScalableBenchmarks.BuildingVAV.BaseClasses.IntLoad Buildings.Examples.ScalableBenchmarks.BuildingVAV.BaseClasses.IntLoad

Schedule for time varying internal loads

Buildings.Examples.ScalableBenchmarks.BuildingVAV.BaseClasses.IntLoad

Information

This block defines schedule of internal load.

Extends from Modelica.Blocks.Sources.CombiTimeTable (Table look-up with respect to time and linear/periodic extrapolation methods (data from matrix/file)).

Parameters

TypeNameDefaultDescription
Table data definition
BooleantableOnFilefalse= true, if table is defined on file or in function usertab
Realtable[:, :][0, 0.1; 8*3600, 1.0; 18*360...Table matrix (time = first column; e.g., table=[0, 0; 1, 1; 2, 4])
StringtableName"NoName"Table name on file or in function usertab (see docu)
StringfileName"NoName"File where matrix is stored
BooleanverboseReadtrue= true, if info message that file is loading is to be printed
Table data interpretation
Integercolumns[:]{2}Columns of table to be interpolated
SmoothnesssmoothnessModelica.Blocks.Types.Smooth...Smoothness of table interpolation
ExtrapolationextrapolationModelica.Blocks.Types.Extrap...Extrapolation of data outside the definition range
TimetimeScale1Time scale of first table column [s]
Realoffset[:]{0}Offsets of output signals
TimestartTime0Output = offset for time < startTime [s]
TimeshiftTimestartTimeShift time of first table column [s]
TimeEventstimeEventsModelica.Blocks.Types.TimeEv...Time event handling of table interpolation
BooleanverboseExtrapolationfalse= true, if warning messages are to be printed if time is outside the table definition range

Connectors

TypeNameDescription
output RealOutputy[nout]Connector of Real output signals

Modelica definition

model IntLoad "Schedule for time varying internal loads" extends Modelica.Blocks.Sources.CombiTimeTable( smoothness=Modelica.Blocks.Types.Smoothness.ConstantSegments, extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic, table=[ 0, 0.1; 8*3600, 1.0; 18*3600, 0.1; 24*3600, 0.1], columns={2}); end IntLoad;

Buildings.Examples.ScalableBenchmarks.BuildingVAV.BaseClasses.VAVBranch Buildings.Examples.ScalableBenchmarks.BuildingVAV.BaseClasses.VAVBranch

Supply branch of a VAV system

Buildings.Examples.ScalableBenchmarks.BuildingVAV.BaseClasses.VAVBranch

Information

Model for a VAV supply branch. The terminal VAV box has a pressure independent damper and a water reheat coil. The pressure independent damper model includes an idealized flow rate controller and requires a discharge air flow rate set-point (normalized to the nominal value) as a control signal.

Parameters

TypeNameDefaultDescription
replaceable package MediumAModelica.Media.Interfaces.Pa...Medium model for air
replaceable package MediumWModelica.Media.Interfaces.Pa...Medium model for water
PressureDifferencedpFixed_nominal0Pressure drop of duct and other resistances that are in series [Pa]
MassFlowRatem_flow_nominal Mass flow rate of this thermal zone [kg/s]
VolumeVRoo Room volume [m3]

Connectors

TypeNameDescription
replaceable package MediumAMedium model for air
replaceable package MediumWMedium model for water
input RealInputTRooHeaSetSetpoint temperature for room for heating [K]
input RealInputTRooCooSetSetpoint temperature for room for cooling [K]
input RealInputTRooMeasured room temperature [K]
FluidPort_aport_aFluid connector a1 (positive design flow direction is from port_a1 to port_b1)
FluidPort_aport_bFluid connector b (positive design flow direction is from port_a1 to port_b1)
output RealOutputyDamActual VAV damper position

Modelica definition

model VAVBranch "Supply branch of a VAV system" replaceable package MediumA = Modelica.Media.Interfaces.PartialMedium "Medium model for air"; replaceable package MediumW = Modelica.Media.Interfaces.PartialMedium "Medium model for water"; parameter Modelica.SIunits.PressureDifference dpFixed_nominal(displayUnit="Pa")=0 "Pressure drop of duct and other resistances that are in series"; parameter Modelica.SIunits.MassFlowRate m_flow_nominal "Mass flow rate of this thermal zone"; parameter Modelica.SIunits.Volume VRoo "Room volume"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TRooHeaSet( final quantity="ThermodynamicTemperature", final unit = "K", displayUnit = "degC", min=0) "Setpoint temperature for room for heating"; Buildings.Controls.OBC.CDL.Interfaces.RealInput TRooCooSet( final quantity="ThermodynamicTemperature", final unit = "K", displayUnit = "degC", min=0) "Setpoint temperature for room for cooling"; Modelica.Blocks.Interfaces.RealInput TRoo( final quantity="ThermodynamicTemperature", final unit = "K", displayUnit = "degC", min=0) "Measured room temperature"; Modelica.Fluid.Interfaces.FluidPort_a port_a( redeclare package Medium = MediumA) "Fluid connector a1 (positive design flow direction is from port_a1 to port_b1)"; Modelica.Fluid.Interfaces.FluidPort_a port_b( redeclare package Medium = MediumA) "Fluid connector b (positive design flow direction is from port_a1 to port_b1)"; Modelica.Blocks.Interfaces.RealOutput yDam "Actual VAV damper position"; Fluid.Actuators.Dampers.PressureIndependent vav( dpDamper_nominal(displayUnit="Pa") = 20, redeclare package Medium = MediumA, m_flow_nominal=m_flow_nominal, dpFixed_nominal=dpFixed_nominal) "VAV box for room"; Buildings.Fluid.HeatExchangers.DryCoilEffectivenessNTU terHea( redeclare package Medium1 = MediumA, redeclare package Medium2 = MediumW, m1_flow_nominal=m_flow_nominal, m2_flow_nominal=m_flow_nominal*1000*(50 - 17)/4200/10, Q_flow_nominal=m_flow_nominal*1006*(16.7 - 50), configuration=Buildings.Fluid.Types.HeatExchangerConfiguration.CounterFlow, dp1_nominal=0, from_dp2=true, dp2_nominal=0, T_a1_nominal=289.85, T_a2_nominal=355.35) "Heat exchanger of terminal box"; Buildings.Fluid.Sources.Boundary_pT sinTer( redeclare package Medium = MediumW, p(displayUnit="Pa") = 3E5, nPorts=1) "Sink for terminal box "; Buildings.Examples.VAVReheat.Controls.RoomVAV con "Room temperature controller"; Buildings.Fluid.Sensors.MassFlowRate senMasFlo( redeclare package Medium = MediumA) "Sensor for mass flow rate"; Modelica.Blocks.Math.Gain fraMasFlo( k=1/m_flow_nominal) "Fraction of mass flow rate, relative to nominal flow"; Buildings.Fluid.Sensors.TemperatureTwoPort TSup( redeclare package Medium = MediumA, m_flow_nominal=m_flow_nominal, initType=Modelica.Blocks.Types.Init.InitialState) "Supply air temperature"; Modelica.Blocks.Math.Gain ACH(k=1/VRoo/1.2*3600) "Air change per hour"; Buildings.Fluid.Actuators.Valves.TwoWayLinear valHea( redeclare package Medium = MediumW, m_flow_nominal=m_flow_nominal*1000*15/4200/10, CvData=Buildings.Fluid.Types.CvTypes.OpPoint, from_dp=true, dpFixed_nominal=6000, dpValve_nominal=6000) "Valve at reaheat coil"; Buildings.Fluid.Sources.Boundary_pT souTer( redeclare package Medium = MediumW, p(displayUnit="Pa") = 3E5 + 12000, nPorts=1, T=323.15) "Source for terminal box "; equation connect(fraMasFlo.u, senMasFlo.m_flow); connect(con.yDam, vav.y); connect(terHea.port_b1, TSup.port_a); connect(TSup.port_b, vav.port_a); connect(vav.port_b, senMasFlo.port_a); connect(ACH.u, senMasFlo.m_flow); connect(con.yVal, valHea.y); connect(souTer.ports[1], terHea.port_a2); connect(terHea.port_b2, valHea.port_a); connect(valHea.port_b, sinTer.ports[1]); connect(port_a, terHea.port_a1); connect(senMasFlo.port_b, port_b); connect(con.TRoo, TRoo); connect(con.TRooHeaSet, TRooHeaSet); connect(TRooCooSet, con.TRooCooSet); connect(vav.y_actual, yDam); end VAVBranch;