Buildings.Examples.VAVReheat.BaseClasses

Package with base classes for Buildings.Examples.VAVReheat

Information

This package contains base classes that are used to construct the models in Buildings.Examples.VAVReheat.

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

Package Content

Name Description
Buildings.Examples.VAVReheat.BaseClasses.ASHRAE2006 ASHRAE2006 Variable air volume flow system with terminal reheat and ASHRAE 2006 control sequence serving five thermal zones
Buildings.Examples.VAVReheat.BaseClasses.Floor Floor Model of a floor of the building
Buildings.Examples.VAVReheat.BaseClasses.Guideline36 Guideline36 Variable air volume flow system with terminal reheat and Guideline 36 control sequence serving five thermal zones
Buildings.Examples.VAVReheat.BaseClasses.HVACBuilding HVACBuilding Partial model that contains the HVAC and building model
Buildings.Examples.VAVReheat.BaseClasses.PartialFloor PartialFloor Interface for a model of a floor of a building
Buildings.Examples.VAVReheat.BaseClasses.PartialHVAC PartialHVAC Partial model of variable air volume flow system with terminal reheat that serves five thermal zones
Buildings.Examples.VAVReheat.BaseClasses.RoomLeakage RoomLeakage Room leakage model
Buildings.Examples.VAVReheat.BaseClasses.VAVReheatBox VAVReheatBox Supply box of a VAV system with a hot water reheat coil
Buildings.Examples.VAVReheat.BaseClasses.Controls Controls Package with controller models

Buildings.Examples.VAVReheat.BaseClasses.ASHRAE2006 Buildings.Examples.VAVReheat.BaseClasses.ASHRAE2006

Variable air volume flow system with terminal reheat and ASHRAE 2006 control sequence serving five thermal zones

Buildings.Examples.VAVReheat.BaseClasses.ASHRAE2006

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. The figure below shows the schematic diagram of an HVAC system that supplies 5 zones:

image

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

The control is an implementation of the control sequence VAV 2A2-21232 of the Sequences of Operation for Common HVAC Systems (ASHRAE, 2006). In this control sequence, the supply fan speed is modulated based on the duct static pressure. The return fan controller tracks the supply fan air flow rate. The duct static pressure set point is adjusted so that at least one VAV damper is 90% open. 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 provides the following functions: freeze protection, 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 "dual maximum with constant volume heating" 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. In the VAV model, all air flows are computed based on the duct static pressure distribution and the performance curves of the fans. Local loop control is implemented using proportional and proportional-integral controllers, while the supervisory control is implemented using a finite state machine.

A similar model but with a different control sequence can be found in Buildings.Examples.VAVReheat.BaseClasses.Guideline36.

