1 Introduction

Multiphase flow has been a significant concern since it is encountered in many industrial processes that are crucial for mankind. One significant example of these processes is the flow found in the upstream petroleum industry [1]. The most common multiphase flow is the gas–liquid flow, precisely the slug flow. Slug flow is an intermittent multiphase flow pattern that has a sequence of elongated bullet-shaped bubbles followed by a portion of liquid below the bubble bottom [2]. The hydrodynamics of the flow is rather complex due to its dependency on the geometry, the pipe orientation, and the fluid properties and the Taylor bubbles that are formed, and the flow intermittency can introduce a significant degree of randomness and instability of the systems where it occurs [2].

This type of flow needs to be thoroughly studied. The knowledge of its fundamentals is necessary to accurately model not only the fluid flow but also reaction and heat and mass transfer. This modeling is crucial in several operation units [2, 3]. Another goal is the possibility to predict a priori the flow regimes based on known values of apparent flow velocity and properties of particular phases and flow geometry (pipe diameter and inclination angle) [4]. The main characteristics of the slug flow are the intermittency and irregularity, and due to its unsteady and developing character, the flow parameters such as the length of the liquid slug and the length of the elongated bubbles should be described [5]. Two essential properties of this type of flow are the slug length and the slug frequency. The average slug length has been observed to be about 15–40 pipe diameters for horizontal flow and 8–25 diameters for vertical flow, and the slug frequency has been considered an entrance phenomenon since it results from the bridging of the liquid at the entrance [5].

In multiphase flow, non-Newtonian fluids can be found, especially shear-thinning fluids, for example waxy crude oils, gelled oils, drilling muds, fracturing fluid, and slurries [1, 6]. They may be encountered in the extraction of oil and gas and have various problems and challenges due to their behavior. The most notorious features and characteristics of these fluids are the flow pattern, the phase holdup, and the pressure drop [6]. One of the most widely used models to describe them is the power law fluid model, which can be applied to a wide range of fluids and conditions but has certain limitations [1]. Deviations of the power law can occur at meager shear rates, when the fluids are at high shear rates in turbulent flows [1]. Also, it has been shown that Newtonian behavior may dominate the shear-thinning effect for specific flow conditions [7, 8]. One of the first studies that were made of non-Newtonian fluids flow was conducted by Chhabra and Richardson [3] in which they developed a flow pattern based in a Newtonian one.

A useful tool to study and evaluate the hydrodynamics of two-phase air/non-Newtonian fluid flow is computational fluid dynamics (CFD). It has the benefit of being capable of changing the operating conditions more quickly than in an experimental facility. The conditions that can be changed vary from inclination angles and diameters of the pipes to gas and liquid properties and flow rates. Nevertheless, these studies must be validated with experimental data first, so that can be concluded that the model works and therefore it can be extrapolated.

Two of the first authors that studied the flow of non-Newtonian fluids (single phase) are Metzner and Reed [9]; their study had the objective of developing a correlation for this type of fluids. The study of the two-phase flow with non-Newtonian fluids can be seen since Mahalingam and Valle [10] studied the momentum transfer of this flow with pseudoplastic liquid mixtures. Rosehart et al. [11] conducted a study of gas–liquid (non-Newtonian) slug flow, in which they measured the void fraction and the slug characteristics (slug frequency and slug velocity). Otten and Fayed [12] extended the study of Rosehart et al. These authors measured pressure drop and drag reduction with gas–liquid slug flow using carboxyl vinyl polymer. They concluded that the reduction in frictional drag increased with the polymer used. In 1992, Das et al. [13] carried out experimental investigations to evaluate the holdup for gas–non-Newtonian liquid mixtures in vertical and horizontal flow in pipes. They developed correlations that predicted the holdup in slug flow regime [13].

Dziubinski [14] proposed a semi-theoretical general method of correlation for experimental data concerning the single and two-phase flow of gas and non-Newtonian liquid in a pipe. Xu et al. [15] studied two-phase co-current air–non-Newtonian shear-thinning fluid flows in inclined smooth pipes theoretically and experimentally. The authors gave their attention to the influence of liquid properties on flow pattern, void fraction, and pressure drop. Jia et al. [16] worked on the non-Newtonian liquid drag reduction by gas injection. They studied two regimes: fully stratified gas shear-thinning liquid flow and gas shear-thinning liquid slug flow. Picchi et al. [17] investigated the flow characteristics of air/shear-thinning liquid systems in horizontal and slightly inclined smooth pipes. Picchi and Poesio [18] develop a unified approach to predict flow pattern transitions for the case of gas/shear-thinning fluid flows to build a complete flow pattern map. They validated the results with data taken from the literature for horizontal and slightly inclined flows.

It is essential to mention the following researchers that have studied modeling of two-phase pipe flows with shear-thinning fluids. Heywood and Charles [19] studied predictions of pressure drop and holdup for the stratified flow of gas and non-Newtonian liquid obeying the Ostwald–de Waele power law model. They extended the model of [20] to liquids that have shear-thinning or shear-thickening behavior. Bishop and Deshpande [21] studied the Heywood–Charles model, and they concluded that it appeared that the model is not valid for predicting two-phase drag reduction in stratified flow.

