A model of wax deposition under oil-gas two-phase stratiﬁed ﬂow in horizontal pipe

. A model of wax deposition based on molecular diffusion mechanism, for oil-gas two-phase stratiﬁed pipe ﬂow is developed. In the model, unidirectional fully developed ﬂow analyses of momentum, heat and mass transfer are presented. And, a cube cage model is used to describe the wax deposit structure considering the effect of oil ﬂow shear on the deposit. Calculation of wax deposit is compared well with a ﬂow loop experiment. In particular, the model could give the wax deposit forming a crescent shape at the cross section of pipe, which is observed in different experiments. Furthermore, the cause of forming a crescent shape is revealed, which is indicated by the non-uniform circumferential distribution of mass ﬂux for wax deposition along the pipe wall wetted by the oil. The mass ﬂux from oil bulk ﬂow to the oil-deposit interface is closely related to three parameters, diffusivity at oil-deposit interface, the temperature gradient at the oil-deposit interface at different time, and the slope of the wax solubility curve at oil-deposit interface temperature.

Inclination angle, rad V b,total Volume of the cage structure after deformation V b,solid (%) Volume fraction of the solid wax after deformation V b, liquid (%) Volume fraction of wrapped liquid oil after deformation V solid,O (%) Solid volume fraction of the initial deposition layer s Shear stress, Pa G Shear modulus of cubic cage structure, Pa c S Shear strain G O Initial shear modulus, Pa w Velocity in the axial direction, m/s C C Effective mass transfer

Introduction
Recently, the rapid economic development in China with the need for oil keeping up, the oil import dependency rapid rises, up to 64.4% in 2017, and exceeds the internationally recognized warning level 50% [1,2] . It makes economic security under potential threat because of the energy factor [3,4]. As oil and gas exploiting onshore and offshore, deep water reserving abundant oil and gas will be key production area in a short time. The low temperature (4°C) and intense heat transfer between oil and environment in deep water make a few kilometers of submarine pipeline to be against severe flow assurance. As the wax crude oil flows through subsea pipeline on the ocean floor at approximately 4°C, the temperature of oil will decrease because of the heat transfer to the surroundings. Then, once the pipe wall temperature decreases below the oil Wax Appearance Temperature (WAT), the wax in the oil will precipitate and deposit on the pipe wall [5]. The deposit makes the flow area and efficiency decrease. The deposit thickness grows with time, and even makes pipe blockage in some cases [6], as shown in Figure 1.
The oil exploited from the Bohai Sea and South China Sea in China is mostly waxy [7]. The intense heat transfer between oil-gas pipeline and the subsea environment in the deep sea (4°C) aggravates the wax deposit. Compared with the wax deposition in the single phase flow, due to the complexity of flow, heat and mass transfer of the oil-gas twophase pipe flow, and the wax deposition process becomes much more complex. There are some flow patterns in oilgas two-phase flow, such as bubble flow, stratified flow, slug flow, annular flow, and dispersed flow for different flow condition. The stratified flow is the fundament and known as one of the most common and dominant flow pattern.
Matzain et al. [8], Apte et al. [9] and Rittirong [10] observed that the wax deposit only buildup on the wall wetted by the oil, and there was no deposit on the wall wetted by gas, and the deposit emerged a crescent shape at the pipe cross section, through the wax deposition in oil-gas stratified flow experiment. A semi-empirical model for wax deposit in oil-gas stratified flow was developed, based on the molecule diffusion mechanism and the assumption that all precipitated wax crystals on pipeline wall can deposit. The model takes the mutual effect of molecule diffusion and shear dispersion into consideration [9][10][11]. The wax deposit experiment for oil-gas stratified flow was also carried out by Gong et al. [12] with Daqing crude oil and air. They also observed that wax deposit presenting a crescent shape at the pipe cross section in the experiment. A wax deposition model based on classical molecule diffusion was established, considering the influence of superficial gas velocity, superficial liquid velocity, liquid hold up and flow pattern Reynolds number.
One-dimensional hydrodynamic, heat and mass transfer correlations are usually applied to predict the wax deposit thickness in multiphase flow previously. However, these models can only obtain the equivalent thickness of wax deposition assuming the deposit distributing in the whole pipe inner wall, and just give a general description for the deposit distribution around the circumference of the inner wall. Furthermore, these models can't give the reason for deposit forming a crescent shape. In this work, a threedimensional wax deposition model of oil-gas stratified pipe flow is developed, and the reason of forming crescent shape is revealed by analyzing the wax deposit model, and it is indicated by the non-uniform circumferential distribution of mass flux for wax deposition along the pipe wall wetted by the oil.

