You are on page 1of 16

SPE-120198-STU (Student 6)

Modeling of Reservoir Temperature Transients and Parameter Estimation


Constrained to the Model
Obinna Duru, SPE, Stanford University

This paper was prepared for presentation at the 2008 SPE International Student Paper Contest at the SPE Annual Technical Conference and Exhibition held in Denver, Colorado, USA, 21–24
September 2008.

This paper was selected for presentation by merit of placement in a regional student paper contest held in the program year preceding the International Student Paper Contest. Contents of the
paper, as presented, have not been reviewed by the Society of Petroleum Engineers and are subject to correction by the author(s). The material, as presented, does not necessarily reflect any
position of the Society of Petroleum Engineers, its officers, or members.

Abstract
Permanent downhole gauges (PDGs) provide a continuous source of downhole pressure, temperature and sometimes rate
data. Until recently, the measured temperature data have been largely ignored. However, a close observation of the
temperature measurements reveals that the temperature responds to changes in flow rate and pressure, which implies that the
temperature data may be a source of reservoir information.
In this work, the Alternating Conditional Expectations (ACE) technique was applied to temperature and flow rate signals
from PDGs to establish the existence of a functional relationship between them. Then, performing energy, mass and
momentum balances, reservoir temperature transient models were developed for flow of single- and multiphase fluids, as
functions of formation parameters, fluid properties, and changes in rate and pressure. The pressure fields in oil and gas
bearing formations are usually transient. This gives rise to pressure-temperature effects appearing as temperature changes in
the porous medium when the pressure field changes. The magnitudes of these effects depend on the properties of the
formation, flow geometry, time and other factors and result in a reservoir temperature distribution that is changing in both
space and time. Therefore, in this study, reservoir thermometric effects were modeled as convective, conductive and transient
phenomena with consideration for time and space dependencies. This mechanistic model included the Joule-Thomson effects
due to fluid compressibility, and viscous dissipation in the reservoir during fluid flow in accounting for the reservoir
temperature dependence on changing pressure/flowrate fields.
Numerical solution schemes as well as the semianalytical scheme - Operator Splitting and Time Stepping (OSATS) were
used to solve the models, and the solutions closely reproduced the temperature profiles seen in real measured data. By
matching the models to different temperature transient histories obtained from PDGs, reservoir parameters namely porosity
and saturation and fluid Joule-Thomson coefficient could be estimated. Hence the normally unused temperature data record
can be used to estimate reservoir parameters not usually available from conventional well test analysis. Analysis of
temperature may also provide a less expensive substitute for downhole flow rate measurement.

Introduction
Long-term reservoir monitoring using permanent downhole devices provides a continuous source of downhole data in the
form of pressure, temperature and sometimes flow rate. These permanent downhole tools provide access to data acquired
continuously over long periods of time, which provides reservoir information at a much larger radius of investigation than
conventional wireline testing.
The behavior of pressure transients in reservoir and wellbore flow has been studied extensively, and applied in
conventional well test analysis for reservoir description, parameter estimation for formation characterization and evaluation
of well and field performance. In recent times, with data convolution and deconvolution techniques as well as data filtering
and tuning, pressure transient analysis methods have also been applied to pressure data from permanent downhole gauges
(PDGs), increasing the usefulness of these data.
However, in most conventional pressure transient analysis methods, the temperature distributions in the reservoir and
wellbore have been assumed isothermal. The temperature changes associated with fluid flow have been considered to be
relatively small and hence negligible for any consideration in the analysis of flow behavior. However, an analysis of
temperature measurements, at a fine scale using continuous data from PDGs, has shown that the temperature of the fluid
responds to changes in flow conditions in the reservoir. Generally, the flow is not isothermal when the scale of observation
and resolution of the temperature data are refined. This study attempts to identify the underlying physical phenomena
responsible for this temperature transient behavior and their possible application to reservoir characterization and evaluation
of well performance.
2 SPE Student Paper

Statement of the Problem


Many previous attempts at developing interpretation method for temperature profiles in wellbore-reservoir systems have
remained largely qualitative. Most of the analyses have concentrated on wellbore thermal exchanges due to conduction and
convection, assuming that the produced fluid enters the wellbore at the geothermal temperature. Others have attempted the
study of thermometric fields in reservoirs and porous systems, but have constrained the analyses to convective effects only in
steady-state formulations. A few have considered the effects of heating or cooling of the produced fluid before it enters the
wellbore due to factors like the Joule-Thomson effect, adiabatic expansion and viscous dissipation.
The pressure fields in oil and gas bearing formations are usually nonstationary (Filippov and Devyatkin, 2001). Pressure-
temperature effects give rise to temperature variations in the porous medium when the pressure field is changing. The
magnitudes of these effects depend on the properties of the formation, flow geometry, time and other factors, and result in a
reservoir temperature distribution that is changing in both space and time. Therefore, in this study, reservoir thermometric
effects were modeled as convective, conductive and transient phenomena with consideration for time and space
dependencies. This mechanistic model included the Joule-Thomson effects due to fluid compressibility, and viscous
dissipation in the reservoir during fluid flow accounting for the reservoir temperature dependence on changing
pressure/flowrate fields.
As a result of these investigations, it was found that in addition to establishing a representative model for the temperature
distribution in the reservoir, reservoir and flow properties such as porosity and saturation could be estimated in an inverse
optimization problem. These properties are not usually available from conventional pressure transient analysis alone.