Picchi et al. [22] studied gas/non-Newtonian power law fluid stratified pipe flow. Picchi and Poesio [23] in this case studied the stability of multiple solutions in inclined gas/shear-thinning fluid pipe flow, investigating the effect of the interfacial shear stress modeling and rheology. Picchi et al. [8] also studied stability of stratified two-phase channel flows of Newtonian/non-Newtonian shear-thinning fluids.

Most of the studies on non-Newtonian two-phase flow have been experimental with development of correlations based on the observations and data collected. The variation in angles has been studied as well as different diameters. Although there have been some researches that have modeled two-phase shear-thinning fluids as mentioned before, in this study the effect of the angle in a horizontal pipe and a vertical pipe is assessed with gas/non-Newtonian two-phase flow using CFD. It is an important task, because in the current industry this type of flow has been increasingly appearing. Experimental facilities to develop this kind of studies could be costly, while with CFD numerous configurations and superficial velocities can be achieved. A comparison with experimental measurements acquired at the University of Brescia (Italy) was made. This comparison was performed with six (6) different conditions of superficial velocities. After this was accomplished, an extrapolation of the model was made with three (3) different pipe configurations. Parameters such as slug frequency, dimensionless slug length, and liquid holdup are studied and compared with a gas/Newtonian two-phase flow case.

2 Methodology

In this section, a brief explanation of the methodology is given. The experimental facilities used and the CFD model are described.

2.1 Experimental facilities

The experimental data used to validate the CFD simulation were collected at the University of Brescia by Picchi [6]. In Fig. 1, it is schematically represented the setup in which the experiments were performed. It is composed of a 9-m long glass pipe, with an inner diameter of 22.8 mm [6]. The pipe is mounted on a rigid beam, and it has the option to change the inclination around the central pin.

Fig. 1
figure 1

Sketch of the experimental setup [6]. A-Liquid tank, B-Receiver tank, C-Observation window, D-Turbine flow meter (liquid), E-Thermal mass flow meter (gas), F-Centrifugal pump, G-Valve, H-Pressure transducer, I-Differential pressure transducer, L-Injector, M-Air injection, N-Valve, O-Capacitance probe [6]

The average properties of the air are shown in Table 1, and the physical properties of CMC–water solutions are shown in Table 2. The operation conditions of the CMC–water solutions (superficial velocity) range from 0.05 to 1.4 m/s, and the gas (superficial velocity) ranges from 0.1 to 2 m/s [6].

Table 1 Air properties at 25 °C and atmospheric pressure [6]
Table 2 Physical properties of the test fluids at 25 °C and atmospheric pressure [6]

The liquid phase (shear thinning) was a CMC–water solution with three different polymer concentrations. A high viscosity CMC is the polymer used from Sigma Aldrich [6]. The density of each solution was measured using a hydrometer with \(\pm \,0.5\) kg/m3 accuracy. On the other hand, the rheology of the CMC–water solutions was measured by an LDV-3T Brookfield rheometer. These solutions show a shear-thinning fluid behavior, which can be described with a two-parameter power law model. In this model, the shear stress \(\tau\) is related to the shear rate \(\dot{\gamma }\) by \(\tau = m\left( {\dot{\gamma }} \right)^{n}\), where the two fitting parameters \(m\) and \(n\) are the fluid consistency index and the flow behavior index, respectively [6]. For the experimental procedure, please refer to Picchi et al. [17]. This power law model is also the chosen one to model the rheological behavior in the CFD model. The shear rate tensor is calculated from the second invariant of the rate of deformation (strain) tensor [24].

2.2 CFD modeling

The experimental results of Picchi [6] will be used to validate the CFD model proposed in this investigation. The CFD simulations were developed in the commercial software STAR-CCM+ v13.04 (Siemens, Germany).

2.2.1 Physical models

Another important step is the physics model selection. There are two ways to describe the multiphase flow in a pipe: the Eulerian–Eulerian model and the Lagrangian–Eulerian model. The first one treats the fluid phases as interpenetrating continua and studies their dynamics, employing averaged equations of motion [25]. On the other hand, the second model tracks the motion of each particle and solves the dynamics of the fluid at a length smaller than the particle diameter [25].

2.2.1.1 VOF model

The last one is chosen, specifically the VOF model. This model adopts that all immiscible fluid phases share the same pressure and velocity fields [19]. It uses only one set of equations for the continuous phase, and the dispersed phase has an additional equation for its volume fraction [24]. The continuity equation, which guarantees the conservation of mass, is described in Eq. (1).

$$\frac{\partial \rho }{\partial t} + \frac{{\partial \rho v_{i} }}{{\partial x_{i} }} = 0.$$
(1)

where \(v_{i}\) is the fluid velocity, \(t\) is the time, and \(x_{i}\) is the spatial coordinate. In Eq. (2), the momentum equations are described. This represents the Navier–Stokes equation.

$$\frac{\partial }{\partial t}\left( {\rho v_{j} } \right) + \frac{\partial }{{\partial x_{i} }}\left( {\rho v_{i} v_{j} } \right) = - \frac{\partial P}{{\partial x_{j} }} + \frac{\partial }{{\partial x_{i} }}\mu \left( {\frac{{\partial v_{i} }}{{\partial x_{j} }} + \frac{{\partial v_{j} }}{{\partial x_{i} }}} \right) + \rho g_{j} + F_{j} .$$
(2)

