# Example 8. System Sizing with Discrete Package Sizes[LINK]

## Problem Statement[LINK]

One tension often arises with modeling when options being evaluated have an indirect effect on air system size. In normal autosizing, the changes in sizes are continuous, but in real systems, equipment sizes tend to be discrete. If we start with the Strip Mall Reference Building model (RefBldgStripMallNew2004_Chicago.idf), we should ask, Could we use the EMS custom calculations to intervene and make the final system sizing results follow the discrete sizes available for a particular product line of equipment?

## EMS Design Discussion[LINK]

Examining the vendor’s literature for one line of commercial packaged single-zone HVAC air systems shows that the nominal product sizes include 1200 cfm, 1600 cfm, 2000 cfm, 2400 cfm, 3000 cfm, 3400, cfm, and 4000 cfm. The literature also classifies units by tonnage of cooling capacity; however, in EnergyPlus modeling it is simpler to classify by air flow rate rather than by cooling capacity (because the direct expansion models have a tight range for allowable cooling capacity per air flow rate and size themselves off the flow rate). We construct the following simple model to select the next higher air flow rate product that uses the volume flow determined during the usual autosizing calculations, ˙Vsize , and threshold values taken from the nominal product sizes (in m3/s):

0<˙Vsize≤0.566 |
˙V=0.566 |

0.566<˙Vsize≤0.755 |
˙V=0.755 |

0.755<˙Vsize≤0.944 |
˙V=0.944 |

0.944<˙Vsize≤1.133 |
˙V=1.133 |

1.133<˙Vsize≤1.416 |
˙V=1.416 |

1.416<˙Vsize≤1.604 |
˙V=1.604 |

1.604<˙Vsize≤1.888 |
˙V=1.888 |

The system sizing calculations determine a value for the volume flow rate. To obtain this result for use in an Erl program, we use an EnergyManagementSystem:InternalVariable input object to set up a variable for the data called “Intermediate Air System Main Supply Volume Flow Rate.” We can then use this value in our algorithm to find a discrete system size.

Once we have the new system size, we need to set up an actuator to apply the new size. For this we use an EnergyManagementSystem:Actuator input object to establish control over “Sizing:System” type of component using the “Main Supply Volume Flow Rate” control type.

The EMS calling point for controlling air system sizing is called “EndOfSystemSizing.” So we enter this into the program calling manager.

For this example, we modify the example file called “RefBldgStripMallNew2004_Chicago.idf.” This file has 10 separate packaged units, so rather than repeat the algorithm several times, we use a subroutine so the same Erl code can be reused for each air system. The subroutine has two arguments that we will declare as global variables: the input for continuous size and the output for the discrete size.

A set of input objects for EMS control for discrete resizing of 10 air systems follows and is included in the example file called “EMSDiscreteAirSystemSizes.idf.”

