Buildings.Air.Systems.SingleZone.VAV

VAV system model

Information

VAV system model that serves a single thermal zone.

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

Package Content

Name Description
Buildings.Air.Systems.SingleZone.VAV.ChillerDXHeatingEconomizer ChillerDXHeatingEconomizer HVAC system model with a dry cooling coil, air-cooled chiller, electric heating coil, variable speed fan, and mixing box with economizer control.
Buildings.Air.Systems.SingleZone.VAV.ChillerDXHeatingEconomizerController ChillerDXHeatingEconomizerController Controller for single zone VAV system
Buildings.Air.Systems.SingleZone.VAV.Examples Examples Collection of models that illustrate model use and test models
Buildings.Air.Systems.SingleZone.VAV.BaseClasses BaseClasses Package with base classes for Buildings.Air.Systems.SingleZone.VAV

Buildings.Air.Systems.SingleZone.VAV.ChillerDXHeatingEconomizer Buildings.Air.Systems.SingleZone.VAV.ChillerDXHeatingEconomizer

HVAC system model with a dry cooling coil, air-cooled chiller, electric heating coil, variable speed fan, and mixing box with economizer control.

Buildings.Air.Systems.SingleZone.VAV.ChillerDXHeatingEconomizer

Information

This is a conventional single zone VAV HVAC system model. The system contains a variable speed supply fan, electric heating coil, water-based cooling coil, economizer, and air-cooled chiller. The control of the system is that of conventional VAV heating and cooling. During cooling, the supply air temperature is held constant while the supply air flow is modulated from maximum to minimum according to zone load. This is done by modulating the fan speed. During heating, the supply air flow is held at a constant minimum while the heating coil is modulated accoding to zone load. The mass flow of chilled water through the cooling coil is controlled by a three-way valve to maintain the supply air temperature setpoint during cooling. The mixing box maintains the minimum outside airflow fraction unless conditions for economizer are met, in which case the economizer controller adjusts the outside airflow fraction to meet a mixed air temperature setpoint. The economizer is enabled if the outside air drybulb temperature is lower than the return air temperature and the system is not in heating mode.

There are a number of assumptions in the model. Pressure drops through the system are collected into a single component. The mass flow of return air is equal to the mass flow of supply air. The mass flow of outside air and relief air in the mixing box is ideally controlled so that the supply air is composed of the specified outside airflow fraction, rather than having feedback control of damper positions. The cooling coil is a dry coil model.

Parameters