In this equation, \(F\), \(P\), and \(g\) indicate the external force per unit volume, pressure, and gravitational acceleration, respectively, \(x_{j}\) is the spatial coordinate, \(\mu\) is the dynamic viscosity, and \(v_{j}\) is the fluid velocity. The properties of the fluid are calculated as a function of the physical properties of each phase and their void fractions.

$$\rho_{m} = \mathop \sum \limits_{i = 1}^{n} \alpha_{p} *\rho_{p} .$$
(3)
$$\mu_{m} = \mathop \sum \limits_{i = 1}^{n} \alpha_{p} *\mu_{p} .$$
(4)

where \(\rho_{p}\) is the density of the phase \(p\) and \(\mu_{p}\) is the dynamic viscosity of the phase \(p\). The variable \(\alpha_{p}\) is the void fraction and can be expressed as Eq. (5).

$$\frac{{\partial \alpha_{p} }}{\partial t} + u\nabla \left( {\alpha_{i} } \right) = 0.$$
(5)

This method solves the equations of momentum and continuity for an equivalent fluid with the averaged fluid properties.

2.2.1.2 Surface tension model

This model describes the angle between the phases and the wall. The model that is used is the one developed by Brackbill et al. [26], in which the interfaces between fluids of different properties are represented as transition regions of finite thickness. In Eq. (6), it is described how the pressure drop can be calculated using the surface tension coefficient (\(\sigma\)) and the surface curvature.

$$P_{2} - P_{1} = \sigma \left( {\frac{1}{{R_{1} }} + \frac{1}{{R_{2} }}} \right) ,$$
(6)

where \(P_{1}\) and \(P_{2}\) are the pressures in the two fluids on either side of the interphase and \(R_{1}\) and \(R_{2}\) are the two radii in the orthogonal directions [26].

2.2.1.3 Turbulence model

The turbulence model that will be used is the \(k - \omega\) model. This model is a two-equation alternative to the \(k - \varepsilon\) model. The quantity \(\omega\) is defined as the dissipation rate, that is, the dissipation rate per unit turbulent kinetic energy.

$$\frac{\partial }{\partial \eta }\left[ {N_{0} \frac{{\partial U_{1} }}{\partial \eta }} \right] + \left( {\alpha_{\text{T}} - 2\beta_{\text{T}} - 2\omega_{\text{T}} } \right)\eta \frac{{\partial U_{1} }}{\partial \eta } + \left( {\beta_{\text{T}} - 2\omega_{\text{T}} } \right)U_{1} = 0.$$
(7)
$$\sigma^{*} \frac{\partial }{\partial \eta }\left[ {N_{0} \frac{{\partial K_{0} }}{\partial \eta }} \right] + \left( {\alpha_{\text{T}} - 2\beta_{\text{T}} - 2\omega_{T} } \right)\eta \frac{{\partial K_{0} }}{\partial \eta } - 4\omega_{\text{T}} K_{0} + \sqrt {\beta^{*} } \left[ {N_{0} \left( {\frac{{\partial U_{1} }}{\partial \eta }} \right)^{2} - K_{0} W_{0} } \right] = 0.$$
(8)
$$\sigma \frac{\partial }{\partial \eta }\left[ {N_{0} \frac{{\partial W_{0} }}{\partial \eta }} \right] + \left( {\alpha_{\text{T}} - 2\beta_{\text{T}} - 2\omega_{\text{T}} } \right)\eta \frac{{\partial W_{0} }}{\partial \eta } + \left( {\alpha_{\text{T}} - 2\beta_{\text{T}} - 2\omega_{\text{T}} } \right)W_{0} + \sqrt {\beta^{*} } \left[ {\gamma \left( {\frac{{\partial U_{1} }}{\partial \eta }} \right)^{2} - \frac{\beta }{{\beta^{*} }}W_{0}^{2} } \right] = 0.$$
(9)

where \(U_{1}\), \(K_{0}\), and \(W_{0}\) are the non-dimensional defect velocity, turbulent kinetic energy, and turbulent dissipation rate \(\omega\), respectively. \(N_{0}\) is the dimensionless eddy viscosity, and \(\alpha_{\text{T}}\), \(\beta_{\text{T}}\) and \(\omega_{\text{T}}\) are defined as following [27]:

$$\alpha_{\text{T}} = \frac{2}{{C_{\text{f}} }}\frac{{{\text{d}}\delta^{*} }}{{{\text{d}}x}}.$$
(10)
$$\beta_{\text{T}} = \frac{{\delta^{*} }}{{\tau_{\text{w}} }}\frac{{{\text{d}}p}}{{{\text{d}}x}}.$$
(11)
$$\beta_{\text{T}} = \frac{{\delta^{*} }}{{C_{\text{f}} u_{\text{T}} }}\frac{{{\text{d}}u_{\text{T}} }}{{{\text{d}}x}},$$
(12)

where \(\delta^{*}\) is the displacement thickness, \(\tau_{w}\) is the wall shear stress, and \(C_{\text{f}} /2 = \left( {u_{\text{T}} /U_{\text{e}} } \right)^{2}\). The constants for the \(k - \omega\) model are [27]:

