combining fvm and pece algorithms with adjoint methods …combining fvm and pece algorithms with...

7
Combining FVM and PECE Algorithms with Adjoint Methods for the dynamical Simulation of Power Plants Prof. Dr. techn. Dipl.-Ing. Dipl.-Ing. R. Leithner H. Zindler A. Witkowski [email protected] [email protected] [email protected] Technical University Braunschweig Institute for Heat and Fuel Technology Franz-Liszt-Str. 35 D-38106 Braunschweig Germany July 14, 2006 Abstract: The dynamic workings of power plants will become much more important with the liberalisa- tion of the energy markets and the ever increasing number of regenerative power plants. Within a short time span it has to be decided, what kind of power plants will supply the norm amount of energy and what kind of cost will result. A mathematical model will be described within this article, which will make it possible to dynamically simulate the power plants in regard to the change in capacity demand and malfunctions. The aim of this simulation will be to show the local behaviour over time of the mass flows, temperature and pressure, although pressure waves are not part of the simulation at this moment. The components of the power plants are divided into fast moving and slow moving components. These may then be reassembled into complete plants. Fast moving components are modelled with the help of non-linear equations, slow moving with differential equations. The resulting differential algebraic equa- tion system will be solved using the Predictor-Corrector-Method (PECE). There may be numerical problems within the heat exchangers of the power plants, because the water/steam tables show signs of discontinuity and because of large density changes. To solve this problem locally, heat exchangers will be modelled using the Finite Volume Method (FVM). To stabilise it further, the simplified momentum- and mass balance is linked using the SIMPLER-algorithm. Since the PECE is a directed method, derivations must be calculated for all equations. For the FVM, these will be calculated using an adjoint method. Keywords: Finite Volume Method (FVM), SIMPLER, Predictor-Corrector-Method (PECE), adjoint method, XML, dynamic simulation, power plants. 1 Introduction - Motivation and state of technology During the liberalisation of the european energy- markets (energy-economy law) and the increas- ing usage of regenerative energy sources (law for the precedency of regenerative energy, power- heat-coupling law) like solar- and wind power plants, the demands on the steam power plants increase. Regenerative power plants fluctuate in their output of power and therefore demand a fast adaption of the conventional power plants. When planning or refitting power plants, dy- namic simulations assist in optimising the con- 1 Proceedings of the 4th WSEAS Int. Conf. on HEAT TRANSFER, THERMAL ENGINEERING and ENVIRONMENT, Elounda, Greece, August 21-23, 2006 (pp180-186)

Upload: others

Post on 03-Mar-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Combining FVM and PECE Algorithms with Adjoint Methods …Combining FVM and PECE Algorithms with Adjoint Methods for the dynamical Simulation of Power Plants Prof. Dr. techn. Dipl.-Ing

Combining FVM and PECE Algorithms with Adjoint Methods for the

dynamical Simulation of Power Plants

Prof. Dr. techn. Dipl.-Ing. Dipl.-Ing.

R. Leithner H. Zindler A. Witkowski

[email protected] [email protected] [email protected]

Technical University Braunschweig

Institute for Heat and Fuel Technology

Franz-Liszt-Str. 35

D-38106 Braunschweig

Germany

July 14, 2006

Abstract: The dynamic workings of power plants will become much more important with the liberalisa-tion of the energy markets and the ever increasing number of regenerative power plants. Within a shorttime span it has to be decided, what kind of power plants will supply the norm amount of energy andwhat kind of cost will result. A mathematical model will be described within this article, which willmake it possible to dynamically simulate the power plants in regard to the change in capacity demandand malfunctions. The aim of this simulation will be to show the local behaviour over time of the massflows, temperature and pressure, although pressure waves are not part of the simulation at this moment.The components of the power plants are divided into fast moving and slow moving components. Thesemay then be reassembled into complete plants. Fast moving components are modelled with the help ofnon-linear equations, slow moving with differential equations. The resulting differential algebraic equa-tion system will be solved using the Predictor-Corrector-Method (PECE). There may be numericalproblems within the heat exchangers of the power plants, because the water/steam tables show signs ofdiscontinuity and because of large density changes. To solve this problem locally, heat exchangers willbe modelled using the Finite Volume Method (FVM). To stabilise it further, the simplified momentum-and mass balance is linked using the SIMPLER-algorithm. Since the PECE is a directed method,derivations must be calculated for all equations. For the FVM, these will be calculated using an adjointmethod.