TypeNameDefaultDescription
replaceable package MediumABuildings.Media.AirMedium model for air
replaceable package MediumWBuildings.Media.WaterMedium model for water
DimensionlessRatioCOP_nominal5.5Nominal COP of the chiller [1]
TemperatureTSupChi_nominal Design value for chiller leaving water temperature [K]
Air design
MassFlowRatemAir_flow_nominal Design airflow rate of system [kg/s]
PressureDifferencedp_nominal500Design pressure drop of flow leg with fan [Pa]
Heating design
PowerQHea_flow_nominalQHea_flow_nominal( ...Design heating capacity of heating coil [W]
RealetaHea_nominaletaHea_nominal( ...Design heating efficiency of the heating coil [1]
Cooling design
PowerQCoo_flow_nominalQCoo_flow_nominal( ...Design heating capacity of cooling coil [W]

Connectors

TypeNameDescription
replaceable package MediumAMedium model for air
replaceable package MediumWMedium model for water
input BooleanInputchiOnOn signal for chiller plant
input RealInputuFanFan control signal [1]
input RealInputuHeaControl input for heater [1]
input RealInputuCooValControl signal for cooling valve [1]
input RealInputTSetChiSet point for leaving chilled water temperature [K]
input RealInputuEcoControl signal for economizer
FluidPort_asupplyAirSupply air
FluidPort_breturnAirReturn air
output RealOutputPFanElectrical power consumed by the supply fan [W]
output RealOutputQHea_flowElectrical power consumed by the heating equipment [W]
output RealOutputPCooElectrical power consumed by the cooling equipment [W]
output RealOutputPPumElectrical power consumed by the pumps [W]
output RealOutputTMixAirMixed air temperature [K]
output RealOutputTSupSupply air temperature after cooling coil [K]
BusweaBusWeather bus

Modelica definition

model ChillerDXHeatingEconomizer "HVAC system model with a dry cooling coil, air-cooled chiller, electric heating coil, variable speed fan, and mixing box with economizer control." replaceable package MediumA = Buildings.Media.Air "Medium model for air"; replaceable package MediumW = Buildings.Media.Water "Medium model for water"; parameter Modelica.SIunits.DimensionlessRatio COP_nominal = 5.5 "Nominal COP of the chiller"; parameter Modelica.SIunits.Temperature TSupChi_nominal "Design value for chiller leaving water temperature"; parameter Modelica.SIunits.MassFlowRate mAir_flow_nominal "Design airflow rate of system"; parameter Modelica.SIunits.Power QHea_flow_nominal(min=0) "Design heating capacity of heating coil"; parameter Real etaHea_nominal(min=0, max=1, unit="1") "Design heating efficiency of the heating coil"; parameter Modelica.SIunits.Power QCoo_flow_nominal(max=0) "Design heating capacity of cooling coil"; parameter Modelica.SIunits.PressureDifference dp_nominal(displayUnit="Pa") = 500 "Design pressure drop of flow leg with fan"; final parameter Modelica.SIunits.MassFlowRate mChiEva_flow_nominal= -QCoo_flow_nominal/Buildings.Utilities.Psychrometrics.Constants.cpWatLiq/4 "Design chilled water supply flow"; final parameter Modelica.SIunits.MassFlowRate mChiCon_flow_nominal= -QCoo_flow_nominal*(1+1/COP_nominal)/Buildings.Utilities.Psychrometrics.Constants.cpAir/10 "Design condenser air flow"; Modelica.Blocks.Interfaces.BooleanInput chiOn "On signal for chiller plant"; Modelica.Blocks.Interfaces.RealInput uFan( final unit="1") "Fan control signal"; Modelica.Blocks.Interfaces.RealInput uHea( final unit="1") "Control input for heater"; Modelica.Blocks.Interfaces.RealInput uCooVal(final unit="1") "Control signal for cooling valve"; Modelica.Blocks.Interfaces.RealInput TSetChi( final unit="K", displayUnit="degC") "Set point for leaving chilled water temperature"; Modelica.Blocks.Interfaces.RealInput uEco "Control signal for economizer"; Modelica.Fluid.Interfaces.FluidPort_a supplyAir( redeclare final package Medium = MediumA) "Supply air"; Modelica.Fluid.Interfaces.FluidPort_b returnAir( redeclare final package Medium = MediumA) "Return air"; Modelica.Blocks.Interfaces.RealOutput PFan(final unit="W") "Electrical power consumed by the supply fan"; Modelica.Blocks.Interfaces.RealOutput QHea_flow(final unit="W") "Electrical power consumed by the heating equipment"; Modelica.Blocks.Interfaces.RealOutput PCoo(final unit="W") "Electrical power consumed by the cooling equipment"; Modelica.Blocks.Interfaces.RealOutput PPum(final unit="W") "Electrical power consumed by the pumps"; Modelica.Blocks.Interfaces.RealOutput TMixAir( final unit="K", displayUnit="degC") "Mixed air temperature"; Modelica.Blocks.Interfaces.RealOutput TSup( final unit="K", displayUnit="degC") "Supply air temperature after cooling coil"; Buildings.BoundaryConditions.WeatherData.Bus weaBus "Weather bus"; Buildings.Fluid.Sensors.TemperatureTwoPort senTSup( m_flow_nominal=mAir_flow_nominal, allowFlowReversal=false, tau=0, redeclare package Medium = MediumA) "Supply air temperature sensor"; Buildings.Fluid.HeatExchangers.HeaterCooler_u heaCoi( m_flow_nominal=mAir_flow_nominal, Q_flow_nominal=QHea_flow_nominal, u(start=0), dp_nominal=0, allowFlowReversal=false, tau=90, redeclare package Medium = MediumA, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, show_T=true) "Air heating coil"; Buildings.Fluid.Movers.FlowControlled_m_flow fanSup( m_flow_nominal=mAir_flow_nominal, nominalValuesDefineDefaultPressureCurve=true, dp_nominal=875, per(use_powerCharacteristic=false), energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, allowFlowReversal=false, use_inputFilter=false, redeclare package Medium = MediumA) "Supply fan"; Buildings.Fluid.FixedResistances.PressureDrop totalRes( m_flow_nominal=mAir_flow_nominal, dp_nominal=dp_nominal, allowFlowReversal=false, redeclare package Medium = MediumA); Modelica.Blocks.Math.Gain eff(k=1/etaHea_nominal); Buildings.Fluid.Sources.Outside out( nPorts=3, redeclare package Medium = MediumA) "Boundary conditions for outside air"; Buildings.Fluid.Sensors.TemperatureTwoPort senTMixAir( m_flow_nominal=mAir_flow_nominal, allowFlowReversal=false, tau=0, redeclare package Medium = MediumA) "Mixed air temperature sensor"; Buildings.Fluid.HeatExchangers.DryCoilEffectivenessNTU cooCoi( redeclare package Medium1 = MediumW, redeclare package Medium2 = MediumA, dp1_nominal=0, dp2_nominal=0, m2_flow_nominal=mAir_flow_nominal, Q_flow_nominal=-QCoo_flow_nominal, configuration=Buildings.Fluid.Types.HeatExchangerConfiguration.CounterFlow, allowFlowReversal1=false, allowFlowReversal2=false, m1_flow_nominal=mChiEva_flow_nominal, show_T=true, T_a1_nominal=279.15, T_a2_nominal=298.15) "Cooling coil"; Buildings.Fluid.Sources.MassFlowSource_T souChiWat( redeclare package Medium = MediumA, nPorts=1, use_T_in=true, m_flow=mChiCon_flow_nominal) "Mass flow source for chiller"; Buildings.Fluid.Movers.FlowControlled_m_flow pumChiWat( use_inputFilter=false, allowFlowReversal=false, redeclare package Medium = MediumW, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, m_flow_nominal=mChiEva_flow_nominal, addPowerToMedium=false, per( hydraulicEfficiency(eta={1}), motorEfficiency(eta={0.9}), motorCooledByFluid=false), dp_nominal=12000, inputType=Buildings.Fluid.Types.InputType.Continuous, nominalValuesDefineDefaultPressureCurve=true) "Pump for chilled water loop"; Buildings.Fluid.Chillers.ElectricEIR chi( allowFlowReversal1=false, allowFlowReversal2=false, redeclare package Medium1 = MediumA, redeclare package Medium2 = MediumW, m2_flow_nominal=mChiEva_flow_nominal, dp1_nominal=0, m1_flow_nominal=mChiCon_flow_nominal, per( capFunT={1.0433811,0.0407077,0.0004506,-0.0041514,-8.86e-5,-0.0003467}, PLRMax=1.2, EIRFunT={0.5961915,-0.0099496,0.0007888,0.0004506,0.0004875,-0.0007623}, EIRFunPLR={1.6853121,-0.9993443,0.3140322}, COP_nominal=COP_nominal, QEva_flow_nominal=QCoo_flow_nominal, mEva_flow_nominal=mChiEva_flow_nominal, mCon_flow_nominal=mChiCon_flow_nominal, TEvaLvg_nominal=TSupChi_nominal, PLRMinUnl=0.1, PLRMin=0.1, etaMotor=1, TEvaLvgMin=274.15, TEvaLvgMax=293.15, TConEnt_nominal=302.55, TConEntMin=274.15, TConEntMax=323.15), dp2_nominal=12E3, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) "Air cooled chiller"; Buildings.Fluid.Sources.Boundary_pT bouPreChi( redeclare package Medium = MediumW, nPorts=1) "Pressure boundary condition for chilled water loop"; Modelica.Blocks.Math.Gain gaiFan(k=mAir_flow_nominal) "Gain for fan mass flow rate"; IdealValve ideVal( redeclare package Medium = MediumW, final m_flow_nominal = mChiEva_flow_nominal) "Ideal valve"; Modelica.Blocks.Math.BooleanToReal booleanToInteger( final realTrue=mChiEva_flow_nominal); IdealValve ideEco( redeclare package Medium = MediumA, final m_flow_nominal=mAir_flow_nominal) "Ideal economizer"; equation connect(fanSup.port_b, totalRes.port_a); connect(fanSup.P, PFan); connect(eff.y, QHea_flow); connect(weaBus, out.weaBus); connect(senTMixAir.port_b, fanSup.port_a); connect(heaCoi.Q_flow, eff.u); connect(heaCoi.port_b, cooCoi.port_a2); connect(cooCoi.port_b2, senTSup.port_a); connect(cooCoi.port_b1, ideVal.port_1); connect(chi.port_b2, pumChiWat.port_a); connect(souChiWat.ports[1], chi.port_a1); connect(chi.port_b1, out.ports[1]); connect(weaBus.TDryBul, souChiWat.T_in); connect(pumChiWat.P, PPum); connect(chi.P, PCoo); connect(ideVal.port_2, chi.port_a2); connect(cooCoi.port_a1, pumChiWat.port_b); connect(cooCoi.port_a1, ideVal.port_3); connect(bouPreChi.ports[1], chi.port_a2); connect(totalRes.port_b, heaCoi.port_a); connect(senTSup.port_b, supplyAir); connect(gaiFan.y, fanSup.m_flow_in); protected model IdealValve extends Modelica.Blocks.Icons.Block; replaceable package Medium = Modelica.Media.Interfaces.PartialMedium "Medium in the component"; parameter Modelica.SIunits.MassFlowRate m_flow_nominal "Design chilled water supply flow"; Modelica.Fluid.Interfaces.FluidPort_a port_1(redeclare package Medium = Medium); Modelica.Fluid.Interfaces.FluidPort_b port_2(redeclare package Medium = Medium); Modelica.Fluid.Interfaces.FluidPort_a port_3(redeclare package Medium = Medium); Modelica.Blocks.Interfaces.RealInput y(min=0, max=1); Fluid.Sensors.MassFlowRate senMasFlo(redeclare package Medium = Medium, allowFlowReversal=false) "Mass flow rate sensor"; Fluid.Movers.BaseClasses.IdealSource preMasFlo( redeclare package Medium = Medium, control_m_flow=true, control_dp=false, m_flow_small=m_flow_nominal*1E-5, show_V_flow=false, allowFlowReversal=false) "Prescribed mass flow rate for the bypass"; Modelica.Blocks.Math.Product pro "Product for mass flow rate computation"; Modelica.Blocks.Sources.Constant one(final k=1) "Outputs one"; Modelica.Blocks.Math.Feedback feedback; equation connect(senMasFlo.m_flow, pro.u2); connect(feedback.u1, one.y); connect(y, feedback.u2); connect(preMasFlo.port_a, port_3); connect(feedback.y, pro.u1); connect(pro.y, preMasFlo.m_flow_in); connect(port_1, senMasFlo.port_a); connect(senMasFlo.port_b, port_2); connect(preMasFlo.port_b, senMasFlo.port_a); end IdealValve; equation connect(booleanToInteger.y, pumChiWat.m_flow_in); connect(booleanToInteger.u, chiOn); connect(chiOn, chi.on); connect(gaiFan.u, uFan); connect(heaCoi.u, uHea); connect(ideVal.y, uCooVal); connect(chi.TSet, TSetChi); connect(senTMixAir.T, TMixAir); connect(senTSup.T, TSup); connect(out.ports[2], ideEco.port_1); connect(ideEco.port_2, senTMixAir.port_a); connect(ideEco.port_3, returnAir); connect(returnAir, out.ports[3]); connect(uEco, ideEco.y); end ChillerDXHeatingEconomizer;

Buildings.Air.Systems.SingleZone.VAV.ChillerDXHeatingEconomizerController Buildings.Air.Systems.SingleZone.VAV.ChillerDXHeatingEconomizerController

Controller for single zone VAV system

Buildings.Air.Systems.SingleZone.VAV.ChillerDXHeatingEconomizerController

Information

This is the controller for the VAV system with economizer, heating coil and cooling coil.

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

Parameters

TypeNameDefaultDescription
TemperatureTSupChi_nominal Design value for chiller leaving water temperature [K]
Air design
RealminAirFlo0.2Minimum airflow rate of system [1]
DimensionlessRatiominOAFra Minimum outdoor air fraction of system [1]
TemperatureTSetSupAir Cooling supply air temperature setpoint [K]
Control gain
RealkHea2Gain of heating controller
RealkCoo1Gain of controller for cooling valve
RealkFan0.5Gain of controller for fan
RealkEco4Gain of controller for economizer

Connectors

TypeNameDescription
input RealInputTRooZone temperature measurement [K]
input RealInputTSetRooCooZone cooling setpoint temperature [K]
input RealInputTSetRooHeaZone heating setpoint temperature [K]
input RealInputTMixMeasured mixed air temperature [K]
input RealInputTSupMeasured supply air temperature after the cooling coil [K]
input RealInputTOutMeasured outside air temperature [K]
output RealOutputyHeaControl signal for heating coil [1]
output RealOutputyFanControl signal for fan [1]
output RealOutputyOutAirFraControl signal for outside air fraction [1]
output RealOutputyCooCoiValControl signal for cooling coil valve [1]
output RealOutputTSetSupChiSet point for chiller leaving water temperature [K]
output BooleanOutputchiOnOn signal for chiller

Modelica definition

model ChillerDXHeatingEconomizerController "Controller for single zone VAV system" extends Modelica.Blocks.Icons.Block; parameter Modelica.SIunits.Temperature TSupChi_nominal "Design value for chiller leaving water temperature"; parameter Real minAirFlo( min=0, max=1, unit="1") = 0.2 "Minimum airflow rate of system"; parameter Modelica.SIunits.DimensionlessRatio minOAFra "Minimum outdoor air fraction of system"; parameter Modelica.SIunits.Temperature TSetSupAir "Cooling supply air temperature setpoint"; parameter Real kHea(min=Modelica.Constants.small) = 2 "Gain of heating controller"; parameter Real kCoo(min=Modelica.Constants.small)=1 "Gain of controller for cooling valve"; parameter Real kFan(min=Modelica.Constants.small) = 0.5 "Gain of controller for fan"; parameter Real kEco(min=Modelica.Constants.small) = 4 "Gain of controller for economizer"; Modelica.Blocks.Interfaces.RealInput TRoo( final unit="K", displayUnit="degC") "Zone temperature measurement"; Modelica.Blocks.Interfaces.RealInput TSetRooCoo( final unit="K", displayUnit="degC") "Zone cooling setpoint temperature"; Modelica.Blocks.Interfaces.RealInput TSetRooHea( final unit="K", displayUnit="degC") "Zone heating setpoint temperature"; Modelica.Blocks.Interfaces.RealInput TMix( final unit="K", displayUnit="degC") "Measured mixed air temperature"; Modelica.Blocks.Interfaces.RealInput TSup( final unit="K", displayUnit="degC") "Measured supply air temperature after the cooling coil"; Modelica.Blocks.Interfaces.RealInput TOut( final unit="K", displayUnit="degC") "Measured outside air temperature"; Modelica.Blocks.Interfaces.RealOutput yHea(final unit="1") "Control signal for heating coil"; Modelica.Blocks.Interfaces.RealOutput yFan(final unit="1") "Control signal for fan"; Modelica.Blocks.Interfaces.RealOutput yOutAirFra(final unit="1") "Control signal for outside air fraction"; Modelica.Blocks.Interfaces.RealOutput yCooCoiVal(final unit="1") "Control signal for cooling coil valve"; Modelica.Blocks.Interfaces.RealOutput TSetSupChi( final unit="K", displayUnit="degC") "Set point for chiller leaving water temperature"; Modelica.Blocks.Interfaces.BooleanOutput chiOn "On signal for chiller"; BaseClasses.ControllerHeatingFan conSup( minAirFlo = minAirFlo, kHea = kHea, kFan = kFan) "Heating coil, cooling coil and fan controller"; BaseClasses.ControllerEconomizer conEco( final kEco = kEco) "Economizer control"; Controls.OBC.CDL.Continuous.Hysteresis hysChiPla( uLow=-1, uHigh=0) "Hysteresis with delay to switch on cooling"; Modelica.Blocks.Math.Feedback errTRooCoo "Control error on room temperature for cooling"; Controls.Continuous.LimPID conCooVal( controllerType=Modelica.Blocks.Types.SimpleController.P, final yMax=1, final yMin=0, final k=kCoo, final reverseAction=true) "Cooling coil valve controller"; protected Modelica.Blocks.Sources.Constant TSetSupChiConst( final k=TSupChi_nominal) "Set point for chiller temperature"; Modelica.Blocks.Sources.Constant conMinOAFra( final k=minOAFra) "Minimum outside air fraction"; Modelica.Blocks.Sources.Constant TSetSupAirConst( final k=TSetSupAir) "Set point for supply air temperature"; equation connect(conMinOAFra.y,conEco. minOAFra); connect(TSetSupAirConst.y, conEco.TMixSet); connect(errTRooCoo.y, hysChiPla.u); connect(TSetRooCoo, errTRooCoo.u2); connect(errTRooCoo.u1, TRoo); connect(TSetSupAirConst.y,conCooVal. u_s); connect(conSup.TSetRooHea, TSetRooHea); connect(conSup.TSetRooCoo, TSetRooCoo); connect(conSup.TRoo, TRoo); connect(conSup.yHea, conEco.yHea); connect(conEco.TMix, TMix); connect(conEco.TRet, TRoo); connect(conEco.TOut, TOut); connect(conSup.yHea, yHea); connect(conSup.yFan, yFan); connect(conEco.yOutAirFra, yOutAirFra); connect(conCooVal.y, yCooCoiVal); connect(TSetSupChiConst.y, TSetSupChi); connect(conCooVal.u_m, TSup); connect(hysChiPla.y, chiOn); end ChillerDXHeatingEconomizerController;

Buildings.Air.Systems.SingleZone.VAV.ChillerDXHeatingEconomizer.IdealValve Buildings.Air.Systems.SingleZone.VAV.ChillerDXHeatingEconomizer.IdealValve


Buildings.Air.Systems.SingleZone.VAV.ChillerDXHeatingEconomizer.IdealValve

Information

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

Parameters

TypeNameDefaultDescription
replaceable package MediumModelica.Media.Interfaces.Pa...Medium in the component
MassFlowRatem_flow_nominal Design chilled water supply flow [kg/s]

Connectors

TypeNameDescription
replaceable package MediumMedium in the component
FluidPort_aport_1 
FluidPort_bport_2 
FluidPort_aport_3 
input RealInputy 

Modelica definition

model IdealValve extends Modelica.Blocks.Icons.Block; replaceable package Medium = Modelica.Media.Interfaces.PartialMedium "Medium in the component"; parameter Modelica.SIunits.MassFlowRate m_flow_nominal "Design chilled water supply flow"; Modelica.Fluid.Interfaces.FluidPort_a port_1(redeclare package Medium = Medium); Modelica.Fluid.Interfaces.FluidPort_b port_2(redeclare package Medium = Medium); Modelica.Fluid.Interfaces.FluidPort_a port_3(redeclare package Medium = Medium); Modelica.Blocks.Interfaces.RealInput y(min=0, max=1); Fluid.Sensors.MassFlowRate senMasFlo(redeclare package Medium = Medium, allowFlowReversal=false) "Mass flow rate sensor"; Fluid.Movers.BaseClasses.IdealSource preMasFlo( redeclare package Medium = Medium, control_m_flow=true, control_dp=false, m_flow_small=m_flow_nominal*1E-5, show_V_flow=false, allowFlowReversal=false) "Prescribed mass flow rate for the bypass"; Modelica.Blocks.Math.Product pro "Product for mass flow rate computation"; Modelica.Blocks.Sources.Constant one(final k=1) "Outputs one"; Modelica.Blocks.Math.Feedback feedback; equation connect(senMasFlo.m_flow, pro.u2); connect(feedback.u1, one.y); connect(y, feedback.u2); connect(preMasFlo.port_a, port_3); connect(feedback.y, pro.u1); connect(pro.y, preMasFlo.m_flow_in); connect(port_1, senMasFlo.port_a); connect(senMasFlo.port_b, port_2); connect(preMasFlo.port_b, senMasFlo.port_a); end IdealValve;