Buildings.Obsolete.Examples.VAVReheat.BaseClasses

Package with base classes

Information

This package contains base classes.

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

Package Content

Name Description
Buildings.Obsolete.Examples.VAVReheat.BaseClasses.Guideline36 Guideline36 Variable air volume flow system with terminal reheat and Guideline 36 control sequence serving five thermal zones
Buildings.Obsolete.Examples.VAVReheat.BaseClasses.VAVBranch VAVBranch Supply branch of a VAV system

Buildings.Obsolete.Examples.VAVReheat.BaseClasses.Guideline36 Buildings.Obsolete.Examples.VAVReheat.BaseClasses.Guideline36

Variable air volume flow system with terminal reheat and Guideline 36 control sequence serving five thermal zones

Buildings.Obsolete.Examples.VAVReheat.BaseClasses.Guideline36

Information

This model consist of an HVAC system is a variable air volume (VAV) flow system with economizer and a heating and cooling coil in the air handler unit. There is also a reheat coil and an air damper in each of the five zone inlet branches.

See the model Buildings.Examples.VAVReheat.BaseClasses.PartialHVAC for a description of the HVAC system.

The control is based on ASHRAE Guideline 36, and implemented using the sequences from the library Buildings.Obsolete.Controls.OBC.ASHRAE.G36_PR1 for multi-zone VAV systems with economizer. The figures below shows the schematic diagram and controls of an HVAC system that supplies 5 zones:

image

A similar model but with a different control sequence can be found in Buildings.Examples.VAVReheat.ASHRAE2006. Note that this model, because of the frequent time sampling, has longer computing time than Buildings.Examples.VAVReheat.ASHRAE2006. The reason is that the time integrator cannot make large steps because it needs to set a time step each time the control samples its input.

Extends from Buildings.Examples.VAVReheat.BaseClasses.PartialHVAC (Partial model of variable air volume flow system with terminal reheat that serves five thermal zones).

Parameters