Keywords: Finite Volume Method (FVM), SIMPLER, Predictor-Corrector-Method (PECE), adjointmethod, XML, dynamic simulation, power plants.

1 Introduction - Motivation

and state of technology

During the liberalisation of the european energy-markets (energy-economy law) and the increas-ing usage of regenerative energy sources (law forthe precedency of regenerative energy, power-

heat-coupling law) like solar- and wind powerplants, the demands on the steam power plantsincrease. Regenerative power plants fluctuate intheir output of power and therefore demand afast adaption of the conventional power plants.

When planning or refitting power plants, dy-namic simulations assist in optimising the con-

1

Proceedings of the 4th WSEAS Int. Conf. on HEAT TRANSFER, THERMAL ENGINEERING and ENVIRONMENT, Elounda, Greece, August 21-23, 2006 (pp180-186)

Page 2: Combining FVM and PECE Algorithms with Adjoint Methods …Combining FVM and PECE Algorithms with Adjoint Methods for the dynamical Simulation of Power Plants Prof. Dr. techn. Dipl.-Ing

2 2 MATHEMATICAL MODEL

trol and operating (structural and setting). Thisshortens the start up time of the plants and maypossibly identify thick walled components, wheredesign parameters must be optimised.

To simulate a steam power plant fast andcost-efficient a flexible, powerful and stablesimulation-software is needed, in which the to-be simulated power plant is modelled and calcu-lated.

There are many simulation-programs (see [1])for the calculation of stationary operating pointsof power plants, in which layout is supported,i.e. for plants which are defined in their structureand geometry, which can solve stationary mass-,matter-, energy- and momentum balances. Ex-amples are Enbipro, Epsilon, Alpro and Gate Cy-cle. It becomes more difficult when consideringthe dynamic behaviour of power plants while inoperation. Simulation software for this exists aswell, although it is either specialised on one cer-tain plant type, that they can only be transferredto other types with an high amount of effort orthey are generalised in a way, that to adapt themto a specific type, high amount of effort and costmust be expected. The solution to this was to tryand design the simulation of dynamic processesas simple as that of stationary processes.

Furthermore, the power plant houses a vari-ety of hierarchies in the control circuits. Singlecomponents like the outlet temperature of the su-perheater must be controlled. Equally, the massflow and steam parameters in front of the turbinehave to be regulated considering different strate-gies like sliding-, or fixed pressure operations.

The system can be influenced from the out-side by altering the required turbine output orchanging other target values, as well as by oper-ational disturbances.

When examining the various components, itappears that they all possess different time con-stants, i.e. they all react differently to influ-ences from the outside. Pressure changes movethrough the system quite rapidly, while changesin the temperature take far longer. This arti-cle will mainly focus on changes in temperatureand mass flow. Some components adjust quitefast, since they can store only very little mass orthermic energy. These fast changing components

can be viewed as quasi-stationary, i.e. all stor-age terms can be eliminated and the differentialequation transforms to a non-linear equation.

This simplification of the before consideredsystem of equations results in the overall sys-tem of equations being a system of differential-algebraic equations (DAE’s) [5].

Algebraic systems of equations (ASE) occurin quasi-stationary components, common differ-ential equations (DE) occur in regulators andstorages and partial differential equations (PDE)in heat exchangers. All systems of equations willbe shown implicitly.

0 = ~F (~z, ~y) (1)

0 = ~G(t, ~z, ~y,d~y

dt) (2)

0 = ~H(t, x, ~z, ~y,d~y

dt,d~y

dx) (3)

A further problem arises due to the fact, thatone can expect large changes in density due tothe large heat flow within the heat exchangers.If the heat exchanger is discretisised locally, sta-bility problems may be encountered. In additionthere are problems with the derivations, sincethe water/steam table shows signs of discontinu-ity. With the transient calculation of the com-ponents, the geometry will be assumed to beknown, i.e. the design has already been donein the stationary case.

