Program Algorithm
Program Algorithm
ABSTRACT
This paper presents the new EnergyPlus HVAC
simulation environment, which differs from existing
energy analysis programs in three key respects. First,
the EnergyPlus HVAC simulation is based on a
"manager-interface" protocol that supports multiple
solution techniques within the overall context of the
simulation.
Second, the EnergyPlus HVAC
simulation
is based on high level component
connectivity. Third, the EnergyPlus simulation and
component modules enforce a high degree of data
encapsulation.
These three features together with
input and output processing services provided by the
environment result in a simulation tool that is ideally
suited for collaborative development of component
models, evaluation of solution techniques and design
of HVAC sub-systems. The paper describes the
features of the simulation environment, discusses
currently implemented algorithms and includes an
example of the type of results that can be expected.
INTRODUCTION
Existing building energy simulation programs can be
broadly categorized on the basis of overall structure
as either system based, component based or equation
based. System based programs tend to use structured
languages such as FORTRAN to describe the various
system simulation algorithms. Since each algorithm
is tightly coupled with a numeric solver; usually a
Gauss-Seidel, successive substitution method
[Stoecker, 1989a], modifications to existing systems
tend to be difficult. Component and equation based
systems are more amenable to object based languages
and usually implement a Newton type solver,
[Stoecker, 1989b] that is de-coupled from the
component level algorithms or equations. Both
system based approaches and component or equation
based approaches have distinct advantages and
disadvantages.
Department of Mechanical and Aerospace Engineering, Oklahoma State University, Stillwater, OK, USA
Building Simulation Laboratory, University of Illinois at Urbana-Champaign, IL, USA
Lawrence Berkeley National Laboratories, Berkeley, CA, USA
School of Architecture, University of Illinois at Urbana-Champaign, IL, USA
1
D E M A N D S IDE
S UPPLY S IDE
Pump
Chiller
Coil
Fan
Zone
Cooling
Coil
A IR L O O P
S IDE
Reheat
Coil
ZONE
E QUIPMENT
S IDE
MANAGER-INTERFACE PROTOCOL
Fluid loops and the ability to track fluid properties
around each loop by means of loop nodes are key
concepts in the EnergyPlus HVAC and mechanical
systems simulation. Systems are defined by first
specifying hydronic and air loops that represent the
ducts and pipes found in a physical system.
Components such as fans, dampers, coils, boilers and
chillers (or potentially groups of system components
such as an HVACSIM+ sub-system) are added to the
loops to form a complete system description. The
Outlet Node
Inlet Node
COMPONENT CONNECTIVITY
Components are connected to each other and to the
fluid loop at loop nodes, which are defined as points
on a loop where fluid properties are known and
available. The loop node data structure shown in
Figure 3 is a de-facto component interface.
TYPE NodeData
CHARACTER(len=Max) :: FluidType
REAL
:: Temp
REAL
:: TempMin
REAL
:: TempMax
REAL
:: TempSetPoint
REAL
:: MassFlowRate
REAL
:: MassFlowRateMin
REAL
:: MassFlowRateMax
REAL
:: MassFlowRateMinAvail
REAL
:: MassFlowRateMaxAvail
REAL
:: MassFlowRateSetPoint
REAL
:: Quality
REAL
:: Press
REAL
:: Enthalpy
REAL
:: HumRat
REAL
:: HumRatMin
REAL
:: HumRatMax
REAL
:: HumRatSetPoint
END TYPE NodeData
Figure 3. Loop Node Data Structure
DATA ENCAPSULATION
The modular structure of the simulation code and
services provided by the EnergyPlus Input Processor
support a high level of data encapsulation. A module
is defined as a self-contained set of initialization,
computation, control and node update routines. The
modules initialization routines use the Input
Processor to retrieve input data needed by the module
and populate module level data structures.
In general the input format is similar to the module
level data structure that it fills. For example, the
input format for plant loop parameters is shown in
Figure 5 where an A prefix indicates an alpha input
and a N prefix indicates a numeric input. The loop
name, fluid type, component list names and operation
scheme identifiers are shown in A1-A5). Design flow
rates and temperatures for the loop follow in A6-N4.
BETA IMPLEMENTATION
A beta version of EnergyPlus has been developed
with successive substitution solvers implemented in
each of the loop managers. Both rule based
controls and ideal controllers that are tailored for
specific applications are supported by the
implementation. Detailed representations of actual
controllers that can be applied to specific types of
components are not supported.
Sensed
Node
CHILLER:CONSTANT COP,
A1 [Chiller Name],
N1 [Nominal Capacity],
N2 [COP],
N3 [Design Evap. Flow Rate],
N4 [Design Cond. Flow Rate],
N5 [Plant Loop Inlet Node],
N6 [Plant Loop Outlet Node],
N7 [Condenser Loop Inlet Node],
N8 [Condenser Loop Outlet Node];
Figure 6. Component Model Specification
Control
Valve
Actuated
Node
Cooling
Coil Air
Inlet
Figure 7. Cooling Coil Control
Air loop controllers update the value of the actuated
variable using previous values of the sensed and
actuated values modified by a pre-set, normalized
gain.
EXAMPLES
In the following examples, each loop is simulated by
stepping around the loop, in the flow direction, from
one component to the next. In the first example, for
which results are presented in Figures 9 and 10, a
three zone building served by a constant volume dual
duct system was simulated. The system consisted of
a single fan upstream of a splitter. One branch of the
splitter fed into a cooling coil, the other into a heating
coil. Each coil was controlled to a constant outlet
temperature by adjusting the supply water flow rates.
On the zone side of the system, each zone had a
mixing damper that provided air at a temperature
appropriate for the load experienced by the zone.
During the winter design day, the zone was controlled
ACKNOWLEDGEMENTS
The authors wish to acknowledge of the Building
Technology Group in the Department Of Energy for
the continued support of this project.
REFERENCES
BSO, BLAST Technical Reference Manual, BLAST
Support Office, University of Illinois, 1991.
Clarke J A The ESP-r System: Advances in
Simulation Modelling, Building Services Journal,
pp27-9, May 1996
Klein, S.A., W.A. Beckman and J.A. Duffie,
TRNSYSA
Transient
Simulation
Program,
ASHRAE Transactions 82 (1), 1976, p 623-633
LBNL, DOE-2 Reference Manual, Lawrence
Berkeley Laboratory and Los Alamos Scientific
Laboratory, May 1980.
McConnell, S.C. Code Complete, Microsoft Press,
Redmond, Washington, 1993, p. 118
Park, C., D.R. Clark and G.E. Kelly, An Overview of
HVACSIM+, A Dynamic Building/HVAC Control
Systems Simulation Program, First Building Energy
Simulation Conference
Proceedings,
Seattle,
Washington, USA, IBPSA, 1985
Sahlin, P. and A. Bring. IDA SolverA Tool for
Building and Energy System Simulation, Conference
Proceedings IBPSA Building Simulation '91, Nice,
France, August 20-22, 1991. p339-348
Sowell, E. F., M.A. Mosier, HVAC Component
Model Libraries For Equation-Based Solvers, Fourth
International Conference Proceedings IBPSA
Building Simulation '95, Madison, Wisconsin, USA,
August 14-16, 1995, p189-196.
ADDITIONAL FIGURES
50
24.0
45
40
22.0
35
25
20
18.0
15
10
16.0
5
14.0
0
0
12
16
20
24
Hour
3.60E+01
2.00E+01
3.40E+01
3.20E+01
3.00E+01
1.00E+01
2.80E+01
2.60E+01
5.00E+00
2.40E+01
2.20E+01
0.00E+00
0
12
16
20
Hour
24
Kilowatts
1.50E+01
Kilowatts
30
20.0
8.00
20
6.00
18
4.00
16
2.00
14
Kilowatts
22
0.00
0
12
16
20
24
Hour
2.50E+01
36
34
2.00E+01
32
1.50E+01
Kilowatts
30
28
1.00E+01
26
5.00E+00
24
22
0.00E+00
0
12
16
20
Hour
24