TypeNameDefaultDescription
replaceable package MediumAAirMedium model for air
replaceable package MediumWWaterMedium model for water
VolumeVRoo[numZon] Room volume per zone [m3]
AreaAFlo[numZon] Floor area per zone [m2]
HeatFlowRateQHeaAHU_flow_nominalmHeaAir_flow_nominal*cpAir*(...Nominal heating heat flow rate of air handler unit coil [W]
HeatFlowRateQCooAHU_flow_nominal1.3*mCooAir_flow_nominal*cpA...Nominal total cooling heat flow rate of air handler unit coil (negative number) [W]
RealratOAFlo_A0.3e-3Outdoor airflow rate required per unit area [m3/(s.m2)]
RealratOAFlo_P2.5e-3Outdoor airflow rate required per person
RealratP_A5e-2Occupant density
RealeffZ0.8Zone air distribution effectiveness (limiting value) [1]
RealdivP0.7Occupant diversity ratio [1]
VolumeFlowRateVZonOA_flow_nominal[numZon](ratOAFlo_P*ratP_A + ratOAFl...Zone outdoor air flow rate of each VAV box [m3/s]
VolumeFlowRateVou_flow_nominal(divP*ratOAFlo_P*ratP_A + ra...System uncorrected outdoor air flow rate [m3/s]
RealeffVenif divP < 0.6 then 0.88*divP...System ventilation efficiency [1]
VolumeFlowRateVot_flow_nominalVou_flow_nominal/effVenSystem design outdoor air flow rate [m3/s]
PressureDifferencedpBuiStaSet12Building static pressure [Pa]
RealyFanMin0.1Minimum fan speed
BooleanallowFlowReversaltrue= false to simplify equations, assuming, but not enforcing, no flow reversal
VolumeFlowRateminZonPriFlo[numZon]conVAV.VDisSetMin_flowMinimum expected zone primary flow rate [m3/s]
TimesamplePeriod120Sample period of component, set to the same value as the trim and respond that process yPreSetReq [s]
PressureDifferencedpDisRetMax40Maximum return fan discharge static pressure setpoint [Pa]
Nominal mass flow rate
MassFlowRatemCooVAV_flow_nominal[numZon] Design mass flow rate per zone for cooling [kg/s]
MassFlowRatemHeaVAV_flow_nominal[numZon]0.3*mCooVAV_flow_nominalDesign mass flow rate per zone for heating [kg/s]
MassFlowRatemAir_flow_nominalmCooAir_flow_nominalNominal mass flow rate for fan [kg/s]
MassFlowRatemCooAir_flow_nominal0.7*sum(mCooVAV_flow_nominal)Nominal mass flow rate for fan [kg/s]
MassFlowRatemHeaAir_flow_nominal0.7*sum(mHeaVAV_flow_nominal)Nominal mass flow rate for fan [kg/s]
MassFlowRatemHeaWat_flow_nominalQHeaAHU_flow_nominal/cpWat/10Nominal water mass flow rate for heating coil in AHU [kg/s]
MassFlowRatemCooWat_flow_nominalQCooAHU_flow_nominal/cpWat/(...Nominal water mass flow rate for cooling coil [kg/s]
Room temperature setpoints
TemperatureTHeaOn293.15Heating setpoint during on [K]
TemperatureTHeaOff285.15Heating setpoint during off [K]
TemperatureTCooOn297.15Cooling setpoint during on [K]
TemperatureTCooOff303.15Cooling setpoint during off [K]
Air handler unit nominal temperatures and humidity
TemperatureTCooAirMix_nominal303.15Mixed air temperature during cooling nominal conditions (used to size cooling coil) [K]
TemperatureTCooAirSup_nominal285.15Supply air temperature during cooling nominal conditions (used to size cooling coil) [K]
MassFractionwCooAirMix_nominal0.017Humidity ratio of mixed air at a nominal conditions used to size cooling coil (in kg/kg dry total) [1]
TemperatureTCooWatInl_nominal279.15Cooling coil nominal inlet water temperature [K]
TemperatureTHeaAirMix_nominal277.15Mixed air temperature during heating nominal conditions (used to size heating coil) [K]
TemperatureTHeaAirSup_nominal285.15Supply air temperature during heating nominal conditions (used to size heating coil) [K]
TemperatureTHeaWatInl_nominal Reheat coil nominal inlet water temperature [K]

Connectors

TypeNameDescription
FluidPort_aport_supAir[numZon]Supply air to thermal zones
FluidPort_aport_retAir[numZon]Return air from thermal zones
input RealInputTRoo[numZon]Room temperatures [K]
BusweaBusWeather data bus
FluidPort_aportHeaCoiSupHeating coil loop supply
FluidPort_bportHeaCoiRetHeating coil loop return
FluidPort_aportHeaTerSupTerminal heat loop supply
FluidPort_bportHeaTerRetTerminal heat loop return
FluidPort_aportCooCoiSupCooling coil loop supply
FluidPort_bportCooCoiRetCoolin coil loop return

Modelica definition

model Guideline36 "Variable air volume flow system with terminal reheat and Guideline 36 control sequence serving five thermal zones" extends Buildings.Examples.VAVReheat.BaseClasses.PartialHVAC( damOut( dpDamper_nominal=10, dpFixed_nominal=10), amb(nPorts=3)); parameter Modelica.Units.SI.VolumeFlowRate minZonPriFlo[numZon]=conVAV.VDisSetMin_flow "Minimum expected zone primary flow rate"; parameter Modelica.Units.SI.Time samplePeriod=120 "Sample period of component, set to the same value as the trim and respond that process yPreSetReq"; parameter Modelica.Units.SI.PressureDifference dpDisRetMax(displayUnit="Pa")= 40 "Maximum return fan discharge static pressure setpoint"; Buildings.Obsolete.Controls.OBC.ASHRAE.G36_PR1.TerminalUnits.Controller conVAV[numZon]( V_flow_nominal=mCooVAV_flow_nominal/1.2, AFlo=AFlo, each final samplePeriod=samplePeriod, VDisSetMin_flow={max(1.5*VZonOA_flow_nominal[i], 0.15*mCooVAV_flow_nominal[ i]/1.2) for i in 1:numZon}, VDisHeaSetMax_flow=mHeaVAV_flow_nominal/1.2) "Controller for terminal unit"; Buildings.Controls.OBC.CDL.Integers.MultiSum TZonResReq(nin=numZon) "Number of zone temperature requests"; Buildings.Controls.OBC.CDL.Integers.MultiSum PZonResReq(nin=numZon) "Number of zone pressure requests"; Buildings.Controls.OBC.CDL.Reals.Switch swiFreStaPum "Switch for freeze stat of pump"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant yFreHeaCoi(final k=1.0) "Flow rate signal for heating coil when freeze stat is on"; Buildings.Obsolete.Controls.OBC.ASHRAE.G36_PR1.AHUs.MultiZone.VAV.Controller conAHU( kMinOut=0.03, final pMaxSet=410, final yFanMin=yFanMin, final VPriSysMax_flow=mAir_flow_nominal/1.2, final peaSysPop=divP*sum({ratP_A*AFlo[i] for i in 1:numZon})) "AHU controller"; Buildings.Obsolete.Controls.OBC.ASHRAE.G36_PR1.AHUs.MultiZone.VAV.SetPoints.OutdoorAirFlow.Zone zonOutAirSet[numZon]( final AFlo=AFlo, final have_occSen=fill(false, numZon), final have_winSen=fill(false, numZon), final desZonPop={ratP_A*AFlo[i] for i in 1:numZon}, final minZonPriFlo=minZonPriFlo) "Zone level calculation of the minimum outdoor airflow setpoint"; Buildings.Obsolete.Controls.OBC.ASHRAE.G36_PR1.AHUs.MultiZone.VAV.SetPoints.OutdoorAirFlow.SumZone zonToSys(final numZon=numZon) "Sum up zone calculation output"; Buildings.Controls.OBC.CDL.Routing.RealScalarReplicator reaRep1(final nout=numZon) "Replicate design uncorrected minimum outdoor airflow setpoint"; Buildings.Controls.OBC.CDL.Routing.BooleanScalarReplicator booRep1(final nout=numZon) "Replicate signal whether the outdoor airflow is required"; Buildings.Obsolete.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.ZoneStatus zonSta[numZon] "Check zone temperature status"; Buildings.Obsolete.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.GroupStatus zonGroSta( final numZon=numZon) "Check zone group status according to the zones status"; Buildings.Obsolete.Controls.OBC.ASHRAE.G36_PR1.Generic.SetPoints.OperationMode opeModSel(final numZon=numZon); Buildings.Obsolete.Controls.OBC.ASHRAE.G36_PR1.TerminalUnits.SetPoints.ZoneTemperatures TZonSet[numZon]( final have_occSen=fill(false, numZon), final have_winSen=fill(false, numZon)) "Zone setpoint"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant warCooTim[numZon]( final k=fill(1800, numZon)) "Warm up and cool down time"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant falSta[numZon]( final k=fill(false, numZon)) "All windows are closed, no zone has override switch"; Buildings.Controls.OBC.CDL.Routing.RealScalarReplicator reaRep(nout=numZon) "Assume all zones have same occupancy schedule"; Buildings.Controls.OBC.CDL.Routing.BooleanScalarReplicator booRep(nout=numZon) "Assume all zones have same occupancy schedule"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant demLimLev[numZon]( final k=fill(0, numZon)) "Demand limit level, assumes to be 0"; Buildings.Controls.OBC.CDL.Routing.IntegerScalarReplicator intRep( final nout=numZon) "All zones in same operation mode"; Buildings.Examples.VAVReheat.BaseClasses.Controls.SystemHysteresis sysHysHea "Hysteresis and delay to switch heating on and off"; Buildings.Examples.VAVReheat.BaseClasses.Controls.SystemHysteresis sysHysCoo "Hysteresis and delay to switch cooling on and off"; Buildings.Controls.OBC.CDL.Reals.Switch swiFreStaVal "Switch for freeze stat of valve"; Buildings.Examples.VAVReheat.BaseClasses.Controls.FreezeStat freSta( lockoutTime=3600) "Freeze stat for heating coil"; Buildings.Controls.OBC.CDL.Routing.RealScalarReplicator TSupAHU(final nout= numZon) "Replicate AHU supply temperature"; Buildings.Controls.OBC.CDL.Routing.IntegerScalarReplicator opeMod(final nout= numZon) "Replicate operation mode"; Buildings.Controls.OBC.Utilities.OptimalStart optSta[numZon]( each computeHeating=true, each computeCooling=true) "Optimal startup"; Buildings.Controls.OBC.CDL.Routing.RealScalarReplicator tZonNexOcc(nout= numZon) "Next occupancy for each zone"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant TZonSetHea[numZon]( each k( unit="K", displayUnit="degC") = 293.15) "Heating setpoint for zone air"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant TZonSetCoo[numZon]( each k( unit="K", displayUnit="degC") = 297.15) "Cooling setpoint for zone air"; equation connect(conVAV.TDis, VAVBox.TSup); connect(conVAV.yZonTemResReq, TZonResReq.u); connect(conVAV.yZonPreResReq, PZonResReq.u); connect(conVAV.VDis_flow, VAVBox.VSup_flow); connect(yFreHeaCoi.y, swiFreStaPum.u1); connect(zonToSys.ySumDesZonPop, conAHU.sumDesZonPop); connect(zonToSys.VSumDesPopBreZon_flow, conAHU.VSumDesPopBreZon_flow); connect(zonToSys.VSumDesAreBreZon_flow, conAHU.VSumDesAreBreZon_flow); connect(zonToSys.yDesSysVenEff, conAHU.uDesSysVenEff); connect(zonToSys.VSumUncOutAir_flow, conAHU.VSumUncOutAir_flow); connect(zonToSys.VSumSysPriAir_flow, conAHU.VSumSysPriAir_flow); connect(zonToSys.uOutAirFra_max, conAHU.uOutAirFra_max); connect(zonOutAirSet.yDesZonPeaOcc, zonToSys.uDesZonPeaOcc); connect(zonOutAirSet.VDesPopBreZon_flow, zonToSys.VDesPopBreZon_flow); connect(zonOutAirSet.VDesAreBreZon_flow, zonToSys.VDesAreBreZon_flow); connect(zonOutAirSet.yDesPriOutAirFra, zonToSys.uDesPriOutAirFra); connect(zonOutAirSet.VUncOutAir_flow, zonToSys.VUncOutAir_flow); connect(zonOutAirSet.yPriOutAirFra, zonToSys.uPriOutAirFra); connect(zonOutAirSet.VPriAir_flow, zonToSys.VPriAir_flow); connect(conAHU.yAveOutAirFraPlu, zonToSys.yAveOutAirFraPlu); connect(conAHU.VDesUncOutAir_flow, reaRep1.u); connect(reaRep1.y, zonOutAirSet.VUncOut_flow_nominal); connect(conAHU.yReqOutAir, booRep1.u); connect(booRep1.y, zonOutAirSet.uReqOutAir); connect(TZonResReq.y, conAHU.uZonTemResReq); connect(PZonResReq.y, conAHU.uZonPreResReq); connect(TOut.y, conAHU.TOut); connect(dpDisSupFan.p_rel, conAHU.ducStaPre); connect(TSup.T, conAHU.TSup); connect(TRet.T, conAHU.TOutCut); connect(VOut1.V_flow, conAHU.VOut_flow); connect(TMix.T, conAHU.TMix); connect(conAHU.yOutDamPos, damOut.y); connect(conAHU.yRetDamPos, damRet.y); connect(conAHU.ySupFanSpe, fanSup.y); connect(VAVBox.y_actual, conVAV.yDam_actual); connect(zonSta.yCooTim, zonGroSta.uCooTim); connect(zonSta.yWarTim, zonGroSta.uWarTim); connect(zonSta.yOccHeaHig, zonGroSta.uOccHeaHig); connect(zonSta.yHigOccCoo, zonGroSta.uHigOccCoo); connect(zonSta.THeaSetOff, zonGroSta.THeaSetOff); connect(zonSta.yUnoHeaHig, zonGroSta.uUnoHeaHig); connect(zonSta.yEndSetBac, zonGroSta.uEndSetBac); connect(zonSta.TCooSetOff, zonGroSta.TCooSetOff); connect(zonSta.yHigUnoCoo, zonGroSta.uHigUnoCoo); connect(zonSta.yEndSetUp, zonGroSta.uEndSetUp); connect(falSta.y, zonGroSta.uWin); connect(occSch.tNexOcc, reaRep.u); connect(reaRep.y, zonGroSta.tNexOcc); connect(occSch.occupied, booRep.u); connect(booRep.y, zonGroSta.uOcc); connect(falSta.y, zonGroSta.zonOcc); connect(zonGroSta.uGroOcc, opeModSel.uOcc); connect(zonGroSta.nexOcc, opeModSel.tNexOcc); connect(zonGroSta.yCooTim, opeModSel.maxCooDowTim); connect(zonGroSta.yWarTim, opeModSel.maxWarUpTim); connect(zonGroSta.yOccHeaHig, opeModSel.uOccHeaHig); connect(zonGroSta.yHigOccCoo, opeModSel.uHigOccCoo); connect(zonGroSta.yColZon, opeModSel.totColZon); connect(zonGroSta.ySetBac, opeModSel.uSetBac); connect(zonGroSta.yEndSetBac, opeModSel.uEndSetBac); connect(zonGroSta.TZonMin, opeModSel.TZonMin); connect(zonGroSta.yHotZon, opeModSel.totHotZon); connect(zonGroSta.ySetUp, opeModSel.uSetUp); connect(zonGroSta.yEndSetUp, opeModSel.uEndSetUp); connect(zonSta.THeaSetOn, TZonSet.TZonHeaSetOcc); connect(zonSta.THeaSetOff, TZonSet.TZonHeaSetUno); connect(zonSta.TCooSetOn, TZonSet.TZonCooSetOcc); connect(zonSta.TCooSetOff, TZonSet.TZonCooSetUno); connect(demLimLev.y, TZonSet.uCooDemLimLev); connect(demLimLev.y, TZonSet.uHeaDemLimLev); connect(opeModSel.yOpeMod, conAHU.uOpeMod); connect(TZonSet[1].TZonHeaSet, conAHU.TZonHeaSet); connect(TZonSet[1].TZonCooSet, conAHU.TZonCooSet); connect(TZonSet.TZonHeaSet, conVAV.TZonHeaSet); connect(TZonSet.TZonCooSet, conVAV.TZonCooSet); connect(opeModSel.yOpeMod, intRep.u); connect(intRep.y, TZonSet.uOpeMod); connect(zonGroSta.yOpeWin, opeModSel.uOpeWin); connect(VAVBox.yVAV, conVAV.yDam); connect(VAVBox.yHea, conVAV.yVal); connect(freSta.y, swiFreStaPum.u2); connect(sysHysCoo.y, valCooCoi.y); connect(sysHysCoo.yPum, pumCooCoi.y); connect(conAHU.yCoo, sysHysCoo.u); connect(conAHU.yHea, sysHysHea.u); connect(sysHysHea.sysOn, conAHU.ySupFan); connect(swiFreStaPum.y, pumHeaCoi.y); connect(swiFreStaVal.u1, yFreHeaCoi.y); connect(sysHysHea.y, swiFreStaVal.u3); connect(sysHysHea.yPum, swiFreStaPum.u3); connect(freSta.y, swiFreStaVal.u2); connect(swiFreStaVal.y, valHeaCoi.y); connect(sysHysCoo.sysOn, conAHU.ySupFan); connect(zonGroSta.TZon, TRoo); connect(zonSta.TZon, TRoo); connect(zonOutAirSet.TZon, TRoo); connect(TMix.T, freSta.u); connect(TRet.port_b, amb.ports[3]); connect(TRoo, conVAV.TZon); connect(zonOutAirSet.VDis_flow, VAVBox.VSup_flow); connect(VAVBox.TSup, zonOutAirSet.TDis); connect(TSup.T, TSupAHU.u); connect(TSupAHU.y, conVAV.TSupAHU); connect(opeModSel.yOpeMod, opeMod.u); connect(opeMod.y, conVAV.uOpeMod); connect(optSta.TZon, TRoo); connect(optSta.tOpt, zonSta.cooDowTim); connect(optSta.tOpt, zonSta.warUpTim); connect(occSch.tNexOcc, tZonNexOcc.u); connect(tZonNexOcc.y, optSta.tNexOcc); connect(optSta.TSetZonCoo, TZonSetCoo.y); connect(optSta.TSetZonHea, TZonSetHea.y); end Guideline36;

Buildings.Obsolete.Examples.VAVReheat.BaseClasses.VAVBranch Buildings.Obsolete.Examples.VAVReheat.BaseClasses.VAVBranch

Supply branch of a VAV system

Buildings.Obsolete.Examples.VAVReheat.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.

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

Parameters

TypeNameDefaultDescription
replaceable package MediumAModelica.Media.Interfaces.Pa...Medium model for air
replaceable package MediumWModelica.Media.Interfaces.Pa...Medium model for water
BooleanallowFlowReversaltrue= false to simplify equations, assuming, but not enforcing, no flow reversal
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
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)
input RealInputyVAVSignal for VAV damper
input RealInputyValActuator position for reheat valve (0: closed, 1: open)
output RealOutputy_actualActual VAV damper position

Modelica definition

model VAVBranch "Supply branch of a VAV system" extends Modelica.Blocks.Icons.Block; replaceable package MediumA = Modelica.Media.Interfaces.PartialMedium "Medium model for air"; replaceable package MediumW = Modelica.Media.Interfaces.PartialMedium "Medium model for water"; parameter Boolean allowFlowReversal=true "= false to simplify equations, assuming, but not enforcing, no flow reversal"; parameter Modelica.Units.SI.MassFlowRate m_flow_nominal "Mass flow rate of this thermal zone"; parameter Modelica.Units.SI.Volume VRoo "Room volume"; Buildings.Fluid.Actuators.Dampers.PressureIndependent vav( redeclare package Medium = MediumA, m_flow_nominal=m_flow_nominal, dpDamper_nominal=220 + 20, allowFlowReversal=allowFlowReversal) "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, allowFlowReversal1=allowFlowReversal, allowFlowReversal2=false, 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 "; 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)"; Buildings.Fluid.Sensors.MassFlowRate senMasFlo( redeclare package Medium = MediumA, allowFlowReversal=allowFlowReversal) "Sensor for mass flow rate"; Modelica.Blocks.Math.Gain fraMasFlo(k=1/m_flow_nominal) "Fraction of mass flow rate, relative to nominal flow"; Modelica.Blocks.Math.Gain ACH(k=1/VRoo/1.2*3600) "Air change per hour"; Buildings.Fluid.Sources.MassFlowSource_T souTer( redeclare package Medium = MediumW, nPorts=1, use_m_flow_in=true, T=323.15) "Source for terminal box "; Modelica.Blocks.Interfaces.RealInput yVAV "Signal for VAV damper"; Modelica.Blocks.Interfaces.RealInput yVal "Actuator position for reheat valve (0: closed, 1: open)"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gaiM_flow(final k= m_flow_nominal*1000*15/4200/10) "Gain for mass flow rate"; Modelica.Blocks.Interfaces.RealOutput y_actual "Actual VAV damper position"; equation connect(fraMasFlo.u, senMasFlo.m_flow); connect(vav.port_b, senMasFlo.port_a); connect(ACH.u, senMasFlo.m_flow); connect(souTer.ports[1], terHea.port_a2); connect(port_a, terHea.port_a1); connect(senMasFlo.port_b, port_b); connect(terHea.port_b1, vav.port_a); connect(vav.y, yVAV); connect(souTer.m_flow_in, gaiM_flow.y); connect(sinTer.ports[1], terHea.port_b2); connect(gaiM_flow.u, yVal); connect(vav.y_actual, y_actual); end VAVBranch;