Buildings.Examples.ScalableBenchmarks.BuildingVAV.Examples

Demonstrate model scalability

Information

This package demonstrates the scalability of the building envelope model and the corresponded VAV AHU system. A one zone model is implemented in Buildings.Examples.ScalableBenchmarks.BuildingVAV.Examples.OneFloor_OneZone, and a multizone model is implemented in Buildings.Examples.ScalableBenchmarks.BuildingVAV.Examples.TwoFloor_TwoZone.

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

Package Content

Name Description
Buildings.Examples.ScalableBenchmarks.BuildingVAV.Examples.OneFloor_OneZone OneFloor_OneZone Closed-loop model with 1 zone in 1 floor
Buildings.Examples.ScalableBenchmarks.BuildingVAV.Examples.TwoFloor_TwoZone TwoFloor_TwoZone Closed-loop model with 2 zone in 2 floor

Buildings.Examples.ScalableBenchmarks.BuildingVAV.Examples.OneFloor_OneZone Buildings.Examples.ScalableBenchmarks.BuildingVAV.Examples.OneFloor_OneZone

Closed-loop model with 1 zone in 1 floor

Buildings.Examples.ScalableBenchmarks.BuildingVAV.Examples.OneFloor_OneZone

Information

This is a model of a building that has multiple thermal zones on each floor, and an HVAC system on each floor.

The HVAC system is a variable air volume (VAV) system with economizer and a heating and cooling coil in the air handler unit (AHU). There is also a reheat coil and an air damper in each zone inlet branch. Each floor has one VAV AHU system. The figure below shows the schematic diagram of the HVAC system

image

The control sequence regulates the supply fan speed to ensure a prescribed pressure rise of 850 Pa when the supply fan runs during operation modes occupied, unoccupied night set back, unoccupied warm-up, and unoccupied pre-cool. The heating coil valve, outside air damper, and cooling coil valve are modulated in sequence to maintain the supply air temperature set point. The economizer control ensures the following functions: minimum outside air requirement, and supply air cooling, see Buildings.Examples.VAVReheat.BaseClasses.Controls.Economizer. The controller of the terminal units tracks the room air temperature set point based on a "single maximum" logic, see Buildings.Examples.VAVReheat.BaseClasses.Controls.RoomVAV.

There is also a finite state machine that transitions the mode of operation of the HVAC system between the modes occupied, unoccupied off, unoccupied night set back, unoccupied warm-up, and unoccupied pre-cool. Local loop control is implemented using proportional and proportional-integral controllers, while the supervisory control is implemented using a finite state machine.

The thermal room model computes transient heat conduction through walls, floors, and ceilings and long-wave radiative heat exchange between surfaces. The convective heat transfer coefficient is computed based on the temperature difference between the surface and the room air. There is also a layer-by-layer short-wave radiation, long-wave radiation, convection, and conduction heat transfer model for the windows. The model is similar to the Window 5 model and described in TARCOG 2006.

Each thermal zone can have air flow from the HVAC system, through leakages of the building envelope.

References

ASHRAE. Sequences of Operation for Common HVAC Systems. ASHRAE, Atlanta, GA, 2006.

Deru M., K. Field, D. Studer, K. Benne, B. Griffith, P. Torcellini, M. Halverson, D. Winiarski, B. Liu, M. Rosenberg, J. Huang, M. Yazdanian, and D. Crawley. DOE commercial building research benchmarks for commercial buildings. Technical report, U.S. Department of Energy, Energy Efficiency and Renewable Energy, Office of Building Technologies, Washington, DC, 2009.

TARCOG 2006: Carli, Inc., TARCOG: Mathematical models for calculation of thermal performance of glazing systems with our without shading devices, Technical Report, Oct. 17, 2006.

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

Parameters