Previous work
Several authors have studied the thermodynamics of flow through porous media and wellbore systems, especially in the
context of heat convection and conduction. One early work in this regard was by Ramey (1962) who developed a model for
the prediction of wellbore fluid temperature as a function of depth for injection wells. Ramey expanded this model to give the
rate of heat loss from the well to the formation, assuming steady-state heat flow in the wellbore and unsteady radial
conduction in heat transfer to the earth. Horne and Shinohara (1979) presented single-phase heat transmission equations for
both production and injection geothermal well systems by modifying Ramey's model as a way of calculating the heat losses
between wellhead and reservoir in order to evaluate reservoir temperature. Shiu and Beggs (1989) presented another
modification of Ramey's model to predict the wellbore temperature profile for a producing well, where the temperature of
fluid entering the wellbore from the reservoir is known. These wellbore models considered heat transfer as strictly convection
and conduction phenomena with fluid entering the formation at a constant temperature from the reservoir.
Izgec et al. (2006) presented a model that applied to coupled wellbore and reservoir systems and provided a transient
wellbore temperature simulator coupled with a variable-earth-temperature scheme for predicting wellbore temperature
profiles in flowing and shut-in wells. Again, their study looked at the mechanism of heat transfer in the wellbore and the
interaction with surrounding formation without consideration for for possible changes in the reservoir fluid temperature
before entry into the wellbore. Sagar et al. (1989), developed a steady-state two-phase model for the wellbore temperature
distribution accounting for Joule-Thomson effects due to heating/cooling caused by pressure changes within the fluid during
flow. Sagar et al. (1989) considered Joule-Thomson effects as a possible heat source/sink during fluid flow and applied the
model to estimate heat losses in gas flow.
Valiullin et al. (2004) presented a treatment of the temperature distribution in the formation when the pressure field in the
reservoir changes, and showed that indeed, adiabatic and Joule-Thomson effects as well as effects due to heat of phase
transition (gas liberation from oil) may be present during fluid flow in a hydrocarbon saturated porous medium. Valiullin et
al. (2004) designed experiments to estimate the thermodynamic coefficients, namely the Joule-Thomson coefficient and
adiabatic coefficients. Ramazanov and Parshin (2006) went on to develop an analytical model that described the formation
temperature distribution in a reservoir, while accounting for phase transitions. They solved a steady-state convective thermal
flow model with constant flow rate and extended it to cases with phase changes. In 2007, Ramazanov and Nagimov presented
a simple analytical model to estimate the temperature distribution in a saturated porous formation at variable bottomhole
pressure. Their investigation showed that for a single-phase fluid in a homogenous reservoir, temperature-pressure effects
such as Joule-Thomson can cause the temperature in the reservoir to vary significantly when reservoir pressure is changing in
time. Ramazanov and Nagimov (2007) solved the convective thermal transport model with variable pressure but constant
flow rate. Attempts to solve the full energy balance equation for the temperature distribution in a reservoir were made by
Dawkrajai (2004) and Yoshioka (2007). Both presented equations for reservoir and wellbore heat flow and developed
prediction models for the temperature and pressure. In an inversion step, they showed a way to identify water and gas entries
into a well. Both approaches made considerations for Joule-Thomson and frictional heating effects but assumed a constant
flow rate, and steady-state conditions in arriving at the solution to their models.
Bear (1972), Bejan (2004) and Nield and Bejan (1999) presented a comprehensive model for heat transport in a porous
media from mass, energy and momentum balance. Thermal diffusion and convection and effects due to the fluid
compressibility, viscous dissipation (mechanical power required to extrude the fluid through the pore) were incorporated into
the model and the final form presented took the form of a convection-diffusion model with source/sink terms. These studies
discussed the possibility of the optimization of the fluid space configuration for minimal thermal resistance in a porous
medium heat exchanger.
SPE Student Paper 3

Distributed reservoir temperature model


In order to proceed with the study of the physics behind the observed temperature response to changes in flow rate and
pressure, as a reservoir temperature distribution problem, there is the need to establish the existence of a functional
relationship between the temperature, and pressure and flow rate. The technique chosen for this investigation was the iterative
nonparametric regression tool, Alternating Conditional Expectation (ACE) originally proposed by Breiman and Friedman
(1985). ACE allows for the estimation of optimal transformations that may lead to the maximal multiple correlation between
a response variable (temperature in this case) and a set of predictor variables (pressure, rate and time). These transformations
are useful in establishing the existence of a functional relationship between the response variable and the predictor variables.
Breiman and Friedman (1985) also showed that these optimal transformations for correlation are also optimal for regression.

Thermometry in a fluid-saturated porous media


The flow of energy-carrying fluids through a porous media has been studied for many years. Bejan (2004) and Bear
(1972) presented a comprehensive thermodynamic approach to obtaining a representative model for temperature distribution
in a porous media. The model accounted for spatial distribution as well as transient effects in the formation. Sharafutdinov
(2001), Filippov and Devyatkin (2001) and Ramazanov and Nagimov (2007) also followed similar approaches in developing
their models for temperature distribution in a fluid saturated porous stratum.
In a flowing well, the pressure and flow rate measurements recorded by permanent monitoring gauges are not constant.
For gauges placed close to the sandface flow area, these changes reflect the dynamics of the flow in the reservoir. These flow
dynamics cause a temperature field to evolve in the reservoir, driven by thermodynamic effects such as the Joule-Thomson
heating (or cooling), adiabatic expansion, and heat of phase transitions. Other effects such as the viscous dissipation, equal to
the mechanical power needed to extrude the viscous fluid through the pore, as well as frictional heating between the fluid and
rock matrix during the fluid flow are also factors that contribute to the evolution of a nonuniform temperature field in the
medium.
The Joule-Thomson effect is the change in the temperature of a fluid due to expansion or compression of the fluid in a
flow process involving no heat transfer or work (constant enthalpy). This change is due to a combination of the effects of
fluid compressibility and viscous dissipation. The Joule-Thomson effect due to the expansion of oil in a reservoir or wellbore
results in the heating of the fluid because of the value of the Joule-Thomson coefficient is negative for oil. The coefficient has
a positive value for real gases and the consequent behavior for gas flow is a cooling effect. Theoretically, the Joule-Thomson
coefficient for ideal gases is zero implying that the temperature of ideal gases would not change due to a pressure change if
the system is held at constant enthalpy. Combined with other factors, on expansion of the fluid and subsequent flow of liquid
oil and/or water out of the reservoir, the wellbore and near wellbore regions in the reservoir become heated above the normal
static reservoir temperature. By convection, diffusion and further generation of heat enerygy due to these effects, a
nonuniform temperature is created, which spreads into the reservoir. Conversely, during no-flow conditions (shut-ins), the
regions already heated lose heat to the surrounding formation through conduction and the result is a temperature decline at a
rate determined by the thermal diffusivity of the medium.

