Sei sulla pagina 1di 8

SOFTWARE FOR THE SIMULATION OF POWER PLANT PROCESSES

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.

• do not handle model problems robustly, Code written by Consonni This is a


steady-state solver which has been
• are not very well documented in litera- used in a variety of gas turbine and
ture, and/or steam turbine system models [5, 6]
• are very expensive. Cycle Tempo This program has a very high-
level graphical user interface, Guide,[25] but the language is under development
and is suited for steady state simula- for this purpose and may be useful in
tions both for power and refrigeration the future. In Dymola, Modelica code is
systems. The solver of the program is a converted to C, and compiled to an ex-
mixture between sequential and simul- ecutable which can be run interactively
taneous methods, such that the linear from Dymola.
balance equations are solved simulta- Dymola includes several standard
neously, whereas the constitutive equa- solvers for ODE/DAE’s and handles
tions of the components are formulated discontinuities efficiently.
explicitly in one unknown and evaluated
in an inner loop for each outer loop eval- EES is a general equation solver with fea-
uation of the balance equations [21]. tures for calculation of properties of a
Cycle Tempo is commercially available large number of fluids and solids. Ex-
and is developed at Delft University of perience shows that EES is very easy
Technology. to use even for unexperienced users,
e.g., students. EES is mainly intended
DIMAP [1, 19] has been developed at Uni- for steady state simulation and it uses
versity of Padova, Italy, and has been a robust implementation of the Newton
used in a number of studies of differ- method including sparse matrix tech-
ent cycles for steady state operation. niques. It may be used for dynamic
The program has been extended with simulation as well, but the implemented
a graphical user interface. The pro- ODE solver has limited efficiency.
gram has a sparse matrix Newton solver
which is applied in a special way to sep- ESMS is developed at the University of
arated parts of the system of equations. Florence[4]. It is suited for simulation of
steady state processes and includes a
DNA is developed by several authors at the graphical user interface. The solver is a
Technical University of Denmark. It is specially implemented simultaneous lin-
suited for both steady state and dy- ear equation solver.
namic simulations [9, 10, 11]. Presently,
GT Pro is a commercial program for steady
there is no graphical interface, so DNA
state simulation of power plants. It uses
is a model description language. It has
a sequential solution method[17].
been integrated with the emacs editor
and is free. The program uses a New- Gate Cycle is a commercial program for
ton solver to solve the system of equa- steady state simulation of power plants.
tions, and it has a sparse linear equation It uses a sequential solution method[17].
solver. The robustness of the solver is
improved by a preprocessing, sequen- Hysys is a commercial simulator for chemi-
tial solution step. The differential equa- cal processes for both steady state and
tions are solved by a fourth order BDF dynamic simulation. It uses a sequential
method with variable step size and han- solution method.
dling of discontinuities. ICAS is developed at the Technical Univer-
sity of Denmark and is a highly inte-
Dymola is a commercial solver for dynamic
grated software package for analysis of
systems. It is the only simulation tool
chemical process plants.
that is currently available for the simula-
tion language Modelica, which is based MMS/ACSL is a commercial simulator for
on object oriented modelling and pro- dynamic systems [8]. MMS is a graphi-
gramming features. It has not yet been cal extension to the ACSL modelling lan-
extensively used for energy systems, guage – a preprocessor that generates
ACSL code. The ACSL model is trans- the code has been developed with general-
lated to Fortran code which is compiled ity as a main aim, there will unavoidably be
to an executable and may then be run. made decisions in the earlier stages of the
The solver is a sequential method, but development of the code, which will lead to
does not handle algebraic loops [20]. difficulties when extending the code.

Matlab/Simulink is a commercial system


for simulation of dynamic systems in TABULAR MODEL REPRESENTATION IN
general. Thus, media properties are DNA
not available, but have to be imple- DNA [9, 10, 20, 22] is an example of an en-
mented. Simulink is mainly intended for ergy system simulation tool which has both
control system design and is not very steady state and dynamic simulation fea-
well suited for closed loop systems, as tures and has proven useful through sev-
is very often the case for energy system eral research and student projects involv-
models. As a Matlab-based system it ing simulation of e.g., steam power, gas tur-
has access to all the mathematical anal- bines, fuel drying, pyrolysis and gasifica-
ysis features available in Matlab. This in- tion, fuel cells, and heat exchanger networks
cludes several solvers for ODE systems. [7, 10, 12, 13, 16].
DNA includes
Prosim is a commercial steady state simu-
lation tool based on a sequential solver. • a modified Newton method solver for
It is so integrated into Autocad, that this steady state models,
is needed in order to run Prosim[3, 17].
• an up to fourth order, variable step size
Vissim is a commercial system for simu- BDF solver for dynamic simulation,
lation of dynamic systems in general. • an extendible component model library
Thus, media properties are not avail- which is compiled into the code, and
able, but have to be implemented. The
program has several solvers for ODE’s • routines for calculation of state variable
included. properties, transport properties and ra-
diative properties of fluids and solids,
Windali This program is developed at the e.g., ideal gas mixtures, water/steam,
Technical University of Denmark, as a carbon dioxide and solid fuels and
code for dynamic simulation of DAE ashes.
systems. It is closely integrated with
the Windows platform and utilizes dy- DNA is a modelling language and the sys-
namic link libraries for integration be- tem model written by the user is compiled
tween code and solvers. The program and simulated in one run.
is available from [24]. It includes several During the compilation, the input is an-
standard DAE Solvers. alyzed, information is re-organized, and
stored properly in a set of tables. Thr simula-
Some of the codes, e.g. [18], are the result tion part is based upon standard solvers im-
of student or research projects and have as plemented with sparse matrix technique for
such often been developed for a special pur- efficiency.
pose and later extended to a more general The system models in DNA consist
applicability. This naturally leads to assump- of components which have a number of
tions and neglects at the early development branches connecting the component to its
stages. This have to lead to limitations in ex- surroundings and parameters determining
tendibility. However, it is also our experience the characteristics of the component. The
from the development of DNA, that even if branches of two or more components are
connected at nodes in order to form a sys- • The "‘residual table"’ stores information
tem. The tabular representation of the model about the equations (residuals) in the
makes it possible to automatically generate model. Each column holds information
mass and energy balances for all compo- about an equation: The type of equa-
nents and nodes. Thus, the component mod- tion, the component or node it comes
eller only has to implement the constitutive from, and the value.
equations of the component type in a model. An equation is either conservation of en-
The tables also allows to exploit the sparsity ergy or mass for a component or a node,
of the system of equations and this feature is a constitutive equation, or an equation
used in the solver. relating dynamic variables to their time
derivatives according to the Nordsieck
From Physical to Mathematical Model formulation [20].

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.

Potrebbero piacerti anche