TypeNameDefaultDescription
replaceable package MediumABuildings.Media.Air (T_defau... 
IntegernZon1Number of zones per floor
IntegernFlo1Number of floors
PressureDifferencedP_pre850Prescribed pressure difference [Pa]
VolumeVRoo[nZon, nFlo]{{6*8*2.7 for j in 1:nFlo} f...Room volume [m3]
MassFlowRatem_flow_nominal_each[nZon, nFlo]7*conv*VRoo[:, :]Nominal flow rate to each zone [kg/s]
MassFlowRatem_flow_nominalnZon*(7*conv)*6*8*2.7Nominal system flow rate [kg/s]

Connectors

TypeNameDescription
replaceable package MediumA 
BusweaBusWeather Data Bus
ControlBuscontrolBus[nFlo]Control bus for each floor

Modelica definition

model OneFloor_OneZone "Closed-loop model with 1 zone in 1 floor" extends Modelica.Icons.Example; replaceable package MediumA = Buildings.Media.Air(T_default=293.15); package MediumW = Buildings.Media.Water "Medium model for water"; parameter Integer nZon(min=1) = 1 "Number of zones per floor"; parameter Integer nFlo(min=1) = 1 "Number of floors"; parameter Modelica.Units.SI.PressureDifference dP_pre=850 "Prescribed pressure difference"; parameter Modelica.Units.SI.Volume VRoo[nZon,nFlo]={{6*8*2.7 for j in 1:nFlo} for i in 1:nZon} "Room volume"; parameter Modelica.Units.SI.MassFlowRate m_flow_nominal_each[nZon,nFlo]= 7*conv*VRoo[:,:] "Nominal flow rate to each zone"; parameter Modelica.Units.SI.MassFlowRate m_flow_nominal=nZon*(7*conv)*6*8*2.7 "Nominal system flow rate"; constant Real conv=1.2/3600 "Conversion factor for nominal mass flow rate"; Buildings.Examples.ScalableBenchmarks.BuildingVAV.BaseClasses.VAVBranch vavTer[nZon,nFlo]( redeclare each package MediumA = MediumA, redeclare each package MediumW = MediumW, m_flow_nominal={{m_flow_nominal_each[i, j] for j in 1:nFlo} for i in 1:nZon}, VRoo={{VRoo[i, j] for j in 1:nFlo} for i in 1:nZon}, dpFixed_nominal={{220 + 20 for j in 1:nFlo} for i in 1:nZon}) "Supply branch of VAV system"; Buildings.Examples.ScalableBenchmarks.BuildingVAV.ThermalZones.MultiZone buiZon( nZon=nZon, nFlo=nFlo) "Multizone model with scalable number of zones"; Buildings.Fluid.Movers.FlowControlled_dp fan[nFlo]( redeclare each package Medium = MediumA, each constantHead=850, each energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, each m_flow_nominal=0.1, each inputType=Buildings.Fluid.Types.InputType.Continuous, each nominalValuesDefineDefaultPressureCurve=true) "Supply air fan"; Buildings.Fluid.HeatExchangers.DryCoilEffectivenessNTU hex[nFlo]( redeclare each package Medium1 = MediumA, redeclare each package Medium2 = MediumW, each m1_flow_nominal=m_flow_nominal, each allowFlowReversal2=false, each m2_flow_nominal=m_flow_nominal*1000*(10 - (-20))/4200/10, each configuration=Buildings.Fluid.Types.HeatExchangerConfiguration.CounterFlow, each Q_flow_nominal=m_flow_nominal*1006*(8.5 - 16.7), each dp1_nominal=0, each dp2_nominal=0, each T_a1_nominal=281.65, each T_a2_nominal=323.15) "Heating coil"; Fluid.HeatExchangers.WetCoilEffectivenessNTU cooCoi[nFlo]( redeclare each package Medium1 = MediumW, redeclare each package Medium2 = MediumA, each UA_nominal=m_flow_nominal*1000*15/ Buildings.Fluid.HeatExchangers.BaseClasses.lmtd( T_a1=26.2, T_b1=12.8, T_a2=6, T_b2=16), each m1_flow_nominal=m_flow_nominal*1000*15/4200/10, each m2_flow_nominal=m_flow_nominal, each dp2_nominal=0, each dp1_nominal=0, each energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) "Cooling coil"; Buildings.Fluid.FixedResistances.PressureDrop fil[nFlo]( redeclare each package Medium = MediumA, each m_flow_nominal=m_flow_nominal, each dp_nominal=200 + 200 + 100, each from_dp=false, each linearized=false) "Filter"; Buildings.Fluid.Sources.Boundary_pT sinHea[nFlo]( redeclare each package Medium = MediumW, each p=300000, each T=318.15, each nPorts=1) "Sink for heating coil"; Buildings.Fluid.Sources.Boundary_pT souHea[nFlo]( redeclare each package Medium = MediumW, each p(displayUnit="Pa") = 300000 + 12000, each T=318.15, each nPorts=1) "Source for heating coil"; Buildings.Fluid.Sources.Boundary_pT sinCoo[nFlo]( redeclare each package Medium = MediumW, each p=300000, each T=285.15, each nPorts=1) "Sink for cooling coil"; Buildings.Fluid.Sources.Boundary_pT souCoo[nFlo]( redeclare each package Medium = MediumW, each p=3E5 + 12000, each T=279.15, each nPorts=1) "Source for cooling coil"; Buildings.Fluid.Sources.Outside amb[nFlo]( redeclare each package Medium = MediumA, each nPorts=2) "Ambient conditions"; Buildings.Fluid.Actuators.Dampers.MixingBox eco[nFlo]( redeclare each package Medium = MediumA, each mOut_flow_nominal=m_flow_nominal, each mRec_flow_nominal=m_flow_nominal, each mExh_flow_nominal=m_flow_nominal, each dpDamExh_nominal=0.27, each dpDamOut_nominal=0.27, each dpDamRec_nominal=0.27, each dpFixExh_nominal=10, each dpFixOut_nominal=10, each dpFixRec_nominal=10) "Economizer"; Buildings.Fluid.Sensors.TemperatureTwoPort TMix[nFlo]( redeclare each package Medium = MediumA, each m_flow_nominal=m_flow_nominal) "Mixed air temperature sensor"; Buildings.Fluid.Sensors.VolumeFlowRate senSupFlo[nFlo]( redeclare each package Medium = MediumA, each m_flow_nominal=m_flow_nominal) "Sensor for supply fan flow rate"; Buildings.Fluid.Sensors.TemperatureTwoPort TRet[nFlo]( redeclare each package Medium = MediumA, each m_flow_nominal=m_flow_nominal) "Return air temperature sensor"; Buildings.Fluid.Sensors.VolumeFlowRate senRetFlo[nFlo]( redeclare each package Medium = MediumA, each m_flow_nominal=m_flow_nominal) "Sensor for return fan flow rate"; Buildings.Fluid.Movers.Preconfigured.SpeedControlled_y fanRet[nFlo]( redeclare each package Medium = MediumA, each m_flow_nominal=m_flow_nominal, each dp_nominal=1.5*110, each tau=60, each energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) "Return air fan"; Buildings.Fluid.Actuators.Valves.TwoWayLinear valHea[nFlo]( redeclare each package Medium = MediumW, each CvData=Buildings.Fluid.Types.CvTypes.OpPoint, each dpValve_nominal=6000, each m_flow_nominal=m_flow_nominal*1000*40/4200/10, each from_dp=true, each dpFixed_nominal=6000) "Heating coil valve"; Buildings.Fluid.Actuators.Valves.TwoWayLinear valCoo[nFlo]( redeclare each package Medium = MediumW, each CvData=Buildings.Fluid.Types.CvTypes.OpPoint, each m_flow_nominal=m_flow_nominal*1000*15/4200/10, each dpValve_nominal=6000, each from_dp=true, each dpFixed_nominal=6000) "Cooling coil valve"; Buildings.Fluid.Sensors.VolumeFlowRate VOut1[nFlo]( redeclare each package Medium = MediumA, each m_flow_nominal=m_flow_nominal) "Outside air volume flow rate"; Buildings.Fluid.Sensors.TemperatureTwoPort TCoiHeaOut[nFlo]( redeclare each package Medium = MediumA, each m_flow_nominal=m_flow_nominal) "Heating coil outlet temperature"; Buildings.Fluid.Sensors.TemperatureTwoPort TSup[nFlo]( redeclare each package Medium = MediumA, each m_flow_nominal=m_flow_nominal) "Supply air temperature sensor"; Buildings.Examples.VAVReheat.BaseClasses.Controls.ModeSelector modeSelector[nFlo] "Finite State Machine for the operational modes"; Buildings.Examples.VAVReheat.BaseClasses.Controls.Economizer conEco[nFlo]( each have_reset=true, each VOut_flow_min=0.3*m_flow_nominal/1.2) "Controller for economizer"; Buildings.BoundaryConditions.WeatherData.ReaderTMY3 weaDat(filNam= Modelica.Utilities.Files.loadResource("modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos")); Buildings.BoundaryConditions.WeatherData.Bus weaBus "Weather Data Bus"; Modelica.Blocks.Routing.RealPassThrough TOut( y(final quantity="ThermodynamicTemperature", final unit="K", displayUnit="degC", min=0)) "Outdoor temperature"; Buildings.Utilities.Math.Average ave[nFlo](each nin=nZon) "Compute average of room temperatures"; Buildings.Utilities.Math.Min min1[nFlo](each nin=nZon) "Computes lowest room temperature"; Buildings.Examples.VAVReheat.BaseClasses.Controls.FanVFD conFanRet[nFlo]( each xSet_nominal(final unit="m3/s") = m_flow_nominal/1.2, each r_N_min=0.2) "Controller for fan"; Buildings.Examples.ScalableBenchmarks.BuildingVAV.BaseClasses.ControlBus controlBus[nFlo] "Control bus for each floor"; Buildings.Examples.ScalableBenchmarks.BuildingVAV.BaseClasses.HeatSetpoint TSetHea "Heating setpoint"; Buildings.Examples.ScalableBenchmarks.BuildingVAV.BaseClasses.CoolSetpoint TSetCoo1 "Cooling setpoint"; Buildings.Controls.SetPoints.OccupancySchedule occSch(occupancy=3600*{8,18}) "Occupancy schedule"; Buildings.Examples.ScalableBenchmarks.BuildingVAV.BaseClasses.FanOnOffWithDP fan_dP_On_Off[nFlo](each preRis=dP_pre) "controller outputs fan on or off"; VAVReheat.BaseClasses.Controls.SupplyAirTemperature conTSup[nFlo](each k=0.01) "Supply air temperature controller"; VAVReheat.BaseClasses.Controls.SupplyAirTemperatureSetpoint TAirSupSet[nFlo] "Supply air temperature set point"; equation for iFlo in 1:nFlo loop connect(eco[iFlo].port_Sup, TMix[iFlo].port_a); connect(TMix[iFlo].port_b, fil[iFlo].port_a); connect(hex[iFlo].port_b2, sinHea[iFlo].ports[1]); connect(TRet[iFlo].T, conEco[iFlo].TRet); connect(VOut1[iFlo].V_flow, conEco[iFlo].VOut_flow); connect(conEco[iFlo].yOA, eco[iFlo].y); connect(weaBus, amb[iFlo].weaBus); connect(senRetFlo[iFlo].V_flow, conFanRet[iFlo].u_m); connect(conFanRet[iFlo].u, senSupFlo[iFlo].V_flow); connect(conFanRet[iFlo].y, fanRet[iFlo].y); connect(TCoiHeaOut[iFlo].port_b, cooCoi[iFlo].port_a2); connect(cooCoi[iFlo].port_b2, fan[iFlo].port_a); connect(cooCoi[iFlo].port_b1, sinCoo[iFlo].ports[1]); connect(cooCoi[iFlo].port_a1, valCoo[iFlo].port_b); connect(controlBus[iFlo], conEco[iFlo].controlBus); connect(controlBus[iFlo], modeSelector[iFlo].cb); connect(controlBus[iFlo], fan_dP_On_Off[iFlo].controlBus); connect(min1[iFlo].y, controlBus[iFlo].TRooMin); connect(ave[iFlo].y, controlBus[iFlo].TRooAve); connect(TOut.y, controlBus[iFlo].TOut); connect(TSetHea.y[1], controlBus[iFlo].TRooSetHea); connect(TSetCoo1.y[1], controlBus[iFlo].TRooSetCoo); connect(occSch.tNexOcc, controlBus[iFlo].dTNexOcc); connect(occSch.occupied, controlBus[iFlo].occupied); connect(eco[iFlo].port_Exh, amb[iFlo].ports[1]); connect(senRetFlo[iFlo].port_b, fanRet[iFlo].port_a); connect(fanRet[iFlo].port_b, TRet[iFlo].port_a); connect(TRet[iFlo].port_b, eco[iFlo].port_Ret); connect(hex[iFlo].port_a2, valHea[iFlo].port_b); connect(souHea[iFlo].ports[1], valHea[iFlo].port_a); connect(valCoo[iFlo].port_a, souCoo[iFlo].ports[1]); connect(amb[iFlo].ports[2], VOut1[iFlo].port_a); connect(VOut1[iFlo].port_b, eco[iFlo].port_Out); connect(fil[iFlo].port_b, hex[iFlo].port_a1); connect(hex[iFlo].port_b1, TCoiHeaOut[iFlo].port_a); connect(fan[iFlo].port_b, TSup[iFlo].port_a); connect(TSup[iFlo].port_b, senSupFlo[iFlo].port_a); connect(fan_dP_On_Off[iFlo].y, fan[iFlo].dp_in); end for; for iFlo in 1:nFlo loop for iZon in 1:nZon loop connect(vavTer[iZon, iFlo].port_b, buiZon.portsIn[iZon, iFlo]); connect(buiZon.portsOut[iZon, iFlo], senRetFlo[iFlo].port_a); connect(buiZon.TRooAir[iZon, iFlo], vavTer[iZon, iFlo].TRoo); connect(senSupFlo[iFlo].port_b, vavTer[iZon, iFlo].port_a); connect(buiZon.TRooAir[iZon, iFlo], ave[iFlo].u[iZon]); connect(buiZon.TRooAir[iZon, iFlo], min1[iFlo].u[iZon]); connect(vavTer[iZon, iFlo].TRooHeaSet, controlBus[iFlo].TRooSetHea); connect(vavTer[iZon, iFlo].TRooCooSet, controlBus[iFlo].TRooSetCoo); end for; end for; connect(weaDat.weaBus, weaBus); connect(weaBus.TDryBul, TOut.u); connect(weaBus, buiZon.weaBus); connect(modeSelector.yFan, conFanRet.uFan); connect(conTSup.yOA, conEco.uOATSup); connect(TSup.T, conTSup.TSup); connect(conTSup.yHea, valHea.y); connect(conTSup.yCoo, valCoo.y); connect(modeSelector.yFan, conTSup.uEna); connect(controlBus, TAirSupSet.controlBus); connect(TAirSupSet.TSet, conTSup.TSupSet); connect(modeSelector.yEco, conEco.uEna); end OneFloor_OneZone;

Buildings.Examples.ScalableBenchmarks.BuildingVAV.Examples.TwoFloor_TwoZone Buildings.Examples.ScalableBenchmarks.BuildingVAV.Examples.TwoFloor_TwoZone

Closed-loop model with 2 zone in 2 floor

Buildings.Examples.ScalableBenchmarks.BuildingVAV.Examples.TwoFloor_TwoZone

Information

The model demonstrates the scalability of model Buildings.Examples.ScalableBenchmarks.BuildingVAV.Examples.OneFloor_OneZone by setting it to be a multizone model with 2 zones in 2 floor, i.e. nFlo=2, nZon=2.

Extends from Buildings.Examples.ScalableBenchmarks.BuildingVAV.Examples.OneFloor_OneZone (Closed-loop model with 1 zone in 1 floor).

Parameters

TypeNameDefaultDescription
replaceable package MediumABuildings.Media.Air (T_defau... 
IntegernZon2Number of zones per floor
IntegernFlo2Number of floors
PressureDifferencedP_pre850Prescribed pressure difference [Pa]
VolumeVRoo[nZon, nFlo]{{6*8*2.7 for j in 1:nFlo} f...Room volume [m3]
MassFlowRatem_flow_nominal_each[nZon, nFlo]7*conv*VRoo[:, :]Nominal flow rate to each zone [kg/s]
MassFlowRatem_flow_nominalnZon*(7*conv)*6*8*2.7Nominal system flow rate [kg/s]

Connectors

TypeNameDescription
BusweaBusWeather Data Bus
ControlBuscontrolBus[nFlo]Control bus for each floor

Modelica definition

model TwoFloor_TwoZone "Closed-loop model with 2 zone in 2 floor" extends Buildings.Examples.ScalableBenchmarks.BuildingVAV.Examples.OneFloor_OneZone ( nFlo=2, nZon=2); end TwoFloor_TwoZone;