Abstract
To predict physical properties in a wellbore during oil and gas production, scientists use empirical correlations or mechanistic approach algorithms. The typical research in this field is concentrated on a single property analysis as heat transfer, pressure, temperature, and so forth. Here the most proper correlations, regarding the subject, are presented. And the authors studied how to join all correlations into the full framework which returns all production parameters at every depth in a wellbore. Additionally, the presented simulation results are studied here. Based on presented algorithms, the proper tool has been applied and the results shown in this paper are taken from this application.
1. Introduction
All of well physical properties in wellbores are deeply studied with many approaches found in literature. Oil and gas industry is a cutting edge domain with a lot of investment involved. This is the reason why it is hard to find any description of a framework which join correlations altogether into one solution. The solution can describe the wellbore physical properties, at every depth, at every stage of production, even for the single whole oilfield. It means that all calculations have been performed every foot across the wellbore, using standard oilfield unit system. Once a few wellbores are considered, the results object keeps all calculations, still performed for every foot, for all wells independently. The final results set is dedicated for oilfield engineers, so pressure, temperature, and production results are most desirable. The whole model considered as full wellbore simulation was presented as a Ph.D. thesis at The University of Texas [1]. The global simulation model is presented there, but without any description of the framework. Both models are based on the same principles but with different approaches. Our aim is to show the possibility of joining correlations altogether using fast and efficient algorithm. Additionally, our model is extended for gas lift which is a part of this framework and can be used in wireless sensor network well monitoring [2]. Optimisation of gas lift is a well known problem [3, 4], but we are concentrating on the gas injection influence on the final results of simulation. Unfortunately, the authors do not have any possibility to verify the simulation results by the comparison to the real data. This kind of data is protected by the oil companies.
Correlations presented in Section 2 are typical wellbore simulation models. Three types of correlations described in this section are identified: empirical correlations, mechanistic approach, and homogeneous models. Typical approaches for the vertical wells are presented. Three phase flows are considered. The pressure model was developed based on [5] study with the consideration of flow regimes and their dependence on the features of empirical correlations. The temperature model is based on Sagar et al. [6] model.
Section 3 presents the framework with the pseudocode and some chart to understand the complexity of wellbore modelling. This is the model with the diversion on reservoir and wellbore calculation. Reservoir calculations use layer pressure and geothermal temperature. Wellbore correlations use the pressure and temperature models, as the iterations where the pressure values from any previous calculation are passed to the calculation object at current depth. This model was developed based on well known principles [5]. Its main advantage is a speed and effectiveness.
In Section 4, typical case study can be found. The tool which has been developed to present all data at every stage of simulation has been implemented. We can present variables as production rate, pressure, temperature, density, solubility, compressibility, formation volume factor, viscosity, heat capacity, surface tension, gas/oil ratio, gas/water ratio, mass rate, bubble point pressure, flow direction, flow regimes, velocity, hydrostatic and kinetic pressure drop, Reynolds number, and others as function of mentioned. It gives the possibility to present different kind of data, which are comparable to other researches.
To summarize, the main contributions of this paper are to show the framework idea, which groups wellbore correlations altogether. This framework gives the reliable simulation results which is proved in this paper.
2. Correlations
The authors would like to present the single correlation for every property. There is no clear algorithm that suggests which correlation should be taken under the consideration as the most proper one. It depends on many factors as fluid density, trajectory, and so forth. The best way to gain the accurate modelling results is to compare obtained data with the real one. Good example can be found from Tulsa oilfields analysis [1] where it has been proven by the comparison of relative performance factor that the mechanistic approach gives better results than empirical correlations. Ansari model presented in Figure 1 is the best in this example. It does not necessarily means that the Ansari model is reliable for every wellbore simulation. It is only regarding this case.
Here the most important part of calculation is presented. Three major parameters as pressure, temperature, and inflow exist as a function of the following variables: bubble point pressure, gas solubility, gas compressibility, formation volume factors, viscosities, heat capacities, surface tension, completion data, and reservoir properties.
2.1. Pressure
Our method is based on solving the equation using a finite difference approximation method with the continuity, momentum, and energy equation as follows:Across the years, the multiphase flow theory has been improved and makes the calculation difficult to predict due to several reasons. In the flow problem, the number of variables affecting pressure drop is enormous. The interfacial tension between phases is taken into account, but all kinds of available models try to reduce the total number of variables with the introduction of nondimensional parameter group. Frictional pressure losses are more difficult considering multiphase flow, so, in addition, new kind of energy losses has been used: slippage loss. All these features make the model so complicated that we cannot describe it in this paper. It is important to emphasize that usually the correlations which are used are based on empirical method.
Pressure loss across the wellbore during the production is divided into three components: The cohesive forces (CF) and frictional forces (FF) have the crucial influence on fluid drive, especially regarding phases separation or bind. The friccohesity model has been considered as a CF and FF product. Using the Mansingh equation [7]the friccohesity as a function of surface tension and cohesive and frictional forces is calculated. In this equation, and are the reference and sample flow times, respectively, is reference friccohesity, and and are the pendant drop number of reference and sample, respectively. Reference friccohesity is represented by the following formula:Mansingh survisemeter is a device to measuring friccohesity [8]. The friccohesity analysis is dependent on hydrocarbon composition. In this model, we are concentrating on the compressibility factor calculation with pseudoreduced pressure and temperature solutions, but the composition role is replaced by the density value. It does not mean that the model is not predicted for hydrocarbon composition, but, from the optimization point of view, our solution is faster upon this simplification. The deeper friccohesity analysis is consider as a future work for this study. That is the reason why the Papay, as the best compressibility correlation in the comparison to the others, has been chosen [9]. There are solutions which do not consider kinetic pressure losses [10]. Inside the correlations which determine the flow regime, liquid holdup for more than single phase, the pressure drop equation is known under the different form presented as follows:
Depending on the correlation, this kinetic term has the different form, but usually this is a variation of the equation: Velocity of each phase is calculated fromOil formation volume factor algorithms are calculated using three different methods: correlation based [5], artificial neural networks based prediction [11], and hybrid soft computing based techniques [12]. The crucial issue of gas formation volume factor correlation is compressibility. Last study estimated this value from the experimental data taken as a function of pressure and temperature [13]. Water formation volume factor is already described as function of two polynomials: pressure and temperature dependent [14]. ConsiderIn (6), friction factor is changing due to flow regimes as a function of Reynolds number, diameter, and pressure as follows [15]:where is intermittency factor:Reynolds number is calculated from the following formula:
Hence, In the whole calculation, density and viscosity are the most important flow parameters. Ideally, they are determined experimentally in the laboratory on actual fluid samples taken from the field under study. In many cases, correlations are region dependent, so every simulation should provide options to choose a place of production. Dead, saturated, and undersaturated are considered as oil types and identified using fluid properties. Every type has its own correlations set [16].
The last parameter in (6) is no slip density which is described in the following formula [5]: Hydrostatic pressure is calculated fromAs it is shown, basically is a function of temperature, inclination, and flow regime. Every correlation has the deep study of mixture density. Pressure drop caused by friction has been studied widely. Usually the variations of the following equation are considered [5]: A flow in a pipe is turbulent if the Reynolds number is greater than 4000 and laminar below 2100. For laminar flow, the friction factor is calculated by assumption as 64/Re, but for the transition and turbulent flow Chen correlation is an example of friction factor calculation [17]. Considerwhere The equations which have been presented in this section are examples of pressure loss correlation. Flow regimes and pipe trajectory are the crucial factors in every calculation. A lot of exceptions have been studied and analysed and during the simulation process.
In the pressure calculation, mixture density depends on surface tension which can be described as a function of pressure and temperature [18]. As an example, the presented correlation has been created for crude/oil gas systems [19] where Pressure calculation is very complicated in this model and should be presented in another paper. It is worth to say that parameters as superficial velocities, Froude numbers, volume fractions in different flow patterns, and pipe properties having the influence on frictional forces are considered. We would like to focus on this part in next publication.
Pressure correlations are good example of diversity between different studies and approaches. In our tool, four different pressure correlations return different results in the bottom hole, respectively [5], BeggsBrill 1620 psi, Orkiszewski 1580 psi, AzizGovierFogarasi 1616 psi, and DunsRoss 1507 psi.
2.2. Temperature
From the simulation point of view, temperature is a parameter of pressure, but from the engineering point it is one of the most important factors regarding the production description and understanding. In the calculation, the efficient correlation is the iteration based on the previous values [6] where is a correction factor combined with hydrocarbon expansion from high pressure to low pressure during the temperature change, known as a JouleThomson effect. Heat transfer occurs between the wellbore fluid and the formation, overcoming resistances offered by the tubing wall, tubingcasing annulus, casing wall, and cement [19].
The mixture heat capacity calculated depends on how many phases are considered. ConsiderHeat capacity of each phase is a function of temperature and density usually estimated from the experimental data. Gambill correlations are valid, respectively, for oil and gas as it is shown [20]:
2.3. Inflow
The derivation of Darcy’s law is used in inflow calculation to determine the flow through the permeable geological layer. This equation is valid for liquid phase inflow at the perforation points, but bubble point pressure has not been taken under the consideration [5]: Drainage radius may be multiplied by some coefficients, depends on reservoir shape. Skin factor is estimated based on well test analysis. A positive value indicates there is a pressure decline in the near vicinity of well that is more than expected based on the radial flow equation but does not necessarily indicate formation damage [21]. Considering gas inflow, Darcy equation is adjusted in terms of gas properties: Inflow equations do not account for the phase change in solution gas reservoirs. In a solution gas drive, there is expansion of the hydrocarbons below bubble point, which is beneficial because it adds energy to the system. Gas liberation in a solution gas drive is also detrimental to oil production because it lowers the effective permeability of oil [22].
3. The Framework
The framework represents an idea of how to organize the modelling part to get the complete information about the whole physics during the production process. Solving every correlation and calculation needs to be organized properly. Every correlation is a function of data taken from producer or calculated by other correlations. There are few approaches involved, which usually meet in commercial solution and they are protected by copyrights against publicity. The authors would like to present optimised approach for production simulations, divided in stages.
3.1. Initialization
Considering the well length and number of physical data during the production, it is very important to establish the simulation points (meshing) in a project. All correlations should run in these points, so the number of data for one loop of simulation is significant. Transient analysis is highly recommended as well, especially during the gas lift or water injection procedures. Correlations use different unit systems and they create difficulties in the framework as well. There is no standardization to keep the modelling results. Flow area in the tubing affects the algorithms, so three options are available: tubing flow, annular flow, and tubing and annular flow. In some cases more than one tubing in a single well provides the production. There are wells where the tubing is split into two independent items from any depth. Sometimes only one casing string without any tubing is involved. It is highly desirable to have the temperature or pressure data from gauges across the well especially at the wellhead and bottom hole. Then, every meshing point is calculated upon this data. Finally, the complexity of modelling properties is relatively high in this kind of the framework.
The producer supports the data which has been called as initial information (II). They are divided between sections as follows. Highly unlikely, all of them are given very precisely (for every depth), but from the simulation point of view the more the data is given, the better the results are obtained. Here, they are presented as follows:(i)trajectory: this set usually has four values: true vertical depth (TVD), measured depth (MD), inclination (Incl), and azimuth (Az); this is the well geometry description;(ii)geothermal temperature (): this is a trajectory function; some frameworks may be based on geothermal temperature especially in a very first part of calculation; finally, knowing this value is highly recommended in terms of the comparison with the real data; in many cases, the full understanding of geothermal temperature explains the well behaviour;(iii)completion items: in the reality, any additional item changes the physical data at this particular depth; in particular, it is valid for packers and running: electric submersible pumps, gas lift valves, inflow control devices, sand screens, and so forth;(iv)completion data: there are conductivity (Conn), roughness (), inner diameter (ID), outer diameter (OD), number of casing strings, and cement properties; outer diameter, conductivity, and cement properties are important regarding the heat transfer and once the flow is observed in the annulus;(v)mixture properties: it may contain gas/oil ratio (GOR) in surface condition information which affects the amount of gas out of the solution; alternatively, some calculations use gas/water rate (GWR); it also includes API gravity in surface condition as a measure of how heavy or light a petroleum liquid is compared to water and gas specified gravity (SG) in surface condition, which is the ratio of the density of a substance to the density of air and water density (WD);(vi)layer data as depth (LD), permeability (), pressure (LP), and reservoir extend (RE) are values usually given as constant for every layer; layer permeability and pressure have the crucial impact on the production results;(vii)real data: the subjects involved in industry have the real data which can be used as a reference in the modelling process; it may contain wellhead temperature (WHT), bottom hole temperature (BHT), wellhead pressure (WHP), wellhead temperature (WHT), separator temperature (ST), separator pressure (SP), production time (), and dorm pressure in the annulus (DormP);(viii)other information: it is very flexible and cannot be specified to the regular mandatory set; it may contain many factors which has the important impact on the simulation results, that is, gamma ray data and surrounding well information; it is almost impossible to predict this information in the simulation model and usually this data is considered during the modelling interpretation.
3.2. Framework Steps
Five steps of framework are identified.
Step 1. Get the producer data mentioned as II previously.
Step 2. Fill the mandatory data as geothermal temperature, flow diameter, heat transfer, geothermal gradient, and TVD gradient.
Step 3. Calculate correlations based on geothermal temperature and layer pressure.
Step 4. Calculate rates, densities, and viscosities for every phase.
Step 5. Find the final correlations based on temperature and pressure from the wellbore. This level is different from Step 3, because physical properties are calculated using the iteration algorithm instead of layers definition and geothermal temperature data.
We present the framework in pseudocode based on object oriented programming.
3.3. Correlations
Once the literature review has been done, the most proper correlations regarding this framework have been chosen. We are not interested in showing the correlations algorithm here, but just in putting the emphasis on the dependence. Steps 3 and 5 use correlations with the different entry parameters. For Step 3, temperature () is the geothermal temperature (); from Step 2, pressure () is the layer pressure (LP); from Step 1, densities and other physical properties are taken from Steps 1 and 2 as well. For Step 5, temperature and pressure are iterated and density and other physical properties are taken from Steps 4 and 5. Here, the correlations dependence is shown as follows:(i)BubblePointPressure(T, SepT, API, SG, SepP, GOR) (ii)GasSolubility(T, API, p, SG) (iii)DeadOilViscosity(T, API) (iv)SaturatedOilViscosity(GasSolubility, DeadOilViscosity) (v)UnderSaturatedOilViscosity(p, BubblePointPressure, SaturatedOilViscosity) (vi)OilViscosity(DeadOilViscosity, SaturatedOilViscosity, UnderSaturatedOilViscosity, p, BubblePointPressure) (vii)WaterViscosity(WD, T) (viii)GasViscosity(T, SG) (ix)GasCompressibility(T, SG, p) (x)OilFormationVolumeFactor(T, API, GOR, SG) (xi)WaterFormationVolumeFactor(T, p) (xii)GasFormationVolumeFactor(T, GasCompressibility, p) (xiii)OilHeatCapacity(API, T) (xiv)WaterHeatCapacity(T, WD) (xv)GasHeatCapacity(T, SG) (xvi)OilInflow(RE, k, LP, p, OilFormationVolumeFactor, S) (xvii)WaterInflow(RE, k, LP, p, WaterFormationVolumeFactor, S) (xviii)GasInflow(SG, RE, k, LP, p, GasCompressibility, GasViscosity, GasFormationVolumeFactor, S) (xix)SurfaceTension(T, p) (xx)EarthThermalDiffusivity(T) (xxi)FrictionFactor(ReNS, R, FlowDiameter) The temperature and pressure correlations are considered as a part of Step 5.
3.4. Initial Information: Step 1
In Step 1 there is nothing to do with the calculation. Only the producer, trajectory, bore, lift, geology, and density data are loaded and stored in one object Step 1 (see Figure 2).
3.5. Basic Properties: Step 2
This is the very first step when calculation is performed. Geothermal temperature is interpolated based on two crucial values: WHT and BHT with respect to MD and TVD data. As the results, geothermal temperature is given in Listing 1.