$$\beta = 3/40,\,\beta^{*} = 0.09,\,\kappa = 0.41,\,\gamma = 5/9, \,\sigma = 0.5,\,\sigma^{*} = 0.5.$$
(13)

The flow in a smooth wall turbulent boundary layer can be broken into two regions: the inner and outer layers, each having its scaling law [28]. In the outer region, the difference between the velocity at the outer edge of the boundary layer and the local mean velocity at a distance \(y\) from the wall is determined by the boundary layer thickness and when it is transformed to the non-dimensional form it becomes the defect velocity [28]. This model requires closure for the Navier–Stokes equations. It is essential to mention the used turbulence model was shared by the phases since there was just one set of equations to solve.

The additional models used are unsteady, segregated flow, and gravity. The unsteady model is used due to the time dependence that the two-phase flow has. Segregated flow is chosen to numerically solve the flow equations in a decoupled way to have the advantage of less memory and faster convergence [24]. This model solves each of the momentum equations, in turn, one for each dimension and the link between the momentum and the continuity equations is achieved with a predictor–corrector approach [24].

2.2.2 Geometrical domain

The experimental facility that Picchi uses is a 9 m and 22.8 mm ID glass pipe. This pipe is horizontal and can be modified to have two slight inclinations (5°, − 5°) to give three combinations. These geometries are designed using Autodesk Inventor® v2016 and transformed into CAD models. The other three geometries that are going to be studied are toe down, one undulation with a hump, and one undulation with a sump. The first one has a variety of inclinations: 1°, 3°, and 5°, while the other two, in each of their sections, incline 1°. There is a sketch in Fig. 6 to clarify these geometries.

2.2.3 Mesh generation

The mesh arrangements that exist are multiple, but for the modeling of multiphase flow in a pipe the best arrangement is the orthogonal grid [29]. An example of this type of grid is shown in Fig. 2; it was made by the operation of direct mesh tool of the program STAR-CCM+.

Fig. 2
figure 2

Grid generation. a Cross-sectional and b longitudinal discretization, and c isometric view of the discretization

The distance between the wall and the first node is an essential characteristic in the mesh’s generation. The reason it is calculated is to solve the boundary layer of the two-phase flow correctly. This wall distance is calculated using Eq. (14).

$$y = \frac{{y^{ + } \mu }}{{\rho u_{*} }},$$
(14)

where \(y^{ + }\) is equal to 1 and \(u_{*}\) is the frictional velocity that can be obtained using Eq. (15).

$$u_{*} = \sqrt {\frac{{\tau_{\text{w}} }}{\rho }} .$$
(15)

In this case, \(\tau_{\text{w}}\) is the wall shear stress, which is a function of Reynolds number. It is calculated, as shown next.

$$\tau_{\text{w}} = C_{\text{f}} \frac{1}{2}\rho u^{2} .$$
(16)

In Eq. (16), \(C_{\text{f}}\) is the wall shear stress, and it is possible to calculate it with the Reynolds number (values below 109).

$$C_{\text{f}} = \left[ {2\log_{10} \left( {\text{Re} } \right) - 0.65} \right]^{ - 2.3} .$$
(17)

Finally, the Reynolds number must be calculated with an equation for a power law fluid defined by Metzner and Reed [9], and it is found in Coulson et al. [30].

$$\text{Re}_{\text{MR}} = 8\left( {\frac{n}{6n + 2}} \right)^{n} \frac{{\rho u^{2 - n} d^{n} }}{m},$$
(18)

where \(n\) is the power law index, \(m\) is the consistency coefficient, \(\rho\) is the density, \(u\) is the velocity (lowest velocity’s phase), and \(d\) is the pipe diameter. After this process is made, it is necessary to develop an independence mesh test. It is used to identify how the grid affects the computational time and the results accuracy. With this grid independence results, the mesh will be selected.

Finally, as it is shown in Fig. 2, only half pipe is used in the spatial discretization due to the assumption of axial symmetry in the pipe and that it has the advantage of decreasing the computational time.

2.2.4 Boundary and initial conditions

The specification of the boundary and initial conditions of the system is an essential step in the pre-processing stage in CFD. The inlet and outlet of the spatial discretization (pipe) are modeled as velocity inlet and pressure outlet, respectively. The symmetry as a symmetry plane and the pipe wall as a wall are shown in Fig. 3.

Fig. 3
figure 3

Boundary conditions in the 3D model

The initial conditions can be described as the pipe is half filled with air and half filled with non-Newtonian liquid, as it can be observed in Fig. 4. These divisions result in the gas entering the domain in the upper part of the pipe and the liquid in the lower part. The volumetric flows must be matched with the experimental ones by multiplying the superficial velocity of each phase by two. These superficial velocities were specified in the lower part (liquid phase) and the upper part (gas phase). The reference pressure is zero (0). This condition will not affect the simulation significantly due that the flow is incompressible. These initial conditions are the same for the other tested geometries.

Fig. 4
figure 4

Visualization of the initial condition with the liquid volume fraction

2.2.5 Processing

