You are on page 1of 12

INTERNATIONAL JOURNAL FOR NUMERICAL AND ANALYTICAL METHODS IN GEOMECHANICS, VOL.

I, 75-86 (1983)
FINITE ELEMENT METHODS FOR GEOTHERMAL
RESERVOIR SIMULATION
GEORGE ZYVOLOSKI
Los Alamos National Laboratory, Los Alamos, New Mexico 87545, U.S.A.
SUMMARY
Two finite element algorithms suitable for long term simulation of geothermal reservoirs are presented.
Both methods use a diagonal mass matrix and a Newton iteration scheme. The first scheme solves the
2N unsymmetric algebraic equations resulting from the finite element discretization of the equations
governing the flow of heat and mass in porous media by using a banded equation solver. The second
method, suitable for problems in which the transmissibility terms are small compared to the accumulation
terms, reduces the set of N equations for the Newton corrections to a symmetric system. Comparison
with finite difference schemes indicates that the proposed algorithms are competitive with existing
methods.
INTRODUCTION
In recent years the interest in geothermal energy has grown enormously. Parallel with this
growth has been the need accurately to model geothermal reservoirs. Garg et aLY1 Pritchett
et af.,' Faust and Mer~er, ~ Thomas and Pi er~on,~ Coats' and Zyvoloski et aLY6 have presented
finite difference based simulations which are capable of modelling one- and two-phase geother-
mal reservoirs. Pruess et af.' have developed an integrated finite difference based code capable
of simulating one- or two-phase flow. Most finite element schemes have been limited to
compressed liquid geothermal reservoirs because of difficulties involved in modelling phase
changes and two-phase flow. Mercer et a1.' discuss some of these difficulties.
I t is the purpose of this paper to present some finite element schemes which are competitive
with finite difference schemes while preserving the inherent flexibility of the finite element
method.
MATHEMATICAL FORMULATI ON
Detailed derivations of the governing equations for two-phase geothermal reservoirs have
been presented by several investigators (Mercer et aLY8 Mercer and Faust' and Brownell et
af." for example) and therefore only a brief development will be presented here.
Conservation of mass is expressed by the equation
a A m
-+at
v * f m +qm =0
where the mass per unit volume A, is given by
0363-9061/83/010075-12$01.20
@ U.S. Government
Received 6 February 1981
Revised 17 July 1981
76 G. ZYVOLOSKI
and the mass flux fm is given by
fm =pv Vv+PI VI (3)
Here q5 is the porosity of the matrix, S, and S1 are saturations, pv and p1 are densities, V, and
Vl are flow rates per unit volume with the subscripts v and 1 indicating quantities for the
vapour phase or liquid phase, respectively. Source or sinks (that is, bores or re-injection wells)
are represented by the term qm.
Conservation of energy is expressed by the equation
aAe
-+v * f e + q e = O
at
(4)
where the energy per unit volume A, is given by
Ae =(1 - 4 >Pr u r + 4 ( S v ~ v u v + SIP~U~) ( 5 )
fe =pvhvVv+plh~ VI-KVT (6)
and the energy flux fe is given by
Here the subscript r refers to the rock matrix, ur, u, and uI are specific internal energies, h,
and hl are specific enthalpies, K is an effective thermal conductivity, T is the temperature
and qe is the energy contributed from sources and sinks.
To complete the governing equations it is assumed that Darcys Law applies to the movement
of each phase and the capillary pressure is r~egligible:~
kR I
v1= -- (Vp -p1g)
PI
Here k is the permeability, R, and R1 are the relative permeabilities, m, and pI are viscosities,
p is the pressure and g represents the acceleration due to gravity. (For simplicity, the equations
are shown for an isotropic medium, though this restriction does not exist in the computer
code.) The relative permeabilities used here are a version of a form suggested by Corey and
adopted by Faust and Mer~er. ~
R, =(1 - STz)(l -Sf)
RI =Sf
where Sf =(Sl--Slr--Svr)/(l -Sir-Svr) and Slr, S,, are the residual saturations at which the
liquid phases respectively become immobile. Values of S1, =0.3 and S,, =0.05 have been used
by other authors and are used in this work.
Using Darcys Law the basic conservation equations (1) and (4) can be rewritten
and
GEOTHERMAL RESERVOIR SIMULATION 77
Here the transmissibilities D, and D, are given by
D m =Dm1 +D m v
and
The functional dependence of the thermodynamic and transport quantities i.n equations (1 1)
and (12) on p and h is not given here. The formulae given by Mercer and Faust' were used
and the reader can refer to that paper for details.
The mixture enthalpy h is related to the other variables by the formula
The source and sink terms in equations (1) and (4) arise from bores, and assuming that the
total mass withdrawal q, for each bore is specified, then the energy withdrawal qe is determined
as follows:
qe =qvhv +qIhl (17)
where qv =aq,, ql =(1 -a)qm and
(+=1 / ( 1 +L) PIRIP
PvRvW1
The form of equation (18) shows the importance of the ratio of relative permeabilities RI/ Rv
in controlling the discharge composition. The limited field data available (see GrantI2) show
that there may be significant differences between the relative permeability formulae used here
in equations (4) and (10) (and by other authors) and field relative permeabilities.
FORMULATION OF FINITE ELEMENT EQUATIONS
The finite element equations are generated using the Galerkin formulations. For a detailed
presentation of the finite element method the reader is referred to Zienkie~icz.'~ In this
method the flow domain, s1, is assumed divided into finite elements and the variables P and
h, along with the accumulation terms A, and A, are interpolated on each element
These approximations are introduced in equations (1) and (4) and the Galerkin formulation
(described by Zienkiewicz and Parekh14) is applied. The following equations are derived
78
where
G. ZYVOLOSKI
Equations (21) and (22) need some comment. D: and D p indicate an upstream weighted
transmissibility (after Dalen). This technique has worked well in the low order elements
(3-node triangle, 4-node quadrilateral) where the schemes resemble difference techniques.
Research is ongoing to determine the applicability of using upstream weighted transmissibilities
when using 8-node quadratic elements. The upstream weighting is determined by comparing
the velocities at the nodes i and j. The matrix [C] is diagonalized by choosing integration
points at the element vertices. This also corresponds to a finite difference approach. As Dalen15
points out, more general finite difference techniques may be formulated, but only at the
expense of considerable sophistication. The finite element technique generates high order and
irregular meshes routinely. In the usual finite element practice the matrices [TI and [C] are
built by an assembly of corresponding element matrices. In the computer code corresponding
to the development outlined above, the equations are developed by node. This allows for easy
determination of the upstream node. It further makes for easy implementation of solution
algorithms that were developed for finite difference schemes.
SOLUTION ALGORITHMS
I. In this algorithm the full Newton-Raphson method is implemented. The system of finite
element equations may be written as:
: +1
=-
K
The method solves this unsymmetric band system of equations using the SGBFA subroutine
package of the LINPACK library developed at the Argonne National Laboratory.
GEOTHERMAL RESERVOIR SIMULATION 79
11. This algorithm is an extension of the one presented by Zyvoloski et aL6 The equations
solved at each iteration can be represented in block form as follows:
Here matrices such as [aF,/ap] contain the derivatives of Fmi, with respect to all the variables
Pii. However, the contribution to the J acobian matrix from the conduction terms is neglected
and therefore the effect on the solution process of inclusion of the conduction terms merely
corresponds to additional terms added to the energy source term 4e.
To obtain a computationally efficient scheme for solution the derivatives of the trans-
missibilities with respect to pressure and enthalpy are neglected. With this important
modification the matrices [aF,/ah] and [aFe/ah] become diagonal while [aFm/ap] and [aFe/ap]
are tridiagonal. This simplification means that the equations for the correction {ah) and { ap}
can be separated, giving the equation
and
As a consequence of the diagonal nature of [8F,/ah] and [aFJah], equation (27) represents
a symmetric banded system of equations which is solved using an active column profile solver.
Once {Ap} is known {Ah} is obtained by direct evaluation using equation (26). Although there
is an approximation made in the solution process by neglecting the derivatives of the trans-
missibilities with respect to p and h it is important to note that this involves no approximation
in the final solution of equation (25). The coefficient matrix and the right-hand side of equation
(25) are updated at each iteration using the latest information to calculate transmissibilities
and other quantities.
There is some additional flexibility in the above algorithms. The programs are set up such
that the algorithms presented above may be applied line-by-line or block-by-block. These
variants are not discussed here. They are the subject of ongoing research and results based
on these algorithms will be presented at a later date.
EXAMPLE CALCULATIONS
The first example is a model of a two-phase highly permeable geothermal reservoir originally
proposed by Toronyi and Farouq Ali16 and solved by a number of authors (Mercer and Faust,
Thomas and Pierson4). The model reservoir is shown in Figure 1. The input for the problem
is presented in Table 1. As with Thomas and Pierson, time steps of 10 days with an initial
time step of 8. 3 days were used. The final state corresponds to 19 percent of the original
water mass removed. Figure 1 shows the results obtained in this study using quadrilateral and
triangular elements and compared with the results obtained by Thomas and Pi er~on.~ The
trangular grid was obtained by bisecting the quadrilateral elements in the top left direction.
These results were obtained with algorithm 1 as described in the previous section. Good
80
,183.182 ,173.1 73 .15 .152 ,119 120 ,148.1 49 ,164.164
G. ZYVOLOSKI
,183
,183
( O N ( 1828,O)
r I I I I I I I
.182 ,173 ,173 ,152.1 53 .119 ,119 ,148,149 ,164.1 63
,183 ,173 ,152 .119 ,148 ,161
,182 ,173 ,173 ,152 ,153 1 17 ,116 ,148 ,150 .164 ,163
.183 .173 .152 .118 .148 .161
,183
,183
,182 ,173 ,173 ,152 ,153 ,119 ,120 ,148 ,149 ,164 . I 6 3
.183 ,173 .152 .120 ,148 ,161
.I82 ,173 ,173 ,152 ,152 ,120 .122 ,149 .148 ,164 ,164
,183 ,173 ,152 .121 ,148 ,161
,183.182 ,173.173 ,152 .152 ,121 .123 .149.148 ,164.164
,183 ,173 ,152 ,122 ,148 ,161
1 I I 1 I I I I
( 1828,182.8)
ReF81 InJADRIUTERAL
(0,182.8)
I TRIANGLE
Figure 1. Comparison of results of Toronyi's problem
agreement is evident. This is somewhat surprising considering the elements have an aspect
ratio of 10. The same problem run with algorithm 2 and smaller time steps was necessary to
complete the simulation. However, run times were comparable. A discussion of computer
costs and run times is presented with the second example.
The second example problem considered is a model of a geothermal field which has recharge
occurring across a constant pressure and enthalpy boundary. The model reservoir is depicted
in Figure 2. The input data are presented in Table 11. This problem was proposed recently as
a Department of Energy geothermal code test pr0b1em.l~The simulation is for 10years.
Because of the relatively long simulation time and the stability afforded by the recharge
(constant pressure) conditions, a variable time stepping algorithm was employed in this
example. The logic is as follows. After each time step the number of iterations was compared
to some fixed value, in this case eight, and if the iterations were less than this amount then
the next time step was made a multiple (1.2 in this example), of the last time step. This scheme
had an advantage of limiting time step increases when the solution was changing quickly, such
as phase changes. Further logic was also employed to decrease the time step increment if the
iterations exceeded 25 cycles. In this example the FE (finite element) quadrilaterals took 41
time steps to model the 10-year production, while the FD (finite difference) scheme took 49
time steps. Computer times were 47.4 and 51.3 cpu sec respectively. To get an idea of the
temporal truncation error, a more accurate 284-step simulation was also performed. The
Table I. Parameters for Toronyi example
Parameter Symbol Value
Permeability
Thermal conductivity
Porosity
Rock density
Rock specific heat
Aquifer length
Aquifer width
Initial water saturation
Initial pressure
Discharge
9.869 x m2
1.730 w/(m "C)
0.05
2563 kg/m3
1010 J/kg"C
1828 m
1828 m
0.2
44.816 bar
0.082021 kg/(sec m)
GEOTHERMAL RESERVOIR SIMULATION 81
( 3 0 0 )
CONSTANT PRESSURE
AND ENTHALPY
p =36 bar
PRODUCTION h =,676 MUKg
(62.5.62.5)
OBSERVATION
WELL
(162.5,137.5)
0
E
Figure 2. Solution domain for DOE test problem
pressure and temperature of the production and observation wells, as well as the outlet enthalpy
are presented in Figures 3-5. As can be seen from the figures, the FD and FE schemes plot
very close to each other while the FE scheme is closer to the presumably more accurate
solution. It is interesting to note here that the accurate solution was run with algorithm 2
using the approximate J acobian. Even though many more time steps were used the cpu time
was only 114 sec. It is also important to note that the truncation error was felt most strongly
in the output temperatures and flowing enthalpies, the quantities which are of most interest
in power plant sizing.
The third example is a model of a fractured geothermal reservoir similar to that being
studied at Los Alamos National Laboratory. It further represents a problem which is very
tractable with finite difference methods. The model reservoir is presented in Figure 6. A
graded mesh was used with elements varying in width from 0.002 m near the fracture face to
10 m at the boundary opposite the fracture; the lengths of the elements varied from 25 m to
Table 11. Parameters for DOE test problem
Parameter Symbol Value
Permeability
Thermal conductivity
Porosity
Rock density
Rock specific heat
Aquifer length
Aquifer width
Initial pressure
Initial temperature distribution:
[240"C rs100
k 2.5 x 10-14mZ
K 1 w/(m "C)
4 0.35
Pr 2563 kg/m3
C, 1010 J /kg "C
- 300 m
- 200 m
P; 36 bar
1-100 r-100
T( x , y, 0) =1 240- 160 ( - 2oo )'+go(=) "C 100<r<300m
(160C r 2 300
where r is the distance from the origin
Discharge q m 0.05 kg/(sec m)
82
38
36
G. ZYVOLOSKI
-
-
-
-
40r I 1 I I I I I I I I
OBSERVATION WELL -
.............
-
p
................... -
.........................................
PRODUCTION WELL
28 -
26 -
24 -
22 -
20 I I I I 1 I 1 I I
-
-
-
-
0 365 730 1095 1460 1825 2190 2555 2920 3285 3650
Figure 3. Pressure histories for DOE test problem
100m. This leads to a very unfavourable aspect ratio (5000) for the 4-node element; the
standard finite element solution failed to finish the problem. If the integration points were
changed from the standard 2-by-2 Gauss type to integration points which were equally weighted
at the 4 nodes, the standard 5-point difference formula resulted. With this change the 10-year
simulation was run in 28 time steps and a CPU time of 71 sec. As before, a logic based on
the iteration count was used to increase the time step size. In this case if the iterations were
1 6 0 : 1 50 0 365 730 1095 1460 1825 2190 2555 2920 3285 3650
DAYS
FD (284 TIME STEPS) ............... FD (49 TIME STEPS)
-. - . - . . FE (41 TIME STEPS)
Figure 4. Temperature histories for DOE test problem
GEOTHERMAL RESERVOIR SIMULATION 83
1 .201 I 1 I 1 I I 1 I I
I
4 1.10
::::Il I I , I I ,
0.70
0 365 730 1095 1460 1825 2190 2555 2920 3285 3650
DAYS
FD (284 TIME STEPS) .-.-..---..--. FD (49 TIME STEPS)
FE (41 TIME STEPS)
Figure 5. Outlet enthalpy for DOE test problem
less than 8, the time step was multiplied by 1-414. The temperature results are presented in
Figure 7. Also shown in Figure 7 are the results of a more accurate 87-time-step solution
(157 sec cpu time). Considerable temporal truncation error is evident. It is interesting to note
that a plot of outlet temperature vs. time (not given) would show identical drawdown curves.
Algorithm 2 also performed poorly on this problem. The time steps were constrained with
(10
PRODUCTION WELL
INJECTION WELL
0)
GRAVITY
1
,2000)
Figure 6. Solution domain for fracture flow problem
84
2600-
G. ZYVOLOSKI
28 TIME STEPS
87 TIME STEPS
-
. . . . . . . . .
, 180
190
? I
I I 1 I
0 20 40 60 80 1
L x 34001
Figure 7. Temperature field for fracture flow problem
0
this algorithm to lop4 days for the first 50 time steps in which it used a comparable amount
of time as algorithm 1 used to finish the problem.
DISCUSSION
The three examples presented above illustrate some of the strengths and weaknesses of the
finite element representation of flow in porous media. The finite element method performed
slightly better than the finite difference method for the DOE test problem (example 2). The
third example demonstrated the well-known result that the aspect ratio for elements must be
kept about the same order of magnitude for good results. The code performed well on this
Table 111. Parameters for fracture flow example
Parameter Symbol Value
Permeability
Thermal conductivity
Porosity
Rock density
Rock specific heat
Aquifer depth
Aquifer width
Fracture length
Fracture width
Initial pressure
Initial temperature
Discharge production
injection
k
K
4
m2 matrix
m2 fracture
2.9 W/(m " C)
0.001 matrix fracture
2700 kg/m3
1000 J /kg " C
1000 (2400 m-3400 m)
100 m
300 m
0.002 m
hydrostatic
40.0+ 0.055 (depth)
0.05 kg/(sec m)
0.05 kg/(sec m) at 118C
GEOTHERMAL RESERVOIR SIMULATION 85
problem using an integration scheme which resulted in the 5-point difference scheme. This
implementation is not restricted to rectangular grids like the difference formulae, and thus is
more general. How it performs in different grid orientations is worth investigating, as well as
an experimental investigation of the spatial discretization error.
Two other important points arise in the discussion of the examples. This is the temporal
truncation error and the performance of algorithm 2, the approximate J acobian algorithm.
These two subjects are somewhat related. I t is evident from the temperature history plot of
example 2 and the temperature contour plot of example 3 that considerable truncation error
occurs in large time step runs. Algorithm 2 usually takes about 4-8 times the time steps using
automatic time stepping, at 2-3 times the cost of algorithm 1. Thus in many problems it may
prove to be very useful in obtaining an accurate solution. It did prove very efficient in well
tests in two-phase conditions in conjunction with finite difference methods.18
CONCLUSIONS
A finite element method for two-phase flow in porous media has been presented which is
competitive with finite difference methods in terms of computational efficiency while still
possessing geometric flexibilities. Two solution algorithms, one using the full Newton-Raphson
iteration and the other employing an approximate J acobian, have been presented and are
useful in solving long-term reservoir problems. Algorithm 1, using the full J acobian, allowed
very large time steps with associated temporal truncation error. Algorithm 2 was found to be
limited in time step size. Despite this drawback, this algorithm proved to be an efficient
alternative to algorithm 1 in some problems.
ACKNOWLEDGEMENT
The author is grateful to Dr. M. J . OSullivan and Gloria Bennett for reading the manuscript
and providing many helpful comments. Financial support for this work was provided by the
U.S. Department of Energy.
REFERENCES
1. S . K. Garg, J. W. Pritchett and D. H. Brownell, Jr., Transport of mass and energy in porous media, Roc. Seeond
United Nations Symp. Development and Use of Geothermal Resources, San Francisco (1975).
2. J. W. Pritchett, S. K. Garg, D. H. Brownell, Jr. and H. B. Levine, Geohydrological environmental effects of
geothermal power production-phase 1, Report No. SSS-R-75-2733, Systems, Science and Software, La Jolla,
California (1975).
3. C. R. Faust and J. W. Mercer, Mathematical modeling of geothermal systems, Proc. Second United Nations
Symp. Development and Use of Geothermal Resources, San Francisco (1975).
4. L. K. Thomas and R. G. Pierson, Three dimensional reservoir simulation, SOC. Pet. Eng. J., 18,151-161 (1978).
5. K. H. Coats, Geothermal reservoir modelling, paper SPE 6892, 52nd Annual Fall Meeting of the SOC. Pet. Eng.
of AZME, Denver, Colorado (1977).
6. G. A. Zyvoloski, M. J. OSullivan and D. E. Krol, Finite difference techniques for modelling geothermal
reservoirs, Znt. J. Numer. Anal. Methods Geomech., 3, 355-366 (1979).
7. K. Pruess, R. C. Schroeaar, P. A. Witherspoon and J. M. Zerzan, SHAFT78, two-phase multidimensional
computer program for geothermal reservoir simulation, Lawrence Berkeley Laboratory Report No. 8264, Novem-
ber (1979).
8. J. W. Mercer, Jr., C. R. Faust and G. F. Pinder, Geothermal reservoir simulation, Proc. Conf. Research for the
Development of Geothermal Energy Resources, Pasadena, California (1974).
9. J. W. Mercer and C. R. Faust, Simulation of water- and vapor-dominated hydrothermal reservoirs, Paper SPE
5520, 50th Annual Fall Meeting of the SOC. Pet. Eng. of AZME, Dallas, Texas (1975).
10. D. H. Brownell, Jr., S . K. Garg and J. W. Pritchett, Computer simulation of geothermal reservoirs, Paper SPE
5381,45th California Regional Meeting of the SOC. Pet. Eng. of AZME, Ventura (1975).
86 G. ZYVOLOSKI
11. A. T. Corey, The interrelation between gas and oil relative permeabilities, Producers Monthly, 19,38-41 (1954)
12. M. A. Grant, Permeability reduction factors at Wairakei, Paper 77-HT-52, AIChE-AIME Heat Transfer Conf.,
Salt Lake City, Utah (1977).
13. 0. C. Zienkiewicz. Th e Finite Element Method. McGraw-Hill, London, 1977.
14. 0. C. Zienkiewicz and C. J . Parekh, Transient field problems-two and three dimensional analysis by
15. V. Dalen, Simplified finite-element models for reservoir flow problems, SOC. Pet. Eng. J., 19, 333-343 (1979).
16. R. M. Toronyi and S. M. Farouq Ali, Two-phase, two-dimensional simulation of a geothermal reservoir and
17. M. W. Molloy, Geothermal reservoir engineering code comparison project, Sixth Workshop on Geothermal
18. G. Zyvoloski and M. J . OSullivan, Simulation of a gas-dominated geothermal reservoir, Soc. Per. Eng. I., 20,
isoparametric finite elements, Int. J. Num. Meth. Eng., 2, 61-70 (1973).
wellbore system, SOC. Pet. Eng. J. , 17, 171-183 (1977).
Reseruoir Engineering, Stanford University (1980).
52-58 (1980).

You might also like