Reservoir Temperature Model in One-dimensional Cylindrical Coordinate System


A. Single-phase Formulation
To derive the energy equation for a homogenous porous medium, the energy equations for the solid and fluid parts are
derived separately from the first law of thermodynamics, and averaged over an elemental control volume to obtain the
general form of the model. The consideration is for nonisothermal flow of a nonideal fluid in a porous medium. The change
in kinetic and potential energies of the flow will be taken as negligible. An assumption of local thermal equilibrium between
the fluid and the porous matrix will also be made. Using volumetric averaging to combine the heat transfer model in the solid
matrix with the model from the fluid heat transport gives the general form:

∂T ∂T ( (1 − φ )λ + φλ f ) ∂ r ∂T + β T φ ∂p + β Tv ∂p − v ∂p + v ρ g
( (1 − φ )( ρ c ) + φ ( ρ
s s f c f ))
∂t
+ ρ f cf v
∂r
=
r
s

∂r ∂r ∂t ∂r ∂r
(1)

On rearrangement and assuming negligible gravity effects, this becomes:


∂T ∂T α ∂ ∂T ∂p ∂p
+u = r + ηφ C + εu (2)
∂t ∂r r ∂r ∂r ∂t ∂r
The form of Eqn. 1 is the convection-diffusion equation with source/sink terms. The second term on the right hand side of
Eqn. 2 is the compressibility term, while the last term is the viscous dissipation term.
The mass balance equation takes the form:
∂ρ f 1 ∂ (rv ρ f )
ρ + =0 (3)
∂t r ∂r
4 SPE Student Paper

The flow is assumed to obey Darcy's law, and the equation for Darcy flow given by
k ∂p
v= (4)
μ ∂r
Eqns 2, 3 and 4 form the governing equations for one-dimensional thermal transport in a homogenous porous medium.
The assumptions made in deriving the equations were:
• The medium is homogenous, such that the solid and fluid permeating the pores are evenly distributed throughout
the porous medium.

• The medium is isotropic such that permeability and thermal conductivity do not depend on the direction of the
flow.

• At any point in the porous medium, the solid matrix is in thermal equilibrium with the fluid in the pores.

• Darcy's law applies.

B. Two phase formulation


The assumptions made for the two-phase formulation are similar to those made in the single-phase case, with the addition
of negligible capillary effects. The thermal model in a one-dimensional radial coordinate system for the two-phase system
becomes:
∂T ∂T
( (1 − φ )( ρ c ) + φ ( ρ
s s w c fw sw + ρo c fo so ) )
∂t
+ ( ρ w c fw sw vw + ρo c fo so vo )
∂r
=
(5)
( (1 − φ )λs + φ (λw sw + λo so )) ∂ ∂T ∂p ∂p
r + ( ρ w c fw swη w + ρo c fo soηo ) φ + ( ρ w c fw sw vwεw + ρ o c fo so voεo )
r ∂r ∂r ∂t ∂r
On rearrangement and with negligible gravity and capillary effects, this becomes:
∂T ∂T α ∂ ∂T ∂p ∂p
+u = r +η* + J* (6)
∂t ∂r r ∂r ∂r ∂t ∂r
The mass balance equation takes the form:
∂ ( ρ w sw ) 1 ∂ (rvw ρ w sw )
φ + =0 (7)
∂t r ∂r

∂ ( ρ o so ) 1 ∂ (rvo ρo so )
φ + =0 (8)
∂t r ∂r
The Darcy flow equation becomes:
kw ∂pw
vw = .( ) (9)
μw ∂r

ko ∂po
vo = .( ) (10)
μo ∂r
Eqns 5 through 10 are the equations defining the formulation for the temperature distribution in a reservoir during two-phase
flow.

Operator Splitting and Adaptive Time Stepping (OSATS)


Eqns. 2.and 6 are convection-diffusion type equations. Analytical solutions for convection-diffusion equations have been
the subject of research and numerical solutions have serious issues with stability due in part to the nature of the model – a
combination of a hyperbolic convective transport and parabolic diffusion transport models. In this work, a semianalytical
technique used in ground water transport was used to solve this problem. The technique is known as Operator Splitting and
Time Stepping (OSATS), and was developed for the solution of contaminant transport in ground water hydrology (Kacur and
Frolkovic, 2002, Remesikova, 2004). The operator splitting method breaks the model into two different parts, the transport
part and the diffusion part. Then, at each time step, the nonlinear transport part and the nonlinear diffusion part are solved
separately. The semianalytical nature comes from the fact that the solution is obtained in time sequences, with the solution at
SPE Student Paper 5

a time step depending on the solution at all previous time steps. Holden et al. (2000) showed the theoretical basis for this
technique.
In this work, the OSATS approach was used to solve the thermal model Eqns. 2 and 6. The methodology adopted was:
1. Decouple the model into two parts: the convection transport part and the diffusion part.
2. At each time step, first solve the hyperbolic convection transport part, accounting for variable flow rate, as well as
heat generation due to viscous dissipation, frictional and Joule-Thomson effects.
3. Solve the diffusion part at the same time step, adaptively modifying the time step to ensure stability if solution is
numerical.
4. Continue until the last time step.

Solution of the Single-phase Formulation by OSATS


The following assumptions were made in solving the single-phase reservoir thermal model:
• Constant fluid Joule-Thomson, adiabatic expansion coefficient, and thermal conductivity i.e. these parameters are
assumed to be weak functions of temperature
• Constant fluid viscosity and formation porosity
• Negligible gravity effects

A. Solution of the convective transport part:


The convection equation with its initial condition becomes:
∂T ∂T ∂p ∂p
+u = ηφ C + εu (11)
∂t ∂r ∂t ∂r

T (t = 0) = To (r ) (12)
Using the method of characteristics, and assuming constant flow rate, the solution yields:
η* − ε t
⎛r⎞
T (r , t ) = T0 (r ) − ε [ p(r , 0) − p (r , t )] − ∫ Φ (τ ) ln ⎜⎝ r
⎟ dτ
'
(13)
ln R 0 e ⎠

