0% found this document useful (0 votes)
52 views

Numerical Simulation of Two-Phase Flow in Horizontal Pipe - R1

This document summarizes a study that numerically simulates two-phase oil-water flow in a horizontal pipe using COMSOL Multiphysics and OpenFOAM software. The study aims to analyze flow behavior, determine velocity distribution, volume fractions, and pressure distribution across the pipe for different inlet velocities. Governing equations for the two-fluid model are presented. The methodology describes setting up the 2D pipe geometry in COMSOL and OpenFOAM, and using a two-phase laminar flow model to perform the simulations and analyze results in the form of diagrams and tables. Results show velocity and pressure depend on mesh quality, and different flow patterns at the oil-water interface between the two software simulations.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views

Numerical Simulation of Two-Phase Flow in Horizontal Pipe - R1

This document summarizes a study that numerically simulates two-phase oil-water flow in a horizontal pipe using COMSOL Multiphysics and OpenFOAM software. The study aims to analyze flow behavior, determine velocity distribution, volume fractions, and pressure distribution across the pipe for different inlet velocities. Governing equations for the two-fluid model are presented. The methodology describes setting up the 2D pipe geometry in COMSOL and OpenFOAM, and using a two-phase laminar flow model to perform the simulations and analyze results in the form of diagrams and tables. Results show velocity and pressure depend on mesh quality, and different flow patterns at the oil-water interface between the two software simulations.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 18

Numerical Simulation of Two-Phase Flow in Horizontal Pipe

using COMSOL Multiphysics and OpenFOAM

Md. Jobayer Mia1*, Md. Syful Isalm Bipul2, Md. Erfanul Haque Al Nahian3, Saiful Ahmad4,
Ahammad Abdullah5

1,2,3,4
Department of Naval Architecture and Offshore Engineering (NAOE), Bangabandhu
Sheikh Mujibur Rahman Maritime University, Bangladesh  

5
Department of Ocean and Mechanical Engineering (OME), Florida Atlantic University,
USA

*Email: [email protected]

Abstract

Oil and water are frequently generated and transported together in the petroleum sector. An
understanding of flow mixing (oil-water) in pipes and ducts is a fundamental requisite for the
design and optimization of fluid–flow systems in petroleum industries. The purpose of this
study is to analyze the behavior of the simultaneous flow of oil and water in horizontal pipes.
Computational investigations have been carried out using COMSOL Multiphysics and
OpenFOAM software. For the simulations of oil-water stratified flow, two-phase laminar
flow model is adopted. This paper presents the velocity distribution of the pipe, and volume
fractions and also shows the pressure distribution across the pipe for different inlet velocities.
The numerical results are presented in the form of diagrams and tables. The results indicate
that velocity and pressure depend heavily on the quality of the mesh adopted. Moreover, flow
in phase interface is found different in COMSOL Multiphysics and OpenFOAM simulations.

Keywords: Two-phase flow, Oil-water, Numerical solution, CFD Simulation, COMSOL


Multiphysics, OpenFOAM.
1. Introduction

Two-phase flow in pipes is prevalent in many industries, including the oil and
chemical industries. The flow of two immiscible liquids in pipes is a challenging task with
many practical applications. Production of oil and gas is necessary to maintain human
civilization. In 2021, an average of 89.9 million barrels per day of oil were produced
globally (Statista, n.d.). Since 1996, offshore oil and gas production on the Norwegian
continental shelf has produced around 3 million barrels of crude oil per day. In offshore
installations, where the oil is transported by pipes to the processing facility, crude oil
transportation is crucial. Oil and water flow, or immiscible liquid-liquid two-phase flow,
occurs concurrently in the transfer of liquid fuels since they are often produced at the same
time. Understanding two-phase flow has led to classifications of two-phase flow based on the
flow patterns. The flow patterns vary based on the dimensions of the pipe and the flow rates
for the individual phases. There are several flow configurations, also known as flow patterns
or flow regimes, that can occur depending on the mixing velocity and water content as shown
in Figure 1.