To validate the CFD model, the simulations must be transient. The necessary parameters specified in the model are the time step, the inner iterations per time step, and the maximum physical time. The most critical parameter is the time step, because, if it is not correctly calculated, diverse problems can appear. One of these problems is convergence, which is presented by many factors. One is when the time step is larger than the velocity magnitude. This causes that intermediate points are not solved, producing that the next points have no previous solution and the CFD solver assuming those solutions that lead to divergence. The CFL (Courant–Friedrichs–Lewy) condition is used to avoid the divergence problem. The recommended CFL values are below 0.1 to capture the interface accurately, and it can be described as shown in Eq. (19).

$$C = \frac{u\Delta t}{\Delta x},$$
(19)

where \(C\) is the courant number, \(\Delta t\) is the time step, and \(\Delta x\) is the mesh cell height. The inner iterations used are 5, which allow the residual of all equations to be below \(1 \times 10^{ - 4}\). The physical time that is simulated is 70 s that allows at least 20 s after the flow is fully developed. The bounds used of the time step are: \(6 \times 10^{ - 5} {\text{s}} < t_{\text{s}} < 2 \times 10^{ - 4} {\text{s}}\).

2.2.6 Post-processing

The main results that are obtained from the simulations are pressure drop, slug frequency, length, and velocity. These results are retrieved from the positions where the capacitance probes are located as explained in the section of the experimental facility.

2.2.7 Slug flow characterization

The methodology that it is used for the analysis of the slug flow can be found in Brito [31] and Soedarmo et al. [32]. It consists of the analysis of voltage signals. In this case, it is extrapolated to analyze the CFD results. The liquid holdup signals find the equivalent to the average slug length and frequency in a specific location of measurement [33]. The characterization starts by comparing each pair of signals. With the cross-correlation function, it is possible to measure the temporal lag (\(\delta\)) between the signals, and therefore calculate the translational velocity (\(U_{t}\)) with Eq. (20).

$$U_{t} = \frac{\Delta x}{\delta }.$$
(20)

In this case, \(\Delta x\) is the distance between the pair of analyzed signals. Then, the next stage is to transform the liquid holdup signal in a binary signal through a value called threshold value (\({\text{TV}}\)). It is selected by the histogram of the liquid holdup signal, and it is identified when the second distribution starts. The value obtains a one (1) when the liquid holdup is higher than this value (\(H_{\text{L}} > {\text{TV}}\)), and it represents a slug zone. On the contrary, a film zone is represented by a zero (0) when the liquid holdup is lower than the threshold value (\(H_{\text{L}} < {\text{TV}}\)). In Fig. 5, it is shown an example of how the explained procedure is developed.

Fig. 5
figure 5

Processing of liquid holdup signals [33]

A slug zone is determined by the change of the binary signal from 0 to 1. It is possible to calculate the slug frequency employing the repetition of the procedure in a pair of signals with time \(t_{\text{T}}\) using Eq. (21).

$$f_{\text{s}} = \frac{{\sum {\text{Slugs}}}}{{t_{\text{T}} }}.$$
(21)

Besides, Eq. (22) is used to compute the slug length.

$$L_{\text{s}} = n_{\text{s}} \Delta tU_{t} ,$$
(22)

where \(n_{\text{s}}\) represents the number of consecutive ones in a slug zone and \(\Delta t\) the time step. Lastly, the dimensionless slug length can be calculated through the relation between the average slug length in the specific location and the diameter, as it is represented in Eq. (23).

$${\text{DSL}} = \frac{{L_{\text{s}} }}{D}.$$
(23)

2.2.8 Tested conditions

The superficial liquid (\(v_{\text{SL}}\)) and gas (\(v_{\text{SG}}\)) velocities that were used to compare the experimental results are shown in Table 3. These conditions are simulated in the horizontal pipe with no inclination. With these different cases, it will be possible to demonstrate that CFD can reproduce the flow pattern encounter on the pipe.

Table 3 Cases used to validate the CFD simulations

The total number of cases is 6 in this section. The models were varied to study the effect of the sharpening factor. The values that were analyzed range from 0 to 1. This factor helps to reduce numerical diffusion in the simulation. When the value is set to 0, there is no reduction of the numerical diffusion; meanwhile, when it is set as 1, there is no numerical diffusion; therefore, a very sharp interface is created and can generate forces and behaviors that could not be real [24]. The value of sharpening factor that was used in this case was 0. Other values created undesired behaviors as previously explained.

2.2.9 Post-processing of the simulation

After the simulations are validated, an extrapolation of the models is studied. This means that the pipe diameter, length, and inclination of the pipe were tested and changed. In this case, the effect of the angle and a vertical section were assessed. In Fig. 6, a schematic of the configurations is shown, and in Table 4, the operating conditions that were tested. It is essential to mention that in the case of the toe-down configuration 3 degrees were tested: 1°, 3°, and 5°. The one undulation with a hump and one undulation with a sump have a 1° inclination in each section.

Fig. 6
figure 6

Tested well configurations. a Toe down (1°, 3°, and 5°), b One undulation with a sump (1° inclination in each section) and c One undulation with a hump (1° inclination in each section)

Table 4 Operating conditions

The total number of cases in this section is: nine (9) for the toe-down well, three (3) for one undulation with a sump and three (3) for one undulation with a hump. That gives a total of fifteen (15) cases in this section.