Wax deposit model
For oil-gas two-phase stratified flow, as the wax deposit increases on the pipe wall, the oil-deposit interface and the gas-oil interface are two moving boundaries, which must be updated at each computational time step, as shown in Figure 2. Wax deposition buildups only at bottom part of the pipe wall wetted by the oil. There is not any deposit on the top part of the pipe wall connected with the gas. An assumption that there is no mass transfer between the oil phase and the gas phase or there is no phase change due to the variation of pressure and temperature, is adopted to simplify the calculation.

Model development
According to molecular diffusion mechanism, the wax deposit thickness (d ¼ R À r i ) and the wax fraction of deposit (F w ), are generated by the wax molecular mass flux (M) from pipe center to the oil-deposit interface. The mass flux M is a function of wax deposit thickness, d and the wax fraction of deposit F w .
The rate of wax molecular mass flux into the deposit in the total derivative form can be written as: where R is the inner radius of pipe, r i is the radial distance from the center to the oil-deposit interface, t is time.
The first term on the right hand side of equation (2) is the rate of wax mass flux, leading to the deposit thickness growth (buildup term), q m;in . The second term on the right hand side of equation (2) is the rate of wax mass flux, leading to wax fraction increase (aging term), q m;aging .
The rate of wax mass flux into the oil-deposit interface can be written as follows: where DL is the pipe length of wax deposit buildup, D wo is the wax diffusivity in oil, can be calculated by the Hayduk-Minhas relationship [13], as given where T is the oil temperature, l is the oil dynamic viscosity, V A is the molar volume of wax molecules. The rate of mass increase leading to aging only depends on the wax mass flux that goes into the deposit. Thus, the aging term can be written as The buildup term depends on the difference between the wax mass flux from pipe center to the oil-deposit interface and the wax mass flux diffusing into the deposit, and it is given as The wax mass in the deposit can be written as where q dep is the density of deposit, assumed to be same as oil. Equation (8) can be given as then @M @r i By rearranging equations (7) and (11), the wax deposit thickness changes with time can be given as So, the wax fraction of the deposit can be calculated from equations (6) and (12): where D e is the effective wax diffusivity in oil as given by the Cussler relationship.
where a is the ratio of length to diameter of wax crystal particles in the deposit.
Singh et al. [14] assume that the equivalent crystal aspect ratio, a, varies linearly with the wax fraction, as shown in equation (16): Singh et al. [14] used k a as the fitting parameter to fit the simulation with the experimental results. Thus, this value is unknown prior to conducting the actual experiments.

The effect of shear stress
Bidmus and Mehrotra [15] and Mehrotra and Bhat [16] show wax fraction in deposit increases with the increase of oil flow rate through experiment. A simple cubic cage model is used to describe the structure of the wax deposition layer, by adding the effect of shear on wax fraction in deposit. In order to reflect the effect of shear on wax fraction simply and vividly, quantitative relationship between solid wax, liquid crude oil and shear in the deposit layer is given by the structure.
The structure unit of deposit layer presents a cubic cage structure under static condition, as shown in Figure 3. The precipitated solid wax is located at the edge of the cage structure, forming its frame, and the liquid oil is wrapped in the cage structure. In order to simplify the calculation, it is assumed that each wax crystal cage structure presents a cubic form, the size is a · a · a. Cross section of the frame of the solid wax crystal at the edge is a rectangle, the size is n · n. Total volume of the cubic cage structure is V total = a 3 . Ratio of thickness of the frame and length of the cube is Z = n/a. Volume fraction of solid wax in cubic cage structure is V solid (%) = 12Z 2 À 16Z 3 , and volume fraction of the wrapped liquid oil is V liquid (%) = 1 À 12Z 2 + 16Z 3 . Figure 3, when the cube cage structure is applied a shear along the flow direction, the cage structure will cause a certain inclination along shear direction and the inclination angle is b. The top, bottom, left and right sides of the cage cube are square, and the front and back sides are rhombus. Frame of wax crystals remains the same, the total volume is unchanged, and volume of the cage structure after deformation is