```
Output:EnergyManagementSystem,
Verbose,
Verbose,
Verbose;
EnergyManagementSystem:ProgramCallingManager,
Apply Discrete Package Sizes to Air System Sizing , ! Name
EndOfSystemSizing , ! EnergyPlus Model Calling Point
Resize_PSZ_To_Match_Product_Availability; ! Program Name 1
EnergyManagementSystem:Program,
Resize_PSZ_To_Match_Product_Availability , ! Name
SET argMainVdot = PSZ_1_CalcMainSupVdot,
RUN Select_Discrete_Nominal_Air_Flow,
SET PSZ_1_MainSupVdotSet = argDiscreteMainVdot,
SET argMainVdot = PSZ_2_CalcMainSupVdot,
RUN Select_Discrete_Nominal_Air_Flow,
SET PSZ_2_MainSupVdotSet = argDiscreteMainVdot,
SET argMainVdot = PSZ_3_CalcMainSupVdot,
RUN Select_Discrete_Nominal_Air_Flow,
SET PSZ_3_MainSupVdotSet = argDiscreteMainVdot,
SET argMainVdot = PSZ_4_CalcMainSupVdot,
RUN Select_Discrete_Nominal_Air_Flow,
SET PSZ_4_MainSupVdotSet = argDiscreteMainVdot,
SET argMainVdot = PSZ_5_CalcMainSupVdot,
RUN Select_Discrete_Nominal_Air_Flow,
SET PSZ_5_MainSupVdotSet = argDiscreteMainVdot,
SET argMainVdot = PSZ_6_CalcMainSupVdot,
RUN Select_Discrete_Nominal_Air_Flow,
SET PSZ_6_MainSupVdotSet = argDiscreteMainVdot,
SET argMainVdot = PSZ_7_CalcMainSupVdot,
RUN Select_Discrete_Nominal_Air_Flow,
SET PSZ_7_MainSupVdotSet = argDiscreteMainVdot,
SET argMainVdot = PSZ_8_CalcMainSupVdot,
RUN Select_Discrete_Nominal_Air_Flow,
SET PSZ_8_MainSupVdotSet = argDiscreteMainVdot,
SET argMainVdot = PSZ_9_CalcMainSupVdot,
RUN Select_Discrete_Nominal_Air_Flow,
SET PSZ_9_MainSupVdotSet = argDiscreteMainVdot,
SET argMainVdot = PSZ_10_CalcMainSupVdot,
RUN Select_Discrete_Nominal_Air_Flow,
SET PSZ_10_MainSupVdotSet = argDiscreteMainVdot;
EnergyManagementSystem:Subroutine,
Select_Discrete_Nominal_Air_Flow,
! argMainVdot Input
! argDiscreteMainVdot Output
IF (argMainVdot < = 0.56628) , ! 1200 cfm
SET argDiscreteMainVdot = 0.56628 ,
ELSEIF (argMainVdot > 0.56628) && (argMainVdot < = 0.75504) , ! 1600 CFM
SET argDiscreteMainVdot = 0.75504 ,
ELSEIF (argMainVdot > 0.75504) && (argMainVdot < = 0.9438 ) , ! 2000 CFM
SET argDiscreteMainVdot = 0.9438 ,
ELSEIF (argMainVdot > 0.9438) && (argMainVdot < = 1.13256 ) , ! 2400 CFM
SET argDiscreteMainVdot = 1.13256 ,
ELSEIF (argMainVdot > 1.13256) && (argMainVdot < = 1.4157 ) , ! 3000 CFM
SET argDiscreteMainVdot = 1.4157 ,
ELSEIF (argMainVdot > 1.4157) && (argMainVdot < = 1.60446 ) , ! 3400 CFM
SET argDiscreteMainVdot = 1.60446 ,
ELSEIF (argMainVdot > 1.60446) && (argMainVdot < = 1.8879 ) , ! 4000 CFM
SET argDiscreteMainVdot = 1.8879 ,
ELSEIF (argMainVdot > 1.8879), ! too high
set dummy = @SevereWarnEP 666.0,
ENDIF;
EnergyManagementSystem:GlobalVariable, argDiscreteMainVdot;
EnergyManagementSystem:GlobalVariable, argMainVdot;
EnergyManagementSystem:InternalVariable,
PSZ_1_CalcMainSupVdot,
PSZ-AC_1:1 ,
Intermediate Air System Main Supply Volume Flow Rate;
EnergyManagementSystem:Actuator,
PSZ_1_MainSupVdotSet, ! Name
PSZ-AC_1:1 , ! Component Name
Sizing:System, ! Component Type
Main Supply Volume Flow Rate; ! Control Type
EnergyManagementSystem:InternalVariable,
PSZ_2_CalcMainSupVdot,
PSZ-AC_2:2 ,
Intermediate Air System Main Supply Volume Flow Rate;
EnergyManagementSystem:Actuator,
PSZ_2_MainSupVdotSet, ! Name
PSZ-AC_2:2 , ! Component Name
Sizing:System, ! Component Type
Main Supply Volume Flow Rate; ! Control Type
EnergyManagementSystem:InternalVariable,
PSZ_3_CalcMainSupVdot,
PSZ-AC_3:3 ,
Intermediate Air System Main Supply Volume Flow Rate;
EnergyManagementSystem:Actuator,
PSZ_3_MainSupVdotSet, ! Name
PSZ-AC_3:3 , ! Component Name
Sizing:System, ! Component Type
Main Supply Volume Flow Rate; ! Control Type
EnergyManagementSystem:InternalVariable,
PSZ_4_CalcMainSupVdot,
PSZ-AC_4:4 ,
Intermediate Air System Main Supply Volume Flow Rate;
EnergyManagementSystem:Actuator,
PSZ_4_MainSupVdotSet, ! Name
PSZ-AC_4:4 , ! Component Name
Sizing:System, ! Component Type
Main Supply Volume Flow Rate; ! Control Type
EnergyManagementSystem:InternalVariable,
PSZ_5_CalcMainSupVdot,
PSZ-AC_5:5 ,
Intermediate Air System Main Supply Volume Flow Rate;
EnergyManagementSystem:Actuator,
PSZ_5_MainSupVdotSet, ! Name
PSZ-AC_5:5 , ! Component Name
Sizing:System, ! Component Type
Main Supply Volume Flow Rate; ! Control Type
EnergyManagementSystem:InternalVariable,
PSZ_6_CalcMainSupVdot,
PSZ-AC_6:6 ,
Intermediate Air System Main Supply Volume Flow Rate;
EnergyManagementSystem:Actuator,
PSZ_6_MainSupVdotSet, ! Name
PSZ-AC_6:6 , ! Component Name
Sizing:System, ! Component Type
Main Supply Volume Flow Rate; ! Control Type
EnergyManagementSystem:InternalVariable,
PSZ_7_CalcMainSupVdot,
PSZ-AC_7:7 ,
Intermediate Air System Main Supply Volume Flow Rate;
EnergyManagementSystem:Actuator,
PSZ_7_MainSupVdotSet, ! Name
PSZ-AC_7:7 , ! Component Name
Sizing:System, ! Component Type
Main Supply Volume Flow Rate; ! Control Type
EnergyManagementSystem:InternalVariable,
PSZ_8_CalcMainSupVdot,
PSZ-AC_8:8 ,
Intermediate Air System Main Supply Volume Flow Rate;
EnergyManagementSystem:Actuator,
PSZ_8_MainSupVdotSet, ! Name
PSZ-AC_8:8 , ! Component Name
Sizing:System, ! Component Type
Main Supply Volume Flow Rate; ! Control Type
EnergyManagementSystem:InternalVariable,
PSZ_9_CalcMainSupVdot,
PSZ-AC_9:9 ,
Intermediate Air System Main Supply Volume Flow Rate;
EnergyManagementSystem:Actuator,
PSZ_9_MainSupVdotSet, ! Name
PSZ-AC_9:9 , ! Component Name
Sizing:System, ! Component Type
Main Supply Volume Flow Rate; ! Control Type
EnergyManagementSystem:InternalVariable,
PSZ_10_CalcMainSupVdot,
PSZ-AC_10:10 ,
Intermediate Air System Main Supply Volume Flow Rate;
EnergyManagementSystem:Actuator,
PSZ_10_MainSupVdotSet, ! Name
PSZ-AC_10:10 , ! Component Name
Sizing:System, ! Component Type
Main Supply Volume Flow Rate; ! Control Type
```

