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.MixingBox MixingBox Outside air mixing box with non-interlocked air dampers
Buildings.Examples.VAVReheat.BaseClasses.PartialOpenLoop PartialOpenLoop Partial model of variable air volume flow system with terminal reheat and five thermal zones

Buildings.Examples.VAVReheat.BaseClasses.MixingBox Buildings.Examples.VAVReheat.BaseClasses.MixingBox

Outside air mixing box with non-interlocked air dampers

Buildings.Examples.VAVReheat.BaseClasses.MixingBox

Information

Model of an outside air mixing box with air dampers. Set y=0 to close the outside air and exhast air dampers.

If dp_nominalIncludesDamper=true, then the parameter dp_nominal is equal to the pressure drop of the damper plus the fixed flow resistance at the nominal flow rate. If dp_nominalIncludesDamper=false, then dp_nominal does not include the flow resistance of the air damper.

Parameters

TypeNameDefaultDescription
replaceable package MediumModelica.Media.Interfaces.Pa...Medium in the component
Booleanuse_deltaMtrueSet to true to use deltaM for turbulent transition, else ReC is used
RealdeltaM0.3Fraction of nominal mass flow rate where transition to turbulent occurs
Velocityv_nominal1Nominal face velocity [m/s]
BooleanroundDuctfalseSet to true for round duct, false for square cross section
RealReC4000Reynolds number where transition to turbulent starts
Nominal condition
Booleandp_nominalIncludesDamperfalseset to true if dp_nominal includes the pressure loss of the open damper
MassFlowRatemOut_flow_nominal Mass flow rate outside air damper [kg/s]
PressureDifferencedpOut_nominal Pressure drop outside air leg [Pa]
MassFlowRatemRec_flow_nominal Mass flow rate recirculation air damper [kg/s]
PressureDifferencedpRec_nominal Pressure drop recirculation air leg [Pa]
MassFlowRatemExh_flow_nominal Mass flow rate exhaust air damper [kg/s]
PressureDifferencedpExh_nominal Pressure drop exhaust air leg [Pa]
Assumptions
BooleanallowFlowReversaltrue= false to simplify equations, assuming, but not enforcing, no flow reversal
Advanced
Booleanfrom_dptrue= true, use m_flow = f(dp) else dp = f(m_flow)
Booleanlinearizedfalse= true, use linear relation between m_flow and dp for any flow rate
Booleanuse_constant_densitytrueSet to true to use constant density for flow friction
Damper coefficients
Reala-1.51Coefficient a for damper characteristics
Realb0.105*90Coefficient b for damper characteristics
RealyL15/90Lower value for damper curve
RealyU55/90Upper value for damper curve
Realk01E6Flow coefficient for y=0, k0 = pressure drop divided by dynamic pressure
Realk10.45Flow coefficient for y=1, k1 = pressure drop divided by dynamic pressure
Dynamics
Filtered opening
TimeriseTime15Rise time of the filter (time to reach 99.6 % of an opening step) [s]
InitinitModelica.Blocks.Types.Init.I...Type of initialization (no init/steady state/initial state/initial output)
Realy_start1Initial value of output

Connectors

TypeNameDescription
replaceable package MediumMedium in the component
input RealInputyRetReturn damper position (0: closed, 1: open) [1]
input RealInputyOutOutdoor air damper signal (0: closed, 1: open) [1]
input RealInputyExhExhaust air damper signal (0: closed, 1: open) [1]
FluidPort_aport_OutFluid connector a (positive design flow direction is from port_a to port_b)
FluidPort_bport_ExhFluid connector b (positive design flow direction is from port_a to port_b)
FluidPort_aport_RetFluid connector a (positive design flow direction is from port_a to port_b)
FluidPort_bport_SupFluid connector b (positive design flow direction is from port_a to port_b)

Modelica definition