As shown in
When there is no liquid oil in the inclination cage structure, V b,liquid (%) = 0, the maximum value of the inclination angle b is cos À1 12Z 2 À 16Z 3 ð Þ , so b cos À1 12Z 2 À 16Z 3 ð Þ . All of the above are functions of Z and inclination angle b. Value of Z is calculated by the precipitated solid portion of wax molecule of the oil spread into the deposition layer with the bound oil. In the initial stage of wax deposition, solid volume fraction of the initial deposition layer V solid,O (%) is calculated by the solid-liquid equilibrium of the oil system with the pipe wall temperature T wall : where V solid;O ð%Þ is the solid fraction of the initial deposition layer, f(T wall ) is the wax precipitation fraction under the temperature T wall . It is assumed that the solid fraction increasing completely due to the wax mass transfer inside the deposit. So, without shear, the solid fraction inside the deposit, V solid (%) given as As shown in Figure 3, when the shear imposes on the cubical-cage, the relationship between the shear strain c S ¼ tan b, and shear stress can be given as where G is the shear modulus of cubic cage structure. Assumed that the shear modulus increases linearly with the edge-thickness Z .
where G O is the initial shear modulus.
The shear stress at the interface can been given as And then the solid fraction of the deposit under the shear can be obtained by Singh et al. [14] presented the formation of incipient gel layer on the cold surface and assumed that the thickness of incipient gel layer d o = 10 lm. So the deposit thickness can be given as And then the wax fraction inside the deposit F w can be calculated by where C ws T ð Þ is the saturation concentration of wax dissolved in oil.
It is important to note that in equation (16), k a is the fitting parameter to fit the deposit thickness with the experimental results. In equation (23), the optimum initial shear modulus G O is selected by matching the predicted average wax fraction of the deposit layer to the experiment measurement.

Hydrodynamic, heat and mass transfer calculation
The hydrodynamic, heat and mass transfer for oil-gas twophase flow should be fundamentally studied to predict wax deposition. During the process of oil-gas two-phase flow in a pipe, there are the heat transfer and the momentum transfer between oil and gas, gas and the environment, oil and the environment. As the temperature of the oil decreases along the pipe, the oil phase flows with smaller velocity and a larger cross sectional area and the gas phase flows with larger velocity and a smaller cross sectional area. The axial momentum equations for oil and gas phases are used to calculate the pressure gradient, the liquid holdup, and the velocity profile of oil in the pipe cross section. The energy equations for two phases are utilized to predict the fluid temperature profile on cross section and fluid temperatures along the pipe segment. In this research, a three-dimensional (3D) model is established using a unidirectional and fully developed flow assumption, in order to reduce the computational intensity, to predict wax deposition in oil/gas stratified flow in the circular pipe. The details of solving non-isothermal hydrodynamics, heat transfer phenomena can be found in our previous works [17], and are not repeated.
The temperature and shear stress on the oil-deposit interface in pipe can be obtained by solving momentum and energy transfer equations. And the radial concentration distribution of the wax molecule in pipe can be obtained by solving the wax molecular mass transfer equation.
The wax concentration profile is calculated using the mass transfer equation, equation (26), in which the precipitation of wax molecule in the bulk oil is neglected and it is valid for laminar flow [13]. The mass transfer equation of wax molecules, in (x, y, z) rectangular coordinate system, is shown as equation (26): where C is the wax concentration of crude oil, kg/m 3 ; C C is the turbulent effective mass diffusion coefficient of wax molecules, C C = m m /Sc + m t /r C , m 2 /s; r C is the mass transfer diffusion coefficient resulted by turbulence; Sc is the Schmidt number, Sc = m m /D WO ; D WO is the wax molecular diffusion coefficient in crude oil, m 2 /s. In (x, y, z) rectangular coordinate system, the oil phase and gas phase have irregular calculation area for gas-liquid smooth stratified flow. But the calculation area becomes regular in bipolar coordinate system (n, g, z) The boundary condition of mass transfer equation is shown in equation (28). Concentration of the wax molecule in the cross section of the pipe inlet (z = 0) is assumed to be the saturated wax molecular concentration (C b ) at the pipe inlet temperature, C = C b . The wax molecule is assumed to be solid-liquid equilibrium on the oil-deposit interface (r = r i ) and the gas-liquid interface, and the wax molecule concentration on the oil-deposit interface is wax saturated concentration in crude oil C = C ws (T). For vertical center boundary of the pipe, due to symmetric relation of the pipe cross section at the vertical center position, oC/og = 0.

