Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
PART B
Brian Elmegaard
Department of Mechanical Engineering
Technical University of Denmark (DTU)
Nils Koppels Alle, Building 402, DK-2800 Kgs. Lyngby, DENMARK
Phone: (+45) 4525 4169, Fax: (+45) 4593 5215, E-mail: be@mek.dtu.dk
Niels Houbak
Department of Mechanical Engineering
Technical University of Denmark (DTU)
Nils Koppels Alle, Building 402, DK-2800 Kgs. Lyngby, DENMARK
Phone: (+45) 4525 4154, Fax: (+45) 4593 5215,
E-mail: Niels.Houbak@mek.dtu.dk
ABSTRACT INTRODUCTION
During the last ten to twenty years, there
Modelling of energy systems has been in- has been a tremendous development of soft-
creasingly more important. In particular the ware for modelling and simulation of energy
dynamic behaviour is critical when operating (or process) systems. The need for pre-
the systems closer to the limits (either of the cise information about the behaviour of such
process, the materials, the emissions or the systems has increased in connection with a
economics, etc.). This enforces strong re- higher degree of integration of processes,
quirements on both the models and their nu- optimization of processes, getting closer to
merical solution with respect to both accu- the limits of strength of the material due to
racy and efficiency. In this paper we give temperature, pressure, or dimensions, or a
a survey on simulation of energy systems, need for better control of the processes due
from models and modelling, over numeri- to for example quality of the product.
cal methods to implementational techniques. It is straightforward to divide these sim-
The paper is the second part of two papers ulation programs into various groups: gen-
covering important aspects of the different eral simulators, application specific or com-
phases of modelling in general and mod- ponent specific simulators.
elling of an (energy) system. Part A, also When buying expensive equipment the
gives a short introduction to robust numerical customer may have included in the deal a
methods which it is strongly recommended simulator that could be used for training of
to use. In this part, Part B, we present a sur- the operators. This is the component specific
vey of available, commercial and university case, where only the manufacturer may actu-
simulators, a few important aspects of the ally make changes in the underlying model.
implementation of the energy system simula- Often it is a non-trivial task to make serious
tor DNA and a short tricky example showing changes to the overall structure of such a
that too simple models may result in unex- model because the model is tailored to the
pected problems. problem.
Application specific codes often offer a Before initiating a work on developing a
higher degree of freedom. In the design of simulation tool, Perstrup [22] made an as-
the code, special attention has been paid sessment of codes available then. The main
to how problems traditionally are described premise for the assessment was the desire
within that specific application area. Pro- for a tool with an extendible component li-
grams for simulating the behaviour of elec- brary which might be applied for both steady
trical (or other types of) networks are of that state and dynamic simulation of all kinds of
nature. thermal energy systems, particularly power
General tools for simulating any system do plants. One further specification following
not exist but there are tools (often equation from this premise was that the code should
based) where the user may type in almost be equipped with a well documented, effi-
any set of equations that he/she thinks de- cient solver for AE, ODE, and DAE systems,
scribe the system. In most cases the solver i.e., a standard solver. The result of this as-
may then actually produce reasonable re- sessment was that no code fulfilling the re-
sults. From the above, it is clear, that the quirements existed. Though, this assess-
more the user wants the tool-producer to ment since then has been maintained dur-
take responsibility for in the model, the less ing the works described in [10, 20], it is not
influence does the user have on the model to a complete overview of energy system sim-
be solved. ulation codes available. Below, we present
This part B of the paper includes a sur- the current status of our survey of available
vey of a number of the available tools and codes. Surveys with focus on overall fea-
the inter-play between mathematical model turs of different codes is given in [3, 23, 17]
and numerical methods. We give a descrip- The presented codes are, to our knowledge,
tion of the tabular representation of an en- maintained and in use:
ergy system model as it is implemented in
Aspen Plus is a commercial program which
the component-based code DNA, and we ex-
is developed for chemical processes
emplify whhat problems may develop when
and is often used in gas turbine applica-
simple component models are connected in
tions. For steam plants its use is more
a system model.
limited. It is intended for steady state
process simulation and uses a sequen-
AVAILABLE SIMULATION TOOLS tial solver [3, 17].
It is a fact that a very high number of codes Camel is developed at the University of
for simulation of energy systems are avail- Rome [14, 15]. It is based on a well
able. This may be verified by a search on documented tabular description of the
the interduct home page [2], which does not model and may be applied for both
even contain all codes described in literature. steady state and dynamic simulation.
On the other hand, it is also possible to verify The latter is based on the assumption
that many of the tools: that dynamics may be calculated as
a sequence of quasi-stationary steady-
• are specific to a narrow range of prob-
states, i.e., an explicit first-order Eu-
lems,
ler integration method. The solution
• are difficult to learn, method is sequential in the equations.
The mathematical model is a result of the • The incidence matrix describing the en-
physical model specified by the user as input tries of the Jacobian matrix. It is imple-
to DNA. From this an internal, tabular repre- mented using sparse matrix techniques
sentation of the model is generated. The ta- as described in part A of the paper.
ble connects component and the connected During the solution process these tables
nodes to the information about the compo- and the system table are frequently in-
nent as is specified in the component library. spected when the residual values or the Ja-
An important feature obtained by careful cobian of the system is to be calculated.
implementation of the tabular representation It should be noted that the above descrip-
is that DNA will check for and issue errors tion does not cover all details of the imple-
if the system of equations resulting from the mentation, and that it is elaborated further in
specified model does not have the same [10, 20]. The source code is available from
number of variables and equations, both in http://www.et.dtu.dk/software/dna.
static parts and the dynamic parts of the sys- In order to minimize the use of RAM in the
tem. computer, the complete set of tables in DNA
In order to have a complete tabular struc- is stored compactly in three one-column ar-
ture describing an energy system model, the rays, see [20].
input model specification generates a few
more tables, e.g., for storage of gas mixture
compositions. LINEARLY DEPENDENT MODELS
A node-oriented description of the connec- The model displayed in figure 1 is a very
tions in the system is generated in order to simplified example of what may easily hap-
check consistency. pen when applying standard, simple com-
ponents to a simple (at first sight) problem.
A heat source with negligible pressure loss
From Mathematical to Numerical
provides hot water (100°C) for two parallely-
Model
coupled heat sinks both with a constant pres-
The core tables for the solution process are sure loss of 9 bar. Both sinks cool the water
generated from the above described tables. to 10°C. The distribution of heat between the
Three tables are necessary: two sinks is fifty-fifty. A pump is used for rais-
ing the pressure to make the fluid circulate in
• The "‘variable table"’ holds information the system.
about all variables in the system. It has Usually, a system model is built iteratively
a column for each variable, describing by inserting components one by one to cre-
the type of variable and the component ate the complete model. In the present
it is connected to and its value. model it is easy to create the system as long
problem is easily recognized here, but if it ap-
pears during the refinement or extension of
Q̇1 a complete power plant model it is difficult to
find.
Q̇3 Q̇2
CONCLUSION
In this paper, parts A and B, we have pre-
sented a survey of methods applicable in the
implementation of energy system simulation
Figure 1: Sketch of a simple, problematic software with focus on the implementation of
model internal model representation and numerical
solvers. In this part B, we have presented a
as the cycle is not closed, i.e., a system with list of software and their main features with
inlet of water to the pump and outlet from the respect to the scope of the paper.
sinks may be made without problems. How- The DNA code was originally designed for
ever, if the connection of the sink outlets to large static problems; hence it was built with
the pump inlet is made, the system can no a Newton solver for the non-linear equations
longer be solved. The reason is that the con- and sparse matrix technique for the linear
stant pressure loss assumption of both the equations. Em-phasis was put on having
sinks generates two equations both speci- a complete component description including
fying the absolute pressure into the pump. consistency checks, in one routine per com-
This is a linear dependency in the system, ponent. Thus, evaluating the complete sys-
which cannot be solved. Another way to ex- tem model corresponds to calling the appro-
press this is: In the outer loop adding any priate component routines in a systematic
number to the mass flows will make no dif- matter. The feature of including the compo-
ference. sition of some of the fluids in the equation
Trying to simulate this system in DNA re- system was not in the original design but has
sults in the error message, that one too many been added later.
conditions on the system operation has been The extension of the code with dynamic
assigned. Removing any of the conditions capabilities did require several projects. In
does not solve the problem; DNA initiates particular the implementation of the handling
the solution procedure and responds with an of discontinuities was a time-consuming
error message: The system of equations is task. It was in principle also this fea-
wrong with some variables being overspeci- ture (or the lack of available discontinuity
fied, some being underspecified. solvers) that caused an own-development
The solution is to decouple the pressures of the DEA solver in DNA. Using the BDF
out of the two heat sinks. There are (at least) method in a Nordsieck-formulation with a
two ways to do this. Either, an insignificant maximum (user-determined) order was sim-
mass flow dependency on the pressure loss ply a choice.
may be introduced (a new component model The conclusion is that all codes, includ-
is added to the simulator), or an expansion ing DNA, which have been presented in
valve may be inserted between either of the more detail, do have defiencies resulting
sinks and the connection (an artificial com- from early assumptions in the implementa-
ponent is introduced in the system model). tion. These result in limitations in applica-
This example shows that even very simple bility and extendibility in further work on a
problems may cause modelling problems, code. We have described the implementa-
but also that modelling creativity may pro- tion of DNA in detail in order to provide an
vide simple solutions to such problems. The insight in a way a code may represent a com-
plete model and solve it numerically. [7] Pietro de Faveri Tron and Giacinto
Even if the code has been carefully im- Carapelli. Analysis of an ifgt (indirectly
plemented, a simple model of a simple en- fired gas turbine). Technical report, De-
ergy system may result in problems and re- partment of Energy Engineering, Tech-
quire the user to make innovative modelling nical University of Denmark, 2000.
efforts.
[8] S. Murthy Divakaruni. The aplication of
simulation in large energy system anal-
REFERENCES ysis. Modeling, Identification and Con-
[1] C. R. Altafini, A. Mirandola, and A. Stop- trol, 6(4):231–247, 1986.
pato. Analysis and simulation of an
integrated gasification combined cycle [9] B. Elmegaard, N. Houbak, and
power plant. In A. Bejan, M. Feidt, M. J. B. Lorentzen. DNA—a network based
Moran, and G. Tsatsaronis, editors, Ef- energy system simulator. In Giampaolo
ficiency, Cost, Optimization, Simulation Manfrida, editor, FLOWERS’97—
and Environmental Aspects of Energy Florence World Energy Research
Systems and Processes, pages 641– Symposium, pages 239–246. SGEdito-
648, 1998. riale, 1997.
[2] Anonymous. Home page of interduct. [10] Brian Elmegaard. Simulation of Boiler
http://www.interduct.tudelft.nl/, Dynamics – Development, Evaluation
1994–2001. and Application of General Energy sys-
tem Simulation Tool. PhD thesis, Tech-
[3] Mohsen Assadi, Per Rosén, and Niklas nical University of Denmark, 1999.
Ågren. Utvärdering av olika värme-
balansprogram, (comparison of differ- [11] Brian Elmegaard and Niels Houbak.
ent heat balance programs). Technical Robust implementation of process sim-
Report LUTMDN/TMVK–3173–SE, De- ulators and their associated models. In
partment of Heat and Power Engineer- G. Hirs, editor, Proceedings of ECOS
ing, Lund Institute of Technology, Swe- 2000, pages 325–332, 2000.
den, 1995.
[12] Brian Elmegaard and Bjørn Qvale.
[4] C. Carcasci and B. Facchini. A numeri- Analysis of indirectly fired gas turbine
cal method for power plant simulations. for wet biomass fuels based on com-
Journal of Energy Resources Technol- mercial micro gas turbine data. Sub-
ogy, 118:36–43, March 1996. mitted to ASME IGTI Turbo Expo 2002,
Amsterdam, June 2002.
[5] S. Consonni and E. D. Larson.
Biomass–gasifier/aeroderivative gas [13] Brian Elmegaard, Bjørn Qvale, Giac-
turbine cycles: Part b—performance into Carapelli, and Pietro de Faveri Tron.
calculations and economic assessment. Open-cycle indirectly fired gas turbine
Transactions of the ASME—Journal of for wet biomass fuels. In Proceedings
Gas Turbines and Power, 118:516–525, of ECOS ’01, pages 361–368, 2001.
July 1996.
[14] Marco Francesco Falcetta and Enrico
[6] Stefano Consonni. Combined cycles for Sciubba. A computational, modular ap-
high performance, low cost, low envi- proach to the simulation of powerplants.
ronmental impact waste-to-energy sys- Heat Recovery Systems and Combined
tem. Munich, Germany, May 2000. Heat and Power Production, 15:131–
ASME. 145, 1995.
[15] Marco Francesco Falcetta and Enrico [22] Claus Perstrup. Analysis of power plant
Sciubba. Unsteady numerical simula- by application of network theory (in dan-
tion of combined cycle plants. In R. Cai, ish). Master’s thesis, Technical Univer-
M. J. Moran, S. Zhangz, and Y. Xiao, ed- sity of Denmark, Laboratory for Ener-
itors, Thermodynamic Analysis and Im- getics, 1991.
provement of Energy Systems, pages
224–231. Chinese Society of Engineer- [23] Robert M. Privette. Developments in the
ing Thermophysics and American So- Design of Thermal Systems, chapter
ciety of Mechanical Engineers, Beijing Computer-aided process design trends
World Publishing, 1997. in the power industry, pages 16–39.
Cambridge University Press, 1997.
[16] Nicola Gelli, Giovanni Sarti, and Marco
Donati. Biomass fuelled power plants. [24] Morten Skovrup. Windali home page.
Technical report, Technical University of Internet: http://www.et.dtu.dk/
Denmark, Department of Energy Engi- software/windali.
neering, 2000.
[25] TNO Milieu, Energie en Procesinno-
[17] I. Giglmayr, M. Nixdorf, and vatie and Delft University of Technol-
M. Pogoreutz. Vergleich von software ogy. CYCLE–TEMPO, Thermodynamic
zur thermodynamischen proceßrech- Energy systems Massflow calculation of
nung. Forschungsvorhaben 177, VGB, POwer processes, release 3.21 edition.
Technische Universität Graz, Tech-
nische Universität München, March
2000.
[18] A. Korving. Cycle–tempo.
http://www-pe.wbmt.tudelft.nl/
ev/cycle/cycle.html, 1999. Section
Thermal Power Engineering, Delft
University of Technology.
[19] A. Lazzaretto et al. Dimap—a modu-
lar computer code for thermodynamic
exergetic and thermoeconomic simula-
tion of energy systems. In R. J. Krane,
editor, Thermodynamics and the de-
sign, analysis and improvement of en-
ergy systems. The 1995 ASME, Proc. of
the International Mechanical Engineer-
ing Congress and Exposition, volume
AES-35, pages 119–126. ASME, Amer-
ican Society of Mechanical Engineers,
1995.
[20] B. Lorentzen. Power Plant Simulation.
PhD thesis, Technical University of Den-
mark, Laboratory for Energetics, 1995.
[21] J. A. Miedema. Cycle; a General Com-
puter Code for Thermodynamic Cycle
Computations. PhD thesis, Delft Unver-
sity of Technology, 1981.