Overall, there are twenty-one (21) cases in the investigation.

2.2.10 Error calculation

The absolute relative error was used to compare the experimental data with the CFD numerical results:

$${\text{error }}\left( \% \right) = \left[ {\frac{1}{N}\mathop \sum \limits_{i = 1}^{N} \left( {\frac{{x_{{{\text{num}}_{i} }} - x_{{\exp_{i} }} }}{{x_{{\exp_{i} }} }}} \right)} \right] \times 100,$$
(24)

where \(N\) is the number of data points and \(x\) is the compared variable. The index \({\text{num}}\) and \(\exp\) stands for the CFD numerical results and experimental data, respectively.

3 Results and discussion

The investigation results are divided into two main sections: tested and extrapolation conditions.

3.1 Validation of the model

3.1.1 Grid independence test

The grid independence test was done with the CMC-6 fluid. The variation made in the cells was in the axial direction. The cross-sectional direction was studied in a less detailed manner due to the results obtained by Pineda [34] in which they concluded that the axial direction affected in a more direct way the results of the CFD model and by Ballesteros et al. [35] in which they mentioned that the number of axial divisions has more effect on the simulation results than the cross-sectional divisions, especially as the number of axial divisions increases. This does not mean that the cross-sectional divisions will not affect the convergence of the simulation. It means that it has less effect on the solution when there is an increase in the axial divisions. These two previous works and the computational time (average simulation time 1.5 months) were the reason to find a proper cross-sectional division and study in a more detailed way the axial divisions. The starting point was with 1184 axial divisions that lead to 823,918 cells, and it was incremented 50 and 70% in the axial divisions to get 1776 divisions—1,236,096 cells and 2013 divisions—1,400,909 cells, respectively.

In Fig. 7, a comparison between the three meshes is shown. The comparison was made with the value of the pressure drop between the experimental data of Picchi [6] and the results of the CFD simulation in a four-core computer. The chosen fluid from the two that are investigated was CMC-6. The \(v_{\text{SL}} = 0.62\,{\text{m/s}}\) and the \(v_{\text{SG}} = 1.50\,{\text{m/s}}\) were the selected combination to analyze the discrepancy and the potential grid.

Fig. 7
figure 7

Grid independence test

As mentioned before, three (3) cases were run with three (3) different numbers of cells. In Fig. 7, three points are shown which indicate each one of the cases. On the one hand, the discrepancy shown is the difference between the experimental data and the simulated data achieved by CFD. On one hand, the discrepancy shown is the difference between the experimental data and the simulate data achieved by CFD. On the other hand, the total number of hours that it was spent in each of the three (3) cases.

In conclusion, the discrepancy decreases when the number of cells increases but the computational time increases significantly (400 h between mesh 2 and 3). With these results, it was decided to choose mesh 2 to develop the rest of the project. This decision was made because of the limitation of the use of high-performance computing (HPC) to decrease the computational time. The simulations run for an estimated time of three weeks in a ten-core computer with the chosen mesh. It is also important to mention that the boundary values of the \(y +\) are: \(- 8.89 \times 10^{ - 6} < y + < 1.46\), which led to use the low y+ model in CFD.

3.1.2 Solution appearance

In Figs. 8 and 9, the visualization of the modeled slug flow for each of the CMC fluids is shown. It can be seen the formation of the bubble and the where it has its end. The solution of CMC-6 has more defined slugs than the CMC-1 solution. The solution of CMC-1 has a more mixed liquid phase than the CMC-6 solution. Visually, the solution of CMC-6 has longer slugs.

Fig. 8
figure 8

Visualization of the volume fraction of CMC-6 in 70 s

Fig. 9
figure 9

Visualization of the volume fraction of CMC-1 in 25.2 s

3.1.3 Slug frequency and length

The slug frequency and length were compared to the experimental results of Picchi [6] employing a Matlab® code. The results of the frequency slug and dimensionless slug length for two different mix velocities for the CMC-6 and CMC-1 fluids are shown in Fig. 10. These plots present 4 points that are outside the \(\pm\) 30% acceptable region. This could be a consequence of the boundary conditions implemented in the model. The average relative error of the CFD model for these two parameters is 24.2%. It is essential to mention that these simulations had a total simulation time of 70 s.

Fig. 10
figure 10

Comparison between experimental and CFD results. a Frequency slug and b dimensionless slug length

3.1.4 Pressure drop

Another valuable result is the comparison of the pressure drop between the experimental data and the CFD model as it can be seen in Fig. 11. The overall average relative error was of 25.7%. That is why we can conclude that the model can represent the experimental data and could be used to test other conditions and configurations.

Fig. 11
figure 11

Comparison between experimental and CFD results of pressure drop

3.2 Effect of different well configurations with non-Newtonian two-phase flow

The configurations tested in this project are described in Fig. 6. The operational conditions that are used can be seen in Table 4. These conditions were chosen so that they can be compared with the Newtonian data collected by Guerrero et al. [33]. In this instance, each of the simulations ran for 600 s to achieve an average of 60 slugs per configuration.