Then geothermal gradient (GG) is calculated as shown in Listing 2.

Heat transfer [HT] calculation is shown in Listing 3.

For the tubing flow, the flow diameter is equal to tubing ID.
3.6. Reservoir Properties: Step 3
Here the correlations are used based on reservoir properties. Passing the parameters to proper correlations, the algorithm returns results arrays. Hence, we have Listing 4.

As the results, objectStep3 contains correlations which have been used in inflow/production correlations in Step 4.
3.7. Flow Properties: Step 4
Here another portion of reservoir calculation is presented. It contains flow rates, mass flow rates, heat capacities, and densities, for all phases and their mixture with the separation for liquid and gas phase. The algorithm has to take into consideration the different unit systems to avoid any problems with the passing parameters to the next step (see Listing 5).

Lines 5, 6, and 7 are dependent on producer type. Because the gas lift in current case was involved, only GasFlowRate is the function of GOR. In line 8, the condition is created to adjust the amount of lifted gas by gas lift valve into the wellbore.
3.8. Wellbore Properties: Step 5
Based on the simply thermodynamic principles, it is obvious that gaseous and liquid states not only are merged into each other in a continuous manner, but also are in fact similar in nature. Volumes of molecules and the intermolecular forces are necessary in establishing the relationship between pressure, volume, and temperature of gases and liquids. So in the foundation of this model Van der Waals equation is used: Here the final step is presented. This algorithm is the iteration, so the initial temperature and pressure values are taken from the bottom hole gauge. In this step, temperature and pressure correlations are dependent as follows: (i)T(T[i+1], GT[i+1], Step4.MixtureHeatCapacity, Step4.MixtureMassFlowRate, t, EarthThermalDiffusivity, GT[i], BoreRadius, FlowDiameter, HT, Incl, GG) (ii)P(P[i+1], Step4.OilFlowRate, Step4.WaterFlowRate, Step4.GasFlowRate, Step3.OilFormationVolumeFactor, Step3.WaterFormationVolumeFactor, Step3.GasFormationVolumeFactor, Step5.OilViscosity, Step5.WaterViscosity, Step5.SurfaceTension, depth, FlowDirection, Step5.WaterDensity, Step5.OilDensity, Step5.GasDensity, FlowDiameter, Incl, gradTVD, R)Pressure and temperature are calculated from the bottom to the top of the well, as the flow occurs, so index means the previous correlations results. Additionally the pressure correlation returns object which contains the following: return new objectPressure(P, FlowDirection, FlowType, LiquidSuperficialVelocity, GasSuperficialVelocity, MixtureVelocity, LiquidVolumeFraction, KineticPressureDrop, ReNS, HydrostaticPressureLoss, FrictionFactor) As a FlowType we consider segregated, intermittent, distributed, and transient. Every type has its own flow regimes which is the part of the pressure correlation. The important part of this step is to find the amount of gas which is out of the solution. The relation between solubility of liquid components and the heat of solution is given as where is the mole fraction of th alkane in water and is the difference between the partial enthalpy of the th hydrocarbon at infinite dilution and the molar enthalpy of the pure hydrocarbon. The heat of solution includes two effects: positive heat of cavity formation and negative heat of hydrophobic interaction between the hydrocarbon and water. These two effects cancel each other at . So the description of solubility of hydrocarbons in water may be presented as In this step, phase intermixing of viscosity, heat capacity, and rates is also considered.
Finally Step 5 is presenetd as shown in Listing 6.