Calculation procedure
The calculation process of wax deposition thickness and wax fraction in deposition layer of oil-gas stratified flow is as shown in Figure 4. Firstly, velocity, temperature and wax molecular concentration profile are calculated along the pipeline. Then temperature, concentration gradient of the wax molecule and shear stress at the oil-deposit interface are calculated. And growth rate of wax deposit thickness and wax fraction in the deposition layer can be obtained from the axial direction. According to the wax deposition model, the Runge-Kutta-Fehlberg (RKF45) method is used to solve the ordinary differential equation. The wax deposition thickness and wax fraction can be obtained by integration in the set time step. Finally, the computing grid is redevised according to the requirements, and the above steps are repeated for the next time step calculation until the set simulation time reached. As the deposit grows on the pipe wall, the oil-gas interface and oil-deposit interface are two moving boundaries that need to be updated at each time. This quasi-steadystate simulator is modular in structure, and each module makes computations for a particular aspect. The simulator consists of four main modules that perform the following tasks: two phase flow hydrodynamic calculations, two phase flow heat transfer calculations, two phase flow mass transfer calculations, and wax deposition calculations.
The wax deposit rate is slow, so the quasi-steady-state simulator is generally used in wax deposit calculation. The deposition rate is expected to be fast initially and then slow down, inasmuch as there is a larger driving force initially. Hence, initially very small time step is used (Dt = 30 s, for t < 10 min), and then progressively bigger time steps are used (Dt = 2 min, for 10 min < t < 1 h, and Dt = 10 min thereafter).

Results and discussion
In order to test the feasibility of the wax deposition model, it has been applied to the oil-gas stratified flow experiment conducted by Matzain et al. [8] with a flow loop. Matzain et al. [8] find that there is no wax deposition on the wall wetted by the gas phase, and the deposition appearing the crescent on the lower part of the wall wetted by oil, as shown in Figure 5. Matzain et al. [8] adopted two nonconcentric circles with different radius to describe the crescent shape. The position of A and B is determined by the liquid holdup in the oil-gas stratified smooth flow, and the thickness of wax deposition d at the bottom of the pipe is acquired from the Vernier Caliper.
The wax concentration at the inlet of the test section has a reducing trend because of the reutilization of crude oil in the experiment flow loop with more wax molecules diffusing to the inner wall, precipitating from the oil and depositing on the wall. According to mass conservation of wax molecules, the wax concentration at the inlet of the test section varies with time and the relationship, as shown in equation (29) where C inlet represents the wax concentration at different time points at the inlet of the pipe, C ini,inlet represents the initial wax concentration at the inlet of the pipe without wax deposition occurring, m dep and V dep are the mass and the volume of wax deposition, respectively.