In Figs. 12 and 14, the slug frequency (\(f_{\text{s}}\)) and dimensionless slug length (\({\text{DSL}}\)) are shown for a toe-down well with 1°, 3°, and 5° inclinations with Newtonian and non-Newtonian (CMC-6) liquid phase for the three cases studied. It can be analyzed that the slug frequency for the two-phase flow with non-Newtonian liquid phase increases from 0.1to 0.3 m/s and again increases from 0.3 to 0.5 m/s. This same pattern occurs in the cases with Newtonian fluid. Nevertheless, the frequency is different for the two modeled fluids. This difference is due to the rheological behavior of the non-Newtonian fluid since it changes how the slug units are formed and how it interacts with the wall of the pipes.

Fig. 12
figure 12

Slug frequency along the pipe trajectory

It can be seen in Fig. 14 that just as it occurs with Newtonian fluids the \(f_{\text{s}}\) and the \({\text{DSL}}\) are inversely related. This occurs to satisfy the liquid mass balance. As the slug became smaller, more slugs are needed to transport the liquid. For the first case (0.5 m/s) and 1°, 3°, and 5°, the dimensionless slug length is smaller in the non-Newtonian case than the Newtonian case. Even though the visualization of the non-Newtonian case shows a different result (Fig. 13), this could lead to the conclusion that the effect of slug merging is taking place in the well. The slugs that are entering the vertical pipe collapse making the upcoming slugs larger and decreasing the \(f_{\text{s}}\). The difference between the two results (Newtonian and non-Newtonian) could be that the velocity profile changes more slowly and to identify a correct temporal lag the signals should be more apart. Having more distance, the signal could be interpreted correctly as it happens in the other two cases (Fig. 14).

Fig. 13
figure 13

Visualization of the flow pattern in case 1

Fig. 14
figure 14

Dimensionless slug length along the pipe trajectory

For the third case (0.1 m/s) and 1°, 3°, and 5° of inclination, the decrease in \({\text{DSL}}\) in the toe-down configuration for the non-Newtonian fluid is of 50.8%. An explanation of this significant decrease is the phenomena called slug dissipation. It can occur by two means; the first one is when the slugs are broken by the coalescence of the two Taylor bubbles causing them to merge with the following slug. The second one is that the preceding Taylor bubble expands, and there is not enough liquid to continue to develop de the slug formation, ending it in a dissipation. In Fig. 15, the visualization of the phenomenon can be seen.

Fig. 15
figure 15

Visualization of the flow pattern in case 3 with the phenomenon occurring on it, in a toe-down configuration with an inclination of 5°

For the second case (0.3 m/s) and the three inclinations, there is not a pattern to identify. Neither of the two behaviors (slug merging or dissipation) can be visibly occurring. Slugs are being formed but not in a consistent way. That is the main difference between the Newtonian fluid and the non-Newtonian fluid. With the Newtonian fluid, the \(f_{\text{s}}\) decreases as the flow moves along the pipe, while with the other fluid it does not show that tendency. The decrease in this case in the \({\text{DSL}}\) is of 43.8%.

Another result that is valuable for this research project is how the studied configurations can change the \({\text{DSL}}\) while using non-Newtonian liquid. It is important to remember that the one undulation with a sump changes the flow from a downward direction to an upward direction. Instead the one undulation with a hump changes the flow direction from upward to downward. In Guerrero et al. [33], they found that the \({\text{DSL}}\) decreased when studying a configuration of one undulation with a hump or a sump, due to the shorter pipe length that does not gives the slug formation enough distance to stabilize. In the Newtonian case, the difference between the toe-down well and the one undulation with a sump was significant. On the contrary with the non-Newtonian liquid phase, this difference is not as significant as it can be seen in Fig. 16. The values obtained of DSL are very similar, and a reason this could be happening is due to the incorrect identification of the temporal lag, which causes that the slugs are not being correctly characterized. It also presents the similar patterns in the two configurations, in the downward direction the flow pattern remains to be segregated and in the upward direction slugs.

Fig. 16
figure 16

Comparison between the \({\text{DSL}}\) in the toe-down well (1°) and a one undulation with a sump \((X /D = 252)\), b one undulation with a hump \(\left( {X /D = 126} \right)\), and in the toe-down well non-Newtonian (1°) [33] and c one undulation with a sump non-Newtonian \((X /D = 252)\), d one undulation with a hump non-Newtonian \(\left( {X /D = 126} \right)\)

Another analysis is the effect of the lateral pipe on the vertical section. In this case, it is compared between the Newtonian results and the ones found in this research as it can be observed in Fig. 17. The first observation is the decrease in the \({\text{DSL}}\) for all the configurations. Also, it can be seen that the non-Newtonian cases have odd behavior. For the toe-down 1° configuration, the \({\text{DSL}}\) decreases, for the 3°, it increases. Meanwhile for the 5° and the one undulation with a sump, the performance is quite similar to the one observed in Guerrero et al. [33] even though the values are still relatively small. As it could be expected when the \(f_{\text{s}}\) is observed, the values are inverse as the values of \({\text{DSL}}\), but in these cases the Newtonian data and the non-Newtonian data have more similar values. As it was observed in the lateral section, the 3° and 5° configurations for the third case have the largest \(f_{\text{s}}\). It is observed in Fig. 15 how the slug in the vertical section is small.

Fig. 17
figure 17