## Example 8. System Sizing with Discrete Package Sizes[LINK]

## Problem Statement[LINK]

One tension often arises with modeling when options being evaluated have an indirect effect on air system size. In normal autosizing, the changes in sizes are continuous, but in real systems, equipment sizes tend to be discrete. If we start with the Strip Mall Reference Building model (RefBldgStripMallNew2004_Chicago.idf), we should ask, Could we use the EMS custom calculations to intervene and make the final system sizing results follow the discrete sizes available for a particular product line of equipment?

## EMS Design Discussion[LINK]

Examining the vendor’s literature for one line of commercial packaged single-zone HVAC air systems shows that the nominal product sizes include 1200 cfm, 1600 cfm, 2000 cfm, 2400 cfm, 3000 cfm, 3400, cfm, and 4000 cfm. The literature also classifies units by tonnage of cooling capacity; however, in EnergyPlus modeling it is simpler to classify by air flow rate rather than by cooling capacity (because the direct expansion models have a tight range for allowable cooling capacity per air flow rate and size themselves off the flow rate). We construct the following simple model to select the next higher air flow rate product that uses the volume flow determined during the usual autosizing calculations, ˙Vsize , and threshold values taken from the nominal product sizes (in m3/s):

The system sizing calculations determine a value for the volume flow rate. To obtain this result for use in an Erl program, we use an EnergyManagementSystem:InternalVariable input object to set up a variable for the data called “Intermediate Air System Main Supply Volume Flow Rate.” We can then use this value in our algorithm to find a discrete system size.

Once we have the new system size, we need to set up an actuator to apply the new size. For this we use an EnergyManagementSystem:Actuator input object to establish control over “Sizing:System” type of component using the “Main Supply Volume Flow Rate” control type.

The EMS calling point for controlling air system sizing is called “EndOfSystemSizing.” So we enter this into the program calling manager.

For this example, we modify the example file called “RefBldgStripMallNew2004_Chicago.idf.” This file has 10 separate packaged units, so rather than repeat the algorithm several times, we use a subroutine so the same Erl code can be reused for each air system. The subroutine has two arguments that we will declare as global variables: the input for continuous size and the output for the discrete size.

## EMS Input Objects[LINK]

A set of input objects for EMS control for discrete resizing of 10 air systems follows and is included in the example file called “EMSDiscreteAirSystemSizes.idf.”

Documentation content copyright © 1996-2017 The Board of Trustees of the University of Illinois and the Regents of the University of California through the Ernest Orlando Lawrence Berkeley National Laboratory. All rights reserved. EnergyPlus is a trademark of the US Department of Energy.

This documentation is made available under the EnergyPlus Open Source License v1.0.