Comparison between the modeling and the Matzain's experiment
Matzain et al. [8] carry out the wax deposition experiment under the condition of gas-liquid stratified smooth flow, using the South Pelto crude oil having 6.6% wax content and the Tulsa City natural gas as the experimental medium. The experimental facility, in general, consists of: an oil system; a gas system; a multiphase system with an oil/gas temperature trimming section, a test section, and  an oil/gas separator; a chilling system; and a heating system. The detailed description of the facility is given by Matzain et al. [8].
The properties of the experimental oil and gas and the operation conditions of the flow loop are listed in Table 1. The detailed parameters of the viscosity of temperature characteristic curve and the solubility-temperature characteristic curve of wax molecules of the South Pelto crude oil are shown in Figures 6 and 7.
The relationship of viscosity and temperature is given as where T o is the oil temperature,°C; l o is the crude oil viscosity, mPa s. The relationship between wax solubility and temperature: where C wax (wt%) is the weight fraction of wax molecules dissolved in oil.
In Figure 8, a comparison between wax deposition thickness at cross section from experiment and model prediction is demonstrated, and the deposition thickness at the bottom of pipe obtained from the experiment and the model prediction is provided. Obviously, the model can give an accurate prediction on the thickness, the shape and the distribution of wax deposition.
It must be pointed out that, liquid holdup of oil-gas twophase stratified flow given by the wax deposition model is 0.53, and it is consistent with the liquid holdup of 0.55 measured by the Gamma density meter in the experimental process. Accurate prediction of the hydraulic condition is the basis of accurate prediction of growth rate of the wax deposition layer. Figure 9 shows the predicted angular distribution of wax deposition layer thickness at the pipe wall. Wax deposition thickness is the largest at the lowest point of pipeline section (c = 0). The closer to contact points A and B at the gas-liquid interface with the pipe wall, the smaller the wax deposition layer thickness is, and the thickness of wax deposition is from 1.86 mm gradually to zero. As shown in Figure 10, predicted angular distribution of wax fraction in deposition layer is given, which is similar to that of the thickness of wax deposition of the pipe inner wall. At the thickest position of wax deposition, maximum of wax fraction in the wax deposition can also be obtained. The wax fraction in deposition layer decreases from 18.52% to 14.78%. The hardness of wax deposition layer is mainly determined by the wax fraction in the deposition. It is of great significance to design and implementation of the paraffin removal method of pipeline.
In Figure 11, the thickness variation with time predicted by the model is compared with the experimental results. In Figure 12, there is a contrast of the wax fraction in the   deposit layer at the bottom of the pipe between the experiment and the prediction. Obviously, the deposition thickness and the wax fraction calculated by the model are very close to the experiment when time reaches 24 h. The thickness at the bottom of the pipe of experiment and prediction are 2.0 mm and 1.86 mm, respectively, with a 7.0% relative error; the wax fraction at the bottom from experiment and prediction are 17.9% and 18.5%, respectively, with a relative error about 3.4%.

