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 |
ChillerDXHeatingEconomizer
|
HVAC system model with a dry cooling coil, air-cooled chiller, electric heating coil, variable speed fan, and mixing box with economizer control. |
ChillerDXHeatingEconomizerController
|
Controller for single zone VAV system |
Examples
|
Collection of models that illustrate model use and test models |
BaseClasses
|
Package with base classes for Buildings.Air.Systems.SingleZone.VAV |
HVAC system model with a dry cooling coil, air-cooled chiller, electric heating coil, variable speed fan, and mixing box with economizer control.
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
Type | Name | Default | Description |
replaceable package MediumA | Buildings.Media.Air | Medium model for air |
replaceable package MediumW | Buildings.Media.Water | Medium model for water |
DimensionlessRatio | COP_nominal | 5.5 | Nominal COP of the chiller [1] |
Temperature | TSupChi_nominal | | Design value for chiller leaving water temperature [K] |
Air design |
MassFlowRate | mAir_flow_nominal | | Design airflow rate of system [kg/s] |
PressureDifference | dp_nominal | 500 | Design pressure drop of flow leg with fan [Pa] |
Heating design |
Power | QHea_flow_nominal | QHea_flow_nominal( ... | Design heating capacity of heating coil [W] |
Real | etaHea_nominal | etaHea_nominal( ... | Design heating efficiency of the heating coil [1] |
Cooling design |
Power | QCoo_flow_nominal | QCoo_flow_nominal( ... | Design heating capacity of cooling coil [W] |
Connectors
Type | Name | Description |
replaceable package MediumA | Medium model for air |
replaceable package MediumW | Medium model for water |
input BooleanInput | chiOn | On signal for chiller plant |
input RealInput | uFan | Fan control signal [1] |
input RealInput | uHea | Control input for heater [1] |
input RealInput | uCooVal | Control signal for cooling valve [1] |
input RealInput | TSetChi | Set point for leaving chilled water temperature [K] |
input RealInput | uEco | Control signal for economizer |
FluidPort_a | supplyAir | Supply air |
FluidPort_b | returnAir | Return air |
output RealOutput | PFan | Electrical power consumed by the supply fan [W] |
output RealOutput | QHea_flow | Electrical power consumed by the heating equipment [W] |
output RealOutput | PCoo | Electrical power consumed by the cooling equipment [W] |
output RealOutput | PPum | Electrical power consumed by the pumps [W] |
output RealOutput | TMixAir | Mixed air temperature [K] |
output RealOutput | TSup | Supply air temperature after cooling coil [K] |
Bus | weaBus | Weather bus |
Modelica definition
model ChillerDXHeatingEconomizer
replaceable package MediumA =
Buildings.Media.Air ;
replaceable package MediumW =
Buildings.Media.Water ;
parameter Modelica.SIunits.DimensionlessRatio COP_nominal = 5.5
;
parameter Modelica.SIunits.Temperature TSupChi_nominal
;
parameter Modelica.SIunits.MassFlowRate mAir_flow_nominal ;
parameter Modelica.SIunits.Power QHea_flow_nominal(min=0) ;
parameter Real etaHea_nominal(min=0, max=1, unit="1") ;
parameter Modelica.SIunits.Power QCoo_flow_nominal(max=0) ;
parameter Modelica.SIunits.PressureDifference dp_nominal(displayUnit="Pa") = 500
;
final parameter Modelica.SIunits.MassFlowRate mChiEva_flow_nominal=
-QCoo_flow_nominal/Buildings.Utilities.Psychrometrics.Constants.cpWatLiq/4
;
final parameter Modelica.SIunits.MassFlowRate mChiCon_flow_nominal=
-QCoo_flow_nominal*(1+1/COP_nominal)/Buildings.Utilities.Psychrometrics.Constants.cpAir/10
;
Modelica.Blocks.Interfaces.BooleanInput chiOn ;
Modelica.Blocks.Interfaces.RealInput uFan(
final unit="1") ;
Modelica.Blocks.Interfaces.RealInput uHea(
final unit="1") ;
Modelica.Blocks.Interfaces.RealInput uCooVal(
final unit="1")
;
Modelica.Blocks.Interfaces.RealInput TSetChi(
final unit="K",
displayUnit="degC")
;
Modelica.Blocks.Interfaces.RealInput uEco ;
Modelica.Fluid.Interfaces.FluidPort_a supplyAir(
redeclare final package Medium =
MediumA) ;
Modelica.Fluid.Interfaces.FluidPort_b returnAir(
redeclare final package Medium =
MediumA) ;
Modelica.Blocks.Interfaces.RealOutput PFan(
final unit="W")
;
Modelica.Blocks.Interfaces.RealOutput QHea_flow(
final unit="W")
;
Modelica.Blocks.Interfaces.RealOutput PCoo(
final unit="W")
;
Modelica.Blocks.Interfaces.RealOutput PPum(
final unit="W")
;
Modelica.Blocks.Interfaces.RealOutput TMixAir(
final unit="K",
displayUnit="degC") ;
Modelica.Blocks.Interfaces.RealOutput TSup(
final unit="K",
displayUnit="degC")
;
Buildings.BoundaryConditions.WeatherData.Bus weaBus ;
Buildings.Fluid.Sensors.TemperatureTwoPort senTSup(
m_flow_nominal=mAir_flow_nominal,
allowFlowReversal=false,
tau=0,
redeclare package Medium =
MediumA) ;
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)
;
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) ;
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)
;
Buildings.Fluid.Sensors.TemperatureTwoPort senTMixAir(
m_flow_nominal=mAir_flow_nominal,
allowFlowReversal=false,
tau=0,
redeclare package Medium =
MediumA)
;
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)
;
Buildings.Fluid.Sources.MassFlowSource_T souChiWat(
redeclare package Medium =
MediumA,
nPorts=1,
use_T_in=true,
m_flow=mChiCon_flow_nominal)
;
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)
;
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)
;
Buildings.Fluid.Sources.Boundary_pT bouPreChi(
redeclare package Medium =
MediumW, nPorts=1)
;
Modelica.Blocks.Math.Gain gaiFan(k=mAir_flow_nominal)
;
IdealValve ideVal(
redeclare package Medium =
MediumW,
final m_flow_nominal = mChiEva_flow_nominal) ;
Modelica.Blocks.Math.BooleanToReal booleanToInteger(
final realTrue=mChiEva_flow_nominal);
IdealValve ideEco(
redeclare package Medium =
MediumA,
final m_flow_nominal=mAir_flow_nominal) ;
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 ;
parameter Modelica.SIunits.MassFlowRate m_flow_nominal
;
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)
;
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)
;
Modelica.Blocks.Math.Product pro ;
Modelica.Blocks.Sources.Constant one(
final k=1) ;
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;
Controller for single zone VAV system
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
Type | Name | Default | Description |
Temperature | TSupChi_nominal | | Design value for chiller leaving water temperature [K] |
Air design |
Real | minAirFlo | 0.2 | Minimum airflow rate of system [1] |
DimensionlessRatio | minOAFra | | Minimum outdoor air fraction of system [1] |
Temperature | TSetSupAir | | Cooling supply air temperature setpoint [K] |
Control gain |
Real | kHea | 2 | Gain of heating controller |
Real | kCoo | 1 | Gain of controller for cooling valve |
Real | kFan | 0.5 | Gain of controller for fan |
Real | kEco | 4 | Gain of controller for economizer |
Connectors
Type | Name | Description |
input RealInput | TRoo | Zone temperature measurement [K] |
input RealInput | TSetRooCoo | Zone cooling setpoint temperature [K] |
input RealInput | TSetRooHea | Zone heating setpoint temperature [K] |
input RealInput | TMix | Measured mixed air temperature [K] |
input RealInput | TSup | Measured supply air temperature after the cooling coil [K] |
input RealInput | TOut | Measured outside air temperature [K] |
output RealOutput | yHea | Control signal for heating coil [1] |
output RealOutput | yFan | Control signal for fan [1] |
output RealOutput | yOutAirFra | Control signal for outside air fraction [1] |
output RealOutput | yCooCoiVal | Control signal for cooling coil valve [1] |
output RealOutput | TSetSupChi | Set point for chiller leaving water temperature [K] |
output BooleanOutput | chiOn | On signal for chiller |
Modelica definition
model ChillerDXHeatingEconomizerController
extends Modelica.Blocks.Icons.Block;
parameter Modelica.SIunits.Temperature TSupChi_nominal
;
parameter Real minAirFlo(
min=0,
max=1,
unit="1") = 0.2
;
parameter Modelica.SIunits.DimensionlessRatio minOAFra ;
parameter Modelica.SIunits.Temperature TSetSupAir ;
parameter Real kHea(min=Modelica.Constants.small) = 2
;
parameter Real kCoo(min=Modelica.Constants.small)=1
;
parameter Real kFan(min=Modelica.Constants.small) = 0.5
;
parameter Real kEco(min=Modelica.Constants.small) = 4
;
Modelica.Blocks.Interfaces.RealInput TRoo(
final unit="K",
displayUnit="degC") ;
Modelica.Blocks.Interfaces.RealInput TSetRooCoo(
final unit="K",
displayUnit="degC")
;
Modelica.Blocks.Interfaces.RealInput TSetRooHea(
final unit="K",
displayUnit="degC")
;
Modelica.Blocks.Interfaces.RealInput TMix(
final unit="K",
displayUnit="degC")
;
Modelica.Blocks.Interfaces.RealInput TSup(
final unit="K",
displayUnit="degC")
;
Modelica.Blocks.Interfaces.RealInput TOut(
final unit="K",
displayUnit="degC")
;
Modelica.Blocks.Interfaces.RealOutput yHea(
final unit="1") ;
Modelica.Blocks.Interfaces.RealOutput yFan(
final unit="1") ;
Modelica.Blocks.Interfaces.RealOutput yOutAirFra(
final unit="1")
;
Modelica.Blocks.Interfaces.RealOutput yCooCoiVal(
final unit="1")
;
Modelica.Blocks.Interfaces.RealOutput TSetSupChi(
final unit="K",
displayUnit="degC")
;
Modelica.Blocks.Interfaces.BooleanOutput chiOn ;
BaseClasses.ControllerHeatingFan conSup(
minAirFlo = minAirFlo,
kHea = kHea,
kFan = kFan) ;
BaseClasses.ControllerEconomizer conEco(
final kEco = kEco)
;
Controls.OBC.CDL.Continuous.Hysteresis hysChiPla(
uLow=-1,
uHigh=0)
;
Modelica.Blocks.Math.Feedback errTRooCoo
;
Controls.Continuous.LimPID conCooVal(
controllerType=Modelica.Blocks.Types.SimpleController.P,
final yMax=1,
final yMin=0,
final k=kCoo,
final reverseAction=true)
;
protected
Modelica.Blocks.Sources.Constant TSetSupChiConst(
final k=TSupChi_nominal)
;
Modelica.Blocks.Sources.Constant conMinOAFra(
final k=minOAFra)
;
Modelica.Blocks.Sources.Constant TSetSupAirConst(
final k=TSetSupAir)
;
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;
Information
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Parameters
Type | Name | Default | Description |
replaceable package Medium | Modelica.Media.Interfaces.Pa... | Medium in the component |
MassFlowRate | m_flow_nominal | | Design chilled water supply flow [kg/s] |
Connectors
Modelica definition
model IdealValve
extends Modelica.Blocks.Icons.Block;
replaceable package Medium =
Modelica.Media.Interfaces.PartialMedium ;
parameter Modelica.SIunits.MassFlowRate m_flow_nominal
;
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)
;
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)
;
Modelica.Blocks.Math.Product pro ;
Modelica.Blocks.Sources.Constant one(
final k=1) ;
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;