Figure 1: Two-phase flow patterns (Waihenya, n.d.)

In general, the pressure loss in multiphase horizontal flow is higher than in similar
single-phase conditions. Oil transport from the reservoir to the processing unit will be
impacted by the presence of water in the pipe because when two immiscible fluids flow
together in a pipe, the mixture behaves differently from a single-phase flow. The amount of
input power used to pump a mixture can change when transporting mixes with varied flow
patterns. Although oil and water mixing in pipes are common phenomena in the
transportation of oil and gas in offshore industries. But very less attention has been given to
the analysis of the oil-water mixture as compared to the gas-water mixture flow analysis. The
objectives of the current study are: - to determine the characteristics of two-phase flow
through a horizontal pipe, - to find the velocity distribution, - to find the concentration of
flow and - to show the pressure distribution across the pipe.

2. Literature Review

Analysis of immiscible liquid-liquid two-phase flow in pipes had been a focus of


significant research for many years due to its fundamental importance as well diverse
practical applications, particularly in the petroleum and chemical industries. Yusuf et al.
(2012) investigated the association of pressure drop per unit length for horizontal oil-water
separated flow (stratified and dual continuous flows). Based on Angeli and Hewitt's (1998)
experimental investigation, the findings were reported by the authors, and the results closely
matched with the experimental results. The reduction of pressure gradients in oil pipelines
with the addition of water was observed by Charles and Redberger (1962). For various oils,
they measured a maximum reduction of pressure between 12 and 31%.

Rashid and Kabir (1990) and Sööt and Knudsen (1973) investigated vertical flows
with or without a slight inclination angle. In reality, the flow of (gas), (oil), and (water) in
transportation pipelines and wells frequently has an inclination angle other than 0 or 90
degrees. The results were therefore applied to enhance two-phase flow in inclined pipelines.

Experimental data on flow patterns, pressure gradients, and phase inversion in


horizontal oil-water flow were provided by Yusuf et al. (2012) along with in-depth
comments. The effect of oil viscosity on flow structure was evaluated by the authors by
contrasting the findings of Raj et al. (2005) and Angeli and Hewitt (2000). The comparison
revealed several important findings. For example, the water velocity required to initiate the
transition to non-stratified flow at low oil velocities increased as the oil viscosity increased
while it decreased at higher oil velocities. However, according to Russell et al. (1959),
Charles et al. (1961), and Arirachakaran et al. (1989) studies, the viscosity effect appears to
have little to no impact on the flow patterns for oil/water flows. Due to the complexities in
measurements of pressure drop and liquid hold-up at high phase fractions and velocities
(Madhavan, 2005), dispersed liquid-liquid flows had not been studied in detail. Based on
visual observations in horizontal pipes, Dukler and Hubbard (1975) and Nicholson et al.
(1978) described the primary characteristics of slug flow. Petalas (1998) developed an
empirical model for liquid hold-up and pressure drop that took surface roughness and liquid
entrainment into account. This has been found to be the best mechanistic model to date for
such predictions.
The stratified pipe flows had been simulated using computational fluid dynamics
(CFD) techniques. One of the earliest CFD models of turbulent stratified flow in a horizontal
pipe was simulated numerically by Shoham and Taitel (1984). A variety of multiphase
models were used to study stratified oil-water two-phase pipe flow by researchers with
different CFD simulation software. Awal et al. (2005) developed a CFD modeling tool to
examine the properties of inline oil and water separation under downhole circumstances.

OpenFOAM is a free C++ library including solvers and other tools primarily designed
for use in CFD applications. InterFoam, a transient solver for two incompressible, isothermal,
and immiscible fluids employing an interface capturing technique based on a modified
Volume of Fluid (VOF) approach that can manage two-phase flow in OpenFOAM was first
proposed by Hirt and Nichols (1981). Deshpande et al. (2012) summarized the interFoam
validation work that had already been done and included additional validation for pure
advection, high Weber number flows, and surface tension-dominated flows.

