Upload
trinhdung
View
214
Download
0
Embed Size (px)
Citation preview
ARTICLE IN PRESS
0360-5442/$ - se
doi:10.1016/j.en
�CorrespondE-mail addr
(L.M. Lopez-G
Energy 32 (2007) 1271–1282
www.elsevier.com/locate/energy
Modelling and dynamic simulation of processes with ‘MATLAB’.An application of a natural gas installation in a power plant
J.A. Gonzalez-Bustamantea, J.M. Salaa, L.M. Lopez-Gonzalezb,�, J.L. Mıguezc, I. Floresa
aEscuela Superior de Ingenieros Industriales de Bilbao, Universidad del Paıs Vasco, Alameda de Urquijo, s/n 48013 Bilbao (Bizkaia), SpainbEscuela Tecnica Superior de Ingenierıa Industrial, Universidad de La Rioja, C/ Luis de Ulloa, 20. E 26004 Logrono (La Rioja), SpaincUniversidad de Vigo, Escuela Tecnica Superior de Ingenieros Industriales, C/Lagoas-Marcosende, s/n 36200 Vigo (Pontevedra), Spain
Received 5 August 2004
Abstract
In this paper, it is proposed to incorporate the analysis of the dynamic performance of the process into the design and engineering
stage of projects as a means of analysing and resolving this type of problem. The following contributions are made with this objective in
mind:
(a)
The barriers in the way of dynamic analysis are identified.(b)
Software tools which make dynamic analysis accessible during the design and engineering phase of the project are proposed.To achieve this goal, modelling and mathematical simulation are used, with the following features:
� strict modelling of mass, momentum and energy conservat
� utilisation of the ‘Matlab-Simulink’ package as the base-so
ion equations as well as state equations, and
ftware tool.
(c)
The procedure and tool proposed for dynamic analysis during the design phase should enable these studies to be carried out at areasonable cost and time for regular industrial projects, and not just for large research projects or nuclear power plants.
To complete this paper, we apply our method to a natural gas installation in a power plant. The model is applied to study the
transients of a natural gas supply line to a steam-electric power plant. The results of the model have been validated with the actual data
on the boiler trip obtained from the distributed control system of a steam-electric power plant.
r 2006 Elsevier Ltd. All rights reserved.
1. Preliminary information
Installations where fluids are processed sometimes sufferfrom operational problems that are a consequence of thedynamic performance of the process itself. Examplesinclude interaction between regulation valves placedconsecutively in the same piping, mutually coupledregulation loops, equipment trips that cause trips in otherequipment because of a transient, incorrect transferencebetween main equipment and backup equipment, poorlyadjusted regulators, etc.
e front matter r 2006 Elsevier Ltd. All rights reserved.
ergy.2006.06.018
ing author. Tel.: +34941 299 536; fax: +34 941 299 478.
ess: [email protected]
onzalez).
The functional characteristics of the equipment, valvesand control elements contribute to this performance, aboveall, the basic cause is the submission of the fluid to the lawsof conservation of mass, momentum and energy.In general, the dynamic performance of a process is not
studied at the installation design and engineering phase.This need has only been recognised and included in theplanning of important experimental or innovative projectsand in nuclear power plants. It is also true that the field ofnuclear energy pioneered the use of dynamic analysis toverify the capability of plants to withstand exceptionalsituations and accidents. But dynamic analysis is costly interms of price and time and has not been incorporated intonormal design practices for industrial processes in theabove-mentioned areas.
ARTICLE IN PRESS
Nomenclature
a speed of sound, m/sA cross section of a control volume, m2
E total energy per unit of mass E ¼ eþ v2=2, J/kgf e outer forces per unit of mass, N/kgFR friction force, NGM mass flow GM ¼ r v A, kg/sH total enthalpy per unit of mass H ¼ hþ v2=2 ¼
eþ p=rþ v2=2 ¼ E þ p=r, J/kgI turbine inertia¯I unit tensorL length of control volume, mm mass of control volume m ¼ rO, kgMfm friction momentum in turbine flowmeter, NmM momentum, Nmp thermodynamic pressure, Papt thermodynamic pressure plus fluid weight, PaqH outer heat source per volume unit, J/m3
Q actual volume flow, m3/s_Q heat transferred to the control volume, J/s
r mean-square root of turbine inner and outerradii, m
ri turbine inner radii, mre turbine outer radii, mS surface containing a control volume, m2
v fluid speed, m/svt tangential fluid speed, m/sva axial fluid speed, m/swturb turbine angular speed, rad/s_Wt technical power provided by the control
volume, J/s
r density, kg/m3
Dx space increment, mDt time increment, sO arbitrary control volume O ¼ A L, m3
Suffixes
In inputOut outputCV control volume
Mathematical symbols
d/dt total derivative of timedO volume differential elementds differential surface vector (pointing towards the
outside of the closed surface)() scalar magnitude (order 0)[] vector magnitude (order 1){} tensor magnitude (order 2)
Multiplication signs
Either no symbol or ‘‘.’’ S : summation of the orderof the factors
� S�1 : summation of the order of the factors less1
� S�2 : summation of the order of the factors less2
: S�4 : summation of the order of the factors less4
J.A. Gonzalez-Bustamante et al. / Energy 32 (2007) 1271–12821272
Introducing dynamic performance at the design stagemeans specifying and complying with requirements duringoperational transients. This is closely related to the analysisof the regulation and control systems to be implementedand, therefore, implies the participation of control en-gineers in the design phase.
In actual fact, control design engineers are now asking tobe included at the basic design stage of the project [1]. Theability to model and simulate process systems means thatcomputer ‘‘experiments’’ can be carried out which elim-inate risks and reduce commissioning costs. It also enables‘‘tests’’ to be run that are physically impossible to performon the actual installation.
Simulation is closely linked to modelling, and logicallydepends on the ability to draw up process models. In thissense there is a significant need for tools that back up themodelling. In order to model a process, a sound knowledgeof control and of the application considered is required [2].And this is where a fundamental difficulty in efforts toachieve an interdisciplinary system appears. In general,there is a lack of understanding among process engineersand control engineers as to the way in which the
mathematical models of the systems they study should bemade up [3].During the design, ‘‘doubts’’ arise regarding the perfor-
mance of the system in case of transients. These doubts arenot resolved due to the unavailability of calculation toolsto model and simulate the dynamic performance within areasonable time and cost. Under these circumstances,designs are established according to the permanent ratingcriteria and with the expectation that the margins will besufficient. It is therefore possible that better solutions havebeen abandoned or errors committed which will show up incommissioning.The objective is therefore to create a work environment
in which process engineers can model their systemsaccording to their usual variables and in which controlengineers can design, analyse and test regulation algo-rithms for the system.The aim of the study presented herein is twofold:
�
To present a dynamic model that responds strictly to thelaws of conservation of mass, linear momentum andenergy, and to equations of state. This model can beARTICLE IN PRESSJ.A. Gonzalez-Bustamante et al. / Energy 32 (2007) 1271–1282 1273
outlined during the design of installations by processengineers.
� On the other hand, these models are developed in aMATLAB/SIMULINK environment. This software hasbeen selected to take advantage of its capabilities foralgorithm control design already built-up in specialisedtoolboxes and blocksets and ready for use by controlengineers.
The achievement of this twofold aim is the basiccontribution of this paper. As far as the authors are awareno model such as the one presented in this paper has beenreported in a MATLAB/SIMULINK environment. Theavailability of a software environment at low cost thatcovers interdisciplinary requirements clearly improves de-sign activities.
2. Model definition and simulation environment
2.1. Model requirements
In general, there are two reasons that justify carrying outdynamic analysis:
�
The design of regulation and control systems. � Predicting the performance of systems during transients,including accidents.
With this purpose in mind, the drawing up ofmodels which comply with the following specifications isjustified:
(a)
The software must be designed to simulate the dynamicbehaviour of process systems, i.e. complete installationsconsisting of equipment, piping and regulation andcontrol systems.(b)
The objective is to use the software at the design stageof the system. It must therefore be useful as a tool fordefining topologies, pipe and duct diameters, equip-ment capacities, actuator speeds, control algorithms,etc., in other words all the parameters that influencetransients in any way whatsoever.(c)
The model must be based on:� mass, momentum and energy conservation princi-ples,� state equations.
This approach allows us to develop general modelswhich can be adapted to particular cases through theuse of characteristic parameters.This approach contrasts with ‘‘experimental mod-els’’ in which it is necessary to take measures ofinput-output variables at the actual installation toestablish the mathematical model. Consequently,this type of model cannot really be used at the designphase of the installation.The aim is to model ‘‘fast transients’’ (time scale:0.001–10 s). ‘‘Fast transients’’ can be caused either
by an equipment trip or as a result of quickmanoeuvres.The assumption of one-dimensional flow is suffi-ciently valid to model process systems in which massflows sequentially through equipment undergoing acontinuous process. Three-dimensional models(CFD) are essentially used for designing specificdevices or units of equipment.The mathematical formulation of the laws ofconservation are presented in Appendix A of thispaper. The integration process is also included asAppendix B. These annexes contain the basicmathematical model to be used in all processelements.
(d)
The model must have a modular structure, i.e. eachelement of the system must be represented by adifferent module of the programme. The programmemust be able to aggregate modules to create a newmodule in a higher hierarchical structure.(e)
The software and its environment must form an‘‘open’’ platform for the user so that he will be ableto modify and adapt it according to the variablerequirements of the final user. This is a majorrequirement because final users will most probablywant to implement a characteristic of their own.(f)
The software environment must truly incorporatecapabilities to analyse and design the regulationand control system, so that both process andcontrol engineers can work with the same softwarepackage.Control is one of the weak points in the software devotedto thermal and fluid devices [4,5]. This is true to such anextent that there are usually no true controller modelsavailable in these simulators.There is software dedicated to dynamic analysis on the
market but it is not considered to respond satisfactorily toall these requirements: in particular it is usually lacking inrequirements (e) and (f) listed above. This is a field whichrequires further development before it can reach theobjective of application in common industrial practise.This is precisely the initial motivation of the workpresented in this paper.
2.2. Software selection
The software selected to simulate the dynamic perfor-mance of systems is a key feature if the aims set out in thispaper are to be achieved.MATLAB/SIMULINK [6], a general-purpose software
package for dynamic systems, has been selected to carryout the task of modelling, for the following reasons:
MATLAB is well-known among the control commu-nity. It offers excellent performance qualities fordesigning regulation algorithms. This makes it the bestcandidate for accomplishing the objective of fostering
ARTICLE IN PRESSJ.A. Gonzalez-Bustamante et al. / Energy 32 (2007) 1271–12821274
interdisciplinary integration if thermohydraulic modelscan be implemented.
SIMULINK is capable of achieving models that complywith the above-mentioned model requirements through theinnovative use of ‘‘S-functions.’’
MATLAB ‘‘toolboxes’’ and SIMULINK ‘‘blocksets’’(e.g. the Nonlinear Control Design blockset) can be usedtogether with the process modules to design control andinstrumentation algorithms. This fulfils requirement f).
An original contribution of this work is to incorporate amodel based on strict conservation principles—mass, linearmomentum, angular momentum and total energy—asreported in Appendix A and B, within a MATLAB/SIMULINK environment, so that the complete library ofcontrol design capabilities of this environment can be usedtogether with these process modules to reinforce the designstage of a process.
3. Procedure of dynamic analysis at the design stage
A process library can be developed following the schemeset out. Process modules are available for modellinginstallation performance through mass, momentum andenergy conservation laws as well as state equations. Inparticular, piping, turbine flowmeter, control and isolationvalve and regulator modules have been developed, and it ispossible to build other models of process equipment asrequired.
From a practical viewpoint, a working method thatincorporates dynamic analysis at the design stage wouldfollow this sequence: first of all, in accordance with
Fig. 1. Process variables (pressure, temperature, speed, densi
common steady-state design criteria, a design and dimen-sion assessment of the installation must be carried out.Next, the general layout of the installation must beestablished.At this point the ‘‘base-design’’ is ready to undergo an
analysis of its dynamic performance. The system ismodelled and its behaviour simulated in a graphicenvironment. The modelling of a system consists of twostages:
�
ty,
First, the system is physically configured in a fullygraphic manner, by taking modules (icons) from thelibraries, selecting them and dragging them over thecomputer screen to form a new model. These moduleswill be interconnected in suitable order to represent aparticular process.
� Second, when each icon is clicked, a window opens andthe user is asked for specific information pertaining tothat equipment.
Once the installation has been modelled, simulations canbe performed.We propose an approach to the problem based on the
definition of the so-called ‘‘problem cases’’. Each problemcase refers to operational conditions which seem to becritical for the installation in the sense that they tend toproduce either unacceptable or undesirable transients. Forthese cases a required performance must be specified sothat the designer has clear criteria to determine whatconstitutes acceptable behaviour of the system.Simulation can be stopped or paused at any time, so it is
possible to change different parameters in order to analyse
mass flow and mach number) through a pipe section.
ARTICLE IN PRESSJ.A. Gonzalez-Bustamante et al. / Energy 32 (2007) 1271–1282 1275
their influence on the final result. The results of thesimulation can be viewed as the process takes place. Allprocess variables are available at all times at any point inthe system. As an example, Fig. 1 presents a screen showingdifferent process variables such as pressure, temperature,speed, density, volume flow and the Mach numbercorresponding to the entire length of pipe section at anygiven time.
From the model and the problem cases to be analysed,the use of MATLAB/SIMULINK toolboxes of the designof control systems is incorporated, allowing us to findsolutions for the control algorithms on an efficient andeconomical basis.
The procedure set out allows for the incorporation ofany other new element we may need to describe a system,e.g. other equipment, valves, regulators, and so on. It isalso feasible to modify an existing element to include newcharacteristics. All of the above makes the softwareenvironment open and flexible, ready to adapt to anynew requirement.
4. Application to a natural gas installation in a power plant
4.1. Introducing a case study
Power plants run on natural gas in conventional Rankinecycles or through new combined cycles are currently beingheavily promoted. In all cases, natural gas is suppliedthrough a natural gas installation from the supply networkto the burners of the consumption device. In this context it isadvisable to perform a dynamic study of the natural gasinstallation for the following general purposes:
�
prediction of system performance during transients, � control and regulation system design and � fulfilment of the dynamic requirements set out innational regulations and international standards.
The dynamic requirements for these installations arespecified in Spanish national UNE Standard 60-620-88 andin criteria established by the gas supply company. Onewell-known international standard which can be applied isStandard NFPA-85-C.
The requirements of these regulations and standards donot always refer to a specific operational conditionoccurring in the consumption device, such as trips, start-up, sudden load increases or decreases, etc., and normallyare not quantified requirements, so a more detaileddefinition is required if they are to have any practicalapplication during the design of an installation.
Obviously dynamic effects causing transients are un-desirable. This means that essential design criteria shouldaim to minimise these effects in order to achieve suitableperformance in start-up, stopping and normal operations.The theoretical considerations mentioned in the first partof this paper are applied to the analysis of a natural gas linein a conventional power plant.
4.2. Basic description of a natural gas line
An installation to supply natural gas from the supplycompany consists of the following parts (Fig. 2):
�
Reception installation. � Consumption device.The reception installation consists of: inner connection,regulation and metre station (RMS), distribution lineand pressure regulation unit. The inner connection anddistribution line basically consist of piping, fittingsand instrumentation. The RMS has three jobs: to filterthe gas, regulate the pressure of the gas to be distributedwithin the plant and measure gas consumption forcustomer invoicing. The pressure regulation unit adjuststhe pressure to the level required by the consumptiondevice. The consumption device consists of the flowregulation valve and the burners themselves.
4.3. Justification of problem cases
During the design stage, regulation problems may beexpected as a result of the three control valves being placedconsecutively in the same pipe section (pressure valve at theRMS, pressure valve of the regulation unit and flow valveof the consumption device).During the commissioning phase, control valve algo-
rithm parameters (gain, integral time, etc.) are tuned torender the plant operational. Nevertheless, some problemsstill remain, e.g. the following:
�
After a two-burner trip (this conventional boiler has 16burners) due to flame detection failure, the power plantreduces its load and the nominal load is not recoveredquickly enough. � Load following, which was presumed to be quick andeasy with natural gas, turns out to be unsatisfactory andbecomes slower than stated in the specifications.
Because of this operational problem, the followingproblem cases are simulated:
�
Two-burner trip at nominal load. � Load following.These cases are useful for analysing regulator perfor-
mance. Other problem cases are useful for analysing theinfluence of the regulation unit layout, the shutoff valveclosing speeds and the performance of the turbine-typeRMS flowmeter. Due to space limitations, only the casesmentioned are expanded upon in this paper.A natural gas installation for a power plant appears in
Fig. 2 and the model developed is shown in Fig. 3.It is important to emphasise that MATLAB/SIMU-
LINK tools to design regulation and control systems areavailable for use in conjunction with the new process
ARTICLE IN PRESS
Fig. 2. Natural gas reception installation and consumption device.
Fig. 3. Natural gas installation model.
J.A. Gonzalez-Bustamante et al. / Energy 32 (2007) 1271–12821276
modules. The objective in the following two cases is todetermine the proper tuning of the regulators with themodel developed and the MATLAB/SIMULINK ‘‘NCDblockset’’ design tool.
4.4. Case a: two-burner trip
Fig. 4 shows the unacceptable behaviour of the originalregulators (b, blue line) under the two-burner trip
condition. The load does not recover quickly enough afterthe trip because of poor tuning of the pressure regulator atthe pressure regulation unit and of the flow regulator at theconsumption device.We are looking for a regulator that meets the following
specification within the time domain: ‘‘when a two-burner trip occurs mass flow will always remain above95% of the load and recovers 100% load within 10 s ofthe trip.’’
ARTICLE IN PRESS
Fig. 4. Two-burner trip.
Table 1
Regulator parameters of the natural gas installation
Pressure
regulation
Mass flow
regulation
J.A. Gonzalez-Bustamante et al. / Energy 32 (2007) 1271–1282 1277
The model plus the NCD tool provide the result shownin Table 1. Fig. 4 also shows how performance clearlyimproves with the new tuning (r, red line), with the flowregulator improving substantially.
Regulation unit Consumption
device
Original parameters PB ¼ 190 PB ¼ 275
iT ¼ 60 s iT ¼ 35 s
dT ¼ 0 s dT ¼ 0 s
Parameters according to model
+NCD for Case A: ‘‘two-burner trip’’
PB ¼ 115 PB ¼ 77
iT ¼ 53 s iT ¼ 14 s
dT ¼ 0 s dT ¼ 0 s
Parameters according to
model+NCD for Case B: ‘‘load
following’’
PB ¼ 103 PB ¼ 77
iT ¼ 10 s iT ¼ 14 s
dT ¼ 0 s dT ¼ 0 s
PB: proportional band; iT: integral time; dT: derivative time.
4.5. Case b: load following
Fig. 5 shows the unacceptable behaviour of the originalregulators (b, blue line) ion the load following case (actualload does not follow the setpoint). Even the tuningobtained under the two-burner trip condition does notshow a good response (r, red line).
We are looking for a regulator that meets the followingspecification within the time domain: ‘‘when the loadsetpoint goes from 55% to 100% in 10 s, the actual massflow follows the setpoint, resulting in 100% load within30 s.
The model plus the NCD tool provide the result shownin Table 1. As shown in Fig. 5, behaviour improves underthe parameters found specifically for load following(g, green line). This design includes a faster pressureregulator, offering better error integration capacity so thatdownstream pressure can be maintained more easily, whichclearly improves supply to the consumption device.
5. Validation of the models
The methods used for validation of the models aredescribed briefly below.
The pipe model is validated by comparing the resultsobtained using UFLOW1D software [7]. This software isdesigned to calculate compressible flow in pipes of variablesections, and it has been adopted as a validation tool forour models in view of the excellent results obtained.
Numerous cases have been analysed, both in pipes ofconstant and varying sections. As an example, for pipes ofa constant section, the conclusions obtained are as follows:
�
For Mach o0.8 (subsonic flow), the error is lower than1% (normally 0.5%). � For Mach 40.8 the error increases to 5%.Considering that in industrial processes the speed isnormally less than Mach 0.3, the model is considered to bevalidated for the experimental framework of application.With regard to the turbine flowmeter, since we have
no data in the dynamic regimen the model has beenvalidated in reference to the stationary regimen. It hasbeen compared with the real calibration curve, obtained
ARTICLE IN PRESS
Fig. 5. Load following.
TURBINE FLOWMETER. CALIBRATION LINESG-10.000/DN500
-1
-0.5
0
0.5
0 % 20 % 40 % 60 % 80 % 100 %
R (
ME
AS
.RE
AL
/RE
AL
)
m
a
J.A. Gonzalez-Bustamante et al. / Energy 32 (2007) 1271–12821278
with a type G10,000 metre of size DN500, with themathematical model (See Fig. 6). As can be appreciated,the error between the real curve and that of the model isminimal.
Lastly, the complete gas line model has been validated bycomparing the actual data from the power station SCADAwith those of the model when the boiler trips (see Fig. 7).The straight lines in the figure are pressures taken by thedistributed control outlets, which sample every 2 s. Thecurved lines are the simulation outlets for the samepressures.
With these data it can be proven that:
RR
O
�
-1.5% E
The calculated and actual pressures are closely matchedthroughout the 10 s of the transient state.
�-2% VOLUMETRIC FLOW Q(m3/s)
(m) Model curve adjusted with calibration coefficient
(a) Actual curve
Fig. 6. Turbine flowmeter calibration lines.
The final calculated and actual overpressures along thegas line match.
Following this acceptable comparison between actualand calculated values, the set of the model for theexperimental framework of application is considered valid.
6. Conclusions
The following conclusions have been reached:
1.
We commence from the fact that process installationssuffer from problems deriving from the dynamicperformance of the process. It is not usual practise toconsider the dynamic study of the installation during thedesign and engineering phase of the project as a meansof reducing these problems. The incorporation of such adynamic analysis requires the joint efforts of processand control engineers in these initial design phases.2.
The fact that the software tools of both disciplines arenot integrated in the same work environment (duringthe design phase of the installation) so that a controlalgorithm design process and tools are available isidentified as a significant barrier.
3.
Models based on the strict fulfilment of conservationlaws—mass, linear momentum, angular momentum andenergy—have been developed and implemented in theMATLAB/SIMULINK environment (and its toolboxesand blocksets). Thus, a real integrated design platform isprovided covering process and control techniques.4.
The model developed has been applied to the analysis oftransients in a natural gas line which supplies a boiler atARTICLE IN PRESS
Fig. 7. Complete gas installation validation.
J.A. Gonzalez-Bustamante et al. / Energy 32 (2007) 1271–1282 1279
a steam-electric power plant. The following transientshave been specifically analysed:� two-burner tripping of the boiler;� load following of the plant.
5.
The models of the different components have beenduly validated. The pipe section model has beenvalidated by comparing the results obtained with thoseof duly contrasted pipe software, and the results of thegas metre model have been compared with the calibra-tion curves provided by the manufacturer. Finally, theresults of the overall model have been compared withthe actual tripping data of a boiler at7 a steam-electricpower plant, obtained from its distributed controlsystem.6.
As a final comment, we should indicate that theproposed solution permits us to carry out adynamic analysis of process systems and to designregulation and control systems at a reasonable cost forindustrial projects, thus extending the use of dynamicanalysis.Appendix A. Integral formulation of conservation laws
This section establishes the mathematical model used todescribe fluid performance in process equipment. Applic-ability range and restrictions for this model are
�
Continuous medium. � One-component flow and therefore no chemical reac-tions.
� No generation of heat inside the fluid. � One-phase flow.�
Laminar flow. Mathematical techniques developed forturbulent flow are not used; nevertheless, the use ofmean values in laminar flow models turns out to be quitesatisfactory in practise [8].Furthermore, the following final simplifications areconsidered due to the application to a compressible fluidsuch as natural gas in a natural gas installation:
�
Fixed control volume. � Viscous forces are considered negligible at input andoutput sections (Poiseuille flow) [9].
� Compressible flow, so that fluid weight is not taken intoaccount.
The equations developed are included without showingintermediate developments.Let us consider a control volume O, as in Fig. 8
arbitrarily bound by a closed surface S. Starting fromthe general conservation equations and considering theabove-mentioned scope of application and restrictions,we have:Mass conservation
d
dt
ZOrdOþ
ZSðin;outÞ
r v dS ¼ 0. (1)
Linear momentum conservation
d
dt
ZOr vdOþ
ZSðin;outÞ
r v vþ pt In o
dS
þ
ZS�Sðin;outÞ
pt I dS þ FR ¼ 0. ð2Þ
ARTICLE IN PRESS
Fig. 8. Control volume and magnitudes of conservation principles.
Fig. 9. Control volume for spatial discretisation of conservation laws.
J.A. Gonzalez-Bustamante et al. / Energy 32 (2007) 1271–12821280
Angular momentum conservation
d
dt
ZO
r� r v½ �dOþZ
Sðin;outÞ
r� r v½ �v� �
dS
�
ZSðin;outÞ
r� p In o
dS þM ¼
ZO
r� r f e
� �dO. ð3Þ
Total energy conservation
d
dt
ZOrE dOþ
ZSðin;outÞ
rH v½ � dS ¼ Q�
�W t
�
. (4)
Appendix B. Integration and discretisation method
To solve the conservation equations system the ‘‘controlvolume method’’ [10] is used. According to this method,equations are first of all discretised in the space variable toobtain ordinary differential equations (ODEs) with timederivatives and afterwards the equations are integrated inthe time domain.
B.1. Discretisation method
This section shows how the original equations arediscretised in control volumes. The following simplifyinghypotheses are used:
�
one-dimensional flow but with variable fluid crosssection, known as pseudo one-dimensional flow; � fluid cross section is variable but rigid, that is to say, itdoes not vary in time.
Considering a generic control volume with input andoutput sections as shown in Fig. 9, space distributedvariables are transformed into mean variables insidethe generic control volume (‘‘lumped parameters’’), whichare identified with the centre of the control volume. Inputsand outputs are those parts of the control volume-
bounding surface which allows mass flow through theboundary.From the equation of mass conservation (Eq. (1)), the
discretisation over the control volume allows us to obtainin a few steps
d
dtm ¼ GMin � GMout. (5)
Likewise, from the equation of lineal momentumconservation (Eq. (2)), we have
d
dtGM ¼
1
Lððp AÞin � ðp AÞout þ ðr v jvjAÞin
� ðr v jvjAÞout þ pmeanDA� FRÞ. ð6Þ
The surface integralR
S�Sðin;outÞpt I dS ¼ 0 of the equation
(Eq. (2)) has been evaluated, which is the force exerted overthe fluid through pressure due to an increase or decrease ofthe jet through the use of average pressure due to anincrease in the jet cross-section. This term arises tomaintain the possibility of a variable cross-section in thefluid flow.From the equation of angular momentum conservation
(Eq. (3)), also made discrete over a control volumecontaining a turbomachine (see Fig. 10) [8] we have
d
dtðrr vt OÞ ¼ ðr vt GMÞin � ðr vt GMÞout �M. (7)
The speed of the turbomachine is considered to dependon the average condition of the flow which exists in theradius situated in the average square root of the inside andoutside radii [11–12].In the application of the pseudo one-dimensional
model of this conservation equation, the turning of aturbomachine and the existence of axial components va
(one-dimensional) and tangential vt (pseudo one-dimen-sional) components of the speed of the fluid should beconsidered.
ARTICLE IN PRESS
Fig. 11. Turbine flowmeter blade speed diagram.
Fig. 10. Piping divided into control volumes.
J.A. Gonzalez-Bustamante et al. / Energy 32 (2007) 1271–1282 1281
From the equation of total energy conservation (Eq. (4)),made discrete over the control volume, we obtain
d
dtðm EÞ ¼ ðGM HÞin � ðGM HÞout þ
_Q� _W t. (8)
B.2. Integration method
From these ODEs, the corresponding numerical integra-tion is carried out by using the explicit fourth-orderRunge–Kutta method. The ‘‘staggered finite volumesmethod’’ is used to implement the integration. Under thismethod [13], we have to make calculations concerninglineal momentum in staggered control volumes with thoseused to carry out mass and energy calculations; therefore,we force conservation and avoid the problem of numericaloscillations.
Equations related to mass and energy conservation aresolved over the main control volumes and the equation oflinear momentum conservation is solved over the second-ary control volumes as per Fig. 9. The detailed equationsbecome:
From the equation of mass conservation (Eq. (5)),applied to main control volume I
d
dtmI ¼ GMinI � GMoutI . (9)
From the equation of total energy conservation (Eq. (6)),applied to main control volume I
d
dtðm EÞI ¼ ðGM HÞinI � ðGM HÞoutI þ
_QI �_W tI . (10)
From the equation of linear momentum conservation(Eq. (7)), applied to secondary control volume J
d
dtGMI ¼
1
Lðp AÞI�1 � ðp AÞI þ ðr v jvjAÞI�1�
� ðr v jvjAÞIþpI�1 þ pI
2ðAI � AI�1Þ � F R
�
ð11Þ
with the force being evaluated as FR ¼ f ðr=8Þv jvjSuperficie_de_contacto.
In order to solve the above equations, the figures forenthalpy at the input and output sections of the maincontrol volume (Fig. 10) are needed. This requiresadditional hypotheses. To determine energy flows throughthe input and output areas of the control volumes we use
the ‘‘upwind’’ or ‘‘Donnor cell’’ scheme; in accordancewith which
HinI ¼ HI�1 if GMinI40; HinI ¼ HI if GMinIo0
and
HoutI ¼ HI if GMoutI40; HoutI ¼ HIþ1 if GMoutIo0.
To calculate the remaining thermodynamic variables weadd the hypothesis of ideal gas for compressible fluidapplications (Fig. 11).The fourth-order Runge–Kutta method [14] assures
the stability of the calculation, provided that (since thisis an explicit method) we keep Dt compliant with theCourant-Friedrichs-Lewy (CFL) stability conditionfor each control volume; such a requirement statesthat Dt must fulfil DtpDx=a (where ‘‘a’’ is the speed ofsound) [10].This method is valid within the intended experimental
framework, where fluid speed is always less than 0.3Mach.The validity of the method is confirmed through thecorresponding validation of the models.
References
[1] Cipra Barry A. Getting control theory into the design loop. SIAM
News—News J Soc Ind Appl Math 1995;28:1.
[2] Benveniste A. Meeting the challenge of computer science in the
industrial applications of control: an introductory discussion to the
special issue. IEEE Trans Automat Control 1993;38(7):1004–10.
[3] Ordys AW, Pike AW, Johnson MA, Katebi RM, Grimble MJ.
Modelling and simulation of power generation plants. London:
Springer; 1994.
[4] Pyotsia J. A mathematical model of a control valve. Doctoral thesis,
Department of Energy Engineering, Faculty of Mechanical Engineer-
ing, Helsinki University of Technology, 1991.
[5] Schobeiri MT, Attin M, Lippke C. GETRAN: a generic, modularly
structured computer code for simulation of dynamic behaviour of
aero and power generation gas turbine engines. ASME J Eng Gas
Turbin Power 1999;116:483.
[6] SIMULINK, Dynamic system simulation for Matlab (nonlinear
control design blockset user’s guide), Version 5, 1997.
[7] Corberan JM. New method to calculate unsteady 1-D compressible
flow in pipes with variable cross section. Application to the
ARTICLE IN PRESSJ.A. Gonzalez-Bustamante et al. / Energy 32 (2007) 1271–12821282
calculation of the flow in intake and exhaust pipes of I.C. engines.
ASME technical conference, 1998.
[8] Hansen AG. Fluid mechanics. Mexico: Limusa-Grupo Noriega
Editores; 1992.
[9] Sala Lizarraga JM. Thermodynamics of fluids and method of
exergetic analysis. Universidad del Paıs Vasco, 1987.
[10] Hirsch C. Numerical computation of internal and external flows, vol.
1, fundamentals of numerical discretization. New York: Wiley; 1994.
[11] Lee WFZ, Evans HJ. Density effect and reynolds number effect on
gas turbine flowmeters. J Basic Eng 1965; 1043–57.
[12] Lee WFZ, Kirik MJ, Bonner JA. Gas turbine flowmeter measure-
ment of pulsation flow. J Eng Power 1975; 531–9.
[13] Patankar SV. Numerical heat transfer and fluid flow. Washington,
DC: Hemisphere Publishing Corporation; 1980.
[14] Borrie JA. Modern control systems: a manual of design methods.
Englwood Cliffs, NJ: Prentice-Hall International; 1986.