The physical mathematical model consists ofa set of ASE’s and/or a set of DE’s (PDE’s withHE), a definite set of differential and algebraicvariables, as well as a definite set of parameters.

2 Mathematical model

All components are connected by either flows(matter- or energy flows) or control signals. Aflow or signal leaving one component must repre-sent a flow or signal entering another component.The equations modelling these components arelinked by these flows and signals. To assemblethe system of equations, methods of the graphtheory are used. All components are vertices.The equations will be placed at these vertices.These are connected by edges. Edges are flowsof any kind. Hence, all state variables must be

Proceedings of the 4th WSEAS Int. Conf. on HEAT TRANSFER, THERMAL ENGINEERING and ENVIRONMENT, Elounda, Greece, August 21-23, 2006 (pp180-186)

Page 3: Combining FVM and PECE Algorithms with Adjoint Methods …Combining FVM and PECE Algorithms with Adjoint Methods for the dynamical Simulation of Power Plants Prof. Dr. techn. Dipl.-Ing

3

stored in the edges. Local values may be storedin the vertices or components as well. All valuesare treated equally in the beginning, i.e. it is notdetermined if a value is a variable or a constant.This can be defined depending on the problemto be solved. Since the system of equations isimplicit, it is not necessary to assemble it anew.

In the following some mathematical modelsof a few components are described.

The most common component in an powerplant are the heat exchangers. They appearin power plants as preheaters, evaporators orsuperheaters. Water- and water/steam flowswithin the pipes are modelled with the help ofmomentum-, mass- and energy-balances (simpli-fied representation for 1-dimensional transientflows).

∂ρu

∂t+

∂ρu2

∂x+

∂p

∂x+ Su = 0 (4)

∂ρ

∂t+

∂ρu

∂x= 0 (5)

∂ρh

∂t+

∂ρhu

∂x− Sh = 0 (6)

Furthermore, ordinary differential equationsappear as they do in PID controllers and massstorage:

m = KP

(

h +1

TN

hdt + TVdh

dt

)

(7)

dm

dt= min − mout (8)

In addition, we find algebraic equations as wedo in mixers and turbines:

0 = −m3 + m2 + m1 (9)

0 = −T1

T2

+

(

p1

p2

)κ−1

κ

(10)

3 Solving the system of equa-

tions

For solving the system of equations, a new simu-lation program has been written in C++, usinga Predictor-Corrector-Method (PECE) based onthe DASSL algorithm [5] [6].

The DASSL algorithm is a collection of multi-step methods for stiff and implicit DAE’s to theindex of 1. When applying the Predictor-Step atthe point tn, a polynomial k of the first grade isplotted through the last k points of the solutioncurve. The polynomial is then extrapolated atthe step tn+1 to give an estimated vector. Butthe estimated vector doesn’t satisfy the systemof equations at the point of tn+1. The estimatedvector will then be corrected with the help of theNewton-Algorithm. The advantages of the algo-rithm are internal increment- and error controls.Due to the good estimation at the point of tn+1

a fast convergence takes place in the correctorstep.

Equations and derivations are implementedefficiently using the polymorphism of C++.

To stabilise the discontinuity in the wa-ter/steam tables and the large variations of thedensity in the heat exchangers, the partial differ-ential equations will not be solved globally usingthe PECE, but with a local finite volume method(FVM), which links the pressure- and momen-tum balance using the SIMPLER algorithm [2].

When embedding the FVM in the PECE, theFVM will be started using the boundary con-ditions of the PECE. While considering flowswithin a pipe and the FVM a number of bound-ary conditions must be predetermined for phys-ical reasons, e.g. inlet velocity, inlet enthalpyand outlet pressure (always assuming a constantheating of Q). The FVM will then calculate theoutlet velocity, outlet enthalpy and inlet pres-sure. The values calculated by the FVM have toequal those of the PECE to solve the system ofequations.

Figure 1: FVM of a pipe flow

The equation linking the PECE with theFVM is exemplified with the following outlet ve-