model MixingBox "Outside air mixing box with non-interlocked air dampers" replaceable package Medium = Modelica.Media.Interfaces.PartialMedium "Medium in the component"; import Modelica.Constants; parameter Boolean allowFlowReversal=true "= false to simplify equations, assuming, but not enforcing, no flow reversal"; parameter Boolean use_deltaM=true "Set to true to use deltaM for turbulent transition, else ReC is used"; parameter Real deltaM=0.3 "Fraction of nominal mass flow rate where transition to turbulent occurs"; parameter Modelica.SIunits.Velocity v_nominal=1 "Nominal face velocity"; parameter Boolean roundDuct=false "Set to true for round duct, false for square cross section"; parameter Real ReC=4000 "Reynolds number where transition to turbulent starts"; parameter Boolean dp_nominalIncludesDamper=false "set to true if dp_nominal includes the pressure loss of the open damper"; parameter Modelica.SIunits.MassFlowRate mOut_flow_nominal "Mass flow rate outside air damper"; parameter Modelica.SIunits.PressureDifference dpOut_nominal(min=0, displayUnit="Pa") "Pressure drop outside air leg"; parameter Modelica.SIunits.MassFlowRate mRec_flow_nominal "Mass flow rate recirculation air damper"; parameter Modelica.SIunits.PressureDifference dpRec_nominal(min=0, displayUnit="Pa") "Pressure drop recirculation air leg"; parameter Modelica.SIunits.MassFlowRate mExh_flow_nominal "Mass flow rate exhaust air damper"; parameter Modelica.SIunits.PressureDifference dpExh_nominal(min=0, displayUnit="Pa") "Pressure drop exhaust air leg"; parameter Boolean from_dp=true "= true, use m_flow = f(dp) else dp = f(m_flow)"; parameter Boolean linearized=false "= true, use linear relation between m_flow and dp for any flow rate"; parameter Boolean use_constant_density=true "Set to true to use constant density for flow friction"; parameter Real a=-1.51 "Coefficient a for damper characteristics"; parameter Real b=0.105*90 "Coefficient b for damper characteristics"; parameter Real yL=15/90 "Lower value for damper curve"; parameter Real yU=55/90 "Upper value for damper curve"; parameter Real k0=1E6 "Flow coefficient for y=0, k0 = pressure drop divided by dynamic pressure"; parameter Real k1=0.45 "Flow coefficient for y=1, k1 = pressure drop divided by dynamic pressure"; parameter Modelica.SIunits.Time riseTime=15 "Rise time of the filter (time to reach 99.6 % of an opening step)"; parameter Modelica.Blocks.Types.Init init=Modelica.Blocks.Types.Init.InitialOutput "Type of initialization (no init/steady state/initial state/initial output)"; parameter Real y_start=1 "Initial value of output"; Modelica.Blocks.Interfaces.RealInput yRet( min=0, max=1, final unit="1") "Return damper position (0: closed, 1: open)"; Modelica.Blocks.Interfaces.RealInput yOut( min=0, max=1, final unit="1") "Outdoor air damper signal (0: closed, 1: open)"; Modelica.Blocks.Interfaces.RealInput yExh( min=0, max=1, final unit="1") "Exhaust air damper signal (0: closed, 1: open)"; Modelica.Fluid.Interfaces.FluidPort_a port_Out(redeclare package Medium = Medium, m_flow(start=0, min=if allowFlowReversal then -Constants.inf else 0)) "Fluid connector a (positive design flow direction is from port_a to port_b)"; Modelica.Fluid.Interfaces.FluidPort_b port_Exh(redeclare package Medium = Medium, m_flow(start=0, max=if allowFlowReversal then +Constants.inf else 0)) "Fluid connector b (positive design flow direction is from port_a to port_b)"; Modelica.Fluid.Interfaces.FluidPort_a port_Ret(redeclare package Medium = Medium, m_flow(start=0, min=if allowFlowReversal then -Constants.inf else 0)) "Fluid connector a (positive design flow direction is from port_a to port_b)"; Modelica.Fluid.Interfaces.FluidPort_b port_Sup(redeclare package Medium = Medium, m_flow(start=0, max=if allowFlowReversal then +Constants.inf else 0)) "Fluid connector b (positive design flow direction is from port_a to port_b)"; Fluid.Actuators.Dampers.VAVBoxExponential damOut( redeclare package Medium = Medium, dp_nominal=dpOut_nominal, dp_nominalIncludesDamper=dp_nominalIncludesDamper, from_dp=from_dp, linearized=linearized, use_deltaM=use_deltaM, deltaM=deltaM, roundDuct=roundDuct, ReC=ReC, a=a, b=b, yL=yL, yU=yU, k0=k0, k1=k1, use_constant_density=use_constant_density, allowFlowReversal=allowFlowReversal, m_flow_nominal=mOut_flow_nominal, use_inputFilter=true, final riseTime=riseTime, final init=init, y_start=y_start) "Outdoor air damper"; Fluid.Actuators.Dampers.VAVBoxExponential damExh( redeclare package Medium = Medium, m_flow_nominal=mExh_flow_nominal, dp_nominal=dpExh_nominal, dp_nominalIncludesDamper=dp_nominalIncludesDamper, from_dp=from_dp, linearized=linearized, use_deltaM=use_deltaM, deltaM=deltaM, roundDuct=roundDuct, ReC=ReC, a=a, b=b, yL=yL, yU=yU, k0=k0, k1=k1, use_constant_density=use_constant_density, allowFlowReversal=allowFlowReversal, use_inputFilter=true, final riseTime=riseTime, final init=init, y_start=y_start) "Exhaust air damper"; Fluid.Actuators.Dampers.VAVBoxExponential damRet( redeclare package Medium = Medium, m_flow_nominal=mRec_flow_nominal, dp_nominal=dpRec_nominal, dp_nominalIncludesDamper=dp_nominalIncludesDamper, from_dp=from_dp, linearized=linearized, use_deltaM=use_deltaM, deltaM=deltaM, roundDuct=roundDuct, ReC=ReC, a=a, b=b, yL=yL, yU=yU, k0=k0, k1=k1, use_constant_density=use_constant_density, allowFlowReversal=allowFlowReversal, use_inputFilter=true, final riseTime=riseTime, final init=init, y_start=y_start) "Return air damper"; protected parameter Medium.Density rho_default=Medium.density(sta_default) "Density, used to compute fluid volume"; parameter Medium.ThermodynamicState sta_default=Medium.setState_pTX( T=Medium.T_default, p=Medium.p_default, X=Medium.X_default) "Default medium state"; equation connect(damOut.port_a, port_Out); connect(damExh.port_b, port_Exh); connect(port_Sup, damOut.port_b); connect(damRet.port_b, port_Sup); connect(port_Ret, damExh.port_a); connect(port_Ret, damRet.port_a); connect(damRet.y, yRet); connect(yOut, damOut.y); connect(yExh, damExh.y); end MixingBox;

