VAV system model that serves a single thermal zone.
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.
model ChillerDXHeatingEconomizer
replaceable package MediumA =
Buildings.Media.Air ;
replaceable package MediumW =
Buildings.Media.Water ;
parameter Modelica.Units.SI.DimensionlessRatio COP_nominal=5.5
;
parameter Modelica.Units.SI.Temperature TSupChi_nominal
;
parameter Modelica.Units.SI.MassFlowRate mAir_flow_nominal
;
parameter Modelica.Units.SI.Power QHea_flow_nominal(min=0)
;
parameter Real etaHea_nominal(min=0, max=1, unit="1")
;
parameter Modelica.Units.SI.Power QCoo_flow_nominal(max=0)
;
parameter Modelica.Units.SI.PressureDifference dp_nominal(displayUnit="Pa")=
500 ;
final parameter Modelica.Units.SI.MassFlowRate mChiEva_flow_nominal=-
QCoo_flow_nominal/Buildings.Utilities.Psychrometrics.Constants.cpWatLiq/4
;
final parameter Modelica.Units.SI.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",
final quantity="ThermodynamicTemperature")
;
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 TMix(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
Modelica.Blocks.Interfaces.RealOutput TSup(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
Buildings.BoundaryConditions.WeatherData.Bus weaBus
;
Buildings.Fluid.Sensors.TemperatureTwoPort senTSup(
final m_flow_nominal=mAir_flow_nominal,
final allowFlowReversal=false,
final tau=0,
redeclare package Medium =
MediumA)
;
Buildings.Fluid.HeatExchangers.HeaterCooler_u heaCoi(
final m_flow_nominal=mAir_flow_nominal,
final Q_flow_nominal=QHea_flow_nominal,
final u(start=0),
final dp_nominal=0,
final allowFlowReversal=false,
final tau=90,
redeclare package Medium =
MediumA,
final energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
final show_T=true)
;
Buildings.Fluid.Movers.FlowControlled_m_flow fanSup(
final m_flow_nominal=mAir_flow_nominal,
final nominalValuesDefineDefaultPressureCurve=true,
final dp_nominal=875,
final per(use_powerCharacteristic=false),
final energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
final allowFlowReversal=false,
final use_inputFilter=false,
redeclare package Medium =
MediumA)
;
Buildings.Fluid.FixedResistances.PressureDrop totalRes(
final m_flow_nominal=mAir_flow_nominal,
final dp_nominal=dp_nominal,
final allowFlowReversal=false,
redeclare package Medium =
MediumA)
;
Modelica.Blocks.Math.Gain eff(k=1/etaHea_nominal)
;
Buildings.Fluid.Sources.Outside out(
final C=
fill(0.0004, 1),
final nPorts=3,
redeclare package Medium =
MediumA)
;
Buildings.Fluid.Sensors.TemperatureTwoPort senTMixAir(
final m_flow_nominal=mAir_flow_nominal,
final allowFlowReversal=false,
final tau=0,
redeclare package Medium =
MediumA)
;
Buildings.Fluid.HeatExchangers.DryCoilEffectivenessNTU cooCoi(
redeclare package Medium1 =
MediumW,
redeclare package Medium2 =
MediumA,
final dp1_nominal=0,
final dp2_nominal=0,
final m2_flow_nominal=mAir_flow_nominal,
final Q_flow_nominal=QCoo_flow_nominal,
final configuration=Buildings.Fluid.Types.HeatExchangerConfiguration.CounterFlow,
final allowFlowReversal1=false,
final allowFlowReversal2=false,
final m1_flow_nominal=mChiEva_flow_nominal,
final show_T=true,
final T_a1_nominal=279.15,
final T_a2_nominal=298.15)
;
Buildings.Fluid.Sources.MassFlowSource_T souChiWat(
redeclare package Medium =
MediumA,
final nPorts=1,
final use_T_in=true,
final m_flow=mChiCon_flow_nominal)
;
Buildings.Fluid.Movers.FlowControlled_m_flow pumChiWat(
final use_inputFilter=false,
final allowFlowReversal=false,
redeclare package Medium =
MediumW,
final energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
final m_flow_nominal=mChiEva_flow_nominal,
final addPowerToMedium=false,
final per(
hydraulicEfficiency(eta={1}),
motorEfficiency(eta={0.9}),
motorCooledByFluid=false),
final dp_nominal=12000,
final inputType=Buildings.Fluid.Types.InputType.Continuous,
final nominalValuesDefineDefaultPressureCurve=true)
;
Buildings.Fluid.Chillers.ElectricEIR chi(
final allowFlowReversal1=false,
final allowFlowReversal2=false,
redeclare package Medium1 =
MediumA,
redeclare package Medium2 =
MediumW,
final m2_flow_nominal=mChiEva_flow_nominal,
final dp1_nominal=0,
final m1_flow_nominal=mChiCon_flow_nominal,
final 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),
final dp2_nominal=12E3,
final 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 booToInt(
final realTrue=mChiEva_flow_nominal)
;
IdealValve ideEco(
redeclare package Medium =
MediumA,
final m_flow_nominal=mAir_flow_nominal)
;
Fluid.Sensors.TemperatureTwoPort senTRetAir(
final m_flow_nominal=mAir_flow_nominal,
final allowFlowReversal=false,
final tau=0,
redeclare package Medium =
MediumA)
;
Modelica.Blocks.Interfaces.RealOutput TRet(
final unit="K",
displayUnit="degC",
final quantity="ThermodynamicTemperature")
;
Fluid.Sensors.TraceSubstancesTwoPort senTraSub(
redeclare package Medium=
MediumA,
final m_flow_nominal=mAir_flow_nominal,
final tau=0)
;
protected
model IdealValve
extends Modelica.Blocks.Icons.Block;
replaceable package Medium =
Modelica.Media.Interfaces.PartialMedium
;
parameter Modelica.Units.SI.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(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);
connect(booToInt.y, pumChiWat.m_flow_in);
connect(booToInt.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, TMix);
connect(senTSup.T, TSup);
connect(out.ports[2], ideEco.port_1);
connect(ideEco.port_2, senTMixAir.port_a);
connect(uEco, ideEco.y);
connect(ideEco.port_3, senTRetAir.port_b);
connect(senTRetAir.port_b, out.ports[3]);
connect(TRet, senTRetAir.T);
connect(senTRetAir.port_a, senTraSub.port_b);
connect(senTraSub.port_a, returnAir);
end ChillerDXHeatingEconomizer;