Proceedings of the 4th WSEAS Int. Conf. on HEAT TRANSFER, THERMAL ENGINEERING and ENVIRONMENT, Elounda, Greece, August 21-23, 2006 (pp180-186)

Page 4: Combining FVM and PECE Algorithms with Adjoint Methods …Combining FVM and PECE Algorithms with Adjoint Methods for the dynamical Simulation of Power Plants Prof. Dr. techn. Dipl.-Ing

4 4 PROGRAM INTERFACES

locity:

uout,FV M = FV M

pout,PECE

uin,PECE

hin,PECE

(11)

0 ≈ Ru = uout,FV M − uout,PECE (12)

With the help of equation 12 the residual out-let velocity Ru can be determined. Since thePECE is a directed method and needs deriva-tions of all equations, an approach is needed inorder to calculate the derivations of the FVM.This is very time-consuming, since the FVM in-cludes a large number of equations.

The smallest amount of programming timewould be needed when using a finite differentialmethod. As well as being inexact and the FVMhaving to be solved quite often, the organisationof the variables for every calculation would alsobe time-consuming. Using a complex step wouldbe just that little bit more elegant [?] [10].

f ′(t) = limh→0

=[f(t + ih)]

h(13)

The derivations of the complex step are veryexact, but have the disadvantage that all calcula-tion routines have to be carried out as templates,so that complex and floating point numbers canbe used. Moreover, calculations in C++ usingcomplex numbers are approx. 15 times slowerthan when using floating point numbers. An-other method for calculating derivations of wholeequation systems is the adjoint method. Whenusing the adjoint method, one distinguishes be-tween the residual equations ~R of the PECE andthe balance equation ~B of the FVM, as well asbetween the the variables ~r of the PECE and ~b ofthe FVM. The following applies to the residualequation i:

Ri = Ri(~r,~b) (14)

The balance equations have to be satisfied,therefore:

~B = ~B(~r,~b(~r)) = 0 (15)

According to [Martins01b] the following hasto apply for the total variance:

δRi =

(

∂Ri

∂~r+ ~Ψ

∂ ~B

∂~r

)

δ~r

+

(

∂Ri

∂~b+ ~Ψ

∂ ~B

∂~b

)

δ~b (16)

The result of the last part of the equation hasto be zero and can then be used to determine thevector of the Lagrange multiplier ~Ψ.

−∂Ri

∂~b= ~Ψ

∂ ~B

∂~b(17)

Using the first part of the equation, thederivation of the residual equation can be cal-culated.

dRi

d~r=

∂Ri

∂~r+ ~Ψ

∂ ~B

∂~r(18)

The assembly of the linear equation system17 proves to be quite laborious, since all partial

derivations ∂ ~B∂~r

were calculated analytically andthe density was not considered to be constant,but rather a function of pressure and enthalpy.These derivations were determined with the helpof the IF97 [16]. The resulting equation systemis occupied weakly. The best solution is a LU-

Decomposition, since the Matrix ∂ ~B

∂~bwill have to

be disassembled only once and, in dependence ofRi, can be used several times. The implementa-tion of the adjoint method does not depend onthe FVM-Implementation and can be carried outsimultaneously.

4 Program interfaces

The input of all boundary conditions of anenergy technical plant is a difficult and time-consuming aspect, even for an experienced engi-neer. The platform-independent graphical userinterface nbiGUI was developed using the crossplatform widget toolkit Qt. nbiGUI is a tool,

Proceedings of the 4th WSEAS Int. Conf. on HEAT TRANSFER, THERMAL ENGINEERING and ENVIRONMENT, Elounda, Greece, August 21-23, 2006 (pp180-186)

Page 5: Combining FVM and PECE Algorithms with Adjoint Methods …Combining FVM and PECE Algorithms with Adjoint Methods for the dynamical Simulation of Power Plants Prof. Dr. techn. Dipl.-Ing

5

with which graphs can be build. I. e. com-ponents, considered as vertices, can be linkedto flows, considered as edges. Components andflows can then be configured with the help of aprogram dialogue.

All objects of the graph are configured usinga XML-file. I. e. the graphical depiction of theconfiguration menu, considering the properties ofthe object, will not be assembled until the startof the program. This has the advantage, that thegraphical user interface only has to be compiledonce, the user may simply add new componentsby expanding the XML-file.