Buildings.Examples.VAVReheat.BaseClasses.PartialOpenLoop Buildings.Examples.VAVReheat.BaseClasses.PartialOpenLoop

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

Buildings.Examples.VAVReheat.BaseClasses.PartialOpenLoop

Information

This model consist of an HVAC system, a building envelope model and a model for air flow through building leakage and through open doors.

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 five zone inlet branches. The figure below shows the schematic diagram of the HVAC system

image

Most of the HVAC control in this model is open loop. Two models that extend this model, namely Buildings.Examples.VAVReheat.ASHRAE2006 and Buildings.Examples.VAVReheat.Guideline36 add closed loop control. See these models for a description of the control sequence.

To model the heat transfer through the building envelope, a model of five interconnected rooms is used. 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.

Parameters

TypeNameDefaultDescription
VolumeVRooCorAFloCor*flo.hRooRoom volume corridor [m3]
VolumeVRooSouAFloSou*flo.hRooRoom volume south [m3]
VolumeVRooNorAFloNor*flo.hRooRoom volume north [m3]
VolumeVRooEasAFloEas*flo.hRooRoom volume east [m3]
VolumeVRooWesAFloWes*flo.hRooRoom volume west [m3]
AreaAFloCorflo.cor.AFloFloor area corridor [m2]
AreaAFloSouflo.sou.AFloFloor area south [m2]
AreaAFloNorflo.nor.AFloFloor area north [m2]
AreaAFloEasflo.eas.AFloFloor area east [m2]
AreaAFloWesflo.wes.AFloFloor area west [m2]
AreaAFlo[numZon]{flo.cor.AFlo,flo.sou.AFlo,f...Floor area of each zone [m2]
MassFlowRatemCor_flow_nominal6*VRooCor*convDesign mass flow rate core [kg/s]
MassFlowRatemSou_flow_nominal6*VRooSou*convDesign mass flow rate perimeter 1 [kg/s]
MassFlowRatemEas_flow_nominal9*VRooEas*convDesign mass flow rate perimeter 2 [kg/s]
MassFlowRatemNor_flow_nominal6*VRooNor*convDesign mass flow rate perimeter 3 [kg/s]
MassFlowRatemWes_flow_nominal7*VRooWes*convDesign mass flow rate perimeter 4 [kg/s]
MassFlowRatem_flow_nominal0.7*(mCor_flow_nominal + mSo...Nominal mass flow rate [kg/s]
Anglelat41.98*3.14159/180Latitude [rad]
TemperatureTHeaOn293.15Heating setpoint during on [K]
TemperatureTHeaOff285.15Heating setpoint during off [K]
TemperatureTCooOn297.15Cooling setpoint during on [K]
TemperatureTCooOff303.15Cooling setpoint during off [K]
PressureDifferencedpBuiStaSet12Building static pressure [Pa]
RealyFanMin0.1Minimum fan speed
BooleanallowFlowReversaltrue= false to simplify equations, assuming, but not enforcing, no flow reversal
Booleanuse_windPressuretrueSet to true to enable wind pressure
Experimental (may be changed in future releases)
BooleansampleModeltrueSet 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
BusweaBusWeather Data Bus

Modelica definition

partial model PartialOpenLoop "Partial model of variable air volume flow system with terminal reheat and five thermal zones" package MediumA = Buildings.Media.Air "Medium model for air"; package MediumW = Buildings.Media.Water "Medium model for water"; constant Integer numZon=5 "Total number of served VAV boxes"; parameter Modelica.SIunits.Volume VRooCor=AFloCor*flo.hRoo "Room volume corridor"; parameter Modelica.SIunits.Volume VRooSou=AFloSou*flo.hRoo "Room volume south"; parameter Modelica.SIunits.Volume VRooNor=AFloNor*flo.hRoo "Room volume north"; parameter Modelica.SIunits.Volume VRooEas=AFloEas*flo.hRoo "Room volume east"; parameter Modelica.SIunits.Volume VRooWes=AFloWes*flo.hRoo "Room volume west"; parameter Modelica.SIunits.Area AFloCor=flo.cor.AFlo "Floor area corridor"; parameter Modelica.SIunits.Area AFloSou=flo.sou.AFlo "Floor area south"; parameter Modelica.SIunits.Area AFloNor=flo.nor.AFlo "Floor area north"; parameter Modelica.SIunits.Area AFloEas=flo.eas.AFlo "Floor area east"; parameter Modelica.SIunits.Area AFloWes=flo.wes.AFlo "Floor area west"; parameter Modelica.SIunits.Area AFlo[numZon]={flo.cor.AFlo,flo.sou.AFlo,flo.eas.AFlo, flo.nor.AFlo,flo.wes.AFlo} "Floor area of each zone"; final parameter Modelica.SIunits.Area ATot=sum(AFlo) "Total floor area"; constant Real conv=1.2/3600 "Conversion factor for nominal mass flow rate"; parameter Modelica.SIunits.MassFlowRate mCor_flow_nominal=6*VRooCor*conv "Design mass flow rate core"; parameter Modelica.SIunits.MassFlowRate mSou_flow_nominal=6*VRooSou*conv "Design mass flow rate perimeter 1"; parameter Modelica.SIunits.MassFlowRate mEas_flow_nominal=9*VRooEas*conv "Design mass flow rate perimeter 2"; parameter Modelica.SIunits.MassFlowRate mNor_flow_nominal=6*VRooNor*conv "Design mass flow rate perimeter 3"; parameter Modelica.SIunits.MassFlowRate mWes_flow_nominal=7*VRooWes*conv "Design mass flow rate perimeter 4"; parameter Modelica.SIunits.MassFlowRate m_flow_nominal=0.7*(mCor_flow_nominal + mSou_flow_nominal + mEas_flow_nominal + mNor_flow_nominal + mWes_flow_nominal) "Nominal mass flow rate"; parameter Modelica.SIunits.Angle lat=41.98*3.14159/180 "Latitude"; parameter Modelica.SIunits.Temperature THeaOn=293.15 "Heating setpoint during on"; parameter Modelica.SIunits.Temperature THeaOff=285.15 "Heating setpoint during off"; parameter Modelica.SIunits.Temperature TCooOn=297.15 "Cooling setpoint during on"; parameter Modelica.SIunits.Temperature TCooOff=303.15 "Cooling setpoint during off"; parameter Modelica.SIunits.PressureDifference dpBuiStaSet(min=0) = 12 "Building static pressure"; parameter Real yFanMin=0.1 "Minimum fan speed"; // parameter Modelica.SIunits.HeatFlowRate QHeaCoi_nominal= 2.5*yFanMin*m_flow_nominal*1000*(20 - 4) // "Nominal capacity of heating coil"; parameter Boolean allowFlowReversal=true "= false to simplify equations, assuming, but not enforcing, no flow reversal"; parameter Boolean use_windPressure=true "Set to true to enable wind pressure"; parameter Boolean sampleModel=true "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.Fluid.Sources.Outside amb(redeclare package Medium = MediumA, nPorts=3) "Ambient conditions"; // Buildings.Fluid.HeatExchangers.DryCoilCounterFlow heaCoi( // redeclare package Medium1 = MediumW, // redeclare package Medium2 = MediumA, // UA_nominal = QHeaCoi_nominal/Buildings.Fluid.HeatExchangers.BaseClasses.lmtd( // T_a1=45, // T_b1=35, // T_a2=3, // T_b2=20), // m2_flow_nominal=m_flow_nominal, // allowFlowReversal1=false, // allowFlowReversal2=allowFlowReversal, // dp1_nominal=0, // dp2_nominal=200 + 200 + 100 + 40, // m1_flow_nominal=QHeaCoi_nominal/4200/10, // energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) // "Heating coil" // annotation (Placement(transformation(extent={{118,-36},{98,-56}}))); Buildings.Fluid.HeatExchangers.DryEffectivenessNTU heaCoi( redeclare package Medium1 = MediumW, redeclare package Medium2 = MediumA, m1_flow_nominal=m_flow_nominal*1000*(10 - (-20))/4200/10, m2_flow_nominal=m_flow_nominal, configuration=Buildings.Fluid.Types.HeatExchangerConfiguration.CounterFlow, Q_flow_nominal=m_flow_nominal*1006*(16.7 - 8.5), dp1_nominal=0, dp2_nominal=200 + 200 + 100 + 40, allowFlowReversal1=false, allowFlowReversal2=allowFlowReversal, T_a1_nominal=318.15, T_a2_nominal=281.65) "Heating coil"; Buildings.Fluid.HeatExchangers.WetCoilCounterFlow cooCoi( UA_nominal=3*m_flow_nominal*1000*15/ Buildings.Fluid.HeatExchangers.BaseClasses.lmtd( T_a1=26.2, T_b1=12.8, T_a2=6, T_b2=16), redeclare package Medium1 = MediumW, redeclare package Medium2 = MediumA, m1_flow_nominal=m_flow_nominal*1000*15/4200/10, m2_flow_nominal=m_flow_nominal, dp2_nominal=0, dp1_nominal=0, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, allowFlowReversal1=false, allowFlowReversal2=allowFlowReversal) "Cooling coil"; Buildings.Fluid.FixedResistances.PressureDrop dpRetDuc( m_flow_nominal=m_flow_nominal, redeclare package Medium = MediumA, allowFlowReversal=allowFlowReversal, dp_nominal=40) "Pressure drop for return duct"; Buildings.Fluid.Movers.SpeedControlled_y fanSup( redeclare package Medium = MediumA, per(pressure(V_flow={0,m_flow_nominal/1.2*2}, dp=2*{780 + 10 + dpBuiStaSet,0})), energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) "Supply air fan"; Buildings.Fluid.Sensors.VolumeFlowRate senSupFlo(redeclare package Medium = MediumA, m_flow_nominal=m_flow_nominal) "Sensor for supply fan flow rate"; Buildings.Fluid.Sensors.VolumeFlowRate senRetFlo(redeclare package Medium = MediumA, m_flow_nominal=m_flow_nominal) "Sensor for return fan flow rate"; Buildings.Fluid.Sources.FixedBoundary sinHea( redeclare package Medium = MediumW, p=300000, T=318.15, nPorts=1) "Sink for heating coil"; Buildings.Fluid.Sources.FixedBoundary sinCoo( redeclare package Medium = MediumW, p=300000, T=285.15, nPorts=1) "Sink for cooling coil"; 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=m_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.Utilities.Math.Min min(nin=5) "Computes lowest room temperature"; Buildings.Utilities.Math.Average ave(nin=5) "Compute average of room temperatures"; Buildings.Fluid.Sources.MassFlowSource_T souCoo( redeclare package Medium = MediumW, T=279.15, nPorts=1, use_m_flow_in=true) "Source for cooling coil"; Buildings.Fluid.Sensors.TemperatureTwoPort TRet( redeclare package Medium = MediumA, m_flow_nominal=m_flow_nominal, allowFlowReversal=allowFlowReversal) "Return air temperature sensor"; Buildings.Fluid.Sensors.TemperatureTwoPort TMix( redeclare package Medium = MediumA, m_flow_nominal=m_flow_nominal, allowFlowReversal=allowFlowReversal) "Mixed air temperature sensor"; Buildings.Fluid.Sources.MassFlowSource_T souHea( redeclare package Medium = MediumW, T=318.15, use_m_flow_in=true, nPorts=1) "Source for heating coil"; Buildings.Fluid.Sensors.VolumeFlowRate VOut1(redeclare package Medium = MediumA, m_flow_nominal=m_flow_nominal) "Outside air volume flow rate"; Buildings.Examples.VAVReheat.ThermalZones.VAVBranch cor( redeclare package MediumA = MediumA, redeclare package MediumW = MediumW, m_flow_nominal=mCor_flow_nominal, VRoo=VRooCor, allowFlowReversal=allowFlowReversal) "Zone for core of buildings (azimuth will be neglected)"; Buildings.Examples.VAVReheat.ThermalZones.VAVBranch sou( redeclare package MediumA = MediumA, redeclare package MediumW = MediumW, m_flow_nominal=mSou_flow_nominal, VRoo=VRooSou, allowFlowReversal=allowFlowReversal) "South-facing thermal zone"; Buildings.Examples.VAVReheat.ThermalZones.VAVBranch eas( redeclare package MediumA = MediumA, redeclare package MediumW = MediumW, m_flow_nominal=mEas_flow_nominal, VRoo=VRooEas, allowFlowReversal=allowFlowReversal) "East-facing thermal zone"; Buildings.Examples.VAVReheat.ThermalZones.VAVBranch nor( redeclare package MediumA = MediumA, redeclare package MediumW = MediumW, m_flow_nominal=mNor_flow_nominal, VRoo=VRooNor, allowFlowReversal=allowFlowReversal) "North-facing thermal zone"; Buildings.Examples.VAVReheat.ThermalZones.VAVBranch wes( redeclare package MediumA = MediumA, redeclare package MediumW = MediumW, m_flow_nominal=mWes_flow_nominal, VRoo=VRooWes, allowFlowReversal=allowFlowReversal) "West-facing thermal zone"; Buildings.Fluid.FixedResistances.Junction splRetRoo1( redeclare package Medium = MediumA, m_flow_nominal={m_flow_nominal,m_flow_nominal - mCor_flow_nominal, mCor_flow_nominal}, from_dp=false, linearized=true, 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.Leaving, portFlowDirection_2=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Entering, portFlowDirection_3=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Entering) "Splitter for room return"; Buildings.Fluid.FixedResistances.Junction splRetSou( redeclare package Medium = MediumA, m_flow_nominal={mSou_flow_nominal + mEas_flow_nominal + mNor_flow_nominal + mWes_flow_nominal,mEas_flow_nominal + mNor_flow_nominal + mWes_flow_nominal,mSou_flow_nominal}, from_dp=false, linearized=true, 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.Leaving, portFlowDirection_2=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Entering, portFlowDirection_3=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Entering) "Splitter for room return"; Buildings.Fluid.FixedResistances.Junction splRetEas( redeclare package Medium = MediumA, m_flow_nominal={mEas_flow_nominal + mNor_flow_nominal + mWes_flow_nominal, mNor_flow_nominal + mWes_flow_nominal,mEas_flow_nominal}, from_dp=false, linearized=true, 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.Leaving, portFlowDirection_2=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Entering, portFlowDirection_3=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Entering) "Splitter for room return"; Buildings.Fluid.FixedResistances.Junction splRetNor( redeclare package Medium = MediumA, m_flow_nominal={mNor_flow_nominal + mWes_flow_nominal,mWes_flow_nominal, mNor_flow_nominal}, from_dp=false, linearized=true, 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.Leaving, portFlowDirection_2=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Entering, portFlowDirection_3=if allowFlowReversal then Modelica.Fluid.Types.PortFlowDirection.Bidirectional else Modelica.Fluid.Types.PortFlowDirection.Entering) "Splitter for room return"; Buildings.Fluid.FixedResistances.Junction splSupRoo1( redeclare package Medium = MediumA, m_flow_nominal={m_flow_nominal,m_flow_nominal - mCor_flow_nominal, mCor_flow_nominal}, from_dp=true, linearized=true, 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) "Splitter for room supply"; Buildings.Fluid.FixedResistances.Junction splSupSou( redeclare package Medium = MediumA, m_flow_nominal={mSou_flow_nominal + mEas_flow_nominal + mNor_flow_nominal + mWes_flow_nominal,mEas_flow_nominal + mNor_flow_nominal + mWes_flow_nominal,mSou_flow_nominal}, from_dp=true, linearized=true, 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) "Splitter for room supply"; Buildings.Fluid.FixedResistances.Junction splSupEas( redeclare package Medium = MediumA, m_flow_nominal={mEas_flow_nominal + mNor_flow_nominal + mWes_flow_nominal, mNor_flow_nominal + mWes_flow_nominal,mEas_flow_nominal}, from_dp=true, linearized=true, 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) "Splitter for room supply"; Buildings.Fluid.FixedResistances.Junction splSupNor( redeclare package Medium = MediumA, m_flow_nominal={mNor_flow_nominal + mWes_flow_nominal,mWes_flow_nominal, mNor_flow_nominal}, from_dp=true, linearized=true, 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) "Splitter for room supply"; BoundaryConditions.WeatherData.ReaderTMY3 weaDat(filNam="modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"); BoundaryConditions.WeatherData.Bus weaBus "Weather Data Bus"; ThermalZones.Floor flo( redeclare final package Medium = MediumA, final lat=lat, final use_windPressure=use_windPressure, final sampleModel=sampleModel) "Model of a floor of the building that is served by this VAV system"; Modelica.Blocks.Routing.DeMultiplex5 TRooAir(u(each unit="K", each displayUnit="degC")) "Demultiplex for room air temperature"; Fluid.Sensors.TemperatureTwoPort TSupCor( redeclare package Medium = MediumA, initType=Modelica.Blocks.Types.Init.InitialState, m_flow_nominal=mCor_flow_nominal, allowFlowReversal=allowFlowReversal) "Discharge air temperature"; Fluid.Sensors.TemperatureTwoPort TSupSou( redeclare package Medium = MediumA, initType=Modelica.Blocks.Types.Init.InitialState, m_flow_nominal=mSou_flow_nominal, allowFlowReversal=allowFlowReversal) "Discharge air temperature"; Fluid.Sensors.TemperatureTwoPort TSupEas( redeclare package Medium = MediumA, initType=Modelica.Blocks.Types.Init.InitialState, m_flow_nominal=mEas_flow_nominal, allowFlowReversal=allowFlowReversal) "Discharge air temperature"; Fluid.Sensors.TemperatureTwoPort TSupNor( redeclare package Medium = MediumA, initType=Modelica.Blocks.Types.Init.InitialState, m_flow_nominal=mNor_flow_nominal, allowFlowReversal=allowFlowReversal) "Discharge air temperature"; Fluid.Sensors.TemperatureTwoPort TSupWes( redeclare package Medium = MediumA, initType=Modelica.Blocks.Types.Init.InitialState, m_flow_nominal=mWes_flow_nominal, allowFlowReversal=allowFlowReversal) "Discharge air temperature"; Fluid.Sensors.VolumeFlowRate VSupCor_flow( redeclare package Medium = MediumA, initType=Modelica.Blocks.Types.Init.InitialState, m_flow_nominal=mCor_flow_nominal, allowFlowReversal=allowFlowReversal) "Discharge air flow rate"; Fluid.Sensors.VolumeFlowRate VSupSou_flow( redeclare package Medium = MediumA, initType=Modelica.Blocks.Types.Init.InitialState, m_flow_nominal=mSou_flow_nominal, allowFlowReversal=allowFlowReversal) "Discharge air flow rate"; Fluid.Sensors.VolumeFlowRate VSupEas_flow( redeclare package Medium = MediumA, initType=Modelica.Blocks.Types.Init.InitialState, m_flow_nominal=mEas_flow_nominal, allowFlowReversal=allowFlowReversal) "Discharge air flow rate"; Fluid.Sensors.VolumeFlowRate VSupNor_flow( redeclare package Medium = MediumA, initType=Modelica.Blocks.Types.Init.InitialState, m_flow_nominal=mNor_flow_nominal, allowFlowReversal=allowFlowReversal) "Discharge air flow rate"; Fluid.Sensors.VolumeFlowRate VSupWes_flow( redeclare package Medium = MediumA, initType=Modelica.Blocks.Types.Init.InitialState, m_flow_nominal=mWes_flow_nominal, allowFlowReversal=allowFlowReversal) "Discharge air flow rate"; Buildings.Examples.VAVReheat.BaseClasses.MixingBox eco( redeclare package Medium = MediumA, mOut_flow_nominal=m_flow_nominal, dpOut_nominal=10, mRec_flow_nominal=m_flow_nominal, dpRec_nominal=10, mExh_flow_nominal=m_flow_nominal, dpExh_nominal=10, from_dp=false) "Economizer"; Results res( final A=ATot, PFan=fanSup.P + 0, PHea=heaCoi.Q2_flow + cor.terHea.Q1_flow + nor.terHea.Q1_flow + wes.terHea.Q1_flow + eas.terHea.Q1_flow + sou.terHea.Q1_flow, PCooSen=cooCoi.QSen2_flow, PCooLat=cooCoi.QLat2_flow) "Results of the simulation"; /*fanRet*/ protected model Results "Model to store the results of the simulation" parameter Modelica.SIunits.Area A "Floor area"; input Modelica.SIunits.Power PFan "Fan energy"; input Modelica.SIunits.Power PHea "Heating energy"; input Modelica.SIunits.Power PCooSen "Sensible cooling energy"; input Modelica.SIunits.Power PCooLat "Latent cooling energy"; Real EFan( unit="J/m2", start=0, nominal=1E5, fixed=true) "Fan 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(EHea) = PHea; A*der(ECooSen) = PCooSen; A*der(ECooLat) = PCooLat; ECoo = ECooSen + ECooLat; end Results; public Buildings.Controls.OBC.CDL.Continuous.Gain gaiHeaCoi(k=m_flow_nominal*1000*40/ 4200/10) "Gain for heating coil mass flow rate"; Buildings.Controls.OBC.CDL.Continuous.Gain gaiCooCoi(k=m_flow_nominal*1000*15/ 4200/10) "Gain for cooling coil mass flow rate"; Buildings.Controls.OBC.CDL.Logical.OnOffController freSta(bandwidth=1) "Freeze stat for heating coil"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant freStaTSetPoi(k=273.15 + 3) "Freeze stat set point for heating coil"; equation connect(fanSup.port_b, dpDisSupFan.port_a); connect(TSup.port_a, fanSup.port_b); connect(amb.ports[1], VOut1.port_a); connect(splRetRoo1.port_1, dpRetDuc.port_a); connect(splRetNor.port_1, splRetEas.port_2); connect(splRetEas.port_1, splRetSou.port_2); connect(splRetSou.port_1, splRetRoo1.port_2); connect(splSupRoo1.port_3, cor.port_a); connect(splSupRoo1.port_2, splSupSou.port_1); connect(splSupSou.port_3, sou.port_a); connect(splSupSou.port_2, splSupEas.port_1); connect(splSupEas.port_3, eas.port_a); connect(splSupEas.port_2, splSupNor.port_1); connect(splSupNor.port_3, nor.port_a); connect(splSupNor.port_2, wes.port_a); connect(cooCoi.port_b1, sinCoo.ports[1]); connect(weaDat.weaBus, weaBus); connect(weaBus.TDryBul, TOut.u); connect(amb.weaBus, weaBus); connect(splRetRoo1.port_3, flo.portsCor[2]); connect(splRetSou.port_3, flo.portsSou[2]); connect(splRetEas.port_3, flo.portsEas[2]); connect(splRetNor.port_3, flo.portsNor[2]); connect(splRetNor.port_2, flo.portsWes[2]); connect(weaBus, flo.weaBus); connect(flo.TRooAir, min.u); connect(flo.TRooAir, ave.u); connect(TRooAir.u, flo.TRooAir); connect(cooCoi.port_b2, fanSup.port_a); connect(cor.port_b, TSupCor.port_a); connect(sou.port_b, TSupSou.port_a); connect(eas.port_b, TSupEas.port_a); connect(nor.port_b, TSupNor.port_a); connect(wes.port_b, TSupWes.port_a); connect(TSupCor.port_b, VSupCor_flow.port_a); connect(TSupSou.port_b, VSupSou_flow.port_a); connect(TSupEas.port_b, VSupEas_flow.port_a); connect(TSupNor.port_b, VSupNor_flow.port_a); connect(TSupWes.port_b, VSupWes_flow.port_a); connect(VSupCor_flow.port_b, flo.portsCor[1]); connect(VSupSou_flow.port_b, flo.portsSou[1]); connect(VSupEas_flow.port_b, flo.portsEas[1]); connect(VSupNor_flow.port_b, flo.portsNor[1]); connect(VSupWes_flow.port_b, flo.portsWes[1]); connect(VOut1.port_b, eco.port_Out); connect(eco.port_Sup, TMix.port_a); connect(eco.port_Exh, amb.ports[2]); connect(eco.port_Ret, TRet.port_b); connect(senRetFlo.port_a, dpRetDuc.port_b); connect(TSup.port_b, senSupFlo.port_a); connect(senSupFlo.port_b, splSupRoo1.port_1); connect(cooCoi.port_a1, souCoo.ports[1]); connect(gaiHeaCoi.y, souHea.m_flow_in); connect(gaiCooCoi.y, souCoo.m_flow_in); connect(dpDisSupFan.port_b, amb.ports[3]); connect(senRetFlo.port_b, TRet.port_a); connect(freStaTSetPoi.y, freSta.reference); connect(freSta.u, TMix.T); connect(TMix.port_b, heaCoi.port_a2); connect(heaCoi.port_b2, cooCoi.port_a2); connect(souHea.ports[1], heaCoi.port_a1); connect(heaCoi.port_b1, sinHea.ports[1]); end PartialOpenLoop;

Buildings.Examples.VAVReheat.BaseClasses.PartialOpenLoop.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.SIunits.Area A "Floor area"; input Modelica.SIunits.Power PFan "Fan energy"; input Modelica.SIunits.Power PHea "Heating energy"; input Modelica.SIunits.Power PCooSen "Sensible cooling energy"; input Modelica.SIunits.Power PCooLat "Latent cooling energy"; Real EFan( unit="J/m2", start=0, nominal=1E5, fixed=true) "Fan 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(EHea) = PHea; A*der(ECooSen) = PCooSen; A*der(ECooLat) = PCooLat; ECoo = ECooSen + ECooLat; end Results;