3. Methodology

In this study, COMSOL Multiphysics version 5.5 and OpenFOAM version 10 are
used to simulate the two-phase (oil-water) flows numerically. For these simulations, two-
phase laminar flow model is considered. Numerical simulation of the model has been
performed by following the steps shown in Figure 2.
Figure 2: Steps of two-phase flow simulation.

3.1 Governing Equations

Several mathematical models have been proposed to simulate multiphase flow, of


which the two-fluid model is the most accurate. The governing equations used in this study
are identical to those used in the Wang et al. study (2008).

According to the mass conservation law, the continuity equation is:

Governing Equation:


( α ρ ) + ∇ . ( α k ρ k u k ) =0
∂t k k

Where,

The conservation equation for the momentum can be expressed by


In case the particle diameter is relatively large, the following lift force must be taken into
account:

Due to the acceleration of the secondary phase to the primary phase, a virtual mass force on
the particles should also be considered, defined by:

1
F vm = α k ρk
2 (
d ul d u k
dt

dt )
l

The exchange coefficient Kkl for oil / water two-phase flow can be written in the following
general form:

herein, is the particulate relaxation time and f the drag function, defined as:

ρk|uk −u l| d k
ℜ¿
μk

3.2 Numerical modeling

The geometry modeling for this study is done using two prominent commercial CFD
software; COMSOL Multiphysics and OpenFOAM. The simulation is performed with a 2D
geometry of a horizontal pipe to avoid complexity. In case of COMSOL, geometry of the
model is generated with its default geometry module. For OpenFOAM simulation the
geometry is modeled with blockMesh.

Parameter Dimension
Length 300 mm
Breadth 20 mm
Water Inlet 10 mm
Oil Inlet 10 mm
Outlet 20 mm
Table 1: Dimension of the horizontal pipe geometry.

The modeled geometry of the horizontal pipe is illustrated in Figure 3. From the figure, it is
seen that the geometry has two even inlets each having a diameter of 10 millimeters for the
two fluids (oil and water) to enter the pipe separately. Then after having a phase interface

inside the pipe, both fluid flows out of the geometry through a common outlet of a diameter
of 20 millimeters.

Figure 3: Geometry of the 2D Pipe used in the simulation.

Oil and water are chosen as flowing fluids for this study. The fluid properties are shown in
Table 2.

Table 2: Properties of flowing fluids.

Property (at 20℃) Water Engine Oil (SAE 30)


Density (kg/m3) 998.2 881.5
Dynamic viscosity (Pa.s) 0.001003 0.23939
Interfacial tension(N/m) 0.15 0.15

3.3 Mesh Generation


Meshing is a phenomenon in which the entire geometry is divided into smaller
elements to obtain correct results. To obtain an accurate CFD result, good and accurate
meshing is required (Mia et al., 2022). Meshing In COMSOL Multiphysics is done using the
default mesh module and in OpenFoam blockMesh is used for meshing. Mesh is mapped
consisting of structured rectangular cells. The size of the cells is also kept similar to have an
actual comparison between the simulation results obtained from the two software.

Figure 4: Mesh of the 2D Pipe used in OpenFoam simulation.

In OpenFoam, the mesh has 360 cells along its length and 24 cells along its breadth
each having an edge of 0.833 millimeters. This gives an even structured mesh of rectangular
cells as shown in Figure.

Figure 5: Mesh of the 2D Pipe used in COMSOL Multiphysics simulation.

In COMSOL, the mesh has been kept similar to the mesh in OpenFoam. It has the
same structured rectangular mesh with a cell size of 0.833 millimeters. This similarity in the
mesh has kept the two simulations comparable with each other.

3.4 Boundary Conditions

The boundary condition is the condition that a quantity that varies throughout a given
space or enclosure must fulfill at every point on the boundary of that space especially when
the velocity of a fluid at any point on the wall of a rigid conduit is necessarily parallel to the
wall. Boundary conditions for this study are shown in Table 3.