3.9. Final Join
All these steps have to be joined in the final calculation which solves all modelling stages. Considering the whole oilfield, this simulation does not take into consideration limited amount of wells. Every well can be treated as a single thread calculation until the gas lift is considered as an optimisation problem for the oilfield. Then, the proper gas distribution is dependent on every well simulation. This study is planned as a future work.
Hence, we have Listing 7.

Function InitP is the initial pressure calculation based on WHP i BHP data with the consideration of trajectory curvature.
4. Case Study: Simulation
Based on the authors experience in oil and gas industry the small oilfield model was created. The application tool has also been developed. It gives the possibility to look through all the results. We emphasize on the single well, and the full interpretation of simulated properties is not a part of this study. A few examples of the simulated results are presented below.
The well trajectory (Figure 3) is very characteristic for relatively shallow wells, commonly found in the middle east. Geothermal temperature profile (Figure 4) meets the trajectory. This is the only model, so the surface temperature of about 350 K is relatively high here. This wellbore is a single casing and tubing string with the ID 12 inches and 9 inches, respectively. Total water and oil inflow chart (Figure 5), oil inflow (Figure 6), and gas inflow (Figure 7) charts confirm that two productive layers are given at this oilfield. Total oil production from this simulation is estimated on 2588 BPD which is very accurate value in comparison to real production data for this kind of wells. Gas inflow chart does not consider gas lift from the annulus and it is part of gas accumulated in this reservoir. The most important physical properties in the wellbore are pressure (Figure 9) and temperature (Figure 8). These values meet the criteria very closely but the difference between the simulated temperature and the geothermal temperature is low (Figure 10). These are the results where this simulation is performed under the early stage of production. Below the reservoir the coefficient between temperature and pressure is equal, so it means that this is to prove that the simulation is correct. In Table 1, some results from the simulation are presented.
Presented values are the confirmation that the framework and its implementation work properly. These values behave as a real one. Flow rates at the bottom are almost 0, and the surface values are highly reliable: 2588 BPD of oil, 4052 BPD of water, and 1,3 MMScf/D of gas. Temperature and pressure values are highly accurate even if the wellhead temperature is very high. Formation volume factors, heat capacities, and viscosities are accurate as well. The small disadvantage is observed for the Reynolds number at the bottom. This value is almost 0 and it is little bit unexpected according to Moody diagram and its properties. At the surface the Reynolds number gets the proper value in terms of pipe roughness which is equal to 0,0006 inches.
5. Conclusions
The literature study, regarding the single property simulations, gives the possibility to create the framework which allows obtaining the simulation for physical properties during the oil production. The authors choose the correlations which meet the criteria in terms of accuracy and efficiency. The obtained results can be classified as proper ones in the comparison to the real data. Unfortunately, upon the legal procedures the comparison results could not be published. But based on the authors experienced in oil and gas industry the presented correlation results are very reliable. The pressure and temperature profiles, as the results of all physical properties simulations, meet the expectations. In this paper, the authors does not analyse physiochemical properties or chemical coordinates, but this analysis is considered as a subject of future paper. This paper has been created to show the possibility of wellbore simulation, which has been proved as an accurate comparison to the real data at oilfields. It is important fact that the whole simulation is running fast because in some cases multithreading technology is used here. The flexibility of the framework idea gives the opportunity to adjust every correlation according to the latest studies. This idea may be extended on optimisation problems for gas lift managing and distribution for the oilfield.
Symbol Description
:  Dimensionless kinetic term 
:  Mixture velocity [ft/s] 
:  Gas superficial velocity [ft/s] 
:  Liquid superficial velocity [ft/s] 
:  No slip density [lb/ft^{2}] 
:  Liquid density [lb/ft^{2}] 
:  Gas density [lb/ft^{2}] 
:  Mixture density [lb/ft^{2}] 
:  Pressure [psi] 
:  Reservoir pressure [psi] 
:  Wellbore pressure [psi] 
:  Pipe diameter, where the flow occurs [in] 
:  Tubing inner diameter [in] 
:  Tubing outer diameter [in] 
:  Volume factor [bbl/STD] 
:  Inflow [BPD] 
:  Friction factor 
:  Friction factor of laminar flow region 
:  Friction factor of turbulent flow region 
:  Reynolds number 
:  Laminar to transition boundary Reynolds number 
:  Transition to turbulent boundary Reynolds number 
:  Flow behaviour index 
:  Roughness [in] 
:  Temperature [K], [C], [F] 
:  Inflow temperature [K], [C], [F] 
:  Pipe inclination [deg] 
:  Gas compressibility factor 
:  Froude number 
:  Volume fraction 
:  Surface tension [dyn/mm] 
:  Mixture viscosity [cP] 
:  Mass of mixture [kg] 
:  Heat capacity [Btu/lb * R] 
:  Mixture heat capacity [Btu/lb * R] 
:  Heat transfer [Btu/Day/ft^{2}/F] 
:  Layer thermal conductivity [Btu/Day/ft^{2}/F] 
:  Geothermal gradient [F/ft] 
:  Geothermal temperature [K], [C], [F] 
:  Thermal diffusivity of Earth 
:  Production time [h] 
:  Mechanical equivalent of heat [ftlb/Btu] 
:  Inflow mass rate [kg] 
:  Wellbore radius [in] 
:  Drainage radius [ft] 
:  Permeability [mD] 
:  Skin factor. 
Conflict of Interests
The authors declare that there is no conflict of interests regarding the publication of this paper.
Acknowledgment
The authors would like to thank the referees for their valuable comments which helped to improve this paper.