nbiGUI saves the input file in a XML-file,which can then be interpreted by the simulationprogram. A DTD (Document Type Definition)has been proposed by [15] for depicting energytechnical plants, this has been implemented innbiGUI. A consistent file standard on the basisof XML, for describing energy technical plants,has the advantage, that many different programsmay use the files and extract useful informationfrom them.

5 Validation and example

The PECE was validated using the IVP-Testset(Index 1 Systems) of the project group

”Paral-

lel Software for Implicit Differential Equations”.The FVM was validated with the κD-Model [17].

To demonstrate the potential of the solver,four superheater surfaces of a mineral coal steamgenerator, including simplified regulator and tur-bine, were simulated.

In figure 3 the results of a parameter studyfor different values of KP of the turbine massflow controller are shown. The mass flows referto a pipe within the heat exchanger. At the pointof time t = 0, the desired value for the turbinemass flow was decreased instantly. Here it can beseen, how important the influence of the controlparameters are.

Figure 2: superheater surfaces with injection(mass flows without depiction of regulation)

0.30.40.50.6

0 100 200 300 400 500 600

m8

inkg/s

2.42.62.8

3

0 100 200 300 400 500 600

h3

inMJ/kg

3.23.33.43.5

0 100 200 300 400 500 600

h8

inMJ/kg

6.87

7.2

0 100 200 300 400 500 600

p1

inMPa

t in s

Figure 3: Functions of p1, m8, h8 and h3 at dif-ferent values of KP of the turbine mass flow con-trollers

Proceedings of the 4th WSEAS Int. Conf. on HEAT TRANSFER, THERMAL ENGINEERING and ENVIRONMENT, Elounda, Greece, August 21-23, 2006 (pp180-186)

Page 6: Combining FVM and PECE Algorithms with Adjoint Methods …Combining FVM and PECE Algorithms with Adjoint Methods for the dynamical Simulation of Power Plants Prof. Dr. techn. Dipl.-Ing

6 REFERENCES

6 Synopsis and prospects

When viewing the equations as an implicit equa-tion system, the user gains a great deal of free-dom in solving varying problems. Yet, just thisfreedom implies the danger of an incorrect prob-lem definition. Not only the number of equationand variables have to match, but certain bound-ary conditions have to be specified because ofthe physical interrelations, to avoid the equationsystem becoming singular. Moreover, the valueof each variable has to be estimated beforehand.These may, however, be taken from experimen-tal data or design calculations. Hence, the userhas to have knowledge in that particular part ofengineering.

The functionality and potential of the pro-gram has been proven in every aspect. Dueto the object orientated nature of the program,new components may be added easily. Althoughthere are some disadvantages to the program.The limitation on the integration increment ofthe FVM. The missing Predictor-Step for the in-ternal variables of the FVM, resulting in the lim-itation in the order of the integration method toone. As well as that the parallelisation of thesolving process would be helpful. However, thesedisadvantages will soon be removed in the follow-up studies.

Index of formulae

Symbol Unit Description

= − imaginary part

κ − adiabatic exponent

ρ kgm3 density

τ − time increment indexΨ var. Lagrange multiplier

B − balance equationE − volume unit

KP var. control parameters

Q W heat flowR − residualRi − residual equationS var. source-/drain termT K temperature

TN , TV var. control parameters

Symbol Unit Description

b var. variable of FVM

h Jkg

enthalpy;

s incrementi − row index

imaginary numberj − column indexm kg mass

m kgs

mass flowp Pa pressuret s timer var. variable of PECEu m

svelocity

x − steam quality;− index of position;m position

of the factor i

y var. differential variablez var. algebraic variable

in − inletFV M − variable of FVMPECE − variable of PECE

out − outlet

Glossary

AE Algebraic EquationDAES Differential Algebraic Equation System

DASSL DAES Solver on the basis of PECEDTD Document Type DefinitionFVM Finite Volume Method

HE Heat ExchangerODE Ordinary Differential Equation

PECE Predictor-Corrector-MethodPDE Partial Differential Equation