Table 3: Boundary conditions for the simulation.

Boundaries OpenFoam COMSOL Multiphysics


Inlet (water, oil) fixedValue Velocity
Outlet inletOutlet Pressure
Wall (lowerWall, topWall) noSlip noSlip

The boundary condition for the outlet is set to ‘inletOutlet’ for OpenFoam which is
similar to the ‘pressure’ boundary condition in COMSOL Multiphysics. This condition
suppresses backflow in the pipe.

3.5 Solver Setup

The solution of this study is carried out using Two-Phase Flow Physics Interface of
COMSOL Multiphysics. In OpenFOAM the solution is performed using interFoam solver of
OpenFOAM. According to Almeland (2019) “interFoam is a two-phase solver for
incompressible, isothermal. and immiscible fluids, using the volume of fluid concept to
capture the interface. It solves a single set of mass- and momentum equations.” The solver
setting for the analysis is shown in Table 4.

Table 4: Solver setup for two-phase flow simulation.

Items OpenFoam COMSOL Multiphysics


Solver interFoam Transient with Initialization
Time Time Dependent Time Dependent
Gravity 9.81 m/s2 9.81 m/s2
Modeling Multiphase (VOF) Two-Phase flow, Phase field
Turbulence model Laminar Laminar
Viscosity model Newtonian Newtonian
Material type Water, Oil Water, Oil
Volume Fraction at 50%-50% Water-oil 50%-50% Water-oil
initialization

4. Results and Discussion

The analysis is done with the results obtained at the 10 th second for four different
velocities; 0.025m/s, 0.05m/s, 0.075m/s, and 0.1m/s. Observing the velocity contour
diagrams illustrated in Figure 6, it can be said that the velocity at the end of the pipe increases
for every inlet velocity. As there is gravitational acceleration, the velocity of the fluid gets a
boost while getting out of the pipe. This creates a high intensity of velocity at the lower
corner of the pipe just before passing the outlet. This statement is true for both CFD software.

In the case of OpenFoam, the highest velocities at that position are 0.24m/s, 0.38m/s,
0.40m/s, and 0.45m/s respectively for inlet velocities of 0.025m/s, 0.050m/s, 0.075m/s, and
0.1m/s. Similarly, the velocities at that position obtained from COMSOL Multiphysics are
0.25m/s, 0.37m/s, 0.42m/s, and 0.45m/s respectively for the same inlet velocities.

(a)

(b)

Figure 6: Velocity contour diagrams for different velocities (a) in COMSOL Multiphysics
and (b) in OpenFOAM.

From the volume fraction contour, it is clear that the flow at the phase interface is not
same for OpenFoam as in COMSOL Multiphysics. The initial volume fraction is set to 50%-
50% water-oil condition. But as the two immiscible and incompressible fluid interacts with
each other, the volume fraction gets changed over time at different position of the pipe. As
water has more density than oil and there is a gravitational force downward, the volume
fraction of water gets intense (100%-0% water-oil) to the lower part of the pipe and the oil
flows above the surface of the water. Though the initial conditions are same for both
software, the phases flow differently. In OpenFoam, the flow is a bit more turbulent than the
flow shown in COMSOL Multiphysics (Figure 7). COMSOL Multiphysics gives a smoother
flow. Even, there is a rise in the flow of water just some distance before the outlet.

(a)

(b)

Figure 7: Volume fractions contour diagrams for different velocities (a) in COMSOL
Multiphysics and (b) in OpenFOAM.
Pressure contour diagrams depict the internal pressure of the pipe. The pressure is
higher at the bottom of the pipe closer to the inlet as there is a higher volume fraction value
and higher density fluid is present there. Besides, gravity works as one of the main effects of
this increase in pressure.

For OpenFoam, the peak pressures at those regions are 70 Pa, 93 Pa, 110 Pa, and 120
Pa respectively for inlet velocities of 0.025m/s, 0.050m/s, 0.075m/s, and 0.1m/s. Again, the
obtained pressures from COMSOL Multiphysics at those positions are 62.9 Pa, 92.1 Pa, 121
Pa, 150 Pa respectively for the same inlet velocities.

