Modeling Reservoir Temperature Transients and Reservoir-Parameter Estimation Constrained to the Model Obinna O. Duru, SPE, and Roland N. Horne, SPE, Stanford University Summary Permanent downhole gauges (PDGs) provide a continuous source of downhole pressure, temperature, and sometimes flow-rate data. Until recently, the measured temperature data have been largely ignored, although a close observation of the temperature measurements reveals a response to changes in flow rate and pressure. This suggests that the temperature measurements may be a useful source of reservoir information. In this study, reservoir temperature-transient models were developed for single- and multiphase-fluid flows, as functions of formation parameters, fluid properties, and changes in flow rate and pressure. The pressure fields in oil- and gas-bearing formations are usually transient, and this gives rise to pressure/temperature effects appearing as temperature change. 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. In this study, these 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 resulting from fluid compressibility and viscous dissipation in the reservoir during fluid flow. Because of the nature of the models, the semianalytical solution technique known as operator splitting was used to solve them, and the solutions were compared to synthetic and real temperature data. In addition, by matching the models to different temperaturetransient histories obtained from PDGs, reservoir parameters such as average porosity, near-well permeabilities, saturation, and some thermal properties of the fluid and formation could be estimated. A key target of this work was to show that temperature measurements, often ignored, can be used to estimate reservoir parameters, as a complement to other more-conventional techniques. Introduction The behavior of pressure transients in reservoir and wellbore flow has been studied extensively and has been applied in conventional well-test analysis for reservoir description, parameter estimation for formation characterization, and evaluation of well and field performance. However, in most of these conventional pressuretransient analyses, the temperature distributions in the reservoir and wellbore have been assumed isothermal. Although the flow is generally nonisothermal, the temperature changes have been considered to be relatively small and, hence, negligible for consideration in the analysis of flow behavior. Most authors in petroleum reservoir engineering have studied heat transfer mainly as a wellbore phenomenon. Ramey (1962) developed a model for the prediction of wellbore-fluid temperature as a function of depth for injection wells and 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 Copyright © 2010 Society of Petroleum Engineers This paper (SPE 115791) was accepted for presentation at the SPE Annual Technical Conference and Exhibition, Denver, 21–24 September 2008. Original manuscript received for review 3 March 2009. Revised manuscript received for review 11 March 2010. Paper peer approved 22 June 2010. December 2010 SPE Reservoir Evaluation & Engineering (1979) presented single-phase heat-transmission equations for both production and injection geothermal-well systems by modifying Ramey’s model. Shiu and Beggs (1980) presented another modification of Ramey’s model to predict the wellbore-temperature profile for a producing well, in which the temperature of fluid entering the wellbore from the reservoir is known. Sagar et al. (1991) developed a steady-state two-phase model for the wellboretemperature distribution accounting for Joule-Thomson effects owing to heating/cooling caused by pressure changes within the fluid during flow. A number of authors have examined heat transfer in porous media, during flow of the reservoir fluids. A good number of these studies are in groundwater hydrology, with a few in petroleum reservoir engineering. Bravo and Jiang (2001) showed how groundwater-temperature measurements can be used to constrain parameter estimation in a groundwater-flow model. The order of magnitude of the changes in the temperature measurements used in their study is close to that seen in oil- and gas-flow systems (a few degrees Fahrenheit). Woodbury and Smith (1988) and Rath et al. (2006), also presented similar findings, in which thermal data could be inverted with hydraulic data for reservoir-parameter estimation. Again, in orders of magnitude, these temperature measurements compare with those seen for oil and gas systems. Valiullin et al. (2004) presented a simplified treatment of the temperature distribution in the formation when the pressure field in the reservoir changes. They showed that adiabatic and JouleThomson effects and effects caused by heat of phase transition (gas liberation from oil) may be present during fluid flow in a hydrocarbon-saturated porous medium. 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. Ramazanov and Nagimov (2007) presented a simple analytical model to estimate the temperature distribution in a saturated porous formation with variable pressure but constant flow rate. Their investigation showed that for a single-phase fluid in a homogeneous reservoir, temperature/pressure effects such as Joule-Thomson behavior can cause the temperature in the reservoir to vary significantly when reservoir pressure is changing in time. Models to couple the wellbore and reservoir systems in solving the heat-transfer problem have been presented by Dawkrajai (2004), Izgec et al. (2007), and Yoshioka (2007). Izgec et al. (2007) provided a transient-wellbore-temperature simulator coupled with a variable-Earth-temperature scheme for predicting wellbore-temperature profiles in flowing and shut-in wells. Their study looked at the mechanism of heat transfer in the wellbore and the interaction with surrounding formation without consideration for possible changes in the reservoir-fluid temperature before entry into the wellbore. Dawkrajai (2004) and Yoshioka (2007) solved the full energy-balance equation for the temperature distribution in a reservoir, coupled to a wellbore model. 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. Comprehensive models for heat transport in a porous medium from mass, energy, and momentum balance are presented in Bear (1972), Bejan (2004), and Nield and Bejan (1998). Thermal 873 4 9000 2.5 ×10 8900 2 8700 Flowrate, bbl/d Pressure, psi 8800 8600 8500 8400 8300 1.5 1 0.5 8200 8100 (a) 0 200 400 600 800 0 1000 0 200 (b) Time, hrs 400 600 800 1000 Time, hrs Fig. 1—Pressure data (a) and flow-rate data (b). diffusion, convection, effects resulting from the fluid compressibility, and viscous dissipation (mechanical power required to extrude the fluid through the pore) are incorporated into the models, and the final forms take the structure of convection/diffusion models with source/sink terms. Many of these previous attempts at developing an interpretation method for temperature profiles in wellbore/reservoir systems have remained largely qualitative. While some have concentrated on wellbore thermal exchanges because of conduction and convection, assuming that the produced fluid enters the wellbore at the geothermal temperature, others have constrained their 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 caused by factors such as the JouleThomson effect, adiabatic expansion, and viscous dissipation. Unlike previous studies, this work presents models that consider reservoir thermometric effects, modeled as convective, conductive, and transient phenomena with consideration for time (transient) and space dependencies, by considering the full underlying physical phenomena. The models and solutions presented here apply to both steady- and unsteady-state heat transfer, and they represent coupled reservoir and wellbore systems. Demonstration of Functional Relationship Using Optimal Transformations To proceed with the study of the physics behind the observed temperature response to changes in flow rate and pressure, there is the need to establish the existence of a functional relationship between the temperature, pressure, and flow-rate signals. The technique chosen for this investigation was the iterative nonparametric regression tool, known as 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), and these transformations are useful in establishing the existence of a functional relationship between the response variable and the predictor variables. ACE yields optimal transformations of the variables, and the correlations between these transformations have been shown to be optimal for regression between the variables. Here, using a field-data set obtained from a 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. Figs. 1 and 2 show the plots of rate, pressure, and temperature data and the plot of the regression on the optimal transformations. 874 The optimal transformation functions (Fig. 2b) showed a correlation coefficient of 0.99. Essentially, this indicates the ability to predict one of the three signals based on the values of the other two, signifying that temperature is well correlated with flow rate and pressure, that a functional relationship may exist between them, and that this functional form can be extracted from any representative data set. Reservoir Temperature Model The model for the flow of energy-carrying fluids through a porous medium involves formulating the energy- and material-conservation equations. Bejan (2004) and Bear (1972) have presented a comprehensive thermodynamic approach to obtaining a representative model for temperature distribution in a porous medium. The model accounted for spatial distribution and transient effects in the formation. 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 effects resulting from flow in the reservoir, and they cause a temperature field to develop in the reservoir, driven primarily by thermodynamic effects such as Joule-Thomson heating (or cooling), adiabatic expansion, and heat of phase transitions. Other effects such as viscous dissipation, equal to the mechanical power needed to extrude the viscous fluid through the pore, and 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 caused by expansion or compression of the fluid in a flow process involving no heat transfer or work (constant enthalpy), and it results from a combination of the effects of fluid compressibility and viscous dissipation. The Joule-Thomson effect caused by the expansion of oil in a reservoir or wellbore results in the heating of the fluid because 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. Combined with other factors, upon 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 energy owing 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. December 2010 SPE Reservoir Evaluation & Engineering 2 146.5 1.5 146 0.5 145 Σ Φi Temperature, °F 1 145.5 144.5 0 -0.5 144 -1 143.5 -1.5 143 0 200 400 (a) 600 800 1000 -2 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 Φ0 (b) Time, hrs Fig. 2—Temperature data (a) and optimal regression with ACE (b). Reservoir Temperature Model in 1D Cylindrical Coordinate System. Single-Phase Formulation. To derive the energy equation for a homogeneous porous medium, the energy equations for the solid and fluid parts are derived separately from the first law of thermodynamics and are 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 c Q 1 ∂T ⎡⎣(1 − )(s cs ) + ( f c f ) ⎤⎦ + f f ∂t 2 h r ∂r ⎡⎣(1 − )s + f ⎤⎦ ∂ ∂T ∂p = + T r ∂t ∂r ∂r Q 1 ∂p + v g + − 2 h r ∂r 2 h r ∂r r TQ 1 ∂p . . . . . . . . . . . . . (1) The mass-balance equation takes the form ∂ f ∂t + 1 ∂(rv f ) = 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (4) r ∂r The flow is assumed to obey Darcy’s law and the equation for Darcy flow, which is given by v= k ∂p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (5) ∂r Eqs. 2, 4, and 5 form the governing equations for 1D thermal transport in a homogeneous porous medium. Other assumptions made in deriving the equations include a homogeneous, isotropic medium and thermal equilibrium between the solid matrix and the fluid in the pores. Multiphase Formulation. Assumptions made for the multiphase formulation are similar to those made in the single-phase case, with the addition of negligible capillary effects. The thermal model in a 1D radial coordinate system for the multiphase system becomes f cfQ and other 2 he ␣t p r T − T∞ dimensionless variables, rD = , TD = , tD = 2 , ε D = ε o , T∞ rw T∞ rw p p D = o , and pD = , and rearranging the formulation and T∞ po neglecting gravity effects, the equation becomes ∂T ⎡⎣(1− )(s cs ) + ( wc fw sw + oc fo so ) ⎤⎦ ∂t ∂T + wc fw sw vw + oc fo so vo + gc fg sg vg ∂r ⎡(1 − ) s + w sw + o so + g sg ⎤ ∂ ∂T ⎦ r =⎣ . . . . . . . . . . . . (6) ∂r ∂r r ∂p + wc fw sw w + oc fo soo + gc fg sg g ∂t ∂p + wc fw sw vwεw + oc fo so voεo + gc fg sg vgεg ∂r ∂TD Pe ∂TD 1 ∂ Pe ∂pD ∂T ∂p . + = rD D + DC D + εD ∂t D rD ∂rD rD ∂rD ∂rD rD ∂rD ∂t D . . . . . . . . . . . . . . . . . . . . . . . . (2) On rearrangement, and keeping the formulation in dimensional form, the equation reduces to Defining a dimensionless Péclet number Pe = The initial and boundary conditions are TD ( rD , 0 ) = 0, pD ( rD , 0 ) = 1, TD ( rD → ∞, t D ) = 0, . . . . . . . . . . . . . . . . . . . . . . . . . . . . (3) and pD ( rD → ∞,t D ) = 1 The form of Eq. 2 is the convection/diffusion equation with source/ sink terms. The second term on the right-hand side of Eq. 2 is the compressibility term, while the last term is the viscous-dissipation term. December 2010 SPE Reservoir Evaluation & Engineering ( ( ( ( ) ) ) ) ∂T ∂T ␣ ∂ ∂T ∂p ∂p +u = + * + J * . . . . . . . . . . . . . . . . . (7) r ∂t ∂r r ∂r ∂r ∂t ∂r The mass-balance equations and the Darcy flow equations, respectively, take the form ∂( w sw ) 1 ∂(rvw w sw ) + = 0, ∂t r ∂r ∂(o so ) 1 ∂(rvo o so ) = 0, + r ∂r ∂t ∂( g sg ) 1 ∂(rvg g sg ) + =0 r ∂t ∂r ; . . . . . . . . . . . . . . . . . . . . . (8) 875 By the method of characteristics, and k ⎛ ∂p ⎞ k ⎛ ∂p ⎞ k ⎛ ∂p ⎞ vw = w ⎜ w ⎟ , vo = o ⎜ o ⎟ , vg = g ⎜ g ⎟ . . . . . . . (9) w ⎝ ∂r ⎠ o ⎝ ∂r ⎠ g ⎝ ∂r ⎠ Eqs. 6 through 9 are the formulation for the temperature distribution in a reservoir during multiphase flow, with initial and boundary conditions similar to those defined for the single-phase case. Solution Operator-Splitting Method. Eqs. 2 and 7 are convection/ diffusion-type equations with forcing terms. Analytical solutions for convection/diffusion equations exist, but with the forcing terms, in the form that appears in Eqs. 2 and 7, the equations become more complicated and not easily amenable to analytical solutions. The operator-splitting method (Valocchi and Malmstead 1992; Khan and Liu 1995; Kacur and Frolkovic 2002; Remešiková 2004) is a semianalytic method that allows the model to be broken into two different parts. Then, at each timestep, the nonlinear transport part and the nonlinear diffusion part are solved separately. Holden et al. (2000) showed the theoretical basis for this technique. An advantage of this process is that appropriate and different solution techniques may be applied to the two parts, and where numerical solutions are used, different timesteps can be chosen for each part. In this work, the operator-splitting approach was used to solve the thermal model given by Eqs. 2 and 7. The method adopted was 1. Decouple the model into two parts: the convection-transport part and the diffusion part. 2. At each timestep, first solve the hyperbolic convection-transport part, accounting for variable flow rate, and heat generation because of viscous-dissipation, frictional, and Joule-Thomson effects. 3. Solve the diffusion part at the same timestep, adaptively modifying the timestep to ensure stability if the solution is numerical. 4. Continue until the last timestep. Solution of the Thermal Models by Operator Splitting. The assumptions made in solving the single-phase reservoir thermal model were constant fluid Joule-Thomson coefficient, adiabatic expansion coefficient, and thermal conductivities (these parameters are assumed to be weak functions of temperature) and constant fluid viscosity and formation porosity. Solution of the Convective-Transport Part for Single-Phase Flow. The convection equation with its initial condition becomes ∂TD Pe ∂TD ∂p Pe ∂pD , . . . . . . . . . . . . . . (10) + = DC D + εD ∂t D rD ∂rD ∂t D rD ∂rD TD (t D = 0) = 0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (11) Using the method of characteristics yields rD2 = rD21 + 2 Pe ⋅ t D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (12) and TD = TD (rD , 0) + ε D [ pD − pD (rD , 0)] − # + εD ln R tD ∫ 0 , . . . . . . . . . . . . . . . . . . . (13) ∂pD ( rD , t D ) d D ∂ D where = DC . The integral can be evaluated numerically, or analytically, using the classical solutions of pressure-transient problems. In the work, both approaches were used and gave similar results. Solution of the Convective-Transport Part for Multiphase Flow. The convection equation with its initial condition is # ∂T ∂T ∂p ∂p +C = * + J * ∂t ∂r ∂t ∂r . . . . . . . . . . . . . . . . . . . . . . . . . (14) T (t = 0) = To (r ) 876 ⎡ ⎛ ⌳o ⌳g ⎞ ⎤ − ⎥ ⎢ wc fw sw ⎜ 1 − ⌳ ⌳T ⎟⎠ ⎥ ⎝ Q T r 2 = r12 + T ⎢ ( t − t1 ), . . . . . . . . . (15) h ⎢ ⌳g ⎥ ⌳ ⎥ ⎢ + oc fo so o + gc fg sg ⌳T ⌳T ⎥⎦ ⎢⎣ ⌳ w , ⌳ o , ⌳ g , and ⌳T are the water mobility, where oil mobility, gas mobility, and total mobility, respectively, and ⎛ c s + oc fo soo ⎞ ⎛ c s v ε + oc fo so voεo ⎞ * = ⎜ w fw w w , J * = ⎜ w fw w w w ⎟ ⎟⎠ . cm cm ⎝ ⎠ ⎝ The final form of the solution closely follows the solution for the single-phase case: T (r , t ) = T0 (r ) + ε * [ p(r , 0) − p(r , t )] * + ε * ∂p ( r , t ) d ln R ∫0 ∂ t − , . . . . . . . . . . . . . . . . . . (16) where ε* = wc fw swε ww + oc fo soε oo . . . . . . . . . . . . . . . . . . . . . . (17) wc fw sww + oc fo soo Again, the integral can be evaluated numerically or analytically, at each timestep, as in the single-phase case. Solution of the Diffusion Part. The form of the diffusion problem is similar for both single and multiphase formulations and takes the same general solution. ∂TD 1 ∂TD ∂ 2TD = + ∂t D rD ∂rD ∂rD2 0 < r < ∞, . . . . . . . . . . . . . . . . . . (18) with initial and boundary conditions: TD (t D = 0) = F (rD ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (19) TD (rD = 0) = finite Özişik (1993), using the method of integral identity described by Masters (1955), showed that the solution to Eq. 18 and Eq. 19 is of the form TD (rD , t D ) = 1 2t D ⎡ ' ⎛ rD2 + rD' 2 ⎞ ⎛ rD rD' ⎞ ⎤ ' ' r exp − ( ) I F r ⎢ D D o ∫ ⎜⎝ ⎜⎝ 2t ⎟⎠ ⎥ drD ε , 4 t D ⎟⎠ D ⎦ rD' ⎣ . . . . . . . . . . . . . . . . . . . . . . . (20) bD where 0 < bD < ∞ is equivalent to the dimensionless thermal-diffusivity length and takes the form b = t D . The solution of the diffusion part for the multiphase problem is also similar to Eq. 20, with the appropriate terms. Therefore, in the operator-splitting approach, at each timestep, Eqs. 13 and 16 are evaluated for the solution of the convective part at that step. Then, the solution forms the initial condition F (rD ) [or F (r )] in the solution of the diffusion problem, Eqs. 18 and 19. The final solution obtained in Eq. 20 is taken as the temperature of the system at that timestep. Wellbore Temperature-Transient Model and Coupling With Reservoir Model. Downhole monitoring tools are usually located some feet (usually more than 30 m) 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 perforations as 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 December 2010 SPE Reservoir Evaluation & Engineering 146.5 146.5 146 146 145.5 Temperature, °F Temperature, °F 145.5 φ=0.05 φ=0.1 φ=0.2 φ=0.3 φ=0.4 φ=0.5 φ=0.6 145 144.5 145 k=50 md k=100 md k=200 md k=400 md k=800 md k=1600 md k=3200 md 144.5 144 143.5 144 0 5 10 (a) 15 20 25 143 30 0 5 10 (b) Time, hrs 15 20 25 30 Time, hrs Fig. 3—Sensitivity to porosity (a) and permeability (b). the fluid in the wellbore and the surrounding formation when the fluid flows from the sandface to the gauge location. The wellbore model used in this work was obtained by modifying the solution proposed by Izgec et al. (2007). T f (r , t ) = Tei 1 − e − aLR t + LR where LR = ⎧ ⎡ ( g sin ) ⎤ ⎫ ( z − L ) LR ⎤⎦ ⎢ gG sin + ⌿ − ⎪⎪ ⎡⎣1 − e ⎥ ⎪, . . . . . . (21) c p Jgc ⎥⎦ ⎪⎬ ⎢⎣ ⎨ ⎪ ⎪ ⎡ − L e ( z − L ) LR T fin − Tein ⎤⎦ ⎭⎪ ⎩⎪ ⎣ R ( ) 2 ⎛ rtoU to ke ⎞ , wc p ⎜⎝ ke + rtoU toTD ⎟⎠ ␣t dp TD = ln ⎡⎣e −0.2 tD + 1.5 − 0.3719e − tD ⎤⎦ t D , t D = 2 , ⌿ = ε , is rw dz ( ) wellbore-inclination angle, T fin is fluid temperature entering the sandface from formation (solution to the reservoir temperature model), Tei is geothermal temperature of the formation at gauge location, and Tein is geothermal temperature of the formation at bottomhole. In principle, the closer the gauge is to the perforations, the more able the overall model would be to resolve effects caused by the reservoir flow. If the gauge is moved farther away from the perforations, then the model begins to lose the ability to capture effects caused by the reservoir flow mechanism because most of the temperature change will be caused by the wellbore heat loss. The two models are coupled through the temperature of the fluid at the bottomhole location. The bottomhole temperature is estimated using the reservoir model and is used as an input into the wellbore model to estimate the fluid temperature at the gauge location. The sensitivity of the overall model to the distance between the gauge and the perforations will be considered in a sensitivity analysis. Results and Discussion Sensitivity Analysis. The thermal model contains many parameters, some of whose values are uncertain. In the sensitivity analysis presented in Figs. 3 through 5, some of the important parameters were varied up to orders of magnitude that are similar to their actual variability in reality, and the model solution was checked for its sensitivity to these values. The parameters tested were the permeability and porosity of the formation, the Joule-Thomson and adiabatic-expansion coefficients of the fluids, thermal-diffusivity length, and distance of the permanent downhole gauge from the perforations. Some other parameters in the model can be obtained easily from measurements and laboratory testing. These parameters include the fluid viscosities, gauge distance from perforations, densities, and thermal conductivities of the rock and fluid. Others 146 150 145 Temperature, °F Temperature, °F 145.8 145.6 145.4 ε =4e−12 K/Pa ε =4e−11 K/Pa ε =4e−10 K/Pa ε =4e−09 K/Pa ε =4e−08 K/Pa ε =6e−08 K/Pa ε =8e−08 K/Pa 145.2 145 144.8 (a) 140 135 130 125 120 115 0 5 10 15 20 Time, hrs 25 μ=1e−09 K/Pa μ=3e−09 K/Pa μ=5e−09 K/Pa μ=8e−09 K/Pa μ=1e−08 K/Pa μ=2e−08 K/Pa μ=3e−08 K/Pa 30 (b) 0 5 10 15 20 25 30 Time, hrs Fig. 4—Sensitivity to Joule-Thomson coefficient (a) and adiabatic-expansion coefficient (b). December 2010 SPE Reservoir Evaluation & Engineering 877 146 146 145.5 145 Temperature, °F Temperature, °F 145 144 143 142 β=6 m 140 0 20 40 (a) 144 143.5 h=5 m h=10 m h=20 m h=40 m h=80 m h=160 m h=320 m 143 β=9 m β=12 m β=15 m β=20 m 141 144.5 142.5 60 80 100 142 120 0 5 10 (b) Time, hrs 15 20 25 Time, hrs Fig. 5—Sensitivity to thermal-diffusivity length (a) and gauge distance from perforation (b). the perforations is large and, hence, the parameters estimated in the inverse problem come with a large confidence interval. On the other hand, using DTS data, or PDG data, in which the gauge is close to the perforation allows the model to resolve effects caused by the reservoir flow without being masked excessively by the heat loss in the wellbore. In this work, we found that a gauge situated up to 80 m above the perforation would still be able to capture effects caused by the reservoir flow, without excessive masking from the wellbore heat loss. However, this number depends on the perforations and the types of fluid flowing in the system and may not be generally optimal. Results for Synthetic Data. Synthetic data were generated using the thermal model developed, and some flow-rate and pressure history. The model used in estimating the pressure from the flow rate was the infinite-acting radial-flow model. Then, 5% random noise was added to the generated data to create a second data set. The synthetic data (true and noisy) are needed to check the robustness of the model in parameter estimation. In essence, the data were used as measurements in the inverse problem to re-estimate some of the model parameters. Two tests were carried out on each data set. In the first test, only one parameter was estimated (porosity). In the second test, the number of variables was increased to five to check how much uncertainty would be added to the estimations by an increase in the number of unknowns. 147.5 147.5 147 147 Temperature, °F Temperature, °F that cannot be measured with a high degree of certainty enter the parameter space for the inverse problem. Figs. 3 through 5 show that the model solutions are sensitive to the model parameters tested. Because the parameters were varied within the actual range of magnitude of possible changes seen in real cases, it is clear that these parameters can affect the shape and magnitude of the solution and, in effect, the temperature distribution in the reservoir. Without consideration for effects of noise (for the moment), it is clear that permeability, porosity, adiabatic-expansion coefficient, and thermal-diffusivity length are parameters that affect the solution most prominently. The Joule-Thomson coefficient is prominent only at the points where there is a sudden change in the flow-rate behavior for single-phase flows. It is also prominent in gas flows (shown in the two-phase example case). The effect of the gauge distance from the perforation zone is also prominent and important, as shown in Fig. 6b. At larger distance, the temperature drop is larger and the drop results mainly from the wellbore heat losses. At lower distance, the temperature drop mainly is caused by effects from the reservoir. Therefore, in order to obtain reservoir parameters from the solution, it is best to have the gauge situated as close to the reservoir as possible. Where this is not possible, the use of distributed-temperature-survey (DTS) data obtained at the sandface would be an appropriate alternative. This is because the model loses the ability to resolve effects caused by the reservoir flow when the gauge distance from 146.5 146 145.5 146.5 146 145.5 Model after match Data with noise Data Model after match Data 145 (a) 0 100 200 300 400 500 600 Time, hrs 700 800 900 145 1000 (b) 0 100 200 300 400 500 600 700 800 900 1000 Time, hrs Fig. 6—Synthetic data (true: a, noisy: b). Matching using only one variable (porosity). 878 December 2010 SPE Reservoir Evaluation & Engineering 152 152 151 151 150 149 Temperature, °F Temperature, °F 150 149 148 147 148 147 146 146 145 Data Model after match 145 Data Model with noise Model after match 144 144 143 0 (a) 200 400 600 800 0 1000 Time, hrs 200 400 600 Time, hrs (b) 800 1000 Fig. 7—Synthetic data (true: a, noisy: b). Matching using five variables (permeability, porosity, thermal diffusivity length, JouleThomson coefficient, and thermal conductivity of the reservoir rock). In the data set shown in Fig. 6, the input porosity used in generating the data was = 0.25. The estimation using the pure data (without noise) yielded opt = 0.25, at the minimum. For the noisy data, the minimum was achieved at opt = 0.249. The matching was relatively easy using only one variable. In Fig. 7, the number of variables for estimation was increased to five. These were permeability k, porosity , thermal-diffusivity length b, Joule-Thomsom coefficient ε, and thermal-conductivity value of λs for the reservoir rocks. The input parameters used in generating the data and the results of the match are tabulated in Table 1. The results show that in the case of using the data without noise, the matching yielded model parameters that were sufficiently close to the values used in generating the synthetic data. The slight variations from the true values can be attributed to the inherent uncertainties when more than one parameter is used in an inverse problem. This generally defines a confidence interval around the estimations. With 5% added noise, the parameter estimation also yields results that are close to the true values of the parameters, with the slight variations caused by the noise, as well as the fact that the inverse problem is estimating more than one parameter. The underlying conclusion from these observations is that the model and the solution are able to resolve the effects caused by these parameters that are being estimated. The solution does not fail when applied to an inverse problem. Before considering real field data, an important reflection at this point would be the issue of noise in the temperature measurements. Generally, as will be seen with the field data, the temperature variation is usually in the region of 1 through 10°F, for producing wells without injection of hotter/colder fluids. The temperature gauges, as evidenced in the number of different data studied so far, have generally measured data with minimal noise, enough for the effects caused by changing flow conditions to be seen. As with any other problem, larger amounts of noise in a data set obscure the data and reduce the ability of any solution to resolve effects caused by the model parameters. This is patently so with temperature measurements. However, unless the data are extremely noisy (and, as such, useless), the temperature solution is able to resolve effects caused by the model parameters, even a temperature-change range of 1 through 10°F. This is because most of the variations in the temperature are caused by changes in the flow conditions such as changes in the fluid pressure and/or flow rate, and changes in compositions as may be captured in the gas/oil ratios (GORs). Results for Field Data. The results of applying the model solution to field data are presented here for data from two fields. In one field, the flow was assumed to be near single-phase (low water cut and low free gas) and was solved using the single-phase model presented in this work. In the second field, the flow was two-phase oil and gas and was solved using the two-phase-model solution. Six parameters were estimated in the single-phase case. These variables were permeability k, porosity , thermal diffusivity length b, Joule-Thomson coefficient ε, thermal-conductivity value of λs for the reservoir rocks, and viscosity µ. In the two-phase oil-andgas case, the number of parameters increased to eight, and these included the gas saturation Sg and the gas Joule-Thomson coefficient εg, in addition to the parameters estimated in the single-phase care. These estimations were compared with average values of the parameters obtained from the two fields. Because we added a temperature model to the already-multivariable pressure equations, the number of model parameters increased significantly and so also did the uncertainties in the estimations and the computational cost of solving the inverse problem. Single-Phase Oil System. The data for the single-phase oil flow were from an 800-hour history of temperature, pressure, and flow rate, as shown in Figs. 8 and 9. The original data sets were presented earlier, in Figs. 1 and 2. Because of the large number of data points in the data, the data set was divided into four different parts that were matched independently while accounting for the histories from previous segments. The histories were carried over through the values of the initial pressure, flow rate, and temperatures in TABLE 1—ESTIMATED PARAMETERS FROM MATCHING THE PURE DATA AND NOISY DATA k (md) φ b (m) (K/Pa) s Parameter for data generation 100 0.25 5.0 1.0 10 8 Match: pure data 100 0.249 5.16 9.6 10 9 Match: noisy data 110 0.286 4.99 1.28 10 December 2010 SPE Reservoir Evaluation & Engineering 8 [W/(m·k)] 0.3 0.32 0.29 879 146.4 146.2 146.2 146 146 145.9 145.9 Temperature, °F Temperature, °F 146.4 145.6 145.4 145.2 145 144.8 145.6 145.4 145.2 145 144.8 Data Model after match 144.6 Data Model after match 144.6 144.4 144.4 0 10 20 30 0 40 Time, hrs (a) 50 100 Time, hrs (b) 150 200 Fig. 8—Result of match to data for the single-phase oil flow (first half of field data). each data segment. In Fig. 10, the entire field data were matched, after sampling the data at every 20th data point. The tolerance set for the objective-function minimization was low enough to have meaningful parameter estimates that represented what is obtainable in reality, but high enough to allow for realistically meaningful length of time for the simulation. Table 2 shows the results of the match of Figs. 8 through 10. For clarity in representing the results, the data segment in Fig. 8a will be simply referred to as “8a” and that in Fig. 8b will be referred to as “8b.” Similarly, Figs. 9 and Fig. 10 are called “9” and “10.” Also reported are the percentage effect because of flow in the wellbore (i.e., by how much the reservoir temperature variation is masked by the flow in the wellbore up to the gauge location). This parameter would be unnecessary if the gauges are close to the perforations. Table 2 shows results (within the objective-function tolerance) that are close to the average values of the parameters obtained for the field. The search space in each inverse problem was open (−∞ to +∞), and the convergence to these values at the optimal match shows promise in the ability of the formulation and the solution to resolve the parameters in the model. The band of uncertainty, as seen from the range of the values, is obvious and has been discussed previously. It is clear why the full-field match has a longer diffusivity length—this is because of the longer length of time (800 hours) in the data. However, depending on the length of time of a transient (one shut-in and one flowing period), the expected diffusivity length would be different for each transient, and this would affect the overall results if the full data of a multitransient data set with multiple shut-ins are used. To properly capture this effect and reduce its consequence on the results of the match, it is better to divide the temperature data set into segments containing fewer transients and shut-ins. Also interesting is the observation that only approximately 25% of the effects measured by the PDG are caused by the reservoir flow, on average. The other 75% is caused by wellbore flow. Two-Phase Oil-and-Gas System. The data for the two-phase case are shown in Fig. 11a. The flow rate reported is the oil-flow rate (reduced by a factor of 10 for scaling). The Joule-Thomson coefficient for oil is negative, while the coefficient for gas is positive. This causes a heating of the fluid during flow of oil. As gas starts to come out of solution and flow with the oil, the cooling because of the gas expansion counteracts the heating caused by oil expansion. If this continues, the temperature profile may show an eventual drop in temperature even with high oil-flow rates because of the cooling caused by more gas in the system. This can be seen in Fig. 11a. Although the temperature dropped slightly owing to the gradually decreasing flow rates (hence, smaller pressure changes) and fairly constant GOR, the temperature dropped significantly more after 1,500 hours. The GOR can also be seen to have increased significantly after 1,500 hours, from 1,000 to 2,000 145.5 146.5 146 Temperature, °F Temperature, °F 145.5 145 144.5 144 145 144.5 Data Model after match Data Model after match 143.5 144 143 0 (a) 20 40 60 Time, hrs 80 100 120 0 (b) 10 20 30 Time, hrs 40 60 80 Fig. 9—Results of match to data for the single-phase oil flow (second half of field data). 880 December 2010 SPE Reservoir Evaluation & Engineering TABLE 2—RESULTS FOR THE SINGLE-PHASE FIELD CASE k (md) φ b (m) Reported average from field 319 0.14-0.19 NA NA 8a 142 0.18 2.3 1.28 10 8b 470 0.194 7.05 9a 200 0.15 9b 380 10 300 µ (cp) Fwbf NA 0.9 NA 8 0.1 2 30 2.36 10 8 0.5 2 23 2.93 2.94 10 7 0.1 0.7 20 0.23 8.0 3.9 10 8 0.3 8 20 0.40 24. 5.8 10 7 0.8 10 20 data and reasonably accepted values obtained from other fields that share the same characteristics as the subject field. Although the model and solution closely followed the field data for this case, as can be seen in Fig. 11b, the uncertainty in the parameters estimated may be very large. This would be a candidate for further research, especially on how to measure and report these measurable thermal properties of multiphase systems and how to minimize the uncertainties in the estimations of the other parameters that cannot be measured. 146.5 146 145.5 Temperature, °F s [W/(m·k)] (K/Pa) 145 144.5 144 143.5 Data Model after match 143 0 200 400 600 Time, hrs 800 1000 Fig. 10—Results of match to data for the single-phase oil flow, using full-field data. scf/STB, even with continued moderate drop in the oil flow rate. This is the counteracting cooling effect caused by more gas expansion. Fig. 11b is a plot of the match of the data to the model. The results are presented in Table 3. It is important to state here that the uncertainties in the values of the parameters used in this match are even higher because more model parameters are needed, and many of them come with the accompanying uncertainties in their measurements. As a result, in the inverse problem, we attempted to match eight parameters, while fixing the rest using average field Conclusions The models developed in this study have been shown to have the potential to help characterize a reservoir by use of temperaturetransient measurements from any downhole monitoring source. This shows one way of extracting the information inherent in the temperature signals, which have not been fully used in the past. The parameter estimation shown here can be used to complement with the parameter-estimation step in pressure-transient analysis. Specifically, this study provides a method for the estimation of porosity and permeability and other thermal properties of the reservoir and reservoir fluids. The approach is also potentially a tool for tracking the saturation in a reservoir. Being rate dependent, the temperature data also offer a way to infer sandface flow rate by inverting the reservoir temperature model. Finally, it is clear that temperature provides an additional source of information in transient analysis, and this presents the potential for cointerpreting rate, pressure, and temperature histories. Nomenclature b = thermal-diffusivity length, m c = pecific heat capacity, J kg ⋅ K Time, hrs 500 1000 1500 2000 2500 3000 3500 4000 155.5 3500 155 3000 154.5 2500 154 2000 153.5 1500 1000 153 Temperature 152.5 152 500 GOR Oil flowrate 0 500 1000 1500 2000 2500 3000 3500 4000 156 4500 4000 0 4500 155.5 155 Temperature, °F 0 GOR=scf/stb, flowrate=10*bbl/d Temperature, °F 156 154.5 154 153.5 153 152.5 152 0 Time, hrs (a) (b) Data Model after match 1000 2000 3000 Time, hrs 4000 5000 Fig. 11—Data (a) and result of match (b) for the two-phase oil-and-gas case. December 2010 SPE Reservoir Evaluation & Engineering 881 TABLE 3—RESULTS FOR THE TWO-PHASE OIL-AND-GAS FLOW k (md) φ b (m) Reported average from field 400 0.23 NA NA 11b 30 0.212 0.6 8.4 10 cm = (1− )(s cs ) + ⎡⎣( wc fw sw ) + (oc fo so ) ⎤⎦, volumetric heat capacity of fluid-saturated rock, J 3 m ⋅K C = volumetric-heat-capacity ratio, ( wc fw sw + oc fo so + gc fg sg ) cm k = permeability p = pressure, Pa 3 Q, q = flow rate, m s r = radius, m S = saturation t = time, seconds, hours T = temperature, K, °F U to = overall-heat-transfer coefficient, J (K ⋅ m 2 ⋅ s) u = Cv = superficial velocity, m s = porosity = density = wellbore-inclination angle 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, (m ⋅ K )  = m = f + (1 − )s , thermal conductivity of fluid-saturated rock Subscripts D = dimensionless f = fluid o = oil w = water Acknowledgments We would like to acknowledge the support of the Stanford Graduate Fellowship and the Stanford University Research Institute on Innovations in Well Testing for making this research possible. References Bear, J. 1972. Dynamics of Fluids in Porous Media. Oxford, UK: Environmental Science Series, Elsevier. Bejan, A. 2004. Convection Heat Transfer, third edition. Hoboken, New Jersey, USA: John Wiley & Sons. Bravo, H.R. and Jiang, F. 2001. Using groundwater temperature data to constrain parameter estimation in a groundwater flow model of a wetland system. Water Resour. Res. 38 (8): 1153–1166. doi: 10.1029/2000WR000172. Breiman, L. and Friedman, J.H. 1985. Estimating Optimal Transformations for Multiple Regression and Correlation. J. of American Statistical Association 80 (391): 580–598. doi: 10.2307/2288473. Dawkrajai, P., Analis, A.R., Yoshioka, K., Zhu, D., Hill, A.D., and Lake, L.W. 2004. A Comprehensive Statistically-Based Method to Interpret 882 s o (K/Pa) g (K/Pa) NA 12 2.45 10 6 Sg [W/(m·k)] NA NA 0.24 0.2 Real-Time Flowing Well Measurements. US DOE Office of Fossil Energy Project ID DE-FC26-03NT15402, CPGE, University of Texas at Austin, Austin, Texas, USA. Filippov, A.I. and Devyatkin, E.M. 2001. Barothermal Effect in a GasBearing Stratum. High Temperature 39 (2): 255–263. doi: 10.1023/ A:1017526900775. Holden, H., Larlsen, K.H., and Lie, K.-A. 2000. Operator splitting methods for degenerate convection-diffusion equations, II: Numerical examples with emphasis on reservoir simulation and sedimentation. Computational Geosciences 4 (4): 287–323. doi: 10.1023/A:1011582819188. Horne, R.N. and Shinohara, K. 1979. Wellbore Heat Loss in Production and Injection Wells. J. Pet Technol 31 (1): 116–118. SPE-7153-PA. doi: 10.2118/7153-PA. Izgec, B., Kabir, C.S., Zhu, D., and Hasan, A.R. 2007. Transient Fluid and Heat Flow Modeling in Coupled Wellbore/Reservoir Systems. SPE Res Eval & Eng 10 (3): 294–301. SPE-102070-PA. doi: 10.2118/102070-PA. Kačur, J. and Frolkovič, P. 2002. Semi-analytical solutions for contaminant transport with nonlinear sorption in 1D. Technical report SFB 359, Contract No. 02 E 9148 2, University of Heidelberg, Heidelberg, Germany (30 September 2002). Khan, L.A. and Liu, P.L.-F. 1995. An operator splitting algorithm for coupled one-dimensional advection-diffusion-reaction equations. Computer Methods in Applied Mechanics and Engineering 127 (1–4): 181–201. doi: 10.1016/0045-7825(95)00839-5. Masters, J.I. 1955. Some Applications in Physics of the P Function. J. of Chemical Physics 23 (10): 1865–1874. doi: 10.1063/1.1740595. Maubeuge, F., Arquis, E., and Bertrand, O. 1994. MOTHER: A Model for Interpreting Thermometrics. Paper SPE 28588 presented at the SPE Annual Technical Conference and Exhibition, New Orleans, 25–28 September. doi: 10.2118/28588-MS. Nield, D.A. and Bejan, A. 1998. Convection in Porous Media, second edition. New York City: Springer-Verlag. Özisş ik, M.N. 1993. Heat Conduction, second edition. New York City: John Wiley & Sons. Ramazanov, A.Sh. and Nagimov, V.M. 2007. Analytical model for the calculation of temperature distribution in the oil reservoir during unsteady fluid inflow. Oil and Gas Business 1/2007 (17.05.07): 532.546–3:536.42. Ramazanov, A.Sh. and Parshin, A.V. 2006. Temperature distribution in oil and water saturated reservoir with account of oil degassing. Oil and Gas Business 1/2006 (10.04.06): 532.546–3:536.42. Ramey, H.J. Jr. 1962. Wellbore Heat Transmission. J. Pet Technol 14 (4): 427–435; Trans., AIME, 225. SPE-96-PA. doi: 10.2118/96-PA. Rath, V., Wolf, A., and Bücker, M. 2006. Three-dimensional joint Bayesian inversion of hydrothermal data using automatic differentiation. Presented at the Workshop on Geothermal Reservoir Engineering, Stanford, California, USA, 30 January–1 February. Remešiková, M. 2004. Solution of convection-diffusion problems with nonequilibrium adsorption. J. of Computational and Applied Mathematics 169 (1): 101–116. doi: 10.1016/j.cam.2003.11.005. Sagar, R.K., Doty, D.R., and Schmidt, Z. 1991. Predicting Temperature Profiles in a Flowing Well. SPE Prod Eng 6 (6): 441–448. SPE-19702PA. doi: 10.2118/19702-PA. Sharafutdinov, R.F. 2001. Multi–Front Phase Transitions During Nonisothermal Filtration of Live Paraffin–Base Crude. J. of Applied Mechanics and Technical Physics 42 (2): 284–289. doi: 10.1023/ A:1018832120659. Shiu, K.C. and Beggs, H.D. 1980. Predicting Temperatures in Flowing Oil Wells. J. Energy Resour. Technol. 102 (1): 2–11. doi: 10.1115/1.3227845. Valiullin, R.A., Sharafutdinov, R.F., and Ramazanov, A.Sh. 2004. A research into thermal fields in fluid-saturated porous media. Powder Technology - Lausanne 148 (1): 72–77. December 2010 SPE Reservoir Evaluation & Engineering Valocchi, A.J. and Malmstead, M. 1992. Accuracy of operator splitting for advection-dispersion-reaction problems. Water Resour. Res. 28 (5): 1471–1476. doi: 10.1029/92WR00423. Woodbury, A.D. and Smith, L. 1988. Simultaneous inversion of hydrogeologic and thermal data: 2. Incorporation of thermal data. Water Resour. Res. 24 (8): 356–372. doi: 10.1029/WR024i003p00356. Yoshioka, K. 2007. Detection of Water or Gas Entry into Horizontal Wells by Using Permanent Downhole Monitoring Systems. PhD dissertation, Texas A&M University, College Station, Texas, USA. Obinna Onyinye Duru is a PhD candidate in the department of energy resources engineering, at Stanford University. He holds December 2010 SPE Reservoir Evaluation & Engineering a BSc degree in chemical engineering from the University of Lagos, and an MS degree in petroleum engineering from Stanford University. Duru is also a research assistant with the Stanford University Research Consortium on Innovations in Well Testing. Roland N. Horne is the Thomas Davies Barrow Professor of Earth Sciences at Stanford University, and was the Chairman of Petroleum Engineering from 1995 to 2006. He holds BE, PhD, and DSc degrees from the University of Auckland, New Zealand, all in engineering science. Horne has been an SPE Distinguished Lecturer, and has been awarded the SPE Distinguished Achievement Award for Petroleum Engineering Faculty, the Lester C. Uren Award, and the John Franklin Carl Award. He is a member of the U.S. National Academy of Engineering and is also an SPE Honorary Member. 883