References

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

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
RealratVMinVAV_flow[numZon]{max(1.5*VZonOA_flow_nominal...Minimum discharge air flow rate ratio [1]
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
ControlBuscontrolBus 

Modelica definition

model ASHRAE2006 "Variable air volume flow system with terminal reheat and ASHRAE 2006 control sequence serving five thermal zones" extends Buildings.Examples.VAVReheat.BaseClasses.PartialHVAC(amb(nPorts=3)); parameter Real ratVMinVAV_flow[numZon](each final unit="1") = {max(1.5* VZonOA_flow_nominal[i]/mCooVAV_flow_nominal[i]/1.2, 0.15) for i in 1:numZon} "Minimum discharge air flow rate ratio"; Controls.FanVFD conFanSup( xSet_nominal( unit="Pa", displayUnit="Pa") = 410, r_N_min=yFanMin) "Controller for fan"; Controls.ModeSelector modeSelector; Controls.ControlBus controlBus; Controls.Economizer conEco( have_reset=true, have_frePro=true, VOut_flow_min=Vot_flow_nominal) "Controller for economizer"; Controls.RoomTemperatureSetpoint TSetRoo( final THeaOn=THeaOn, final THeaOff=THeaOff, final TCooOn=TCooOn, final TCooOff=TCooOff); Controls.DuctStaticPressureSetpoint pSetDuc( nin=5, pMin=50) "Duct static pressure setpoint"; Controls.RoomVAV conVAV[numZon]( have_preIndDam=fill(false, numZon), ratVFloMin=ratVMinVAV_flow, ratVFloHea=mHeaVAV_flow_nominal ./ mCooVAV_flow_nominal, V_flow_nominal=mCooVAV_flow_nominal/1.2) "Controller for terminal unit"; Buildings.Controls.OBC.CDL.Logical.Or or2; Controls.SupplyAirTemperature conTSup "Supply air temperature and economizer controller"; Controls.SupplyAirTemperatureSetpoint TSupSet "Supply air temperature set point"; Buildings.Fluid.Actuators.Dampers.Exponential damExh( from_dp=false, riseTime=15, dpFixed_nominal=5, redeclare package Medium = MediumA, m_flow_nominal=mAir_flow_nominal, dpDamper_nominal=5) "Exhaust air damper"; Controls.SystemHysteresis sysHysHea "Hysteresis and delay to switch heating on and off"; Controls.SystemHysteresis sysHysCoo "Hysteresis and delay to switch cooling on and off"; Buildings.Controls.OBC.CDL.Reals.Switch swiFreStaPum "Switch for freeze stat of pump"; Buildings.Controls.OBC.CDL.Reals.Switch swiFreStaVal "Switch for freeze stat of valve"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant yFreHeaCoi(final k=1.0) "Flow rate signal for heating coil when freeze stat is on"; Buildings.Controls.OBC.CDL.Reals.MultiMin TRooMin( final nin=numZon, u(each final unit="K", each displayUnit="degC"), y(final unit="K", displayUnit="degC")) "Minimum room temperature"; Utilities.Math.Average TRooAve( final nin=numZon, u(each final unit="K", each displayUnit="degC"), y(final unit="K", displayUnit="degC")) "Average room temperature"; Controls.FreezeStat freSta "Freeze stat for heating coil"; Buildings.Controls.OBC.CDL.Routing.RealScalarReplicator TRooHeaSet(final nout= numZon) "Replicate room temperature heating setpoint"; Buildings.Controls.OBC.CDL.Routing.RealScalarReplicator TRooCooSet(final nout= numZon) "Replicate room temperature cooling setpoint"; equation connect(controlBus, modeSelector.cb); connect(TRooAve.y, controlBus.TRooAve); connect(TRet.T, conEco.TRet); connect(TSetRoo.controlBus, controlBus); connect(dpDisSupFan.p_rel, conFanSup.u_m); connect(pSetDuc.y, conFanSup.u); connect(conEco.VOut_flow, VOut1.V_flow); connect(occSch.tNexOcc, controlBus.dTNexOcc); connect(occSch.occupied, controlBus.occupied); connect(TOut.y, controlBus.TOut); connect(conEco.controlBus, controlBus); connect(modeSelector.yFan, conFanSup.uFan); connect(conFanSup.y, fanSup.y); connect(or2.u2, modeSelector.yFan); connect(VAVBox.y_actual, pSetDuc.u); connect(TSup.T, conTSup.TSup); connect(conTSup.yOA, conEco.uOATSup); connect(or2.y, conTSup.uEna); connect(modeSelector.yEco, conEco.uEna); connect(TMix.T, conEco.TMix); connect(controlBus, TSupSet.controlBus); connect(TSupSet.TSet, conTSup.TSupSet); connect(damRet.y, conEco.yRet); connect(damExh.y, conEco.yOA); connect(damOut.y, conEco.yOA); connect(damExh.port_a, TRet.port_b); connect(freSta.y, or2.u1); connect(conTSup.yHea, sysHysHea.u); connect(conTSup.yCoo, sysHysCoo.u); connect(sysHysCoo.y, valCooCoi.y); connect(sysHysCoo.yPum, pumCooCoi.y); connect(sysHysCoo.sysOn, modeSelector.yFan); connect(sysHysHea.sysOn, modeSelector.yFan); connect(yFreHeaCoi.y, swiFreStaPum.u1); connect(yFreHeaCoi.y, swiFreStaVal.u1); connect(freSta.y, swiFreStaPum.u2); connect(freSta.y, swiFreStaVal.u2); connect(sysHysHea.y, swiFreStaVal.u3); connect(sysHysHea.yPum, swiFreStaPum.u3); connect(swiFreStaPum.y, pumHeaCoi.y); connect(swiFreStaVal.y, valHeaCoi.y); connect(TRooMin.y, controlBus.TRooMin); connect(TRooMin.u, TRoo); connect(TRooAve.u, TRoo); connect(freSta.u, TMix.T); connect(damExh.port_b, amb.ports[3]); connect(TRoo, conVAV.TRoo); connect(controlBus.TRooSetHea, TRooHeaSet.u); connect(controlBus.TRooSetCoo, TRooCooSet.u); connect(TRooHeaSet.y, conVAV.TRooHeaSet); connect(TRooCooSet.y, conVAV.TRooCooSet); connect(conVAV.yDam, VAVBox.yVAV); connect(conVAV.yVal, VAVBox.yHea); connect(VAVBox.VSup_flow, conVAV.VDis_flow); end ASHRAE2006;

Buildings.Examples.VAVReheat.BaseClasses.Floor Buildings.Examples.VAVReheat.BaseClasses.Floor

Model of a floor of the building

Buildings.Examples.VAVReheat.BaseClasses.Floor

Information

Model of a floor that consists of five thermal zones.

The five room model is representative of one floor of the new construction medium office building for Chicago, IL, as described in the set of DOE Commercial Building Benchmarks (Deru et al, 2009). There are four perimeter zones and one core zone. The envelope thermal properties meet ASHRAE Standard 90.1-2004. 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 (except for the core zone) and through bi-directional air exchange through open doors that connect adjacent zones. The bi-directional air exchange is modeled based on the differences in static pressure between adjacent rooms at a reference height plus the difference in static pressure across the door height as a function of the difference in air density. Infiltration is a function of the flow imbalance of the HVAC system.

References

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 Buildings.Examples.VAVReheat.BaseClasses.PartialFloor (Interface for a model of a floor of a building).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium model for air
Booleanuse_windPressuretrueSet to true to enable wind pressure
RealkIntNor1Gain factor to scale internal heat gain in north zone
VolumeVRooCorcor.AFlo*hRooRoom volume corridor [m3]
VolumeVRooSousou.AFlo*hRooRoom volume south [m3]
VolumeVRooNornor.AFlo*hRooRoom volume north [m3]
VolumeVRooEaseas.AFlo*hRooRoom volume east [m3]
VolumeVRooWeswes.AFlo*hRooRoom volume west [m3]
AreaAFloCor2698/hRooFloor area corridor [m2]
AreaAFloSou568.77/hRooFloor area south [m2]
AreaAFloNor568.77/hRooFloor area north [m2]
AreaAFloEas360.0785/hRooFloor area east [m2]
AreaAFloWes360.0785/hRooFloor area west [m2]
LengthwExtSou49.91South zone exterior wall width [m]
LengthwExtNor49.91North zone exterior wall width [m]
LengthwExtEas33.27East zone exterior wall width [m]
LengthwExtWes33.27West zone exterior wall width [m]
InteriorConvectionintConModBuildings.HeatTransfer.Types...Convective heat transfer model for room-facing surfaces of opaque constructions
RealwinWalRat0.33Window to wall ratio for exterior walls
LengthhWin1.5Height of windows [m]
PlywoodmatFurmatFur(x=0.15, nStaRef=5)Material for furniture
CarpetmatCar Carpet
ConcretematConmatCon(x=0.1, k=1.311, c=836...Concrete
PlywoodmatWoomatWoo(x=0.01, k=0.11, d=544...Wood for exterior construction
GenericmatInsmatIns(x=0.087, k=0.049, c=8...Steelframe construction with insulation
GypsumBoardmatGypmatGyp(x=0.0127, k=0.16, c=8...Gypsum board
GypsumBoardmatGyp2matGyp2(x=0.025, k=0.16, c=8...Gypsum board
GenericconExtWalconExtWal(final nLay=3, mate...Exterior construction
GenericconIntWalconIntWal(final nLay=1, mate...Interior wall construction
GenericconFloconFlo(final nLay=1, materia...Floor construction (opa_a is carpet)
GenericconFurconFur(final nLay=1, materia...Construction for internal mass of furniture
PlywoodmatCarTramatCarTra(k=0.11, d=544, nSt...Wood for floor
DoubleClearAir13ClearglaSysglaSys(UFra=2, shade=Buildin...Data record for the glazing system
Experimental (may be changed in future releases)
BooleansampleModelfalseSet to true to time-sample the model, which can give shorter simulation time if there is already time sampling in the system model

Connectors

TypeNameDescription
VesselFluidPorts_bportsSou[2]Fluid inlets and outlets
VesselFluidPorts_bportsEas[2]Fluid inlets and outlets
VesselFluidPorts_bportsNor[2]Fluid inlets and outlets
VesselFluidPorts_bportsWes[2]Fluid inlets and outlets
VesselFluidPorts_bportsCor[2]Fluid inlets and outlets
output RealOutputTRooAir[5]Room air temperatures [K]
output RealOutputp_relRelative pressure signal of building static pressure
BusweaBusWeather bus

Modelica definition

model Floor "Model of a floor of the building" extends Buildings.Examples.VAVReheat.BaseClasses.PartialFloor( final VRooCor=cor.AFlo*hRoo, final VRooSou=sou.AFlo*hRoo, final VRooNor=nor.AFlo*hRoo, final VRooEas=eas.AFlo*hRoo, final VRooWes=wes.AFlo*hRoo, AFloCor=2698/hRoo, AFloSou=568.77/hRoo, AFloNor=568.77/hRoo, AFloEas=360.0785/hRoo, AFloWes=360.0785/hRoo); parameter Modelica.Units.SI.Length wExtSou=49.91 "South zone exterior wall width"; parameter Modelica.Units.SI.Length wExtNor=49.91 "North zone exterior wall width"; parameter Modelica.Units.SI.Length wExtEas=33.27 "East zone exterior wall width"; parameter Modelica.Units.SI.Length wExtWes=33.27 "West zone exterior wall width"; parameter HeatTransfer.Types.InteriorConvection intConMod=Buildings.HeatTransfer.Types.InteriorConvection.Temperature "Convective heat transfer model for room-facing surfaces of opaque constructions"; parameter Real winWalRat( min=0.01, max=0.99) = 0.33 "Window to wall ratio for exterior walls"; parameter Modelica.Units.SI.Length hWin=1.5 "Height of windows"; parameter HeatTransfer.Data.Solids.Plywood matFur(x=0.15, nStaRef=5) "Material for furniture"; parameter HeatTransfer.Data.Resistances.Carpet matCar "Carpet"; parameter HeatTransfer.Data.Solids.Concrete matCon( x=0.1, k=1.311, c=836, nStaRef=5) "Concrete"; parameter HeatTransfer.Data.Solids.Plywood matWoo( x=0.01, k=0.11, d=544, nStaRef=1) "Wood for exterior construction"; parameter HeatTransfer.Data.Solids.Generic matIns( x=0.087, k=0.049, c=836.8, d=265, nStaRef=5) "Steelframe construction with insulation"; parameter HeatTransfer.Data.Solids.GypsumBoard matGyp( x=0.0127, k=0.16, c=830, d=784, nStaRef=2) "Gypsum board"; parameter HeatTransfer.Data.Solids.GypsumBoard matGyp2( x=0.025, k=0.16, c=830, d=784, nStaRef=2) "Gypsum board"; parameter HeatTransfer.Data.OpaqueConstructions.Generic conExtWal(final nLay=3, material={matWoo,matIns,matGyp}) "Exterior construction"; parameter HeatTransfer.Data.OpaqueConstructions.Generic conIntWal(final nLay=1, material={matGyp2}) "Interior wall construction"; parameter HeatTransfer.Data.OpaqueConstructions.Generic conFlo(final nLay=1, material={ matCon}) "Floor construction (opa_a is carpet)"; parameter HeatTransfer.Data.OpaqueConstructions.Generic conFur(final nLay=1, material={ matFur}) "Construction for internal mass of furniture"; parameter HeatTransfer.Data.Solids.Plywood matCarTra( k=0.11, d=544, nStaRef=1, x=0.215/0.11) "Wood for floor"; parameter HeatTransfer.Data.GlazingSystems.DoubleClearAir13Clear glaSys( UFra=2, shade=Buildings.HeatTransfer.Data.Shades.Gray(), haveInteriorShade=false, haveExteriorShade=false) "Data record for the glazing system"; constant Modelica.Units.SI.Height hRoo=2.74 "Room height"; parameter Boolean sampleModel = false "Set to true to time-sample the model, which can give shorter simulation time if there is already time sampling in the system model"; Buildings.ThermalZones.Detailed.MixedAir sou( redeclare package Medium = Medium, AFlo=AFloSou, hRoo=hRoo, nConExt=0, nConExtWin=1, datConExtWin( layers={conExtWal}, A={wExtSou*hRoo}, glaSys={glaSys}, wWin={winWalRat/hWin*wExtSou*hRoo}, each hWin=hWin, fFra={0.1}, til={Buildings.Types.Tilt.Wall}, azi={Buildings.Types.Azimuth.S}), nConPar=2, datConPar( layers={conFlo,conFur}, A={AFloSou,414.68}, til={Buildings.Types.Tilt.Floor,Buildings.Types.Tilt.Wall}), nConBou=3, datConBou( layers={conIntWal,conIntWal,conIntWal}, A={6.47,40.76,6.47}*hRoo, til={Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Wall}), nSurBou=0, nPorts=5, intConMod=intConMod, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, final sampleModel=sampleModel) "South zone"; Buildings.ThermalZones.Detailed.MixedAir eas( redeclare package Medium = Medium, AFlo=AFloEas, hRoo=hRoo, nConExt=0, nConExtWin=1, datConExtWin( layers={conExtWal}, A={wExtEas*hRoo}, glaSys={glaSys}, wWin={winWalRat/hWin*wExtEas*hRoo}, each hWin=hWin, fFra={0.1}, til={Buildings.Types.Tilt.Wall}, azi={Buildings.Types.Azimuth.E}), nConPar=2, datConPar( layers={conFlo,conFur}, A={AFloEas,262.52}, til={Buildings.Types.Tilt.Floor,Buildings.Types.Tilt.Wall}), nConBou=1, datConBou( layers={conIntWal}, A={24.13}*hRoo, til={Buildings.Types.Tilt.Wall}), nSurBou=2, surBou( each A=6.47*hRoo, each absIR=0.9, each absSol=0.9, til={Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Wall}), nPorts=5, intConMod=intConMod, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, final sampleModel=sampleModel) "East zone"; Buildings.ThermalZones.Detailed.MixedAir nor( redeclare package Medium = Medium, AFlo=AFloNor, hRoo=hRoo, nConExt=0, nConExtWin=1, datConExtWin( layers={conExtWal}, A={wExtNor*hRoo}, glaSys={glaSys}, wWin={winWalRat/hWin*wExtNor*hRoo}, each hWin=hWin, fFra={0.1}, til={Buildings.Types.Tilt.Wall}, azi={Buildings.Types.Azimuth.N}), nConPar=2, datConPar( layers={conFlo,conFur}, A={AFloNor,414.68}, til={Buildings.Types.Tilt.Floor,Buildings.Types.Tilt.Wall}), nConBou=3, datConBou( layers={conIntWal,conIntWal,conIntWal}, A={6.47,40.76,6.47}*hRoo, til={Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Wall}), nSurBou=0, nPorts=5, intConMod=intConMod, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, final sampleModel=sampleModel) "North zone"; Buildings.ThermalZones.Detailed.MixedAir wes( redeclare package Medium = Medium, AFlo=AFloWes, hRoo=hRoo, nConExt=0, nConExtWin=1, datConExtWin( layers={conExtWal}, A={wExtEas*hRoo}, glaSys={glaSys}, wWin={winWalRat/hWin*wExtEas*hRoo}, each hWin=hWin, fFra={0.1}, til={Buildings.Types.Tilt.Wall}, azi={Buildings.Types.Azimuth.W}), nConPar=2, datConPar( layers={conFlo,conFur}, A={AFloWes,262.52}, til={Buildings.Types.Tilt.Floor,Buildings.Types.Tilt.Wall}), nConBou=1, datConBou( layers={conIntWal}, A={24.13}*hRoo, til={Buildings.Types.Tilt.Wall}), nSurBou=2, surBou( each A=6.47*hRoo, each absIR=0.9, each absSol=0.9, til={Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Wall}), nPorts=5, intConMod=intConMod, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, final sampleModel=sampleModel) "West zone"; Buildings.ThermalZones.Detailed.MixedAir cor( redeclare package Medium = Medium, AFlo=AFloCor, hRoo=hRoo, nConExt=0, nConExtWin=0, nConPar=2, datConPar( layers={conFlo,conFur}, A={AFloCor,1967.01}, til={Buildings.Types.Tilt.Floor,Buildings.Types.Tilt.Wall}), nConBou=0, nSurBou=4, surBou( A={40.76,24.13,40.76,24.13}*hRoo, each absIR=0.9, each absSol=0.9, til={Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Wall, Buildings.Types.Tilt.Wall}), nPorts=11, intConMod=intConMod, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, final sampleModel=sampleModel) "Core zone"; Modelica.Blocks.Math.MatrixGain gai(K=20*[0.4; 0.4; 0.2]) "Matrix gain to split up heat gain in radiant, convective and latent gain"; Modelica.Blocks.Sources.CombiTimeTable intGaiFra( table=[0,0.05; 8,0.05; 9,0.9; 12,0.9; 12,0.8; 13,0.8; 13,1; 17,1; 19,0.1; 24,0.05], timeScale=3600, extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic) "Fraction of internal heat gain"; Modelica.Blocks.Math.Gain gaiIntNor[3](each k=kIntNor) "Gain for internal heat gain amplification for north zone"; Modelica.Blocks.Math.Gain gaiIntSou[3](each k=2 - kIntNor) "Gain to change the internal heat gain for south"; Modelica.Blocks.Sources.Constant uSha(k=0) "Control signal for the shading device"; Modelica.Blocks.Routing.Replicator replicator(nout=1); equation connect(sou.surf_conBou[1], wes.surf_surBou[2]); connect(sou.surf_conBou[2], cor.surf_surBou[1]); connect(sou.surf_conBou[3], eas.surf_surBou[1]); connect(eas.surf_conBou[1], cor.surf_surBou[2]); connect(eas.surf_surBou[2], nor.surf_conBou[1]); connect(nor.surf_conBou[2], cor.surf_surBou[3]); connect(nor.surf_conBou[3], wes.surf_surBou[1]); connect(wes.surf_conBou[1], cor.surf_surBou[4]); connect(replicator.y, nor.uSha); connect(replicator.y, wes.uSha); connect(replicator.y, eas.uSha); connect(replicator.y, sou.uSha); connect(replicator.y, cor.uSha); connect(gai.y, cor.qGai_flow); connect(gai.y, eas.qGai_flow); connect(gai.y, wes.qGai_flow); connect(sou.weaBus, weaBus); connect(eas.weaBus, weaBus); connect(nor.weaBus, weaBus); connect(wes.weaBus, weaBus); connect(cor.weaBus, weaBus); connect(sou.heaPorAir, temAirSou.port); connect(eas.heaPorAir, temAirEas.port); connect(nor.heaPorAir, temAirNor.port); connect(wes.heaPorAir, temAirWes.port); connect(cor.heaPorAir, temAirCor.port); connect(sou.ports[1], portsSou[1]); connect(sou.ports[2], portsSou[2]); connect(eas.ports[1], portsEas[1]); connect(eas.ports[2], portsEas[2]); connect(nor.ports[1], portsNor[1]); connect(nor.ports[2], portsNor[2]); connect(wes.ports[1], portsWes[1]); connect(wes.ports[2], portsWes[2]); connect(cor.ports[1], portsCor[1]); connect(cor.ports[2], portsCor[2]); connect(leaSou.port_b, sou.ports[3]); connect(leaEas.port_b, eas.ports[3]); connect(leaNor.port_b, nor.ports[3]); connect(leaWes.port_b, wes.ports[3]); connect(opeSouCor.port_b1, cor.ports[3]); connect(opeSouCor.port_a2, cor.ports[4]); connect(opeSouCor.port_a1, sou.ports[4]); connect(opeSouCor.port_b2, sou.ports[5]); connect(opeEasCor.port_b1, eas.ports[4]); connect(opeEasCor.port_a2, eas.ports[5]); connect(opeEasCor.port_a1, cor.ports[5]); connect(opeEasCor.port_b2, cor.ports[6]); connect(opeNorCor.port_b1, nor.ports[4]); connect(opeNorCor.port_a2, nor.ports[5]); connect(opeNorCor.port_a1, cor.ports[7]); connect(opeNorCor.port_b2, cor.ports[8]); connect(opeWesCor.port_b1, cor.ports[9]); connect(opeWesCor.port_a2, cor.ports[10]); connect(opeWesCor.port_a1, wes.ports[4]); connect(opeWesCor.port_b2, wes.ports[5]); connect(cor.ports[11], senRelPre.port_a); connect(senRelPre.p_rel, p_rel); connect(gaiIntNor.y, nor.qGai_flow); connect(gaiIntSou.y, sou.qGai_flow); connect(gai.y,gaiIntSou. u); connect(gai.y,gaiIntNor. u); connect(intGaiFra.y,gai. u); connect(uSha.y,replicator. u); end Floor;

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

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

Buildings.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.Controls.OBC.ASHRAE.G36 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
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.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.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)) "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.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.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 TOccHeaSet[numZon]( each k( unit="K", displayUnit="degC") = 293.15) "Occupied heating setpoint for zone air"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant TOccCooSet[numZon]( each k( unit="K", displayUnit="degC") = 297.15) "Occupied cooling setpoint for zone air"; Buildings.Controls.OBC.ASHRAE.G36.AHUs.MultiZone.VAV.Controller conAHU( final eneStd=Buildings.Controls.OBC.ASHRAE.G36.Types.EnergyStandard.ASHRAE90_1, final venStd=Buildings.Controls.OBC.ASHRAE.G36.Types.VentilationStandard.ASHRAE62_1, final ashCliZon=Buildings.Controls.OBC.ASHRAE.G36.Types.ASHRAEClimateZone.Zone_5A, final freSta=Buildings.Controls.OBC.ASHRAE.G36.Types.FreezeStat.No_freeze_stat, final minOADes=Buildings.Controls.OBC.ASHRAE.G36.Types.OutdoorAirSection.SingleDamper, final buiPreCon=Buildings.Controls.OBC.ASHRAE.G36.Types.BuildingPressureControlTypes.BarometricRelief, final ecoHigLimCon=Buildings.Controls.OBC.ASHRAE.G36.Types.ControlEconomizer.FixedDryBulb, final have_perZonRehBox=true, final VUncDesOutAir_flow=0.644, final VDesTotOutAir_flow=1.107) "Air handler unit controller"; Buildings.Controls.OBC.ASHRAE.G36.AHUs.MultiZone.VAV.SetPoints.OutdoorAirFlow.ASHRAE62_1.SumZone sumZon( final nZon=numZon, final nGro=1, final zonGroMat=[1,1,1,1,1], final zonGroMatTra=[1; 1; 1; 1; 1]) "Sum up zone ventilation setpoints"; Buildings.Controls.OBC.ASHRAE.G36.ZoneGroups.OperationMode opeModSel( final nZon=numZon) "Operation mode"; Buildings.Controls.OBC.ASHRAE.G36.ZoneGroups.ZoneStatus zonSta[numZon] "Status of different zone temperature"; Buildings.Controls.OBC.ASHRAE.G36.ZoneGroups.GroupStatus groSta(final nBuiZon= numZon) "Zone group status"; Buildings.Controls.OBC.ASHRAE.G36.ThermalZones.Setpoints TZonSet[numZon]( final have_occSen=fill(false, numZon), final have_winSen=fill(false, numZon), final have_locAdj=fill(false, numZon)) "Zone setpoint temperature"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant TUnoHeaSet[numZon]( each k( unit="K", displayUnit="degC") = 285.15) "Unoccupied heating setpoint for zone air"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant TUnoCooSet[numZon]( each k( unit="K", displayUnit="degC") = 303.15) "Unoccupied cooling setpoint for zone air"; Buildings.Controls.OBC.CDL.Routing.IntegerScalarReplicator intRep( final nout=numZon) "All zones in same operation mode"; Buildings.Controls.OBC.ASHRAE.G36.TerminalUnits.Reheat.Controller conVAV[numZon]( final venStd=fill(Buildings.Controls.OBC.ASHRAE.G36.Types.VentilationStandard.ASHRAE62_1, numZon), final have_winSen=fill(false, numZon), final have_occSen=fill(false, numZon), final have_CO2Sen=fill(false, numZon), final VAreBreZon_flow={ratOAFlo_A*AFlo[i] for i in 1:numZon}, final VPopBreZon_flow={ratP_A*AFlo[i]*ratOAFlo_P for i in 1:numZon}, final VMin_flow={max(1.5*VZonOA_flow_nominal[i], 0.15*mCooVAV_flow_nominal[ i]/1.2) for i in 1:numZon}, final VCooMax_flow=mCooVAV_flow_nominal/1.2, final VHeaMin_flow=fill(0, numZon), final VHeaMax_flow=mHeaVAV_flow_nominal/1.2, final VAreMin_flow=fill(0, numZon), final VOccMin_flow=fill(0, numZon), floHys=fill(0.01, numZon)) "Reheat box control"; Buildings.Controls.OBC.CDL.Routing.RealScalarReplicator TSupAHU( final nout=numZon) "Replicate AHU supply temperature"; Buildings.Controls.OBC.CDL.Routing.RealScalarReplicator TSupAHUSet( final nout=numZon) "Replicate AHU supply temperature setpoint"; Buildings.Controls.OBC.CDL.Integers.Sources.Constant oveRid[numZon]( final k=fill(0, numZon)) "No override flow setpoint, no override damper position"; Buildings.Controls.OBC.CDL.Routing.BooleanScalarReplicator booScaRep( final nout=numZon) "Supply fan commanded on"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant hotWatPla[numZon]( final k=fill(true, numZon)) "Hot water plant status"; Buildings.Controls.OBC.CDL.Integers.MultiSum preRetReq( final nin=numZon) "Zone pressure reset request"; Buildings.Controls.OBC.CDL.Integers.MultiSum temResReq( final nin=numZon) "Zone temperature reset request"; Buildings.Controls.OBC.CDL.Logical.FallingEdge falEdg "Reset back to normal after freeze protection"; Buildings.Controls.OBC.ASHRAE.G36.ZoneGroups.ZoneGroupSystem ahuMod( final nGro=1) "AHU operating mode"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant truSta[numZon]( final k=fill(true, numZon)) "All windows are closed"; equation connect(yFreHeaCoi.y, swiFreStaPum.u1); connect(occSch.tNexOcc, reaRep.u); connect(occSch.occupied, booRep.u); connect(freSta.y, swiFreStaPum.u2); connect(sysHysCoo.y, valCooCoi.y); connect(sysHysCoo.yPum, pumCooCoi.y); 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(TMix.T, freSta.u); connect(TRet.port_b, amb.ports[3]); connect(optSta.TZon, TRoo); connect(occSch.tNexOcc, tZonNexOcc.u); connect(tZonNexOcc.y, optSta.tNexOcc); connect(optSta.TSetZonCoo,TOccCooSet. y); connect(optSta.TSetZonHea,TOccHeaSet. y); connect(zonSta.yCooTim, groSta.uCooTim); connect(zonSta.yWarTim, groSta.uWarTim); connect(zonSta.yOccHeaHig, groSta.u1OccHeaHig); connect(zonSta.yHigOccCoo, groSta.u1HigOccCoo); connect(zonSta.yUnoHeaHig, groSta.u1UnoHeaHig); connect(zonSta.yEndSetBac, groSta.u1EndSetBac); connect(zonSta.yHigUnoCoo, groSta.u1HigUnoCoo); connect(zonSta.yEndSetUp, groSta.u1EndSetUp); connect(falSta.y, groSta.zonOcc); connect(optSta.tOpt, zonSta.cooDowTim); connect(optSta.tOpt, zonSta.warUpTim); connect(TOccHeaSet.y, zonSta.TOccHeaSet); connect(TOccCooSet.y, zonSta.TOccCooSet); connect(TUnoHeaSet.y, zonSta.TUnoHeaSet); connect(TUnoCooSet.y, zonSta.TUnoCooSet); connect(TRoo, zonSta.TZon); connect(TRoo, groSta.TZon); connect(booRep.y, groSta.u1Occ); connect(reaRep.y, groSta.tNexOcc); connect(groSta.uGroOcc, opeModSel.u1Occ); connect(groSta.nexOcc, opeModSel.tNexOcc); connect(groSta.yCooTim, opeModSel.maxCooDowTim); connect(groSta.yOccHeaHig, opeModSel.u1OccHeaHig); connect(groSta.yHigOccCoo, opeModSel.u1HigOccCoo); connect(groSta.yWarTim, opeModSel.maxWarUpTim); connect(groSta.yColZon, opeModSel.totColZon); connect(groSta.yOpeWin, opeModSel.uOpeWin); connect(groSta.ySetBac, opeModSel.u1SetBac); connect(groSta.yEndSetBac, opeModSel.u1EndSetBac); connect(groSta.TZonMin, opeModSel.TZonMin); connect(groSta.yHotZon, opeModSel.totHotZon); connect(groSta.ySetUp, opeModSel.u1SetUp); connect(groSta.yEndSetUp, opeModSel.u1EndSetUp); connect(opeModSel.yOpeMod, intRep.u); connect(intRep.y, TZonSet.uOpeMod); connect(TOccCooSet.y, TZonSet.TOccCooSet); connect(TUnoCooSet.y, TZonSet.TUnoCooSet); connect(TOccHeaSet.y, TZonSet.TOccHeaSet); connect(TUnoHeaSet.y, TZonSet.TUnoHeaSet); connect(demLimLev.y, TZonSet.uCooDemLimLev); connect(demLimLev.y, TZonSet.uHeaDemLimLev); connect(TRoo, conVAV.TZon); connect(TZonSet.TCooSet, conVAV.TCooSet); connect(TZonSet.THeaSet, conVAV.THeaSet); connect(intRep.y, conVAV.uOpeMod); connect(VAVBox.TSup, conVAV.TDis); connect(VAVBox.VSup_flow, conVAV.VDis_flow); connect(TSup.T, TSupAHU.u); connect(TSupAHU.y, conVAV.TSup); connect(conAHU.TAirSupSet, TSupAHUSet.u); connect(TSupAHUSet.y, conVAV.TSupSet); connect(oveRid.y, conVAV.oveFloSet); connect(oveRid.y, conVAV.oveDamPos); connect(falSta.y, conVAV.uHeaOff); connect(conAHU.y1SupFan, booScaRep.u); connect(booScaRep.y, conVAV.u1Fan); connect(conVAV.VAdjPopBreZon_flow, sumZon.VAdjPopBreZon_flow); connect(conVAV.VAdjAreBreZon_flow, sumZon.VAdjAreBreZon_flow); connect(conVAV.VMinOA_flow, sumZon.VMinOA_flow); connect(VAVBox.VSup_flow, sumZon.VZonPri_flow); connect(conVAV.yVal, VAVBox.yHea); connect(conVAV.yDam, VAVBox.yVAV); connect(sumZon.VSumAdjPopBreZon_flow, conAHU.VSumAdjPopBreZon_flow); connect(sumZon.VSumAdjAreBreZon_flow, conAHU.VSumAdjAreBreZon_flow); connect(sumZon.VSumZonPri_flow, conAHU.VSumZonPri_flow); connect(sumZon.uOutAirFra_max, conAHU.uOutAirFra_max); connect(dpDisSupFan.p_rel, conAHU.dpDuc); connect(TOut.y, conAHU.TOut); connect(TMix.T, conAHU.TAirMix); connect(VOut1.V_flow, conAHU.VAirOut_flow); connect(TSup.T, conAHU.TAirSup); connect(conAHU.yHeaCoi, sysHysHea.u); connect(conAHU.yCooCoi, sysHysCoo.u); connect(conAHU.y1SupFan, sysHysHea.sysOn); connect(conAHU.y1SupFan, sysHysCoo.sysOn); connect(valHeaCoi.y_actual, conAHU.uHeaCoi_actual); connect(valCooCoi.y_actual, conAHU.uCooCoi_actual); connect(conAHU.yRetDam, damRet.y); connect(conAHU.yOutDam, damOut.y); connect(conAHU.ySupFan, fanSup.y); connect(hotWatPla.y, conVAV.u1HotPla); connect(conAHU.y1SupFan, conAHU.u1SupFan); connect(conVAV.yZonTemResReq, temResReq.u); connect(conVAV.yZonPreResReq, preRetReq.u); connect(preRetReq.y, conAHU.uZonPreResReq); connect(temResReq.y, conAHU.uZonTemResReq); connect(freSta.y, falEdg.u); connect(falEdg.y, conAHU.u1SofSwiRes); connect(opeModSel.yOpeMod, sumZon.uOpeMod[1]); connect(opeModSel.yOpeMod, ahuMod.uOpeMod[1]); connect(ahuMod.yAhuOpeMod, conAHU.uAhuOpeMod); connect(TUnoCooSet.y, groSta.TCooSetOff); connect(TUnoHeaSet.y, groSta.THeaSetOff); connect(truSta.y, groSta.u1Win); end Guideline36;

Buildings.Examples.VAVReheat.BaseClasses.HVACBuilding

Partial model that contains the HVAC and building model

Buildings.Examples.VAVReheat.BaseClasses.HVACBuilding

Information

Partial model that contains an HVAC system connected to a building with five conditioned thermal zones.

Parameters

TypeNameDefaultDescription
replaceable package MediumABuildings.Media.AirMedium model for air
replaceable package MediumWBuildings.Media.WaterMedium model for water
MassFlowRatemCor_flow_nominal Design mass flow rate core [kg/s]
MassFlowRatemSou_flow_nominal Design mass flow rate south [kg/s]
MassFlowRatemEas_flow_nominal Design mass flow rate east [kg/s]
MassFlowRatemNor_flow_nominal Design mass flow rate north [kg/s]
MassFlowRatemWes_flow_nominal Design mass flow rate west [kg/s]
TemperatureTHeaWatInl_nominal45 + 273.15Reheat coil nominal inlet water temperature [K]
PartialHVAChvacredeclare Buildings.Examples...HVAC system
PartialFloorfloredeclare Buildings.Examples...Building

Connectors

TypeNameDescription
replaceable package MediumAMedium model for air
replaceable package MediumWMedium model for water

Modelica definition

partial model HVACBuilding "Partial model that contains the HVAC and building model" replaceable package MediumA = Buildings.Media.Air "Medium model for air"; replaceable package MediumW = Buildings.Media.Water "Medium model for water"; final parameter Modelica.Units.SI.Volume VRooCor=flo.VRooCor "Room volume corridor"; final parameter Modelica.Units.SI.Volume VRooSou=flo.VRooSou "Room volume south"; final parameter Modelica.Units.SI.Volume VRooNor=flo.VRooNor "Room volume north"; final parameter Modelica.Units.SI.Volume VRooEas=flo.VRooEas "Room volume east"; final parameter Modelica.Units.SI.Volume VRooWes=flo.VRooWes "Room volume west"; final parameter Modelica.Units.SI.Area AFloCor=flo.AFloCor "Floor area corridor"; final parameter Modelica.Units.SI.Area AFloSou=flo.AFloSou "Floor area south"; final parameter Modelica.Units.SI.Area AFloNor=flo.AFloNor "Floor area north"; final parameter Modelica.Units.SI.Area AFloEas=flo.AFloEas "Floor area east"; final parameter Modelica.Units.SI.Area AFloWes=flo.AFloWes "Floor area west"; constant Real conv=1.2/3600 "Conversion factor for nominal mass flow rate"; parameter Modelica.Units.SI.MassFlowRate mCor_flow_nominal "Design mass flow rate core"; parameter Modelica.Units.SI.MassFlowRate mSou_flow_nominal "Design mass flow rate south"; parameter Modelica.Units.SI.MassFlowRate mEas_flow_nominal "Design mass flow rate east"; parameter Modelica.Units.SI.MassFlowRate mNor_flow_nominal "Design mass flow rate north"; parameter Modelica.Units.SI.MassFlowRate mWes_flow_nominal "Design mass flow rate west"; final parameter Modelica.Units.SI.MassFlowRate mCooVAV_flow_nominal[5]={ mSou_flow_nominal,mEas_flow_nominal,mNor_flow_nominal,mWes_flow_nominal, mCor_flow_nominal} "Design mass flow rate of each zone"; parameter Modelica.Units.SI.Temperature THeaWatInl_nominal(displayUnit="degC")= 45 + 273.15 "Reheat coil nominal inlet water temperature"; replaceable Buildings.Examples.VAVReheat.BaseClasses.PartialHVAC hvac constrainedby Buildings.Examples.VAVReheat.BaseClasses.PartialHVAC( redeclare final package MediumA = MediumA, redeclare final package MediumW = MediumW, final VRoo={VRooSou,VRooEas,VRooNor,VRooWes,VRooCor}, final AFlo={AFloSou,AFloEas,AFloNor,AFloWes,AFloCor}, final mCooVAV_flow_nominal=mCooVAV_flow_nominal, final THeaWatInl_nominal=THeaWatInl_nominal) "HVAC system"; replaceable Buildings.Examples.VAVReheat.BaseClasses.PartialFloor flo constrainedby Buildings.Examples.VAVReheat.BaseClasses.PartialFloor( redeclare final package Medium = MediumA) "Building"; Buildings.BoundaryConditions.WeatherData.ReaderTMY3 weaDat( filNam=Modelica.Utilities.Files.loadResource( "modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"), computeWetBulbTemperature=false) "Weather data reader"; Fluid.Sources.Boundary_pT sinHea( redeclare package Medium = MediumW, p=300000, T=THeaWatInl_nominal, nPorts=1) "Sink for heating coil"; Fluid.Sources.Boundary_pT souHea( redeclare package Medium = MediumW, p(displayUnit="Pa") = 300000 + 6000, T=THeaWatInl_nominal, nPorts=1) "Source for heating coil"; Fluid.Sources.Boundary_pT sinCoo( redeclare package Medium = MediumW, p=300000, T=279.15, nPorts=1) "Sink for cooling coil"; Fluid.Sources.Boundary_pT souCoo( redeclare package Medium = MediumW, p(displayUnit="Pa") = 300000 + 6000, T=279.15, nPorts=1) "Source for cooling coil loop"; Fluid.Sources.Boundary_pT souHeaTer( redeclare package Medium = MediumW, p(displayUnit="Pa") = 300000 + 6000, T=THeaWatInl_nominal, nPorts=1) "Source for heating of terminal boxes"; Fluid.Sources.Boundary_pT sinHeaTer( redeclare package Medium = MediumW, p(displayUnit="Pa") = 300000, T=THeaWatInl_nominal, nPorts=1) "Source for heating of terminal boxes"; equation connect(souHea.ports[1], hvac.portHeaCoiSup); connect(sinHea.ports[1], hvac.portHeaCoiRet); connect(hvac.portHeaTerSup, souHeaTer.ports[1]); connect(hvac.portHeaTerRet, sinHeaTer.ports[1]); connect(weaDat.weaBus, hvac.weaBus); connect(flo.TRooAir, hvac.TRoo); connect(hvac.port_supAir[1], flo.portsSou[1]); connect(hvac.port_supAir[2], flo.portsEas[1]); connect(hvac.port_supAir[3], flo.portsNor[1]); connect(hvac.port_supAir[4], flo.portsWes[1]); connect(hvac.port_supAir[5], flo.portsCor[1]); connect(hvac.port_retAir[1], flo.portsSou[2]); connect(hvac.port_retAir[2], flo.portsEas[2]); connect(hvac.port_retAir[3], flo.portsNor[2]); connect(hvac.port_retAir[4], flo.portsWes[2]); connect(hvac.port_retAir[5], flo.portsCor[2]); connect(weaDat.weaBus, flo.weaBus); connect(souCoo.ports[1], hvac.portCooCoiSup); connect(sinCoo.ports[1], hvac.portCooCoiRet); end HVACBuilding;

Buildings.Examples.VAVReheat.BaseClasses.PartialFloor Buildings.Examples.VAVReheat.BaseClasses.PartialFloor

Interface for a model of a floor of a building

Buildings.Examples.VAVReheat.BaseClasses.PartialFloor

Information

This is a partial model for one floor of the DOE reference office building.

Parameters

TypeNameDefaultDescription
replaceable package MediumModelica.Media.Interfaces.Pa...Medium model for air
Booleanuse_windPressuretrueSet to true to enable wind pressure
RealkIntNor1Gain factor to scale internal heat gain in north zone
VolumeVRooCor Room volume corridor [m3]
VolumeVRooSou Room volume south [m3]
VolumeVRooNor Room volume north [m3]
VolumeVRooEas Room volume east [m3]
VolumeVRooWes Room volume west [m3]
AreaAFloCor Floor area corridor [m2]
AreaAFloSou Floor area south [m2]
AreaAFloNor Floor area north [m2]
AreaAFloEas Floor area east [m2]
AreaAFloWes Floor area west [m2]

Connectors

TypeNameDescription
replaceable package MediumMedium model for air
VesselFluidPorts_bportsSou[2]Fluid inlets and outlets
VesselFluidPorts_bportsEas[2]Fluid inlets and outlets
VesselFluidPorts_bportsNor[2]Fluid inlets and outlets
VesselFluidPorts_bportsWes[2]Fluid inlets and outlets
VesselFluidPorts_bportsCor[2]Fluid inlets and outlets
output RealOutputTRooAir[5]Room air temperatures [K]
output RealOutputp_relRelative pressure signal of building static pressure
BusweaBusWeather bus

Modelica definition

partial model PartialFloor "Interface for a model of a floor of a building" replaceable package Medium = Modelica.Media.Interfaces.PartialMedium "Medium model for air"; parameter Boolean use_windPressure=true "Set to true to enable wind pressure"; parameter Real kIntNor(min=0, max=1) = 1 "Gain factor to scale internal heat gain in north zone"; parameter Modelica.Units.SI.Volume VRooCor "Room volume corridor"; parameter Modelica.Units.SI.Volume VRooSou "Room volume south"; parameter Modelica.Units.SI.Volume VRooNor "Room volume north"; parameter Modelica.Units.SI.Volume VRooEas "Room volume east"; parameter Modelica.Units.SI.Volume VRooWes "Room volume west"; parameter Modelica.Units.SI.Area AFloCor "Floor area corridor"; parameter Modelica.Units.SI.Area AFloSou "Floor area south"; parameter Modelica.Units.SI.Area AFloNor "Floor area north"; parameter Modelica.Units.SI.Area AFloEas "Floor area east"; parameter Modelica.Units.SI.Area AFloWes "Floor area west"; Modelica.Fluid.Vessels.BaseClasses.VesselFluidPorts_b portsSou[2]( redeclare package Medium = Medium) "Fluid inlets and outlets"; Modelica.Fluid.Vessels.BaseClasses.VesselFluidPorts_b portsEas[2]( redeclare package Medium = Medium) "Fluid inlets and outlets"; Modelica.Fluid.Vessels.BaseClasses.VesselFluidPorts_b portsNor[2]( redeclare package Medium = Medium) "Fluid inlets and outlets"; Modelica.Fluid.Vessels.BaseClasses.VesselFluidPorts_b portsWes[2]( redeclare package Medium = Medium) "Fluid inlets and outlets"; Modelica.Fluid.Vessels.BaseClasses.VesselFluidPorts_b portsCor[2]( redeclare package Medium = Medium) "Fluid inlets and outlets"; Modelica.Blocks.Interfaces.RealOutput TRooAir[5]( each unit="K", each displayUnit="degC") "Room air temperatures"; Modelica.Blocks.Interfaces.RealOutput p_rel "Relative pressure signal of building static pressure"; BoundaryConditions.WeatherData.Bus weaBus "Weather bus"; Buildings.Examples.VAVReheat.BaseClasses.RoomLeakage leaSou( redeclare package Medium = Medium, VRoo=VRooSou, s=49.91/33.27, azi=Buildings.Types.Azimuth.S, final use_windPressure=use_windPressure) "Model for air infiltration through the envelope"; Buildings.Examples.VAVReheat.BaseClasses.RoomLeakage leaEas( redeclare package Medium = Medium, VRoo=VRooEas, s=33.27/49.91, azi=Buildings.Types.Azimuth.E, final use_windPressure=use_windPressure) "Model for air infiltration through the envelope"; Buildings.Examples.VAVReheat.BaseClasses.RoomLeakage leaNor( redeclare package Medium = Medium, VRoo=VRooNor, s=49.91/33.27, azi=Buildings.Types.Azimuth.N, final use_windPressure=use_windPressure) "Model for air infiltration through the envelope"; Buildings.Examples.VAVReheat.BaseClasses.RoomLeakage leaWes( redeclare package Medium = Medium, VRoo=VRooWes, s=33.27/49.91, azi=Buildings.Types.Azimuth.W, final use_windPressure=use_windPressure) "Model for air infiltration through the envelope"; Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor temAirSou "Air temperature sensor"; Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor temAirEas "Air temperature sensor"; Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor temAirNor "Air temperature sensor"; Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor temAirWes "Air temperature sensor"; Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor temAirCor "Air temperature sensor"; Modelica.Blocks.Routing.Multiplex5 multiplex5_1; Airflow.Multizone.DoorOpen opeSouCor( redeclare package Medium = Medium, wOpe=10) "Opening between perimeter1 and core"; Airflow.Multizone.DoorOpen opeEasCor( redeclare package Medium = Medium, wOpe=10) "Opening between perimeter2 and core"; Airflow.Multizone.DoorOpen opeNorCor( redeclare package Medium = Medium, wOpe=10) "Opening between perimeter3 and core"; Airflow.Multizone.DoorOpen opeWesCor(redeclare package Medium = Medium, wOpe=10) "Opening between perimeter3 and core"; Buildings.Fluid.Sensors.RelativePressure senRelPre(redeclare package Medium = Medium) "Building pressure measurement"; Buildings.Fluid.Sources.Outside out(nPorts=1, redeclare package Medium = Medium); equation connect(weaBus, leaSou.weaBus); connect(weaBus, leaEas.weaBus); connect(weaBus, leaNor.weaBus); connect(weaBus, leaWes.weaBus); connect(out.weaBus, weaBus); connect(multiplex5_1.y, TRooAir); connect(temAirSou.T, multiplex5_1.u1[1]); connect(temAirEas.T, multiplex5_1.u2[1]); connect(temAirNor.T, multiplex5_1.u3[1]); connect(temAirWes.T, multiplex5_1.u4[1]); connect(temAirCor.T, multiplex5_1.u5[1]); connect(senRelPre.p_rel, p_rel); connect(out.ports[1], senRelPre.port_b); end PartialFloor;

Buildings.Examples.VAVReheat.BaseClasses.PartialHVAC Buildings.Examples.VAVReheat.BaseClasses.PartialHVAC

Partial model of variable air volume flow system with terminal reheat that serves five thermal zones

Buildings.Examples.VAVReheat.BaseClasses.PartialHVAC

Information

This partial model consist of an HVAC system that serves multiple thermal zones.

The 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 zone inlet branches. The figure below shows the schematic diagram of an HVAC system that supplies 5 zones:

image

The control sequences for this HVAC system are added in the two models that extend this model, namely Buildings.Examples.VAVReheat.ASHRAE2006 and Buildings.Examples.VAVReheat.Guideline36.

Parameters

TypeNameDefaultDescription
replaceable package MediumABuildings.Media.AirMedium model for air
replaceable package MediumWBuildings.Media.WaterMedium 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
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
replaceable package MediumAMedium model for air
replaceable package MediumWMedium model for water
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

partial model PartialHVAC "Partial model of variable air volume flow system with terminal reheat that serves five thermal zones" replaceable package MediumA = Buildings.Media.Air constrainedby Modelica.Media.Interfaces.PartialCondensingGases "Medium model for air"; replaceable package MediumW = Buildings.Media.Water "Medium model for water"; constant Integer numZon(min=2)=5 "Total number of served VAV boxes"; parameter Modelica.Units.SI.Volume VRoo[numZon] "Room volume per zone"; parameter Modelica.Units.SI.Area AFlo[numZon] "Floor area per zone"; final parameter Modelica.Units.SI.Area ATot=sum(AFlo) "Total floor area for all zone"; constant Real conv=1.2/3600 "Conversion factor for nominal mass flow rate"; parameter Modelica.Units.SI.HeatFlowRate QHeaAHU_flow_nominal(min=0) = mHeaAir_flow_nominal * cpAir * (THeaAirSup_nominal-THeaAirMix_nominal) "Nominal heating heat flow rate of air handler unit coil"; parameter Modelica.Units.SI.HeatFlowRate QCooAHU_flow_nominal(max=0) = 1.3 * mCooAir_flow_nominal * cpAir *(TCooAirSup_nominal-TCooAirMix_nominal) "Nominal total cooling heat flow rate of air handler unit coil (negative number)"; parameter Modelica.Units.SI.MassFlowRate mCooVAV_flow_nominal[numZon] "Design mass flow rate per zone for cooling"; parameter Modelica.Units.SI.MassFlowRate mHeaVAV_flow_nominal[numZon] = 0.3*mCooVAV_flow_nominal "Design mass flow rate per zone for heating"; parameter Modelica.Units.SI.MassFlowRate mAir_flow_nominal=mCooAir_flow_nominal "Nominal mass flow rate for fan"; parameter Modelica.Units.SI.MassFlowRate mCooAir_flow_nominal=0.7*sum(mCooVAV_flow_nominal) "Nominal mass flow rate for fan"; parameter Modelica.Units.SI.MassFlowRate mHeaAir_flow_nominal = 0.7*sum(mHeaVAV_flow_nominal) "Nominal mass flow rate for fan"; parameter Modelica.Units.SI.MassFlowRate mHeaWat_flow_nominal= QHeaAHU_flow_nominal/cpWat/10 "Nominal water mass flow rate for heating coil in AHU"; parameter Modelica.Units.SI.MassFlowRate mCooWat_flow_nominal= QCooAHU_flow_nominal/cpWat/(-6) "Nominal water mass flow rate for cooling coil"; parameter Real ratOAFlo_A(final unit="m3/(s.m2)") = 0.3e-3 "Outdoor airflow rate required per unit area"; parameter Real ratOAFlo_P = 2.5e-3 "Outdoor airflow rate required per person"; parameter Real ratP_A = 5e-2 "Occupant density"; parameter Real effZ(final unit="1") = 0.8 "Zone air distribution effectiveness (limiting value)"; parameter Real divP(final unit="1") = 0.7 "Occupant diversity ratio"; parameter Modelica.Units.SI.VolumeFlowRate VZonOA_flow_nominal[numZon]=( ratOAFlo_P*ratP_A + ratOAFlo_A)*AFlo/effZ "Zone outdoor air flow rate of each VAV box"; parameter Modelica.Units.SI.VolumeFlowRate Vou_flow_nominal=(divP*ratOAFlo_P* ratP_A + ratOAFlo_A)*sum(AFlo) "System uncorrected outdoor air flow rate"; parameter Real effVen(final unit="1") = if divP < 0.6 then 0.88 * divP + 0.22 else 0.75 "System ventilation efficiency"; parameter Modelica.Units.SI.VolumeFlowRate Vot_flow_nominal=Vou_flow_nominal/ effVen "System design outdoor air flow rate"; parameter Modelica.Units.SI.Temperature THeaOn=293.15 "Heating setpoint during on"; parameter Modelica.Units.SI.Temperature THeaOff=285.15 "Heating setpoint during off"; parameter Modelica.Units.SI.Temperature TCooOn=297.15 "Cooling setpoint during on"; parameter Modelica.Units.SI.Temperature TCooOff=303.15 "Cooling setpoint during off"; parameter Modelica.Units.SI.PressureDifference dpBuiStaSet(min=0) = 12 "Building static pressure"; parameter Real yFanMin = 0.1 "Minimum fan speed"; parameter Modelica.Units.SI.Temperature TCooAirMix_nominal(displayUnit="degC")=303.15 "Mixed air temperature during cooling nominal conditions (used to size cooling coil)"; parameter Modelica.Units.SI.Temperature TCooAirSup_nominal(displayUnit="degC")=285.15 "Supply air temperature during cooling nominal conditions (used to size cooling coil)"; parameter Modelica.Units.SI.MassFraction wCooAirMix_nominal = 0.017 "Humidity ratio of mixed air at a nominal conditions used to size cooling coil (in kg/kg dry total)"; parameter Modelica.Units.SI.Temperature TCooWatInl_nominal(displayUnit="degC") = 279.15 "Cooling coil nominal inlet water temperature"; parameter Modelica.Units.SI.Temperature THeaAirMix_nominal(displayUnit="degC")=277.15 "Mixed air temperature during heating nominal conditions (used to size heating coil)"; parameter Modelica.Units.SI.Temperature THeaAirSup_nominal(displayUnit="degC")=285.15 "Supply air temperature during heating nominal conditions (used to size heating coil)"; parameter Modelica.Units.SI.Temperature THeaWatInl_nominal(displayUnit="degC") "Reheat coil nominal inlet water temperature"; parameter Boolean allowFlowReversal=true "= false to simplify equations, assuming, but not enforcing, no flow reversal"; Modelica.Fluid.Interfaces.FluidPort_a port_supAir[numZon](redeclare package Medium = MediumA) "Supply air to thermal zones"; Modelica.Fluid.Interfaces.FluidPort_a port_retAir[numZon](redeclare package Medium = MediumA) "Return air from thermal zones"; Modelica.Blocks.Interfaces.RealInput TRoo[numZon]( each final unit="K", each displayUnit="degC") "Room temperatures"; Buildings.Fluid.Sources.Outside amb( redeclare package Medium = MediumA, nPorts=2) "Ambient conditions"; Buildings.Fluid.HeatExchangers.DryCoilEffectivenessNTU heaCoi( redeclare package Medium1 = MediumW, redeclare package Medium2 = MediumA, Q_flow_nominal=QHeaAHU_flow_nominal, m1_flow_nominal=mHeaWat_flow_nominal, m2_flow_nominal=mHeaAir_flow_nominal, show_T=true, configuration=Buildings.Fluid.Types.HeatExchangerConfiguration.CounterFlow, dp1_nominal=3000, dp2_nominal=0, allowFlowReversal1=false, allowFlowReversal2=allowFlowReversal, T_a1_nominal=THeaWatInl_nominal, T_a2_nominal=THeaAirMix_nominal) "Heating coil"; Fluid.HeatExchangers.WetCoilEffectivenessNTU cooCoi( redeclare package Medium1 = MediumW, redeclare package Medium2 = MediumA, use_Q_flow_nominal=true, Q_flow_nominal=QCooAHU_flow_nominal, m1_flow_nominal=mCooWat_flow_nominal, m2_flow_nominal=mCooAir_flow_nominal, dp2_nominal=0, dp1_nominal=3000, T_a1_nominal=TCooWatInl_nominal, T_a2_nominal=TCooAirMix_nominal, w_a2_nominal=wCooAirMix_nominal, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, allowFlowReversal1=false, allowFlowReversal2=allowFlowReversal, show_T=true) "Cooling coil"; Buildings.Fluid.FixedResistances.PressureDrop dpRetDuc( m_flow_nominal=mAir_flow_nominal, redeclare package Medium = MediumA, allowFlowReversal=allowFlowReversal, dp_nominal=40) "Pressure drop for return duct"; Buildings.Fluid.Movers.Preconfigured.SpeedControlled_y fanSup( redeclare package Medium = MediumA, m_flow_nominal=mAir_flow_nominal, dp_nominal=780 + 10 + dpBuiStaSet, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) "Supply air fan"; Buildings.Fluid.Sensors.VolumeFlowRate senSupFlo(redeclare package Medium = MediumA, m_flow_nominal=mAir_flow_nominal) "Sensor for supply fan flow rate"; Buildings.Fluid.Sensors.VolumeFlowRate senRetFlo(redeclare package Medium = MediumA, m_flow_nominal=mAir_flow_nominal) "Sensor for return fan flow rate"; Modelica.Blocks.Routing.RealPassThrough TOut(y( final quantity="ThermodynamicTemperature", final unit="K", displayUnit="degC", min=0)); Buildings.Fluid.Sensors.TemperatureTwoPort TSup( redeclare package Medium = MediumA, m_flow_nominal=mAir_flow_nominal, allowFlowReversal=allowFlowReversal); Buildings.Fluid.Sensors.RelativePressure dpDisSupFan(redeclare package Medium = MediumA) "Supply fan static discharge pressure"; Buildings.Controls.SetPoints.OccupancySchedule occSch(occupancy=3600*{6,19}) "Occupancy schedule"; Buildings.Fluid.Sensors.TemperatureTwoPort TRet( redeclare package Medium = MediumA, m_flow_nominal=mAir_flow_nominal, allowFlowReversal=allowFlowReversal) "Return air temperature sensor"; Buildings.Fluid.Sensors.TemperatureTwoPort TMix( redeclare package Medium = MediumA, m_flow_nominal=mAir_flow_nominal, allowFlowReversal=allowFlowReversal, transferHeat=true) "Mixed air temperature sensor"; Buildings.Fluid.Sensors.VolumeFlowRate VOut1(redeclare package Medium = MediumA, m_flow_nominal=mAir_flow_nominal) "Outside air volume flow rate"; BoundaryConditions.WeatherData.Bus weaBus "Weather data bus"; Results res( final A=ATot, PFan=fanSup.P + 0, PPum=pumHeaCoi.P + pumCooCoi.P, PHea=heaCoi.Q2_flow + sum(VAVBox.terHea.Q2_flow), PCooSen=cooCoi.QSen2_flow, PCooLat=cooCoi.QLat2_flow) "Results of the simulation"; Fluid.Actuators.Dampers.Exponential damRet( redeclare package Medium = MediumA, m_flow_nominal=mAir_flow_nominal, from_dp=false, riseTime=15, dpDamper_nominal=5, dpFixed_nominal=5) "Return air damper"; Fluid.Actuators.Dampers.Exponential damOut( redeclare package Medium = MediumA, m_flow_nominal=mAir_flow_nominal, from_dp=false, riseTime=15, dpDamper_nominal=5, dpFixed_nominal=5) "Outdoor air damper"; Fluid.FixedResistances.Junction splCooSup( redeclare package Medium = MediumW, m_flow_nominal=mCooWat_flow_nominal*{1,1,1}, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, dp_nominal(each displayUnit="Pa") = {0,0,0}, portFlowDirection_1=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Entering, portFlowDirection_2=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Leaving, portFlowDirection_3=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Leaving) "Flow splitter"; Fluid.Actuators.Valves.TwoWayEqualPercentage valCooCoi( redeclare package Medium = MediumW, m_flow_nominal=mCooWat_flow_nominal, dpValve_nominal=6000, dpFixed_nominal=0) "Valve for cooling coil"; Fluid.FixedResistances.Junction splCooRet( redeclare package Medium = MediumW, m_flow_nominal=mCooWat_flow_nominal*{1,1,1}, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, dp_nominal(each displayUnit="Pa") = {0,0,0}, portFlowDirection_1=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Entering, portFlowDirection_2=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Leaving, portFlowDirection_3=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Leaving) "Flow splitter"; Fluid.Movers.Preconfigured.SpeedControlled_y pumCooCoi( redeclare package Medium = MediumW, m_flow_nominal=mCooWat_flow_nominal, dp_nominal=3000, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) "Supply air fan"; Fluid.Movers.Preconfigured.SpeedControlled_y pumHeaCoi( redeclare package Medium = MediumW, m_flow_nominal=mHeaWat_flow_nominal, dp_nominal=3000, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) "Pump for heating coil"; Fluid.Actuators.Valves.TwoWayEqualPercentage valHeaCoi( redeclare package Medium = MediumW, m_flow_nominal=mHeaWat_flow_nominal, dpValve_nominal=6000, dpFixed_nominal=0) "Valve for heating coil"; Fluid.FixedResistances.Junction splHeaRet( redeclare package Medium = MediumW, m_flow_nominal=mHeaWat_flow_nominal*{1,1,1}, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, dp_nominal(each displayUnit="Pa") = {0,0,0}, portFlowDirection_1=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Entering, portFlowDirection_2=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Leaving, portFlowDirection_3=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Leaving) "Flow splitter"; Fluid.FixedResistances.Junction splHeaSup( redeclare package Medium = MediumW, m_flow_nominal=mHeaWat_flow_nominal*{1,1,1}, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, dp_nominal(each displayUnit="Pa") = {0,0,0}, portFlowDirection_1=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Entering, portFlowDirection_2=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Leaving, portFlowDirection_3=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Leaving) "Flow splitter"; Modelica.Fluid.Interfaces.FluidPort_a portHeaCoiSup(redeclare package Medium = MediumW) "Heating coil loop supply"; Modelica.Fluid.Interfaces.FluidPort_b portHeaCoiRet(redeclare package Medium = MediumW) "Heating coil loop return"; Modelica.Fluid.Interfaces.FluidPort_a portHeaTerSup(redeclare package Medium = MediumW) "Terminal heat loop supply"; Modelica.Fluid.Interfaces.FluidPort_b portHeaTerRet(redeclare package Medium = MediumW) "Terminal heat loop return"; Modelica.Fluid.Interfaces.FluidPort_a portCooCoiSup(redeclare package Medium = MediumW) "Cooling coil loop supply"; Modelica.Fluid.Interfaces.FluidPort_b portCooCoiRet(redeclare package Medium = MediumW) "Coolin coil loop return"; Buildings.Examples.VAVReheat.BaseClasses.VAVReheatBox VAVBox[numZon]( redeclare each package MediumA = MediumA, redeclare each package MediumW = MediumW, mCooAir_flow_nominal=mCooVAV_flow_nominal, mHeaAir_flow_nominal=mHeaVAV_flow_nominal, VRoo=VRoo, each allowFlowReversal=allowFlowReversal, each THeaWatInl_nominal=THeaWatInl_nominal, each THeaWatOut_nominal=THeaWatInl_nominal - 10, each THeaAirInl_nominal=285.15, each THeaAirDis_nominal=301.15) "VAV boxes"; Buildings.Fluid.FixedResistances.Junction splRetRoo[numZon - 1]( redeclare each package Medium = MediumA, each from_dp=false, each linearized=true, m_flow_nominal={{sum(mCooVAV_flow_nominal[i:numZon]),sum( mCooVAV_flow_nominal[(i + 1):numZon]),mCooVAV_flow_nominal[i]} for i in 1:(numZon - 1)}, each energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, each dp_nominal(each displayUnit="Pa") = {0,0,0}, each portFlowDirection_1=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Leaving, each portFlowDirection_2=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Entering, each portFlowDirection_3=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Entering) "Splitter for room return air"; Buildings.Fluid.FixedResistances.Junction splSupRoo[numZon - 1]( redeclare each package Medium = MediumA, each from_dp=true, each linearized=true, m_flow_nominal={{sum(mCooVAV_flow_nominal[i:numZon]),sum( mCooVAV_flow_nominal[(i + 1):numZon]),mCooVAV_flow_nominal[i]} for i in 1:(numZon - 1)}, each energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, each dp_nominal(each displayUnit="Pa") = {0,0,0}, each portFlowDirection_1=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Entering, each portFlowDirection_2=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Leaving, each portFlowDirection_3=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Leaving) "Splitter for room supply air"; Fluid.FixedResistances.PressureDrop dpSupDuc( m_flow_nominal=mAir_flow_nominal, redeclare package Medium = MediumA, allowFlowReversal=allowFlowReversal, dp_nominal=200 + 200 + 100 + 40) "Pressure drop for supply duct"; Fluid.FixedResistances.Junction splRetOut( redeclare package Medium = MediumA, tau=15, m_flow_nominal=mAir_flow_nominal*{1,1,1}, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, dp_nominal(each displayUnit="Pa") = {0,0,0}, portFlowDirection_1=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Entering, portFlowDirection_2=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Leaving, portFlowDirection_3=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Entering, linearized=true) "Flow splitter"; protected constant Modelica.Units.SI.SpecificHeatCapacity cpAir=Buildings.Utilities.Psychrometrics.Constants.cpAir "Air specific heat capacity"; constant Modelica.Units.SI.SpecificHeatCapacity cpWat=Buildings.Utilities.Psychrometrics.Constants.cpWatLiq "Water specific heat capacity"; model Results "Model to store the results of the simulation" parameter Modelica.Units.SI.Area A "Floor area"; input Modelica.Units.SI.Power PFan "Fan energy"; input Modelica.Units.SI.Power PPum "Pump energy"; input Modelica.Units.SI.Power PHea "Heating energy"; input Modelica.Units.SI.Power PCooSen "Sensible cooling energy"; input Modelica.Units.SI.Power PCooLat "Latent cooling energy"; Real EFan( unit="J/m2", start=0, nominal=1E5, fixed=true) "Fan energy"; Real EPum( unit="J/m2", start=0, nominal=1E5, fixed=true) "Pump energy"; Real EHea( unit="J/m2", start=0, nominal=1E5, fixed=true) "Heating energy"; Real ECooSen( unit="J/m2", start=0, nominal=1E5, fixed=true) "Sensible cooling energy"; Real ECooLat( unit="J/m2", start=0, nominal=1E5, fixed=true) "Latent cooling energy"; Real ECoo(unit="J/m2") "Total cooling energy"; equation A*der(EFan) = PFan; A*der(EPum) = PPum; A*der(EHea) = PHea; A*der(ECooSen) = PCooSen; A*der(ECooLat) = PCooLat; ECoo = ECooSen + ECooLat; end Results; equation connect(fanSup.port_b, dpDisSupFan.port_a); connect(TSup.port_a, fanSup.port_b); connect(amb.ports[1], VOut1.port_a); connect(weaBus.TDryBul, TOut.u); connect(amb.weaBus, weaBus); connect(senRetFlo.port_a, dpRetDuc.port_b); connect(TSup.port_b, senSupFlo.port_a); connect(dpDisSupFan.port_b, amb.ports[2]); connect(senRetFlo.port_b, TRet.port_a); connect(TMix.port_b, heaCoi.port_a2); connect(heaCoi.port_b2, cooCoi.port_a2); connect(VOut1.port_b, damOut.port_a); connect(damRet.port_a, TRet.port_b); connect(pumHeaCoi.port_b, heaCoi.port_a1); connect(cooCoi.port_b1,pumCooCoi. port_a); connect(splCooSup.port_2, cooCoi.port_a1); connect(splCooRet.port_3,splCooSup. port_3); connect(pumCooCoi.port_b, splCooRet.port_2); connect(splHeaSup.port_2, pumHeaCoi.port_a); connect(heaCoi.port_b1, splHeaRet.port_2); connect(splHeaRet.port_3, splHeaSup.port_3); connect(splHeaSup.port_1, valHeaCoi.port_b); connect(splCooSup.port_1, valCooCoi.port_b); connect(portHeaCoiSup, valHeaCoi.port_a); connect(portHeaCoiRet, splHeaRet.port_1); connect(portCooCoiSup, valCooCoi.port_a); connect(portCooCoiRet, splCooRet.port_1); connect(VAVBox.port_bAir, port_supAir); for i in 1:numZon loop connect(VAVBox[i].port_aHeaWat, portHeaTerSup); connect(VAVBox[i].port_bHeaWat, portHeaTerRet); end for; connect(splSupRoo[1].port_1, senSupFlo.port_b); connect(splRetRoo[1].port_1, dpRetDuc.port_a); connect(splSupRoo.port_3, VAVBox[1:(numZon-1)].port_aAir); connect(splRetRoo.port_3, port_retAir[1:(numZon-1)]); for i in 1:(numZon - 2) loop connect(splSupRoo[i].port_2, splSupRoo[i+1].port_1); connect(splRetRoo[i].port_2, splRetRoo[i+1].port_1); end for; connect(splSupRoo[numZon-1].port_2, VAVBox[numZon].port_aAir); connect(splRetRoo[numZon-1].port_2, port_retAir[numZon]); connect(cooCoi.port_b2, dpSupDuc.port_a); connect(dpSupDuc.port_b, fanSup.port_a); connect(damOut.port_b, splRetOut.port_1); connect(splRetOut.port_2, TMix.port_a); connect(damRet.port_b, splRetOut.port_3); end PartialHVAC;

Buildings.Examples.VAVReheat.BaseClasses.RoomLeakage Buildings.Examples.VAVReheat.BaseClasses.RoomLeakage

Room leakage model

Buildings.Examples.VAVReheat.BaseClasses.RoomLeakage

Information

Room leakage.

Extends from Buildings.BaseClasses.BaseIcon (Base icon).

Parameters

TypeNameDefaultDescription
replaceable package MediumModelica.Media.Interfaces.Pa...Medium in the component
VolumeVRoo Room volume [m3]
Booleanuse_windPressurefalseSet to true to enable wind pressure
Reals Side ratio, s=length of this wall/length of adjacent wall
Angleazi Surface azimuth (South:0, West:pi/2) [rad]

Connectors

TypeNameDescription
replaceable package MediumMedium in the component
FluidPort_bport_b 
BusweaBusBus with weather data

Modelica definition

model RoomLeakage "Room leakage model" extends Buildings.BaseClasses.BaseIcon; replaceable package Medium = Modelica.Media.Interfaces.PartialMedium "Medium in the component"; parameter Modelica.Units.SI.Volume VRoo "Room volume"; parameter Boolean use_windPressure=false "Set to true to enable wind pressure"; Buildings.Fluid.FixedResistances.PressureDrop res( redeclare package Medium = Medium, dp_nominal=50, m_flow_nominal=VRoo*1.2/3600) "Resistance model"; Modelica.Fluid.Interfaces.FluidPort_b port_b(redeclare package Medium = Medium); Buildings.Fluid.Sources.Outside_CpLowRise amb(redeclare package Medium = Medium, nPorts=1, s=s, azi=azi, Cp0=if use_windPressure then 0.6 else 0); BoundaryConditions.WeatherData.Bus weaBus "Bus with weather data"; Buildings.Fluid.Sensors.MassFlowRate senMasFlo1(redeclare package Medium = Medium, allowFlowReversal=true) "Sensor for mass flow rate"; Modelica.Blocks.Math.Gain ACHInf(k=1/VRoo/1.2*3600, y(unit="1/h")) "Air change per hour due to infiltration"; parameter Real s "Side ratio, s=length of this wall/length of adjacent wall"; parameter Modelica.Units.SI.Angle azi "Surface azimuth (South:0, West:pi/2)"; equation connect(res.port_b, port_b); connect(amb.weaBus, weaBus); connect(amb.ports[1], senMasFlo1.port_a); connect(senMasFlo1.port_b, res.port_a); connect(senMasFlo1.m_flow, ACHInf.u); end RoomLeakage;

Buildings.Examples.VAVReheat.BaseClasses.VAVReheatBox Buildings.Examples.VAVReheat.BaseClasses.VAVReheatBox

Supply box of a VAV system with a hot water reheat coil

Buildings.Examples.VAVReheat.BaseClasses.VAVReheatBox

Information

Model for a VAV terminal box with a water reheat coil and exponential damper.

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
MassFlowRatemCooAir_flow_nominal Nominal air mass flow rate from cooling sizing calculations [kg/s]
MassFlowRatemHeaAir_flow_nominal Nominal air mass flow rate from heating sizing calculations [kg/s]
VolumeVRoo Room volume [m3]
TemperatureTHeaWatInl_nominal Reheat coil nominal inlet water temperature [K]
TemperatureTHeaWatOut_nominal Reheat coil nominal outlet water temperature [K]
TemperatureTHeaAirInl_nominal Inlet air nominal temperature into VAV box during heating [K]
TemperatureTHeaAirDis_nominal Discharge air temperature from VAV box during heating [K]
HeatFlowRateQHea_flow_nominalmHeaAir_flow_nominal*cpAir*(...Nominal heating heat flow rate [W]

Connectors

TypeNameDescription
replaceable package MediumAMedium model for air
replaceable package MediumWMedium model for water
FluidPort_aport_aAirFluid connector a1 (positive design flow direction is from port_a1 to port_b1)
FluidPort_aport_bAirFluid connector b (positive design flow direction is from port_a1 to port_b1)
input RealInputyVAVSignal for VAV damper [1]
output RealOutputy_actualActual VAV damper position [1]
output RealOutputyVal_actualActual valve position [1]
FluidPort_aport_aHeaWatHot water inlet port
FluidPort_bport_bHeaWatHot water outlet port
output RealOutputTSupSupply Air Temperature [K]
output RealOutputVSup_flowSupply Air Volumetric Flow Rate [m3/s]
input RealInputyHeaActuator position for heating valve (0: closed, 1: open)

Modelica definition

model VAVReheatBox "Supply box of a VAV system with a hot water reheat coil" 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 mCooAir_flow_nominal "Nominal air mass flow rate from cooling sizing calculations"; parameter Modelica.Units.SI.MassFlowRate mHeaAir_flow_nominal "Nominal air mass flow rate from heating sizing calculations"; final parameter Modelica.Units.SI.MassFlowRate mHeaWat_flow_nominal= QHea_flow_nominal/(cpWatLiq*(THeaWatInl_nominal - THeaWatOut_nominal)) "Nominal mass flow rate of hot water to reheat coil"; parameter Modelica.Units.SI.Volume VRoo "Room volume"; parameter Modelica.Units.SI.Temperature THeaWatInl_nominal(start=55 + 273.15, displayUnit="degC") "Reheat coil nominal inlet water temperature"; parameter Modelica.Units.SI.Temperature THeaWatOut_nominal(start= THeaWatInl_nominal - 10, displayUnit="degC") "Reheat coil nominal outlet water temperature"; parameter Modelica.Units.SI.Temperature THeaAirInl_nominal(start=12 + 273.15, displayUnit="degC") "Inlet air nominal temperature into VAV box during heating"; parameter Modelica.Units.SI.Temperature THeaAirDis_nominal(start=28 + 273.15, displayUnit="degC") "Discharge air temperature from VAV box during heating"; parameter Modelica.Units.SI.HeatFlowRate QHea_flow_nominal= mHeaAir_flow_nominal * cpAir * (THeaAirDis_nominal-THeaAirInl_nominal) "Nominal heating heat flow rate"; Modelica.Fluid.Interfaces.FluidPort_a port_aAir( redeclare package Medium=MediumA) "Fluid connector a1 (positive design flow direction is from port_a1 to port_b1)"; Modelica.Fluid.Interfaces.FluidPort_a port_bAir( redeclare package Medium=MediumA) "Fluid connector b (positive design flow direction is from port_a1 to port_b1)"; Modelica.Blocks.Interfaces.RealInput yVAV(final unit="1") "Signal for VAV damper"; Modelica.Blocks.Interfaces.RealOutput y_actual(final unit="1") "Actual VAV damper position"; Modelica.Blocks.Interfaces.RealOutput yVal_actual(final unit="1") "Actual valve position"; Modelica.Fluid.Interfaces.FluidPort_a port_aHeaWat(redeclare package Medium = MediumW) "Hot water inlet port"; Modelica.Fluid.Interfaces.FluidPort_b port_bHeaWat(redeclare package Medium = MediumW) "Hot water outlet port"; Modelica.Blocks.Interfaces.RealOutput TSup( final unit = "K", displayUnit = "degC") "Supply Air Temperature"; Modelica.Blocks.Interfaces.RealOutput VSup_flow( final unit="m3/s") "Supply Air Volumetric Flow Rate"; Buildings.Fluid.Actuators.Dampers.Exponential vav( redeclare package Medium = MediumA, m_flow_nominal=mCooAir_flow_nominal, dpDamper_nominal=20, allowFlowReversal=allowFlowReversal, dpFixed_nominal=130) "VAV box for room"; Buildings.Fluid.HeatExchangers.DryCoilEffectivenessNTU terHea( redeclare package Medium1 = MediumW, redeclare package Medium2 = MediumA, m1_flow_nominal=mHeaWat_flow_nominal, m2_flow_nominal=mHeaAir_flow_nominal, Q_flow_nominal=QHea_flow_nominal, configuration=Buildings.Fluid.Types.HeatExchangerConfiguration.CounterFlow, dp1_nominal=0, from_dp2=true, dp2_nominal=0, allowFlowReversal1=false, allowFlowReversal2=allowFlowReversal, T_a1_nominal=THeaWatInl_nominal, T_a2_nominal=THeaAirInl_nominal) "Reheat coil"; Fluid.Sensors.TemperatureTwoPort senTem( redeclare package Medium = MediumA, initType=Modelica.Blocks.Types.Init.InitialState, m_flow_nominal=mCooAir_flow_nominal, allowFlowReversal=allowFlowReversal) "Supply air temperature sensor"; Fluid.Sensors.VolumeFlowRate senVolFlo( redeclare package Medium = MediumA, initType=Modelica.Blocks.Types.Init.InitialState, m_flow_nominal=mCooAir_flow_nominal, allowFlowReversal=allowFlowReversal) "Supply air volumetric flow rate sensor"; Fluid.Actuators.Valves.TwoWayEqualPercentage val( redeclare package Medium = MediumW, allowFlowReversal=false, m_flow_nominal=mHeaWat_flow_nominal, from_dp=true, dpValve_nominal=3000, use_inputFilter=false, dpFixed_nominal=3000) "Valve for terminal heater"; Modelica.Blocks.Interfaces.RealInput yHea "Actuator position for heating valve (0: closed, 1: open)"; Real ACH(unit="1/h") = VSup_flow/VRoo*3600 "Air changes per hour"; protected constant Modelica.Units.SI.SpecificHeatCapacity cpAir=Buildings.Utilities.Psychrometrics.Constants.cpAir "Air specific heat capacity"; constant Modelica.Units.SI.SpecificHeatCapacity cpWatLiq=Buildings.Utilities.Psychrometrics.Constants.cpWatLiq "Water specific heat capacity"; equation connect(vav.y, yVAV); connect(vav.y_actual, y_actual); connect(port_aAir, terHea.port_a2); connect(vav.port_a, terHea.port_b2); connect(port_bHeaWat, terHea.port_b1); connect(vav.port_b, senTem.port_a); connect(senTem.port_b, senVolFlo.port_a); connect(senVolFlo.port_b, port_bAir); connect(senVolFlo.V_flow, VSup_flow); connect(senTem.T, TSup); connect(port_aHeaWat, val.port_a); connect(val.port_b, terHea.port_a1); connect(yHea, val.y); connect(val.y_actual, yVal_actual); end VAVReheatBox;

Buildings.Examples.VAVReheat.BaseClasses.PartialHVAC.Results

Model to store the results of the simulation

Parameters

TypeNameDefaultDescription
AreaA Floor area [m2]

Modelica definition

model Results "Model to store the results of the simulation" parameter Modelica.Units.SI.Area A "Floor area"; input Modelica.Units.SI.Power PFan "Fan energy"; input Modelica.Units.SI.Power PPum "Pump energy"; input Modelica.Units.SI.Power PHea "Heating energy"; input Modelica.Units.SI.Power PCooSen "Sensible cooling energy"; input Modelica.Units.SI.Power PCooLat "Latent cooling energy"; Real EFan( unit="J/m2", start=0, nominal=1E5, fixed=true) "Fan energy"; Real EPum( unit="J/m2", start=0, nominal=1E5, fixed=true) "Pump energy"; Real EHea( unit="J/m2", start=0, nominal=1E5, fixed=true) "Heating energy"; Real ECooSen( unit="J/m2", start=0, nominal=1E5, fixed=true) "Sensible cooling energy"; Real ECooLat( unit="J/m2", start=0, nominal=1E5, fixed=true) "Latent cooling energy"; Real ECoo(unit="J/m2") "Total cooling energy"; equation A*der(EFan) = PFan; A*der(EPum) = PPum; A*der(EHea) = PHea; A*der(ECooSen) = PCooSen; A*der(ECooLat) = PCooLat; ECoo = ECooSen + ECooLat; end Results;