(a)

(b)

Figure 8: Pressure contour diagrams for different velocities (a) in COMSOL Multiphysics
and (b) in OpenFOAM.
A comparative analysis of the results derived from the simulations done with the two
CFD software (OpenFoam and COMSOL Multiphysics) can be easily observed through
different graphs plotted with the data retrieved from both software.

Figure 9: Inlet velocity vs. Peak Pressure Figure 10: Inlet velocity vs. Peak velocity

Figure 9 and Figure 10 represents variation respectively in peak pressure and velocity
inside the pipe for different inlet velocity (v). Though the initial conditions are set similarly
for both software, there are visible changes in the results. The variation in pressure is surely
high, yet the inside velocities of the pipe are pretty similar for the two simulation interfaces.

Figure 11: Cut line for the arc length of the pipe.

This study is
Graphs
of arc
length
(Figure 11) along the outlet vs. pressure and velocity for different inlet velocity (v) is plotted
(Figure 12) to complete the analysis.

For, v = 0.025m/s For, v = 0.050m/s

For, v = 0.075m/s For, v = 0.1m/s

Figure 12: Comparison of arc length vs pressure at the outlet for different velocities.

For, v =
0.025m/s For, v = 0.050m/s
For, v =
0.025m/s For, v = 0.050m/s

Figure 13: Comparison of arc length vs velocity at the outlet for different velocities.

As it is discussed before that the variation in pressure inside the pipe is pretty high,
from Figures 12 and 13 it is visible that this variation is also true at the outlet. On the other
hand, the velocity graphs are pretty similar for OpenFoam and Comsol Multiphysics though
there is a slight change in the values. This is true regardless of the inlet velocity.

During this study, another thing is noticed that the pressure inside the pipe is greatly affected
by the mesh quality. As the mesh density is increased, the variation of pressure also increases
significantly although the velocities inside the pipe don’t change that much regardless of the
variation in mesh quality. This phenomenon can be observed with the help of two graphs
plotted as cell size in the mesh vs peak pressure magnitude inside the pipe (see Figure 14).

For, v =
0.025m/s For, v = 0.050m/s
Figure 14: Cell size vs Peak Pressure Graphs for two different inlet velocity

Although no major experimental observation is done in this study regarding the effect of
mesh quality on the simulation, it is clear with the data (figure 14) that there is a significant
influence of mesh quality on the desired result obtained with both of the CFD software used
in this case. So, it is a matter of a new study and more experiments need to be done to reach
in a conclusion regarding this corollary.

Conclusions

Oil–water two-phase laminar flow in a horizontal pipe is numerically simulated using


laminar two-phase flow model. A comparative analysis on the results derived from the
simulations is shown in this study. The key findings of this study are summarized as follows:

1) It is seen that as velocity increases, the pressure gradient also increases.

2) Predictions of pressure loss and slip ratio showed acceptable agreement in both
simulations.

3) The prediction of velocity field is quite satisfactory in both simulations.

4) The pressure is higher at the bottom of the pipe closer to the inlet.

5) Flow at the phase interface is not same for OpenFoam as in COMSOL Multiphysics.

6) It is found that the pressure inside the pipe is greatly affected by the mesh quality.

References

Almeland, S. K. 2018. “Implementation of an air-entrainment model in


interFoam.” Proceedings of CFD with OpenSource Software, Edited by Nilsson. H.

Arirachakaran S., Oglesby K.D., Malinowsky M.S., Shoham O., Brill J.P. 1989. “An
Analysis of Oil/Water Flow Phenomena in Horizontal Pipes”. SPE Paper 18836, SPE
Production Operations Symposium, pp. 155-167, Oklahoma.
Angeli, P., Hewitt, G.F., 1998. “Pressure gradient in horizontal liquid–liquid flows.” Int J.of
Multiphase Flow 24(7), 1183–1203.

