## 6 Heat Exchange between the Well and the Surrounding Soil Massive  
The depth of wells often reaches 5 km and sometimes even up to 10 km. Moreover, with a shortage of surface deposits of petroleum products in the future, it is possible that the average well depth will increase up to 15 km or more. For example, the Deepwater Horizon well sits at more than 10 km beneath the surface. The oil well known as Z-44 Chayvo goes over 12 km into the ground. The temperature of the rocks surrounding the wellbore at this depth reaches 300-400 \({}^{\circ}\)C and becomes one of the main causes of various complications and accidents during the construction of the well. Under the influence of high temperature, the rheological properties of drilling and cementing fluid, the composition and parameters of formation fluids and rocks, and the operating conditions of submersible motors and pipes, drill bits, and surface equipment change dramatically. The well itself is a complex heat exchange system. The main heat exchanger in the well is the rock formation that is unbounded in the radial direction and has its natural temperature field. The drilling fluid is pumped into the well through the drill pipes at a certain initial speed; it moves down to the bit, washing the drill pipes from the inside (and, accordingly, exchanging heat with them). Coming out of the bit holes, the drilling fluid rises along the annular gap, contacting both the rock (or casing) and drill pipes. At the beginning of the ascent from the bit, the fluid is heated from the rock, the temperature of which at the well bottom can be quite significant. In addition, rising through the drill pipes the drilling fluid gives off some of the heat to the drilling fluid moving downward inside the drill pipes. At a certain depth, the temperature of the rising drilling fluid becomes equal to and then higher than the temperature of the rock. After that, the fluid gives off heat not only to the fluid moving downward but also to the rock formation. There are two main approaches to modeling the heat transfer in a well: analytical and numerical. Examples of analytical models can be found in [109] by [PERSON] and [PERSON]. Such models are usually simple to calculate. However, they are extremely approximate and do not consider many important factors that can significantly affect the temperature distribution in the wellbore and the rock formation. The approximate formulas obtained within the framework of such analytical models can be very useful in the initial analysis of thermal effects in the well. Although, their application in more accurate calculations is difficult due to many restrictions and assumptions made during their construction. A fairly large number of studies have been devoted to the numerical models of heat transfer in the wellbores [110; 111; 112; 113]. Many widely used models share a common approach to the choice of basic equations. As a rule, it is assumed that the diameter and thickness of the drill pipes and the thickness of annular space are negligible compared to the depth of the well. There is also a reason to assume that the temperature does not change in the circumferential direction. This makes it possible to consider a one-dimensional heat transfer model in the well, where the temperature of the drilling fluid in the pipes and annular space, as well as the temperature of the drill pipes, depend only on the depth of the well and on time. The temperature in the rock formation changes not only in depth but also along the radius, especially near the well. That is why a two-dimensional model is often considered for a rock formation, and therefore a two-dimensional heat equation is solved. In general, the mathematical models available in the literature have much in common.