Characterization in the vertical section for different well configurations (\(X /D = 538\)). a \({\text{DSL}}\) for toe down-well (1° and 3°) Newtonian and non-Newtonian, b \({\text{DSL}}\) for toe-down well (5°) and one undulation with a sump Newtonian and non-Newtonian, c \(f_{\text{s}}\) for toe-down well (1° and 3°) Newtonian and non-Newtonian and d \(f_{\text{s}}\) for toe-down well (5°) and one undulation with a sump Newtonian and non-Newtonian

3.2.1 Slug flow visualization in the toe-down well configurations

It is interesting to visualize in a more specific way that the hydrodynamics of the slug flow appearance results in the CFD simulations. This visualization is provided by the VOF model that allows having a clear view of the studied hydrodynamics. In Fig. 18, the horizontal slug flow is shown. Figure 18a displays the slug tail that has the bubble in the upper part of the pipe and it can be seen how it is going to penetrate the liquid film [36]. In Fig. 18b, the film is shown, and in Fig. 18c, it can be seen in front of the slug. As it is shown by Taitel and Barnea [36], the expected velocity profile is to be as they show in their study. The velocity of the liquid film should decrease when it approaches the Taylor bubble (Fig. 19).

Fig. 18
figure 18

Horizontal slug flow. a Slug tail, b film zone and c slug front

Fig. 19
figure 19

Velocity profiles in the horizontal slug flow a slug tail, b film zone and c slug front

In Fig. 20, it can be seen the slug flow in the vertical section of the configurations studied. The liquid film thickness, in this case, increases 15% in comparison with the results of Guerrero et al. [33] as it can be observed in Fig. 21. This is the result of the shear-thinning behavior of the non-Newtonian liquid [37]. This behavior shows that the increment in the liquid viscosity elongates the Taylor bubble because the viscous drag increases on the rising bubble. Comparing the Taylor bubble with the Newtonian liquid Taylor bubble, the bubble in the non-Newtonian liquid is still shorter and as the concentration of CMC increases the bubble will be shorter [37]. The velocity profile is expected to be as predicted by Abishek et al. [37] in his study of the dynamics of a Taylor bubble in shear-thinning liquid in a vertical tube. It can be compared with the Newtonian case because the behavior is similar; the significant difference is in the size of the bubble as stated before.

Fig. 20
figure 20

Upward vertical slug flow a slug tail, b film zone and c slug front

Fig. 21
figure 21

Comparison of the film thickness between a gas/non-Newtonian fluid flow and b gas/Newtonian fluid flow [33]

4 Conclusions

The implemented CFD simulations were capable of reproducing the experimental results, both visually and in its fundamental parameters (pressure drop, slug length, and frequency). The CFD model replicated with a good agreement with the experimental results of Picchi [6] resulting in an overall relative error of 24.9% in comparison with the observed experimental data. The visualization of the slug flow in the horizontal pipe is shown, and it has the characteristics reported in the literature [6]. As the model was verified, a study of the effect of the well trajectory on slug flow was conducted. In this study, five different configurations were studied: toe-down well with three different inclination angles (1°, 3°, and 5°), one undulation with a hump well, and one undulation with a sump well. Each of these configurations was compared with the results provided by Guerrero et al. [33] in which they study air/Newtonian two-phase flow. The comparison was made for two crucial parameters: slug frequency and dimensionless slug length (it was compared with three different superficial gas velocities). In the third case (\(v_{\text{SG}} = 0.1\,{\text{m/s}}\)), the slug frequency increased in 57.4% which results in a decrease in the dimensionless slug length of 49.9%. This could be expected due to the inverse relation of the two parameters. In the first case (\(v_{\text{SG}} = 0.5\,{\text{m/s}}\)), the slug frequency decreased 42.5%, creating long slugs that were not captured by the CFD signals. This error could be because the temporal lag is not correctly identified, so the signals cannot be well post-processed. A solution to investigate is the increase in the distance between the signals for a more accurate result. For the second case (\(v_{\text{SG}} = 0.5\,{\text{m/s}}\)), a pattern could not be recognized. For 1° and 5°, the slug frequency increased but for 3° it decreased.

As was mentioned before, one undulation with a hump and one undulation with a sump were modeled. In each case, the toe-down section produced slug flow pattern, and the toe-up section produced segregated flow. It was seen that the toe-down well (1°) has larger slugs (28%) in comparison with the other two configurations. Moreover, it was also analyzed that the one undulation with a hump configuration has larger slugs than the one undulation with a sump (16%) because the first one has more capacity of accumulating liquid than the second one, which is the same reason to expect larger slugs in the toe-down configuration.

Finally, the same configurations were modeled to evince the effect in the two-phase flow on vertical pipes. It was observed that the dimensionless slug length was reduced in 56% with the non-Newtonian liquid phase due to the shear-thinning behavior, in each of the five studied cases. The slug is being formed, but the shear-thinning behavior produces an increase in the viscous drag that can make the Taylor bubble longer but not as long as when it is with Newtonian fluids. Besides, it was identified that the liquid film in the wall of the vertical section increased by 15% in comparison with the Newtonian case. The explanation for this phenomenon is, as mentioned before, the nature of shear-thinning fluids.