PeTra: A Novel Computer Code for Simulation of Slug Flow
Authors: Larsen M. , Hustvedt E. , Hedne P. , Straume T. 
Published: December 2007

Abstract
This paper presents a new transient code, PeTra (Petroleum Transport), specially designed for tracking slugs and pigs in multiphase pipelines. PeTra is a one dimensional three-phase flow model using separate mas and momentum equations for gas, oil and water. A staggered mesh and a first order Eulerian implicit time integration method are applied. The PeTra code has been developed in C++ using object-oriented methods. A major feature in PeTra is an adaptive and moving grid together with a fully integrated slug/pig tracking model. The slug tracking model enables tracking of slug fronts and tails without numerical diffusion and provides direct information about slug lengths. The use of a moving grid improves and simplifies the modelling and numerical tracking of liquid slugs. The slug tracking model controls the grid movement and also adjusts the grid to be optimal at all times, based on a user given coarse initial grid.
This paper discusses the applied techniques in this novel code and compares its slug tracking capabilities with experimental data and field data.

Introduction
Slug flow is a common flow pattern in hilly terrain multiphase pipelines. It is an unsteady flow regime and may cause large variations in liquid holdup and pressure drop in the pipeline. Large slugs or slug trains leaving the pipeline can lead to severe disturbances in the downstream process facilities. To ensure optimum design and operation of the pipeline and the process equipment the size and frequency of these slugs must be predicted.
Most general purpose transient multiphase design codes use an Eulerian formulation on a fixed grid and treat slug flow in an averaged manner, e.g. OLGA, PLAC, TACITE. This method is adequate for general liquid holdup and pressure drop prediction in pipelines, but improvements can be made for large slugs travelling long distances as these are prone to numerical diffusion. Another weakness of such general multiphase model is difficulties of implementing physical relations for the behaviour of the gas-liquid fronts, propagation velocity of bubbles and gas mixing into a liquid front
In a Lagrangian slug flow model, numerical diffusion can be avoided and relations for front and bubble velocities together with gas entrainment relations can be implemented directly.
In a dynamic Lagrangian model for two phase slug flow in pipelines is presented. Here slugs and bubbles are tracked individually. The slugs are assumed free of gas and relations for the behaviour of the borders, either bubble nose or liquid front, are implemented. The liquid velocity in the slugs is determined from a force balance over each slug with moving boundaries while the liquid volume fraction and velocity under the bubble is determined using a liquid mass balance and a force balance. The model has been implemented in C++ using object-oriented techniques. Dynamic memory allocation and linked lists have been used. This simplifies the bookkeeping when tracking the slug and bubble as slugs may be initiated or removed dynamically during the simulation. Another Lagrangian two phase slug model is presented in [8]. This is a model capable of tracking a slug train past a pipe bend. The model can track each individual slug and bubble and new slugs can be created at bends with a sink/source procedure in the mass equations. Relations for the bubble and slug front velocity are implemented, but the model suffers from several limitations. Constant mixture volumetric flux is assumed at all pipe locations and the velocity of the liquid layer under the bubble is given a constant absolute value, depending on the pipe inclination.
The OLGA code contains a slug tracking option that superimposes a Lagrangian front tracking model on the Eulerian scheme.
P. 965^