Angeli, P., Hewitt, G.F. 2000. “Flow structure in horizontal oil–water flow.” International
Journal of Multiphase Flow 26 (7), 1117–1140.

Awal, Mohammad R., Zughbi, Habib D., Razzak, Shaikh A., Al-Majed, Abdulaziz A., and
Al-Yousef, hasan Y. 2005 “Liquids phase holdup and separation characteristics as a
function of well inclination and flowrate”, SPE SA.

Charles M.E., Govier G.W., Hodgson G.W. 1961. “The Horizontal Pipeline Flow of Equal
Density Oil-Water Mixtures”. The Canadian Journal of Chemical Engineering.

Charles M.E., Redberger P.J. 1962. “The Reduction of Pressure Gradients in Oil Pipelines by
the Addition of Water: Numerical Analysis of Stratified Flow.” The Canadian
Journal of Chemical Engineering.

Deshpande S S, Anumolu L, and Trujillo M F. 2012. “Evaluating the performance of the two-
phase flow solver interfoam”. Comp. Sci. & Dis. 5 pp 1-36

Dukler, A. E. and Hubbard, M. G. 1975. “A model for gas-liquid slug flow in horizontal and
near horizontal tubes.” lnd. Engng Chem. Fundam. 14, 337-347.

Hirt C W and Nichols B D. 1981. “Volume of fluid (vof) method for the dynamics of free
boundaries”. J. Comp. Phy. 39 pp 201-25.

Madhavan, S., 2005. “CFD Simulations of Immiscible Liquid Dispersions.” M.Sc Thesis,
Dalhousie University, Canada.

Mia, M., J., Islam, M., Kabir, A., & Islam, M. 2022. “Numerical Analysis of tubular XT Joint
of jacket type offshore structures under static loading.”  Bangladesh Maritime
Journal (BMJ) Volume, 6, 2520-1840. 

Nicholson, M. K., Aziz K. and Gregory, G. Ai. 1978. “Intermittent two-phasepow in


horizontal pipes: predictive models.” Can. J. chew. Engng 56, 653-663.

O. Shoham, Y. Taitel. 1984. “Stratified turbulent–turbulent gas–liquid flow in horizontal and


inclined pipes”. AIChE J. 30 (2).

Petalas, N., & Aziz, K. 1998 . “A Mechanistic Model for Multiphase Flow in Pipes”.
Petroleum Society of Canada.
Rashid Hasan A., Shah Kabir C. 1990. “A New Model for Two-Phase Oil/Water Flow:
Production Log Interpretation and Tubular Calculations”. SPE Production
Engineering.

Raj, T.S., Chakrabarti, D.P., Das, G. 2005. “Liquid–liquid stratified flow through horizontal
conduit.” Chemical Engineering and Technology 28, 899–907.

Russell T.W.F., Hodgson G.W., Govier G.W. 1959. “Horizontal Pipeline Flow of Mixtures of
Oil and Water”. The Canadian Journal of Chemical Engineering, February.

Statista, n.d. “Global Oil Production 2021”. Retrieved from


https://www.statista.com/statistics/265203/global-oil-production-since-in-barrels-per-
day/.

Sööt P.M., Knudsen J.G. 1973. “Two-Phase Liquid-Liquid Flow in Pipes”. AlChE
Symposium Series, Vol. 68, No.118, pp. 38-44.

Wang, Li-yang, Ying-xiang Wu, Zhi-chu Zheng, Jun Guo, Jun Zhang, and Chi Tang. 2008.
"Oil-water two-phase flow inside T-junction." Journal of Hydrodynamics 20, no. 2:
147-153.

Yusuf N., Al-Wahaibi Y., Al-Wahaibi T., Al-Ajmi, A.S. Olawale, I.A. Mohammed. 2012.
“Effect of oil viscosity on the flow structure and pressure gradient in horizontal oil–
water flow.” Chemical Engineering Research and design

You might also like