Model an buiding that has multiple thermal zones on each floor,
and an HVAC system on each floor.
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 zone inlet branches. Each floor has one VAV
AHU system.
The figure below shows the schematic diagram of the HVAC system
The control sequence regulates the supply fan speed to ensure a
prescribed pressure rise of 850 Pa
when the supply fan runs
during operation modes occupied, unoccupied night set back,
unoccupied warm-up and unoccupied pre-cool.
The economizer dampers are modulated to track the setpoint for the
mixed air dry bulb temperature.
Priority is given to maintain a minimum outside air volume flow rate.
In each zone, the VAV damper is adjusted to meet the room temperature
setpoint for cooling, or fully opened during heating.
The room temperature setpoint for heating is tracked by varying
the water flow rate through the reheat coil. 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.
Local loop control is implemented using proportional and proportional-integral
controllers, while the supervisory control is implemented
using a finite state machine.
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.
ASHRAE.
Sequences of Operation for Common HVAC Systems.
ASHRAE, Atlanta, GA, 2006.
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.
model OneFloor_OneZone
extends Modelica.Icons.Example;
replaceable package MediumA =
Buildings.Media.Air (T_default=293.15);
package MediumW =
Buildings.Media.Water ;
parameter Integer nZon(min=1) = 1 ;
parameter Integer nFlo(min=1) = 1 ;
parameter Modelica.SIunits.PressureDifference dP_pre=850 ;
parameter Modelica.SIunits.Volume VRoo[nZon, nFlo]={{6*8*2.7
for j
in 1:nFlo}
for i
in 1:nZon} ;
parameter Modelica.SIunits.MassFlowRate m_flow_nominal_each[nZon, nFlo]={{7*
conv*VRoo[i, j]
for j
in 1:nFlo}
for i
in 1:nZon} ;
parameter Modelica.SIunits.MassFlowRate m_flow_nominal=nZon*(7*conv)*6*8*2.7 ;
constant Real conv=1.2/3600 ;
Buildings.Examples.ScalableBenchmarks.BuildingVAV.BaseClasses.VAVBranch
vavTer[nZon, nFlo](
redeclare each package MediumA =
MediumA,
redeclare each package MediumW = MediumW,
m_flow_nominal={{m_flow_nominal_each[i, j]
for j
in 1:nFlo}
for i
in 1:nZon},
VRoo={{VRoo[i, j]
for j
in 1:nFlo}
for i
in 1:nZon},
dpFixed_nominal={{220 + 20
for j
in 1:nFlo}
for i
in 1:nZon}) ;
Buildings.Examples.ScalableBenchmarks.BuildingVAV.ThermalZones.MultiZone
buiZon(nZon=nZon, nFlo=nFlo) ;
Buildings.Fluid.Movers.FlowControlled_dp fan[nFlo](
redeclare each package Medium =
MediumA,
each constantHead=850,
each energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
each m_flow_nominal=10,
each inputType=Buildings.Fluid.Types.InputType.Continuous,
each nominalValuesDefineDefaultPressureCurve=true) ;
Buildings.Fluid.HeatExchangers.DryEffectivenessNTU hex[nFlo](
redeclare each package Medium1 =
MediumA,
redeclare each package Medium2 = MediumW,
each m1_flow_nominal=m_flow_nominal,
each allowFlowReversal2=false,
each m2_flow_nominal=m_flow_nominal*1000*(10 - (-20))/4200/10,
each configuration=Buildings.Fluid.Types.HeatExchangerConfiguration.CounterFlow,
each Q_flow_nominal=m_flow_nominal*1006*(16.7 - 8.5),
each dp1_nominal=0,
each dp2_nominal=0,
each T_a1_nominal=281.65,
each T_a2_nominal=323.15) ;
Buildings.Fluid.HeatExchangers.WetCoilCounterFlow cooCoi[nFlo](
redeclare each package Medium1 = MediumW,
redeclare each package Medium2 =
MediumA,
each UA_nominal=m_flow_nominal*1000*15/
Buildings.Fluid.HeatExchangers.BaseClasses.lmtd(
T_a1=26.2,
T_b1=12.8,
T_a2=6,
T_b2=16),
each m1_flow_nominal=m_flow_nominal*1000*15/4200/10,
each m2_flow_nominal=m_flow_nominal,
each dp2_nominal=0,
each dp1_nominal=0,
each energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) ;
Buildings.Fluid.FixedResistances.PressureDrop fil[nFlo](
redeclare each package Medium =
MediumA,
each m_flow_nominal=m_flow_nominal,
each dp_nominal=200 + 200 + 100,
each from_dp=false,
each linearized=false) ;
Buildings.Fluid.Sources.FixedBoundary sinHea[nFlo](
redeclare each package Medium = MediumW,
each p=300000,
each T=318.15,
each nPorts=1) ;
Buildings.Fluid.Sources.FixedBoundary souHea[nFlo](
redeclare each package Medium = MediumW,
each p(displayUnit="Pa") = 300000 + 12000,
each T=318.15,
each nPorts=1) ;
Buildings.Fluid.Sources.FixedBoundary sinCoo[nFlo](
redeclare each package Medium = MediumW,
each p=300000,
each T=285.15,
each nPorts=1) ;
Buildings.Fluid.Sources.FixedBoundary souCoo[nFlo](
redeclare each package Medium = MediumW,
each p=3E5 + 12000,
each T=279.15,
each nPorts=1) ;
Buildings.Fluid.Sources.Outside amb[nFlo](
redeclare each package Medium =
MediumA,
each nPorts=2) ;
Buildings.Fluid.Actuators.Dampers.MixingBox eco[nFlo](
redeclare each package Medium =
MediumA,
each mOut_flow_nominal=m_flow_nominal,
each mRec_flow_nominal=m_flow_nominal,
each mExh_flow_nominal=m_flow_nominal,
each dpOut_nominal=10,
each dpRec_nominal=10,
each dpExh_nominal=10) ;
Buildings.Fluid.Sensors.TemperatureTwoPort TMix[nFlo](
redeclare each package
Medium =
MediumA,
each m_flow_nominal=m_flow_nominal) ;
Buildings.Fluid.Sensors.VolumeFlowRate senSupFlo[nFlo](
redeclare each package
Medium =
MediumA,
each m_flow_nominal=m_flow_nominal) ;
Buildings.Fluid.Sensors.TemperatureTwoPort TRet[nFlo](
redeclare each package
Medium =
MediumA,
each m_flow_nominal=m_flow_nominal) ;
Buildings.Fluid.Sensors.VolumeFlowRate senRetFlo[nFlo](
redeclare each package
Medium =
MediumA,
each m_flow_nominal=m_flow_nominal) ;
Buildings.Fluid.Movers.SpeedControlled_y fanRet[nFlo](
redeclare each package Medium =
MediumA,
each tau=60,
each per(pressure(V_flow=m_flow_nominal/1.2*{0,2}, dp=1.5*110*{2,0})),
each energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) ;
Buildings.Fluid.Actuators.Valves.TwoWayLinear valHea[nFlo](
redeclare each package Medium = MediumW,
each CvData=Buildings.Fluid.Types.CvTypes.OpPoint,
each dpValve_nominal=6000,
each m_flow_nominal=m_flow_nominal*1000*40/4200/10,
each from_dp=true,
each dpFixed_nominal=6000) ;
Buildings.Fluid.Actuators.Valves.TwoWayLinear valCoo[nFlo](
redeclare each package Medium = MediumW,
each CvData=Buildings.Fluid.Types.CvTypes.OpPoint,
each m_flow_nominal=m_flow_nominal*1000*15/4200/10,
each dpValve_nominal=6000,
each from_dp=true,
each dpFixed_nominal=6000) ;
Buildings.Fluid.Sensors.VolumeFlowRate VOut1[nFlo](
redeclare each package
Medium =
MediumA,
each m_flow_nominal=m_flow_nominal) ;
Buildings.Fluid.Sensors.TemperatureTwoPort TCoiHeaOut[nFlo](
redeclare each
package Medium =
MediumA,
each m_flow_nominal=m_flow_nominal) ;
Buildings.Fluid.Sensors.TemperatureTwoPort TSup[nFlo](
redeclare each package
Medium =
MediumA,
each m_flow_nominal=m_flow_nominal) ;
Modelica.Blocks.Sources.Constant TSupSetHea(y(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC",
min=0), k=273.15 + 10) ;
Buildings.Examples.VAVReheat.Controls.CoolingCoilTemperatureSetpoint TSetCoo[
nFlo] ;
Buildings.Controls.Continuous.LimPID cooCoiCon[nFlo](
each reverseAction=true,
each Td=60,
each initType=Modelica.Blocks.Types.InitPID.InitialState,
each yMax=1,
each yMin=0,
each controllerType=Modelica.Blocks.Types.SimpleController.PI,
each Ti=600,
each k=0.1) ;
Buildings.Controls.Continuous.LimPID heaCoiCon[nFlo](
each yMax=1,
each yMin=0,
each Td=60,
each initType=Modelica.Blocks.Types.InitPID.InitialState,
each controllerType=Modelica.Blocks.Types.SimpleController.PI,
each Ti=600,
each k=0.1) ;
Buildings.Examples.VAVReheat.Controls.ModeSelector modeSelector[nFlo] ;
Buildings.Examples.VAVReheat.Controls.Economizer conEco[nFlo](
each dT=1,
each VOut_flow_min=0.3*m_flow_nominal/1.2,
each Ti=600,
each k=0.1) ;
Buildings.BoundaryConditions.WeatherData.ReaderTMY3 weaDat(filNam="modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos");
Buildings.BoundaryConditions.WeatherData.Bus weaBus ;
Modelica.Blocks.Routing.RealPassThrough TOut(y(
final quantity="ThermodynamicTemperature",
final unit="K",
displayUnit="degC",
min=0)) ;
Buildings.Utilities.Math.Average ave[nFlo](
each nin=nZon) ;
Buildings.Utilities.Math.Min min1[nFlo](
each nin=nZon) ;
Buildings.Examples.VAVReheat.Controls.FanVFD conFanRet[nFlo](
each
xSet_nominal(displayUnit="m3/s") = m_flow_nominal/1.2,
each r_N_min=0.2) ;
Buildings.Examples.ScalableBenchmarks.BuildingVAV.BaseClasses.ControlBus
controlBus[nFlo] ;
Buildings.Examples.ScalableBenchmarks.BuildingVAV.BaseClasses.HeatSetpoint
TSetHea ;
Buildings.Examples.ScalableBenchmarks.BuildingVAV.BaseClasses.CoolSetpoint
TSetCoo1 ;
Buildings.Controls.SetPoints.OccupancySchedule occSch(occupancy=3600*{8,18}) ;
Buildings.Examples.ScalableBenchmarks.BuildingVAV.BaseClasses.FanOnOffWithDP
fan_dP_On_Off[nFlo](
each preRis=dP_pre) ;
equation
for iFlo
in 1:nFlo
loop
connect(eco[iFlo].port_Sup, TMix[iFlo].port_a);
connect(TMix[iFlo].port_b, fil[iFlo].port_a);
connect(hex[iFlo].port_b2, sinHea[iFlo].ports[1]);
connect(TSupSetHea.y, heaCoiCon[iFlo].u_s);
connect(TSupSetHea.y, TSetCoo[iFlo].TSetHea);
connect(TSetCoo[iFlo].TSet, cooCoiCon[iFlo].u_s);
connect(TCoiHeaOut[iFlo].T, heaCoiCon[iFlo].u_m);
connect(TSup[iFlo].T, cooCoiCon[iFlo].u_m);
connect(heaCoiCon[iFlo].y, valHea[iFlo].y);
connect(cooCoiCon[iFlo].y, valCoo[iFlo].y);
connect(TRet[iFlo].T, conEco[iFlo].TRet);
connect(TMix[iFlo].T, conEco[iFlo].TMix);
connect(VOut1[iFlo].V_flow, conEco[iFlo].VOut_flow);
connect(TSupSetHea.y, conEco[iFlo].TSupHeaSet);
connect(TSetCoo[iFlo].TSet, conEco[iFlo].TSupCooSet);
connect(conEco[iFlo].yOA, eco[iFlo].y);
connect(weaBus, amb[iFlo].weaBus);
connect(senRetFlo[iFlo].V_flow, conFanRet[iFlo].u_m);
connect(conFanRet[iFlo].u, senSupFlo[iFlo].V_flow);
connect(conFanRet[iFlo].y, fanRet[iFlo].y);
connect(TCoiHeaOut[iFlo].port_b, cooCoi[iFlo].port_a2);
connect(cooCoi[iFlo].port_b2, fan[iFlo].port_a);
connect(cooCoi[iFlo].port_b1, sinCoo[iFlo].ports[1]);
connect(cooCoi[iFlo].port_a1, valCoo[iFlo].port_b);
connect(modeSelector[iFlo].cb, TSetCoo[iFlo].controlBus);
connect(controlBus[iFlo], conEco[iFlo].controlBus);
connect(controlBus[iFlo], modeSelector[iFlo].cb);
connect(controlBus[iFlo], fan_dP_On_Off[iFlo].controlBus);
connect(min1[iFlo].y, controlBus[iFlo].TRooMin);
connect(ave[iFlo].y, controlBus[iFlo].TRooAve);
connect(TOut.y, controlBus[iFlo].TOut);
connect(TSetHea.y[1], controlBus[iFlo].TRooSetHea);
connect(TSetCoo1.y[1], controlBus[iFlo].TRooSetCoo);
connect(occSch.tNexOcc, controlBus[iFlo].dTNexOcc);
connect(occSch.occupied, controlBus[iFlo].occupied);
connect(eco[iFlo].port_Exh, amb[iFlo].ports[1]);
connect(senRetFlo[iFlo].port_b, fanRet[iFlo].port_a);
connect(fanRet[iFlo].port_b, TRet[iFlo].port_a);
connect(TRet[iFlo].port_b, eco[iFlo].port_Ret);
connect(hex[iFlo].port_a2, valHea[iFlo].port_b);
connect(souHea[iFlo].ports[1], valHea[iFlo].port_a);
connect(valCoo[iFlo].port_a, souCoo[iFlo].ports[1]);
connect(amb[iFlo].ports[2], VOut1[iFlo].port_a);
connect(VOut1[iFlo].port_b, eco[iFlo].port_Out);
connect(fil[iFlo].port_b, hex[iFlo].port_a1);
connect(hex[iFlo].port_b1, TCoiHeaOut[iFlo].port_a);
connect(fan[iFlo].port_b, TSup[iFlo].port_a);
connect(TSup[iFlo].port_b, senSupFlo[iFlo].port_a);
connect(fan_dP_On_Off[iFlo].y, fan[iFlo].dp_in);
end for;
for iFlo
in 1:nFlo
loop
for iZon
in 1:nZon
loop
connect(vavTer[iZon, iFlo].port_b, buiZon.portsIn[iZon, iFlo]);
connect(buiZon.portsOut[iZon, iFlo], senRetFlo[iFlo].port_a);
connect(buiZon.TRooAir[iZon, iFlo], vavTer[iZon, iFlo].TRoo);
connect(senSupFlo[iFlo].port_b, vavTer[iZon, iFlo].port_a);
connect(buiZon.TRooAir[iZon, iFlo], ave[iFlo].u[iZon]);
connect(buiZon.TRooAir[iZon, iFlo], min1[iFlo].u[iZon]);
connect(vavTer[iZon, iFlo].TRooHeaSet, controlBus[iFlo].TRooSetHea);
connect(vavTer[iZon, iFlo].TRooCooSet, controlBus[iFlo].TRooSetCoo);
end for;
end for;
connect(weaDat.weaBus, weaBus);
connect(weaBus.TDryBul, TOut.u);
connect(weaBus, buiZon.weaBus);
connect(modeSelector.yFan, conFanRet.uFan);
end OneFloor_OneZone;