The temperature distribution in the well at a particular time is represented by one central temperature in each grid cell. Given the temperatures at a time, the objective of this computation is to compute the temperature of the next timestep.
The computation is based on applying the first law of thermodynamics (energy conservation) to each grid cell volume. The grid cell volume is the volume obtained when the grid cell rectangle in the plane is rotated around the well center. Similarly, the four boundaries of this ring like structure, are the areas we get when the four edges of the grid cell rectangle are rotated around the well center. With this in mind, the energy balance for a grid cell volume can be written as:
- is the mass density
- is the specific internal energy (per mass)
- is the conductive energy flow
- is the convective energy flow
- is the volumetric energy source
For all grid cells except the ones in the flow path(s), there is no mass flow over the grid cell boundaries, and the last term in the equation is zero. These are all the grid cells containing a solid material (steel, cement etc.) and the fluid filled grid cells in the close annuli. The thermally induced free convection within these grid cells is treated as a modification of the thermal conductivity of the grid cell and not as a convective energy transport.
Energy is transported in the axial direction through convection in the flowpath(s) and are then transported in the radial and axial directions through conduction. Let us look at the three terms in the equation separately.
The accumulation term can be written in terms of enthalpy, , as:
and are supposed to be constant within the grid cell and equal to the midpoint values. Furthermore, the density variation due to the temperature is ignored. A steady state pressure is also assumed. Then this accumulation term can be written as:
The extension to 3 phase flow is straightforward. The expression is a sum over the phases, where the volume fractions are computed in the 1D flow computation:
This term is inserted into the energy balance for each grid cell.
The heat conduction is based on Fourier's law for heat conduction:
where the conductive heat flow is proportional to the temperature gradient. The proportionality factor, , is the thermal conductivity for the material. This low is then integrated over a grid cell (Fig. 1). The integrated conductive heat flows passing the four boundaries, , , , and can be expressed as:
where , , , and are the conductances between the grid cells in the different directions. , , , and are the temperatures fo the neighboring cells and is the temperature of the central cell.
When doing this, it must be taken into account that in general the thermal conductivity and the temperature gradient are discontinuous over the grid cell boundary, while the heat flux is always continuous over the boundary. The estimation of the conductances , , , and are done in three steps.
Step 1 - Computation of Internal Conductance in the Grid Cell
The intern effective conductance, between the center of the cell and the boundaries, are computed by applying a uniform heat flow field between the center of the grid cell and the boundaries (see figure below).
The conductances in the direction are given by the thermal conductivity , the area where the conductive flow goes through and the distance between the central point and the boundary of the cell:
The expression for the horizontal conductances in a cylinder geometry is:
where is the average radius of the cell and is the radius of the external boundary of the cell. A similar expression is obtained for .
Step 2 - Modification of the Conductance Terms Due to Free and Forced Convection
In the flow path(s) fluids, either one phase or three phases, are transported. In the bulk of the flow there is normally strong turbulent mixing. Close to the wall there is a laminar boundary layer. The thickness of this boundary layer defines the heat transfer number between the bulk flow and the wall. We modify the horizontal conductance in the bulk flow by multiplying with a large number to simulate the turbulent mixing. The horizontal conductance connecting the bulk flow with the wall is modified in order to effectively give the correct heat transfer number.
Similarly, in the annuli filled with stationary fluid, there is thermally induced free convection due to the temperature gradients. This free convection gives added heat transfer over the annulus which effectively is seen as an increased thermal conductivity. This increase is expressed as a Nusselt number. We correct all the horizontal conductance over the annuli with the Nusselt number which is included in Appendix.
Step 3 - Computation of Conductances Based On the Modified Internal Conductances
The figure 3 shows two internal conductances sharing the same boundary. By requiring continuity in the heat flow over the boundary, it is possible to eliminate the boundary temperature and to compute the effective conductance between the two central temperatures as:
and the heat flow from the right to the left grid cell can then be written as:
This term is added to the energy balance for the left cell and subtracted from the energy balance for the right cell. In this way all the contributions from the heat conduction flows are included in the balances.
Let us consider $F$ the mass flow between a downstream grid cell and an upstream grid cell and look at the energy transfer during a short time interval $\delta_t$. The total internal energy transferred is:
where is the specific energy in the upstream grid cell. Furthermore, the mass flow displaces a volume
Adding the internal energy transferred and the work done by the upstream volume on the downstream volume, it is obtained:
In other words, by convicting the enthalpy instead of the internal energy, the work is automatically included.
Two additional energy flows must be included in the convection: the potential energy and the kinetic energy. If neglecting these energies, the equation will say that all the net work being done on a grid cell will be dissipated into internal energy. We know that this is not true. A major part of this work is used to lift the fluid out of the well, in other words to increase the potential energy of the fluid. Part of the potential energy is also converted into kinetic energy. Only the work associated with the frictional pressure drop is dissipated into heat. To account for this fact, we have to include the potential energy in the energy flow between the grid cell volumes. The convective energy flow over the boundary can be written as:
As is the True Vertical Depth, the equation is written with a minus sign. and should really be taken at the boundary. is the fluid velocity. For reasons of numerical stability, an upstream approximation is used, with the upstream values of and :
This expression is nonlinear in and is linearized before added to the balance equations. Ideally, it should be linearized around , but since we do not know yet, the next best thing to do is to linearize it around the old value of which is . Doing so one gets:
This expression is linear in , and can be added as a term in the downstream energy balance and subtracted from the upstream energy balance.
For three phase flow, the composition of the flow is constant in steady state. Therefore by using thermodynamics, the mixture properties of the flow can be computed (, etc.).
In most applications the potential energy term can be neglected. However, here it is very important due to the huge height differences. In fact, the mechanical work needed to lift the fluid out of the well is typically of the order of the energy required to heat the fluid 10C. Failure to include the potential energy in the energy flows would therefore lead to a large overestimation of the temperature in the upper part of a production well.
The formulation used in this program is quite general. The phase transition heat is automatically included. Since it is based on an enthalpy flow formulation, and the variation of enthalpy with pressure is taken into account, the Joule-Thomson heating/cooling is also contained in the equations.
A source term is taken into account for the cementation (heat of hydration, produced during cement curing) and the drilling operations. A large part of the energy from the drilling motor is transformed into heat, generated by friction. Only a small part is actually used to cut the rock. For the other simulated operations, there is no source term.