Analysis the wax deposit crescent shape
The radial mass transfer of wax molecules is a direct driving force for wax deposition. Huang et al. [18] confirmed that the growth rate of wax deposition is mainly depended on J wax , the convection diffusion mass flux of wax molecules in oil, as shown in equation (32): The wax concentration gradient at the oil-deposit interface is obtained by the calculation of liquid-solid equilibrium. In other words, dC=dT j T interface is represented by the slope of the solubility-temperature characteristic curve of wax molecules in oil at the temperature of oildeposit interface. Then, the growth rate of wax deposition is codetermined by the three factors: (1) the diffusion coefficient of wax molecules at the temperature of oil-deposit interface, D wo T interface ð Þ; (2) the temperature gradient at oil-deposit interface, ÀdT =drj oil to interface ; 3) the slope of the solubility-temperature characteristic curve of wax molecules in oil at the temperature of oil-deposit interface, dC=dT j T interface . Two of the three factors, D wo T interface ð Þ and dC=dT j T interface are the function of the oil-deposit interface   temperature. If the oil-deposit interface temperature changes, D wo T interface ð Þ and dC=dT j T interface will change the growth rate of wax deposition. To interpret the crescent shape of wax deposition in gas-liquid smooth stratified flow, T interface , the distribution of the temperature of oil-deposit interface around the wall, and these three factors: D wo T interface ð Þ , ÀdT =drj oil to interface and dC=dT j T interface should be obtained clearly.
(1) The distribution of the oil-deposit interface temperature The accurate prediction of thermodynamics is the foundation for estimating the growth rate of wax deposition. The wax deposition interface temperature can be accurately determined by solving the heat transfer equation. The distribution of oil-deposit interface temperature around the circumference of the inner wall wetted by the oil phase is described in Figure 13, under the condition of gas-liquid smooth stratified flow. As shown in Figure 13, the temperature at the bottom of the pipe is 18.91°C, the minimum value for the temperature distribution; for the position getting close to point B where the gas-liquid interface intersects with the wall, the interface temperature increases gradually. And the temperature at B is the maximum value, 24.43°C.
(2) The diffusion coefficient of wax molecules at the oil-deposit interface Figure 14 gives the distribution, around the circumference, of diffusion coefficient of wax molecules at the oil-deposit interface temperature, which is similar to the interface temperature distribution around the wall. Along the wall, when the position gets close to point B, the diffusion coefficient D wo T interface ð Þ increases with the growth of interface temperature and the decrease in oil viscosity, which promotes the increase in the wax deposition thickness.
(3) The temperature gradient at the oil-deposit interface The growth rate of wax deposition is an increasing function of the temperature gradient at the oil-deposit interface. The larger the temperature gradient, the easier the thickness of wax deposition grows. According to the discretization of the energy transfer equation, the temperature gradient at the oil-deposit interface can be described as: The temperature gradient distribution around the circumference of oil-deposit interface is shown in Figure 15. With being close to B where the gas-liquid interface intersects with the wall, ÀdT =drj oil to interface has a slow decrease at first and then an obvious reduction. The gradual decrease leads to a little decrease in the deposition thickness, while the obvious reduction results in a great decrease in the deposition thickness.
(4) The slope of wax solubility curve at the oil-deposit interface The solubility of wax in oil has a close relation to the oil temperature. The slope of wax solubility curve at the   oil-deposit interface is essential to calculate the growth rate of wax deposition. And the greater the slope, the faster the wax deposition grows. The dC=dT j T interface can be obtained from T interface , knowing the solubility curve of the oil.
The slope of wax solubility curve at different temperature dC/dT is calculated, based on the solubility curve of wax molecules in oil in Figure 7. As shown in Figure 16, dC/dT has a linear increasing trend with the oil temperature decreasing. As shown in Figure 17, the slope of wax solubility curve dC/dT diminishes, with the position approaching to B along the wall, which leads to a decrease in the thickness of wax deposition.
Through the above analysis, it is known that the growth rate of wax deposition is controlled by the three factors. When the position approaches to point B along the wall where the gas-liquid interface intersects with the wall, D wo T interface ð Þ , the diffusion coefficient of wax molecules in oil, gradually increases; ÀdT =drj oil to interface , the temperature gradient at oil-deposit interface, and dC=dT j T interface , the slope of wax solubility curve, decrease. And the increasing rate of D wo T interface ð Þis slower than the summing decreasing rate of ÀdT =drj oil to interface and dC=dT j T interface . As a result, J wax , the convection diffusion mass flux of wax molecules in oil, decreases, resulting in the reduction of the growth rate of wax deposition. Therefore, for the researches on the growth rate of wax deposition, it is essential to have a comprehensive analysis of heat transfer, mass transfer and oil properties during wax deposition process.

Conclusion
A three-dimensional wax deposition model of oil-gas stratified flow in a circular pipe where deposition occurs at the lower part of the pipe has been developed based on the molecular diffusion mechanism. The non-isothermal    hydrodynamics and the heat/mass transfer for stratified flow in a circular pipe are studied to predict the growth of the wax deposit along the circumferential distribution as a function of time. Predictions of wax deposition thickness along the circumferential pipe wall showed acceptable agreement with Matzain's experimental results.
In addition, an analysis was carried out using the wax deposition model to explain why the deposit appears crescent shaped with two identifiable zones in the oil-gas stratified flow pattern. The reason is indicated by the circumferential distribution of characteristic mass flux for wax deposition, J wax , along the pipe wall wetted by the oil. The effect of the mass flux includes D wo (T interface ), the diffusion coefficient of wax molecules in oil, ÀdT =drj oil to interface , the temperature gradient at oil-deposit interface, and dC=dT j T interface , the slope of wax solubility curve. The molecular diffusivity D wo T interface ð Þrises gradually from the bottom of the pipe to the intersection of gas-liquid interface and the pipe wall across the circumference. But the oil-deposit interface temperature gradient ÀdT =drj oil to interface and the slope of wax solubility curve in oil dC=dT j T interface diminish. Besides, the increasing rate of D wo T interface ð Þis slower than the summing decreasing rate of ÀdT =drj oil to interface and dC=dT j T interface , which leads to diffusion mass flux of wax molecules Jwax decreases. It indicates that the growth rate of wax deposition should diminish.