Where:
Φ (t ) = p (r = rw ) (14)
Ramazanov and Nagimov (2007) showed that by using the average time theorem, the integral on the left hand side of Eqn. 13
can be closely approximated when an optimal average time is used. Therefore, applying the average time theorem, the final
approximate solution for wellbore sandface temperature becomes:

η* − ε ⎛ r 2 − 2ψ ( p z − s ( z ) ⎞
T (rw , t ) = T0 (r1 ) − ε [ p (r , 0) − φ (t )] − [Φ(t ) − Φ(0)] ln ⎜ 1 e
⎟ (15)
ln R ⎜ r ⎟
⎝ e

Where:
t
r1 = rw2 − 2ψ ( pe t − s (t ) , s (t ) = ∫ Φ(τ )dτ , 0 < z < t
0
(16)
z = average time.
B. Solution of the diffusion part:
The form of the diffusion problem is:
1 ∂T 1 ∂T ∂ 2T
= + (17)
α ∂t r ∂r ∂r 2

0<r<∞ (18)
with initial and boundary conditions:
T (t = 0) = F (r )
(19)
T (r = 0) = finite
Ozisik (1993), using the method of integral identity described by Masters (1955), showed that the solution to Eqn. 17 is of
the form:
6 SPE Student Paper

1 ⎡ ' ⎛ r 2 + r'2 ⎞ ⎛ rr ' ⎞ ⎤ '


b
T (r , t ) = ∫ ⎢ r exp ⎜ −
'
⎟ F (r ) I o ⎜ ⎟ ⎥ dr (20)
2α t r ' ⎣ ⎝ 4α t ⎠ ⎝ 2α t ⎠ ⎦

Where 0 < b < ∞ is equivalent to the thermal diffusivity length, and takes the form b = α t .
Therefore in operator splitting and time stepping approach, at each time step, Eqn. 15 is evaluated for the solution of the
convective part at that step. Then, this solution forms the initial condition F (r ) in the evaluation of the diffusion solution,
Eqn. 17 The final solution obtained from Eqn. 17 is taken as the temperature of the system at that time step.

Solution of the Two-phase Formulation by OSATS}


A. Solution of the convective transport part:
The convection equation with its initial condition is:
∂T ∂T ∂p ∂p
+C = η* + J*
∂t ∂r ∂t ∂r (21)
T (t = 0) = To (r )
The solution follows closely the approach used for single phase formulation. By method of Characteristics, and
simplification by collection of terms, the solution yields,
η* − ε * t
⎛r⎞
T (r , t ) = T0 (r ) − ε * [ p(r , 0) − p(r , t )] − ∫ Φ (τ ) ln ⎜⎝ r
⎟ dτ
'

ln R 0 e ⎠

where (22)
ρ w c fw sw ε w λw + ρo c fo so ε o λo ⎛ ρ w c fw swη w + ρo c fo soηo ⎞ ⎛ ρ w c fw sw vw εw + ρo c fo so vo εo ⎞
ε* = , η* = ⎜ ⎟φ, J = ⎜
*

ρ w c fw sw λw + ρo c fo so λo ⎝ cm ⎠ ⎝ cm ⎠
Using the average time theorem, the integral on the left hand side of Eqn. 22 can be closely approximated when an
optimal average time is used. Therefore, the final approximate solution for wellbore sand face temperature becomes:

η* − ε * ⎛ r 2 − 2ψ ( p z − s ( z ) ⎞
T (rw , t ) = T0 (r1 ) − ε * [ p(r , 0) − φ (t )] − [Φ(t ) − Φ(0)] ln ⎜ 1 e
⎟ (23)
ln R ⎜ re ⎟
⎝ ⎠

r1 = rw2 + 2ψ ( pe t − s (t )) (24)

0 < z < t , z = average time. An optimal choice for z must be used.

B. Solution of the diffusion part:


The form of the diffusion problem is:
1 ∂T 1 ∂T ∂ 2T
= + (25)
α ∂t r ∂r ∂r 2

0<r<∞ (26)
with initial and boundary conditions:
T (t = 0) = F (r )
(27)
T (r = 0) = finite
Using the method of integral identity we get:
1 ⎡ ' ⎛ r 2 + r'2 ⎞ ⎛ rr ' ⎞ ⎤ '
b
T (r , t ) = ∫ ⎢ r exp ⎜ −
'
⎟ F (r ) I o ⎜ ⎟ ⎥ dr (28)
2α t r ' ⎣ ⎝ 4α t ⎠ ⎝ 2α t ⎠ ⎦

where 0 < b < ∞ is equivalent to the thermal diffusivity length, and takes the form b = α t .

Wellbore Temperature Transient Model


Permanent downhole monitoring tools are usually located some hundreds of feet (200 - 300 ft) above the
perforation/production zone. The tool placement constraint is one that is imposed by the design of the completions, although
the optimal location for pressure and temperature data management would be a position as close to the perforation as
SPE Student Paper 7

possible, to give measurements that are comparable with their sandface values. This disparity in location calls for a coupling
of the reservoir temperature model to a wellbore model to account for heat loss that may occur between the fluid in the
wellbore and the surrounding formation when the fluid flows a few hundred feet from the sandface to the gauge location.
The wellbore model used in this work was obtained from the work of Izgec et al. (2006). The solution to the model is a
modification of Ramey's model (1962) to account for heat transfer at shut-in times when flow rate is zero and heat transfer in
the wellbore is only by conduction into the formation.
Izgec et al. (2006) showed that the distribution of temperature in a wellbore can be obtained, as a fucntion of depth, by

1 − e aLR t ⎛ ( g sin θ ) ⎞ ( z − L ) LR
T f (r , t ) = Tei +
LR ⎣
⎡1 − e( z − L ) LR ⎤⎦ ⎜ gG sin θ + Ψ −
⎜ ⎟+e
c p Jg c ⎟⎠
(T fbh − Tebh ) (29)

where LR is called the relaxation parameter, defined by:

2π ⎡ rtoU to ke ⎤
LR = ⎢ ⎥ (30)
wc p ⎣ ke + rtoU toTD ⎦
and

(
TD = ln ⎡⎣e −0.2tD + 1.5 − 0.3719e − tD ⎤⎦ t D ) (31)

αt dp
tD = 2
, Ψ =ε (32)
rw dz

where θ = wellbore inclination angle


T fbh = fluid temperature entering the sandface from formation (solution to the reservoir temperature model)
Tei = geothermal temperature of formation at gauge location
Tebh = geothermal temperature of formation at bottomhole

Coupling the Reservoir Model to the Wellbore Model


The issue of gauge placement at some distance away from the perforation calls for the coupling of the reservoir model to
the wellbore model to account for heat loss during flow between the perforation and the gauge location. In principle, the
closer the gauge to the perforation, the closer the overall model would be to the reservoir model and the better the reservoir
model would be for further reservoir/formation analysis. The two models are coupled through the temperature of the fluid at
the bottomhole location. The bottomhole temperature is estimated using the distributed reservoir model, and used as an input
into the wellbore model to estimate the fluid temperature at the gauge location. The sensitivity of this overall model to the
distance between the gauge and the perforation will be revisited in a sensitivity analysis test to determine the viability of
using the model in reservoir studies, since the further away the gauge is from the perforation, the less sensitive the solution
will be to the reservoir model, and the more sensitive to the wellbore model.

Results and discussion


Optimal Transformation for Estimation of Functional Relationship
In order to show that a functional relationship may exist between temperature as a response variable, and rate and
pressure as the predictor variables, the nonparametric regression method known as Alternating Conditional Expectation
(ACE) was applied to a field data set. ACE yields optimal transformations of the variables, and the correlations between
these transformations have been shown to be optimal for regression between the variables. These transformations are also
useful in establishing the existence of a functional relationship between the response and predictor variables.
8 SPE Student Paper

Figure 1.: Flow rate data (left), and pressure data (right).

Using a field data set obtained from permanent downhole monitoring tool in a well, the ACE method was applied to the
pressure, rate and temperature data to establish the existence or otherwise of a correlation and functional form for their
relationship. Figures 1 and 2 show the plots of rate, pressure and temperature data, and the plot of the regression on the
optimal transformations.
The optimal transformation functions (in the right plot of Figure 2) showed a correlation coefficient of 0.99. This means
that temperature is well correlated with flow rate and pressure, and that a functional relationship may exist between
temperature, and rate and pressure, and this functional form can be extracted from any representative data set. The
consequence is that the flow rate can be predicted based on the temperature, and does not need to be measured.

Figure 2.: Temperature data (left) and optimal regression with ACE (right).

Sensitivity Analysis
Many variables/parameters are present in the model formulation and uncertainties in their values present a challenge in
further processing and utilization of the formulation and solution methodology presented in this work, hence the need to test
the sensitivity of the formulation and solution to different values of these parameters. The following parameters were tested:
the porosity of the formation, Joule-Thomson coefficient of the fluids, reservoir thickness, fluid viscosity, thermal
conductivity of rock and fluid, permeability, thermal diffusivity length, distance of permanent downhole gauge from the
perforation and the geothermal gradient.
It is clear from Figures 3 to 6 that the temperature formulation and solution is sensitive to most of the model parameters.
The parameters with the most prominent sensitivity (more than 50% in temperature estimation for less than 25% change in
the value of the parameters) were the fluid Joule-Thomson coefficient which smoothed the responses to small intermittent
rate changes, the porosity of the formation, the height of the formation, the thermal diffusivity length, fluid viscosity and
reservoir permeability. However, some of the parameters such as the formation thickness and geothermal gradient can be
estimated with acceptable certainty from other means such as well logs, viscosity from laboratory measurements, as well as
the gauge distance from the perforation face. Therefore the parameter space for the inverse problem was reduced to the space
of formation porosity, fluid Joule-Thomson coefficient, thermal diffusivity length and permeability. Porosity and
permeability are highly correlated (as can be seen also in the sensitivity plots).
SPE Student Paper 9

p y p y p y
336.5 336.6
φ = 0.1
ε = 2..*10-7
336.4
φ = 0.2 336.5
ε = 2.*10-8
φ = 0.3
336.3 336.4
φ = 0.4 ε = 6.*10-8
336.2 336.3 ε = 4.5.*10-9
ε = 1.*10-9

Temperature (K)
Temperature (K)

336.1 336.2

336 336.1

335.9 336

335.8 335.9

335.7 335.8

335.6 335.7

335.5 335.6
2.5 2.6 2.7 2.8 2.9 3 3.1 3.2 2.5 2.6 2.7 2.8 2.9 3 3.1 3.2
time (sec) 5 time (sec) 5
x 10 x 10
Figure 3.: Sensitivity to porosity (left) and fluid Joule-Thomson coefficient (right).

p y y
p y y g 336.5
336.5
μ = 0.05
β = 2.0 μ = 0.005
336.4 336
β = 3.5 μ = 0.001
β=5 μ = 0.0005
336.3
β = 10 335.5
336.2
Temparature (K)
Temperature (K)

335
336.1

336 334.5

335.9
334
335.8
333.5
335.7

335.6 333
2.5 2.6 2.7 2.8 2.9 3 3.1 3.2 2.5 2.6 2.7 2.8 2.9 3 3.1 3.2
time (sec) 5 time (sec) 5
x 10 x 10
Figure 4.: Sensitivity to thermal diffusivity length (left) and fluid viscosity (right)

p y y Temperature sensitivity to permeability


336.5 336.5
λf = 0.05
336.4
λf = 0.1
κ= 100md
336.3 λf = 0.2 336
κ= 600md
λf = 0.3 κ= 1.5 darcy
336.2 κ= 3.0 darcy
Temperature (K)
Temperature (K)

335.5
336.1

336
335
335.9

335.8
334.5

335.7

335.6 334
2.5 2.6 2.7 2.8 2.9 3 3.1 3.2 2.5 2.6 2.7 2.8 2.9 3 3.1 3.2
time (sec) 5 time (sec) 5
x 10 x 10
Figure 5.: Sensitivity to thermal conductivity (left) and permeability (right).
10 SPE Student Paper

y g g p

336.4

336.2
gauge at sandface
gauge at 500 ft above sandface

336
Temperature, K

335.8

335.6

335.4

500 1000 1500 2000 2500


time counter

Figure 6.: Sensitivity to gauge placement.

Therefore, in the inverse problem for parameter estimation, permeability of the medium was specified, reducing the final
parameter space to formation porosity, formation thermal diffusivity length and fluid Joule-Thomson coefficient. Sensitivity
to the gauge distance presents a problem in using the formulation presented in this work for possible reservoir parameter
estimation. The temperature of the fluid recorded at the gauge location is a combined effect of thermal transient processes in
the reservoir which delivers fluid of changing temperature (with constant/changing rate) to the wellbore from the reservoir,
and the heat loss to the external formation during flow up the wellbore to the gauge location. This makes the magnitude of
heat loss in the wellbore very important, and calls for a careful use of the formulation developed here if the gauge distance is
large. This is because, at a very large distance away from the formation, the magnitude of the heat loss in the wellbore will
mask the effect of the reservoir thermal transients and hence lead to poor reservoir parameter estimation. In the field data
example show here, by repetitive trials the optimal distance of the gauge from the perforation to ensure reasonable
representative reservoir parameters was around 300 feet. This however is consistent with the distance often found in many
field installations.

Some Results
The model solution, unique to the boundary condition chosen in the formulation, was matched to the temperature data
using the flow rate as input. In the case of field data collected over long periods in time, because of thermal diffusivity length
issues, representative transient regions were selected to ensure that a constant diffusivity length could be used. In the
optimization routine, the parameters that were perturbed to establish the match were porosity φ , oil Joule-Thomson
coefficient ε , fluid thermal conductivity λ f (in some instances as a check) and the optimal diffusivity length b. The values of
these parameters obtained at the optimal match were taken to be estimates of the optimal values of the parameters.
The input data used were flow rate information from two real fields, and here called data sets DAT.1 and DAT.2. These
were obtained from permanent downhole gauges (PDGs) in two different operating oil wells (in different fields). The data
sets consist of measurements of flow rate, pressure and temperature as a function time. Using the flow rate data as input, the
temperature profile was simulated for each representative data input set using thermal model developed.

Synthetic data
As a check on the procedure, synthetic data were generated using the thermal model developed in this work. The synthetic
data were generated in three single-phase forms and one two-phase form:
• normally distributed random noise (with mean ~20% of the range of the flow rate from DAT.1 data set) was added
to the flow rate data, and this was used as input to generate a temperature data set using the single-phase model
• again, normally distributed random noise was added to the temperature data obtained in the first step to create a
second noisy temperature data set
• using a different transient region in DAT.1 data set, the step was repeated to generate a third temperature data set
with appropriate noise added to it, using the single-phase model
• the two-phase model was also used to generate a temperature data set
Each of the four temperature data sets was used as `true' measurement in an inversion step in an attempt to reestimate the
model parameters used in generating the data sets. This was done to test the robustness of the formulation and solution
strategy, and to examine the possibility of using them in an inverse model for parameter estimation.
SPE Student Paper 11

Figure 7.: Single-phase: temperature match using rate data with random noise (left) and temperature match using rate data with
random noise, and `true' temperature with random noise (right).

For Figure 7 (left), the data were generated using φ = 0.3, ε = 4.5*10−8 ( K / pa) and b = 7.0m . The optimal parameter
values after the match were φ = 0.227, ε = 3.5*10−8 ( K / pa ) and b = 7.3m . In Figure 7 (right), the data were generated using
φ = 0.3, ε = 4.5*10−8 ( K / pa) and b = 7.0m and the match occurred at φ = 0.231, ε = 3.27 *10−8 ( K / pa) and b = 7.2m . In
Figure 8, the data were generated with φ = 0.3, ε = 4.5*10−8 ( K / pa) and b = 8.0m and the match occurred
at φ = 0.259, ε = 1.51*10 −8 (K / pa) and b = 8.32m .

Figure 8.: Single-phase: temperature match with random noise added to the `true' temperature (left) and temperature match using
rate data with random noise, with different transient region (right).

Figure 9.: Two-phase: temperature match using rate data with random noise, and `true' temperature with random noise.
12 SPE Student Paper

Finally, in the two-phase case shown in Figure 9, the data were generated with φ = 0.3$,$Sw = 0.45 and b = 2.7 m and the
match occurred at φ = 0.145, S w = 0.493 and b = 3.0m .
The plots show good matches between the `true' data and simulated results for the tests on both models (single- and two-
phase). Also, the estimated values of the model parameters obtained after the matching were close to the original values of
the parameters. This shows that the formulation with the solution method used was able to reestimate the parameters used in
generating a synthetic data set and so lends support to the applicability of using the model formulation in an inverse step for
reservoir parameter estimation by matching the model to real field temperature data.

Field data
Single-phase system:
The two different sets of field data DAT.1 and DAT.2 were used to test the model, as well as obtain model parameters at
optimal match of the model to the data. DAT.1 set is an 800-hr long measurement, with a measurement taken every 6 secs.
DAT.2 is 24-hr long with a measurement taken every 1 second. Again, representative transient regions were selected, to
ensure a constant diffusivity length and the parameters used in the inverse problem were porosity φ , oil Joule-Thomson
coefficient ε , fluid thermal conductivity λ f (in some instances as a check) and the thermal diffusivity length b. The
temperature transients were obtained using the semianalytical solution technique (Operator Splitting and Adaptive Time
Stepping [OSATS]) discussed earlier, and the values of the model parameters at optimal match are shown in the captions of
each figure.
Figures 10 to 12 show good matches between the single-phase model and the DAT.1 data set. Figure 13 also shows the
match using the single-phase model on the DAT.2 data set. Both direct search (Genetic algorithms) and gradient-based
(Levenberg-Marquardt) optimization techniques were used in each case, and the optimal parameters at the matches were
always approximately equal for each optimization algorithm used.
336.8
336.7

336.6 336.6

model data
336.5
data 336.4 model
336.4
Temperature, K
Temperature, K

336.2
336.3

336.2 336

336.1
335.8

336
335.6
335.9

335.8 335.4
1.48 1.5 1.52 1.54 1.56 1.58 1.6 1.62 1.64 0 0.5 1 1.5 2 2.5
time, s 6 time series (data counter) 4
x 10 x 10

Figure 10.: Matching DAT.1 using OSATS (φ = 0.196, ε = −1.16*10 ( K / Pa), b = 9.2m) [left] and
−7

(φ = 0.21, ε = −9.0*10 −9
( K / Pa), b = 6.12m ) [right].
SPE Student Paper 13

336.5
data
model
336.4

336.3

Temperature (K)
336.2

336.1

336

335.9

335.8
0 100 200 300 400 500 600 700
time series (counter)

Figure 11.: Matching DAT.1 using OSATS (φ = 0.2, ε = −7.7 *10 −8


( K / Pa), b = 5.2m ) [left] and

(φ = 0.235, ε = −4.48*10 −8
( K / Pa), b = 7.817m ) [right].
337
336.6 data
model
336.5
336.5
336.4

336.3 model
data 336
336.2
Temp, (K)
Temp, (K)

336.1
335.5
336

335.9
335
335.8

335.7

335.6 334.5
2.5 3 3.5 4 2.14 2.16 2.18 2.2 2.22 2.24 2.26 2.28 2.3 2.32
time (secs) time (secs) 6
x 10
5 x 10

Figure 12.: Matching DAT.1 using OSATS (φ = 0.228, ε = −1.09*10 −9


( K / Pa), b = 3.0m ) [left] and

(φ = 0.21, ε = −4.3*10 −8
( K / Pa ), b = 5.16m ) [right].

Figure 13.: Matching DAT.2 using OSATS (φ = 0.182, ε = −5.95*10 −8


( K / Pa), b = 5.92m ) .
The values of the model parameters (also reservoir and fluid properties) obtained at optimal match are physically
meaningful, and the porosity values are well within the range of porosity values for carbonate reservoirs (for DAT.1 data set).
The values of the Joule-Thomson coefficient are also consistent with the range of values of the coefficient that have been
14 SPE Student Paper

observed for different types of crude oil. The thermal diffusivity length correlation to the duration of shut-in for each
transient is also very obvious. The longer the shut-in (when input flow rate is zero), the longer the value of thermal diffusivity
length estimated from the inverse problem.
A fully numerical solution of the the model formulation was also attempted for comparison with results from the
semianalytical solution. It must be noted that numerical solutions to convection-diffusion problems, especially where there
are source/sink terms, are known to be very unstable. A way out was to use Operator Splitting and Time Stepping (OSATS),
in which case numerical discretization methods were used to solve each of the decoupled convection and diffusion transport
parts.

Figure 14.: Matching DAT.1 using fully numerical solution (φ = 0.286, ε = −1.53*10 −8
( K / Pa), b = 2.0m ) [left] and

(φ = 0.287, ε = −9.0*10 −9
( K / Pa), b = 2.6m, λ f = 0.11(W / m.K ), λs = 4.0(W / m.K ) ) [right].

Figure 14 shows that the numerical scheme could also match the data. The model parameters at optimal match are
comparable to the values obtained using the more stable semianalytic solution scheme.

Two-phase
The two-phase formulation includes the fluid saturations among the model parameters. The saturation variables in the
formulation are static (not modeled to change with time). However, since permanent monitoring devices take measurements
over long periods of time, saturation changes with time can be modeled as a time-lapse problem, in which effective values of
saturations are estimated at each region of time. Data from the single-phase system (DAT.1) were used to test the
formulation. The intent of the inversion was to check if the inversion process would drive the water saturation to the specified
critical value when data acquired from single-phase oil flow are used. Therefore, as in the single-phase case, the model
developed here was matched to the temperature data using the flow rate as input. Representative transient regions were
selected, to ensure a constant diffusivity length and the parameters for estimation were porosity φ , water saturation Sw , and
the optimal thermal diffusivity length b. The critical water saturation value used was Swc = 0.2

336.6

336.5

336.4
model
336.3 data
Temp, (K)

336.2

336.1

336

335.9

335.8

2.5 3 3.5 4
time, (secs) 5
x 10

Figure 15.: Matching using two-phase model (φ = 0.25, S w = 0.28, b = 5.36m ) .


SPE Student Paper 15

Figure 15 shows the plots of the match of the two-phase model to data from the single-phase system. Because the data set
used was that from a single-phase oil flow, the inversion optimization step was expected to drive the water saturation to its
critical value at optimal match. The initial guess of the value of water saturation was set at 0.6. Then a gradient-based search
was used to obtain the match of the model to the data. The estimated value of water saturation at optimal match
was Sw = 0.28. . The algorithm drove the water saturation value towards the critical water saturation. Using direct search
(Genetic algorithm), similar results were also obtained. It should be noted that the sensitivity of the solution to the difference
in the thermal conductivity of the water and oil had been tested and it was found that the solution is sensitive to this
difference.

Field application
Further testing and verification of this method was done by analyzing temperature, flow rate and pressure data from five
wells in a producing field. There were saturation and porosity information for each well in the field, obtained through well
logging. In all five wells, the estimated porosities and saturations from the method discussed in this work closely agreed with
the estimations from well logs. The estimations using the method were all within 10% of the values reported from well logs.

Conclusion and potential applications


The models developed in this study have been shown to have the potential to help characterize a reservoir using rate and
temperature data from any permanent downhole monitoring source. This reservoir characterization would be additional to
characterization normally achieved by analyzing the pressure transient history. Until recently, temperature data measured
have not been used in this way. Specifically, this study provides a method for the estimation of porosity, as well as a potential
to estimate the saturation distribution. These methods would use only temperature data. Being rate-dependent, the
temperature data also offers a potential way to infer sandface flowrate by inverting the reservoir temperature model.
The formulations and their solutions allow for local point-to-point estimation of temperature in a discretized spatial grid.
Each local estimation is dependent on the local values of the model parameters, hence allowing for the estimation of local
(grid) values of model parameters, each depending on the value of the temperature at the grid. This could form the basis for
the estimation of heterogeneous parameter fields. Results could serve as secondary conditioning data for porosity and
saturation fields in reservoir modeling.
As presented here, temperature provides an additional source of information in transient analysis. This presents the
potential for cointerpreting rate, pressure and temperature.

Nomenclature
b = thermal diffusivity length, m
( ρ w c fw sw + ρo c fo so )
C = volumetric heat capacity ratio,
cm
J
C f = volumetric heat capacity of fluid,
m3 K
J
cm = (1 − φ )( ρ s cs ) + φ (( ρ w c fw sw ) + ( ρo c fo so )) , volumetric heat capacity of fluid saturated rock,
m3 K
p = pressure, Pa
m3
q = flowrate
s
r = radius, m
T = temperature, K
T fbh = fluid temperature entering the sandface from formation (solution to the reservoir temperature model)
Tei = geothermal temperature of formation at gauge location
Tebh = geothermal temperature of formation at bottomhole
αt
tD = dimensionless time
rw2
J
U to = overall heat transfer coefficient,
( sKm 2 )
m
u = Cv = superficial velocity,
s
16 SPE Student Paper

Greek
φ = porosity
ρ = density
βT K
η= , adiabatic expansion coefficient,
Cf Pa
βT −1 K
ε= , Joule-Thomson coefficient,
Cf Pa
1 ∂ρ 1
β= ( ) , thermal expansion coefficient,
ρ ∂T p K
λ m2
α = m , thermal diffusivity,
cm s
W
λ = thermal conductivity,
mK
λm = φλ f + (1 − φ )λs , thermal conductivity of fluid saturated rock
θ = wellbore inclination angel

Subscripts
w = water o = oil = fluid
Acknowledgement
We would like to thank the H.L. and Janet Bilhartz-ARCO Stanford Graduate Fellowship and the Stanford University
Petroleum Research Institute-Innovations in Well Testing (SUPRI-D) for making this research possible.
References
J. Bear, The Dynamics of Fluids in Porous Media, Dover Publications, Inc, 1972.
A. Bejan, Convective heat transfer, Wiley, 2004
L. Breiman and J.H. Friedman, “Estimating optimal transformation for multiple regression and correlation”, Journal of American
Statistical Association 80 (1985), no. 391, 580 - 598.
P. Dawkrajai, A.R. Analis, K. Yoshioka, D. Zhu, A.D Hill, and L.W Lake, “A comprehensive statistically-based method to interpret real-
time owing measurements”, DOE Report (2004).
A.I. Filippov and E.M. Devyatkin, “Barothermal effect in a gas-bearing stratum”, High Temperature 39 (2001), no. 2, 255 - 263.
H. Holden, K.H. Larlsen, and K.A. Lie, “Operator splitting methods for degenerate convection-difusion equations, II: Numerical examples
with emphasis on reservoir simulation and sedimentation”, Comput. Geosci. 4 (2000), 287-323.
R.N. Horne and K. Shinohara, “Wellbore heat loss in production and injection wells”, J. Pet. Tech (1979), 116-118.
Izgec, C.S. Kabir, D. Zhu, and A.R. Hasan, “Transient fluid and heat flow modeling in coupled wellbore/reservoir systems”, SPE 102070
presented at the SPE Annual Technical conference, San Antonio, Texas (Sept. 2006).
H.J Ramey Jr., “Wellbore heat transmission”, JPT 435 (1962).
J. Kacur and P. Frolkovic, “Semi-analytical solutions for contaminant transport with nonlinear soption in one dimension”, University of
Heidelberg, SFB 359 24 (2002), 1- 20.
J.I. Masters, “Some applications of the p-function”, Journal of Chem. Physics 23 (1955), 1865-1874.
F. Maubeuge, M. Didek, M.B. Beardsell, E. Arquis, O. Bertrand, and J.P. Caltagirone, “Mother:a model for interpreting thermometrics”,
SPE 28588 presented at the SPE Annual Technical Conference and Exhibition (Sept. 1994).
D.A. Nield and A. Bejan, Convection in porous media, Springer, 1999.
M.N. Ozisik, Heat conduction, Wiley-Intersciences, 1993.
A. Sh. Ramazanov and V.M. Nagimov, “Analytical model for the calculation of temperature distribution in the oil reservoir during
unsteady fluid inflow”, Oil and Gas Business Journal (2007).
A. Sh. Ramazanov and A.V. Parshin, “Temperature distribution in oil and water saturated reservoir with account of oil degassing”, Oil and
Gas Business Journal (2006).
M. Remesikova, “Solution of convection-diffusion problems with nonequilibrium adsorption”, Journal of Comp. and Applied Maths 169
(2004), 101-116.
R.K. Sagar, D.R. Dotty, and Z. Schmidt, “Predicting temperature profiles in a flowing well”, SPE 19702 presented at SPE Annual
Technical Conference and Exhibition, San Antonio, TX (1989).
R.F. Sharafutdinov, “Multi-front phase transitions during nonisothermal filtration of live parafin-base crude”, Journal of Applied
Mechanics and Techincal Papers 42 (2001), no. 2, 284-289.
K.C. Shiu and H.D. Beggs, “Predicting temperatures in fowing oil wells”, J. Energy Resources Tech (1989), 1-11.

R.A. Valiullin, R.F. Sharafutdinov, and A.Sh. Ramazanov, “A research into thermal fields in fluid-saturated porous media”, Elsevier 148
(2004), 72-77.
K. Yoshioka, “Detection of water or gas entry into horizontal wells by using permanent downhole monitoring systems”, Ph.D. thesis, Texas
A and M University, Department of Petroleum Engineering, 2007.

You might also like