SIMPLER Semi Implicit Method for PressureLinked Equations Revised

XML eXtensible Markup Language

References

[1] J. Karl, M. Nixdorf, M. Pogoreutz,I. Giglmayr; Vergleich von Softwarezur Thermodynamischen Prozess-rechnung; TU- Munchen, TU-Graz;1999

[2] S. Patankar; Numerical HeatTransfer and Fluid Flow; Hemi-

Proceedings of the 4th WSEAS Int. Conf. on HEAT TRANSFER, THERMAL ENGINEERING and ENVIRONMENT, Elounda, Greece, August 21-23, 2006 (pp180-186)

Page 7: Combining FVM and PECE Algorithms with Adjoint Methods …Combining FVM and PECE Algorithms with Adjoint Methods for the dynamical Simulation of Power Plants Prof. Dr. techn. Dipl.-Ing

REFERENCES 7

sphere Publishing Corporation;1980

[3] H. Walter; Modellbildung undnumerische Simulation vonNaturumlaufdampferzeugern;Fortschritt-Berichte VDI Reihe6 Energietechnik Nr.: 457; 2001Wien

[4] Eine objektorientierte Simula-tionsplattform fur Kalte-, Klima-und Warmepumpensysteme; VDI-Fortschritt-Berichte Reihe 19 Nr.:118; 1999 Marburg

[5] K. E. Brenan, S. L. Campbell,L. R. Petzold; Numerical So-lution of Initial-Value Problemsin Differential-Algebraic Equations;siam; 1995

[6] U. M. Ascher, L. R. Petzold; Com-puter Methods for Ordinary Differ-ential Equations and Differential-Algebraic Equations; siam; 1998

[7] L. F. Shampine, M. K. Gordon;Computer-Losungen gewohnlicherDifferentialgleichungen; Vieweg;2004

[8] C. W. Gear; Numerical InitialValue Problems in Ordinary Dif-ferential Equations; Prentice-Hall,Inc. Englewood Cliffs, New Jersy;Stanford, California 1971

[9] R. Leithner, V. Linzer; EinfachesDampferzeugermodell (digitaleSimulation); Fortschritt-Berichteder VDI Zeitschrift Reihe 6 Nr. 41Aug. 1975; EVT Bericht 31/75;Stuttgart

[10] Martins, J. R. R. A., Kroo, I.M., and Alonso, J. J., An Auto-mated Method for Sensitivity Anal-ysis using Complex Variables Pro-ceedings of the 38th Aerospace Sci-

ences Meeting; AIAA Paper 2000-0689, Reno, NV, January 2000

[11] Martins, J. R. R. A., Alonso, J.J., and Reuther, J., Aero-StructuralWing Design Optimization UsingHigh-Fidelity Sensitivity Analysis;CEAS Conference on Multidisci-plinary Aircraft Design and Opti-mization, Cologne, Germany, June25-26, 2001

[12] Untersuchung der Vorgange beimUbergang vom Umwalz- zumZwangsdurchlaufbetrieb mit einerdynamischen Dampferzeugersim-ulation; Hartmut Rohse; VDI-Fortschritt-Berichte Reihe 6 Nr.:327; 1995 Wien/Braunschweig

[13] M. Doring; Simulation des Auskuh-lenvorgangs in Dampferzeugern;Fortschritt-Berichte VDI Reihe6 Energietechnik Nr.: 353; 1995Stuttguart

[14] Simulation stationarer und in-stationarer Betriebszustande kom-binierter Gas- und Dampfturbine-nanlagen; Thorsten Lohr; VDI-Fortschritt-Berichte Reihe 6 Nr.:432; 1999 Braunschweig

[15] A. Witkowski; Simulation und Va-lidierung von Kraftwerksprozessen;TU-Braunschweig, Der Andere Ver-lag 2006

[16] The International Association forthe Properties of Water and Steam;Erlangen, Germany September1997

[17] L. Acklin, F. Laubli; Die Berech-nung des dynamischen Verhaltensvon Warmetauschern mit Hilfe vonAnalog-Rechengeraten; TechnischeRundschau Sulzer; Forschungsheft1960 Dampfkesselbau