You are on page 1of 101

INTRODUCTION TO PIPEPHASE

Introduction to PIPEPHASE Workbook

The software described in this document is furnished under a license agreement and may be used only in accordance with the terms of that agreement. Information in this document is subject to change without notice. Simulation Sciences Inc. assumes no liability for any damage to any hardware or software component or any loss of data that may occur as a result of the use of the information contained in this document. Copyright 2001 Simulation Sciences Inc. All Rights Reserved. No part of this publication may be copied and/or distributed without the express written permission of Simulation Sciences Inc., 601 Valencia Ave., Brea, CA 92823-6346. PIPEPHASE, NETOPT,TACITE, and SIMSCI are registered marks and/or trademarks of Simulation Sciences Inc. Windows, Excel, and MS-DOS are registered marks and/or trademarks of Microsoft Corporation. All other products are trademarks or registered marks of their respective companies. Printed in the United States of America, July 2001.

Copyright Notice

Trademarks

Contents
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Exploring the PIPEPHASE Desktop . . . . . . . . . . . . . . . . . 5 Defining the Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Setting the Input Units of Measure . . . . . . . . . . . . . . . . . . 22 Entering Thermodynamic or PVT Data . . . . . . . . . . . . . . 24 Specifying the Global Defaults. . . . . . . . . . . . . . . . . . . . . 31 Building the Flowsheet . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Entering Source and Sink Data. . . . . . . . . . . . . . . . . . . . . 36 Defining Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Setting up a Case Study . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Working with Keyword Input Files. . . . . . . . . . . . . . . . . . 53 Running the Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . 54 Viewing the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 Fluid Flow Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 Applying PIPEPHASE to Downhole Operations . . . . . . . 87 Executing a Sensitivity (or Nodal) Analysis. . . . . . . . . . . 98 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105

Introduction to PIPEPHASE

Introduction
PIPEPHASE is a steady-state multiphase fluid flow network simulator used for the rigorous modeling of oil and gas gathering and transportation systems. PIPEPHASE provides integrated solutions to network problems. It can perform distinct analyses of individual nodes separately and it is also able to incorporate the parameters of interrelated nodes into the total solution. The applications of PIPEPHASE range from the sensitivity analysis of key parameters in a single well, to a multi-year facilities planning study for an entire field. This program also combines an efficient multiphase network solution algorithm with modern oil and gas production analysis techniques to create a unique field design and planning tool. This is coupled with an extensive physical property databank, and integrated with an intuitive Windows-based user interface.

Calculation Engine

PIPEPHASE technology includes:


s

Comprehensive physical properties databank and thermodynamic capabilities Fluid types, such as, blackoil, compositional, liquid, gas, steam, and multiphase mixtures of gas and liquid Link devices: pipes, tubing, compressors, pumps, separators, IPRs Well analysis with inflow performance Gas lift analysis Pipeline sphering Sensitivity (nodal) analysis

s s s s s

PIPEPHASE also comes with two add-on modules, NETOPT and TACITE, which can be installed at the same time as PIPEPHASE provided you have obtained the appropriate security. Contact your sales representative for more information. NETOPT NETOPT provides you with optimization capabilities that allows you to optimize network performance by defining specific operating objectives while satisfying both physical and user-imposed constraints. For example, you can use NETOPT to maximize the oil production from a system of wells operating under injection-limited gaslift, or minimize capital costs for a new pipeline system.

Introduction to PIPEPHASE

TACITE The TACITE code, developed by IFP, Elf Aquitaine and TOTAL, is a compositional transient multiphase flow simulation tool, for the design and control of oil and gas production pipelines and wells. The program simulates the transient behavior of a fluid flowing through a single-link flow system. The source flowrate and sink pressure are specified as timedependent boundary conditions.

Graphical User Interface

PIPEPHASE GUI features include:


s s s s s

A true 32-bit Windows-based application Interactive data entry and execution Generate graphs, tables, and charts; view in Microsoft Excel On-line help with hypertext jumps And many more.

This comprehensive range of features enables your company to use one simulator for all phases of business.

PIPEPHASE Engine/GUI Relationship

PIPEPHASE was originally designed with an easy-to-use keyword version, where input information was entered through a text editor. The currently enhanced Graphical User Interface (GUI), however, provides a more user-friendly and interactive environment for data input and flowsheet construction. Although familiarity with the keyword structure can be useful in executing and troubleshooting simulations, this class will focus solely on the GUI for several reasons. The GUI prompts you for the necessary input data, making it easier for you to see what is missing from a particular simulation. Furthermore, the GUI provides a visual description of the process, giving you a better feel for the simulation.
PIPEPHASE PIPEPHASE Calculation Calculation Module Module

Figure 1: PIPEPHASE Components

PIPEPHASE PIPEPHASE Graphical GraphicalUser User Interface Interface

PIPEPHASE PIPEPHASE Database Database

PFE PFEText Text Editor Editor

PIPEPHASE PIPEPHASE Keyword KeywordFile File

PIPEPHASE PIPEPHASE RAS RAS

PIPEPHASE PIPEPHASE Report ReportFile File

Introduction

Where to Find Additional Help


Documents
User manuals are shipped with your copy of PIPEPHASE. A complete set of documents is provided on the CD in the form of .PDF files that are most conveniently viewed using Adobe Acrobat Reader, supplied on the installation CD. If you required additional manuals, contact your sales representative.

Online Help

PIPEPHASE comes with online Help, a comprehensive online reference tool that accesses information quickly. In Help, commands, features, and data fields are explained in easy steps. Answers are available instantly, online, while you work. You can access the electronic contents for Help by selecting Help/Contents from the menu bar.

Technical Support

PIPEPHASE is backed by the full resources of Simulation Sciences Inc. (SIMSCI), a leader in the process simulation business since 1966. SIMSCI provides the most thorough service capabilities and advanced process modeling technologies available to the process industries. SIMSCI's comprehensive support around the world, allied with its training seminars for every user level, is aimed solely at making your use of PIPEPHASE the most efficient and effective that it can be. SIMSCI offers technical support for PIPEPHASE for all questions sent by fax, E-mail or regular mail. In North America, call our hotline support at 1-800-SIMSCI1. When contacting Technical Support, please include the following in your correspondence:
s s s

Name and company, phone and fax numbers Product version number Problem description, including any error messages that you received and the steps necessary to duplicate the problem If you are e-mailing your problem, please include an electronic copy of the .INP or .PP0 and .PP1 files. When calling in a request, please have this workbook available and be near your computer to be able to walk through any difficulties.

Introduction to PIPEPHASE

About This Workbook


This workbook complements SIMSCI's Introduction to PIPEPHASE training course. Since much of the course time is dedicated to hands-on examples, you will not necessarily go through the document page by page. The workbook does, however, follow the course sequence and you may want to jot notes in the margin. We strongly recommend that you read this workbook from cover to cover once and then use it to refresh your memory later on.

Conventions

Before you begin this workbook, you should be aware of several conventions. These include:
s

Italicized text denotes menu items, dialog box names and fields, and lists. For example, File, Save As..., the Source Data dialog box, and Composition Defined. Buttons within dialog boxes are represented as gray-filled boxes with white overlaid text, such as OK , Status , and . Add -> ... Ellipses indicate items that, when selected, bring up a windo or dialog box, for example, Modify... and Enter Data... . Text in < > brackets indicates keyboard strokes. The , icon indicates a cautionary note or a useful tip.

s s

SIMSCI has made great efforts to ensure that PIPEPHASE is compliant with Microsoft Windows. As a result, much of what follows will be very familiar to experienced Windows users.
s

Click, Highlight or Select: Place the pointer on the item and press the left mouse button. Double-click: Same as click except you press the left mouse button twice with only a very short pause between clicks. Open: To open a dialog box or object, place the pointer on the object and click or double-click the mouse. Drag: Move the mouse while holding the left button down

,
4

Note:

Remember to save your work often!

Introduction

Exploring the PIPEPHASE Desktop


The visual engineering of PIPEPHASE makes building a simulation easy. Functional colors, menu-graphics and picture icons guide you every step of the way. On-line references refresh your memory on equations and guidelines. And if you encounter trouble, Help is available when you need it.

Launching PIPEPHASE

To initiate a PIPEPHASE session:


Click Start on the taskbar, select Programs and then SIMSCI. Click on PIPEPHASE. Click OK , then choose File from the menu bar.

The File menu is described below.


Table 1: File Menu Options
Option New Open Import Keyword File Close Save/Save As Copy Simulation Delete Simulation Run Remote Settings View Output File View Keyword File Print Exit Function Initialize a new simulation Open an existing simulation Load a keyword input file into PIPEPHASE Close the active simulation Save the active simulation to a file with the same name, or to a new file Create a new simulation as a copy of an existing one Delete an existing simulation Run the simulation Run PIPEPHASE calculations from a UNIX machine View the output file in the Programmers File Editor View the input file in the Programmers File Editor Print the flowsheet drawing or output report Close the active simulation and exit the program

Main Window

The PIPEPHASE main window, shown in Figure 2, is your primary workspace. This window forms the interface between you and the PIPEPHASE program. This is where you will build and run all your simulations, as well as open files, save the current data, or exit the program. You will use all the familiar Windows features such as toolbar buttons, menus, dialog boxes, and drop-down lists.

Introduction to PIPEPHASE

Figure 2: PIPEPHASE Main Window

Table 2: PIPEPHASE Main Window Components


Component Title Bar Menu Bar Toolbar Description The window title contains the name of the current simulation and view. All functionality can be accessed through the menus. Shortcut buttons for many commonly used PIPEPHASE operations are provided. These include data entry window buttons and viewing buttons. The vertical and horizontal scroll bars enable you to move vertically and horizontally through a window. The bar below the toolbar that gives quick help on the highlighted button. The standard Windows control-menu in the top left corner can be used to move, resize or close the application window

Primary Workspace This is where you draw your flowsheet. Scroll Bars Status Bar Control-menu Box

Menu Bar

Directly below the title bar of the main PIPEPHASE window you will find the main menu bar. It gives you easy access to the command menus.

Table 3: PIPEPHASE Menu Bar


Menu File Edit View General Special Features Help Main Functions File operations: open, close save, import, etc. Manipulate links and nodes on the flowsheet Specify what appears on the main window Add input data - all data can be entered from this menu Enter case study and time-stepping data; access to a number of performance curves and program databases Access the on-line help functions

Exploring the PIPEPHASE Desktop

Many of same commands are available through the buttons on the toolbar.

Toolbar

The toolbar appears just below the menu bar on the main PIPEPHASE window. Using the mouse, you can initiate many actions by clicking the buttons on the toolbar.

Table 4: PIPEPHASE Toolbar Buttons


Button Description Create a new simulation Open an existing simulation Import a keyword input file Save the active simulation Run the simulation and review the results View the output file Print the output file or flowsheet Add a source to the flowsheet Add a sink to the flowsheet Add a junction to the flowsheet Add a calculator to the flowsheet Button Description Define hydrates Select units of measurement Select the components Select thermodynamic method or enter PVT data Set the calculation method Enter the global defaults Define network optimization data Zoom in on a selected area Zoom out Display the entire flowsheet in the main window Refresh the flowsheet drawing

Data Entry Windows

PIPEPHASE provides dialog boxes that allow you to enter data in a logical manner. Throughout this workbook, you will see examples of data entry windows. Within these dialog boxes, there are many different types of data entry devices including check boxes, radio buttons, drop-down lists, and buttons.
Table 5: Data Entry Window Buttons
Button Description All data are saved and the dialog box is closed. All data entered or modified are lost when the dialog box closes. Displays the online help for the dialog box.

OK Cancel Help Introduction to PIPEPHASE

Color Cues

PIPEPHASE uses color cues to inform you of the status of your simulation. The significance of the colors you will encounter while working with PIPEPHASE are summarized below.
Table 6: Color Significance During Data Entry
Color Red Blue Green Gray Significance Required data is missing All necessary data has been entered An item is selected Data field is not available to you

Editing and Viewing the Flowsheet

You can use the options on the Edit menu to modify the placement of objects on your flowsheet diagram.
Table 7: Edit Menu Options
Option Copy Node... Copy Link... Edit Node... Edit Link... Move Node... Draw... Function Copy an existing node to a new node at coordinates X, Y Copy an existing link to a new link Sort, edit, delete, and copy existing nodes or add a new node to the flowsheet Sort, edit, delete, copy, or change the flow direction of existing links Move the highlighted node around the flowsheet using the arrow keys Add text, a line, a rectangle, or an oval to the flowsheet.

You can use the options on the View menu to modify the data displayed on your flowsheet diagram.
Table 8: View Menu Options
Option View Output Node Labels Link Labels Show Pressures Show Temperatures Show Rates Ribbon Bar When the option has a checkmark beside it: View node results or link plots; you cannot make data entries or edits in this mode Node labels are shown on the PFD; for example, S001, D002 Link names are shown on the PFD, for example, L001, L002 Defined pressures (not estimates) are displayed on the PFD Supplied temperatures for each source are displayed on the PFD Defined flowrates (not estimates) are displayed on the PFD Toolbar is visible below the menu bar

Exploring the PIPEPHASE Desktop

Link Device Data Window


Figure 3: Link Device Window

The Link Device Data window, shown in Figure 3, is the workspace into which you add and define your link data for each link on the main window. To open this window, double-click on any link on the flowsheet.

This window is broken up into four sections. Starting from the top lefthand-side, these include:
s

Access buttonsenter and exit link device view, and open online

help.
s s

Edit link functionsedit, delete, reverse, copy and paste functions. Calculation dataenter link data, nodal analysis data, line sizing data,

or TACITE transient data.


s

Devices paletteuse this toolbar to add devices to the active link; the

description for each unit is provided in the status line above the toolbar, for example, Pipe.

Introduction to PIPEPHASE

Defining the Simulation


This chapter describes the objectives, applications, and capabilities of PIPEPHASE. It introduces the concepts involved in pipeline, well, and network analysis and describes how PIPEPHASE tackles them. The numerous simulation and fluid types available in PIPEPHASE are also discussed.

Applications

The broad applications of PIPEPHASE can be categorized into three parts:


s s s

Single pipeline analysis Wellbore analysis Field wide studies

Single Pipe Analysis

PIPEPHASE is a sophisticated tool for the design and analysis of singlephase and multiphase pipelines. The main features of PIPEPHASE involve capacity calculations, condensate drop-out problems, CO 2/ Steam/N2 injection networks, and heated oil pipelines. The rigorous energy balance and detailed heat transfer model enable the accurate simulation of viscous fluids in insulated and/or heated oil pipelines as well as steam injection systems. Capacity calculations form the core of any preliminary process design. PIPEPHASE allows you to specify the desired parameters in a particular field, and accurately calculates the operating conditions necessary to accommodate these values. For instance, as a simple example, if one is given a specified inlet and a desired outlet pressure at a given flow rate, PIPEPHASE calculates the pump power needed to meet these specifications. You could also use line sizing to vary the diameter of the pipes used in order to provide an optimal estimate for the size of the pipes.

Figure 4: Capacity Calculations

C`USYVYUT ^\Ud@bUccebU @e]`C`USYVYSQdY_^c

C`USYVYUT ?ed\Ud@bUccebU

PIPEPHASE also accurately predicts retrograde condensation, or condensate drop-out problems, in wet gas pipelines. The retrograde phenomena is graphically illustrated in Figure 5. Conventional techniques that employ extrapolation to predict the point of retrograde phenomena are invariably incorrect. PIPEPHASE applies a point-by-point PVT anal10 Defining the Simulation

ysis, which has proven to be extremely accurate. This is especially useful when exact solutions are desired.
Figure 5: Phase Envelope

@81C55>F5<?@5@8!
200 3bYdYSQ\@_Y^d 160 CQdebQdUT<YaeYT 120 CQdebQdUTFQ`_b

@bUccebU@C91

800

400 !%<Ya 0 -150 -100 -50 0 50 100 CQdebQdUT FQ`_b

! <Ya

%<Ya

DU]`UbQdebU6

Steam Injection Networks In steam injection networks, PIPEPHASE allows you to develop operating conditions that will minimize heat loss in the network and optimize energy usage. Large networks require an optimal distribution of heat for maximum energy efficiency. For instance, an even distribution of steam injection throughout the network may not necessarily be the optimal arrangement. Such a configuration may exceed heating requirements in some wells and may fail to provide sufficient energy in others. PIPEPHASE performs rigorous heat transfer calculations to fully describe the energy requirements of each individual well, as well as the network as a whole. Because PIPEPHASE performs a rigorous enthalpy balance, it can be used for single component fluids other than steam. In the example shown in Figure 6, given 600 psia steam at the inlet, PIPEPHASE can calculate the flowing bottomhole pressure.
Figure 6: Steam Injection Networks

&

`cYQCdUQ]

C_ebSU

@/
Introduction to PIPEPHASE 11

Heated Oil Pipelines For heated oil pipelines, PIPEPHASE allows for the variation of node parameters (i.e., insulation thickness, heaters, pumps) to meet the pipe specifications. Viscosity characteristics are always taken into account, and the flow characteristics of the fluid can be analyzed exactly. PIPEPHASE can perform accurate calculations in both laminar and turbulent flow regions, as well as analyze the transition region with equal precision. In the event of sludge formation, especially in heated oil pipelines, PIPEPHASE employs a sphering or pigging model to estimate slug characteristics for the design of downstream slug catchers.

Wellbore Analysis

PIPEPHASE provides a comprehensive set of features for the detailed design of production or injection well systems. This includes detailed reservoir inflow performance characterization, a choice of completion models at the sandface, wellbore geometry variations to accommodate typical production, injection or artificial lift (ESP or gaslift) operations, and surface flowline and facilities models simulating most oil field operations. Almost all of the well-known mulitiphase correlations, both empirical as well as mechanistic, are available for a wide range of flowing conditions and inclination angles.
@b_TeSdY_^6\eYT _Y\gQdUbWQc

Figure 7: Wellbore Analysis

CebVQSU

BUcUbf_Yb

The most common application of PIPEPHASE to wellbore problems is a nodal analysis . PIPEPHASE is equipped with a sensitivity analysis feature, which is a generalized nodal analysis tool. This feature can provide graphical solutions to wellbore problems, where the solution node can be any point along the production string, and the inflow and outflow curves can represent composite multiple parameter behavior. For instance, in modeling a particular well, the inflow and outflow curves can be given by the Productivity Index IPR (inflow) and the tubinghead pressure (outflow). The intersection of these curves provides the solution.

12

Defining the Simulation

Performance Analysis Figure 8 illustrates a graphical solution to wellbore calculations. In this case, reservoir performance is given (flowing bottomhole pressure as a function of flow rate). The composite variable in this case is the size (inside diameter) of the pipes. These curves are superimposed on the graph, and the intersection of these curves with the Reservoir Performance curve indicates the solution for each case. The solution gives the operating conditions for the node to meet the desired specifications.
Figure 8: Wellbore Calculations - Varying Pipe Sizes

94-"!" 6\_gY^W2_dd_]X_\U @bUccebU 94-# 94-#!" 94-$ BUcUbf_Yb @UbV_b]Q^SU 6\_gBQdU

Figure 9 is analogous to the previous example with a different variable. Instead of varying pipe sizes, you vary well-head pressure (WHP). Also, reservoir performance is represented by two curves, illustrating the decline in the reservoir pressure with production. Similarly, solutions are indicated by the intersection of the two plots, and the solutions give the operating conditions needed for the given specifications.
Figure 9: Wellbore Analysis Varying Well-head Pressure

- # G8 @
6\_gY^W2_dd_]X_\U @bUccebU

BUcUbf_Yb @UbV_b]Q^SU 6\_gBQdU

PIPEPHASE also models artificial lift methods. The two methods available to the program are continuous gas lift for enhanced fluid recovery and electrical submersible pump analyses.
Introduction to PIPEPHASE 13

G8 @

G8 @

- !

- "

Gas Lift Analysis In a gaslift analysis, separator gas available from the oil well or from an outside source can be used to increase production. The production fluid is considered to be in the tubing and the lift gas in the annulus around it. Using PIPEPHASE, you can investigate the feasibility of injecting gas for continuous gaslift. PIPEPHASE has four gaslift options:
s

With specified oil production and lift gas rate, PIPEPHASE generates pressure profiles in the production and injection strings of the well. With specified tubinghead pressure, PIPEPHASE generates table of oil production rate vs. specified lift gas rate. With a specified range of gas injection valve locations for fixed oil production and lift gas injection rates, PIPEPHASE calculates corresponding production string pressure, and determines the injection location which is closest to the target outlet pressure. With a specified range of gas injection valve locations for fixed oil production and lift gas injection rates, PIPEPHASE calculates corresponding injection string pressures and determines the location which is closest to the target outlet pressure.

Figure 10: Gas Lift Analysis

DeRY^WGU\\XUQT@bUccebU-!&%`cYW 7Qc<YVd7Qc @-)% `cYW D-! 6A-/

7Qc<YVdFQ\fU BUcUbf_Yb3_^TYdY_^c @-"! `cYW D-!("6

A/

PIPEPHASE offers you great flexibility in cases of gaslift analysis. You can analyze the performance of wells currently on gaslift, maximize oil recovery using new gaslift, and determine which gaslift valves should be activated for a specified production scheme. This allows you to study each production well in a field over the life of the reservoir. You can also determine which wells are candidates for gaslift, how production can be improved with gaslift, and which gaslift rates and valve locations are required. Once the performance of an individual well is refined using the gaslift options, the performance of an entire gathering system can be
14 Defining the Simulation

analyzed in the network mode with the injection depth and rate specified for each well. The most common calculation in gas lift problems is the calculation of the optimum gas injection rate. Usually, you are given the following parameters: reservoir pressure, well-head pressure, formation gas-oil ratio, and water cut. Injection pressure and gaslift valve locations are usually fixed, and from this information, you must determine the optimum lift gas injection rate, Q. PIPEPHASE can generate plots of the liquid and oil production versus gas injection rate, as shown in Figure 11, to indicate the optimum gas injection rate required (trial injection rates are used as input to this simulation to generate the desired graph).
Figure 11: Finding the Optimum Gas Injection Rate

A <=Qh

A<
A 7?`dY]e]

A7

PIPEPHASE also performs rigorous wellbore heat transfer calculations. These are especially useful in steam injection networks with viscous oil (API < 10, or viscosity > 100 cP). As described previously, the object of steam injection networks is to minimize heat loss, and PIPEPHASE takes into account all the necessary parameters to build an accurate model. PIPEPHASE allows user-defined input as well as default values for pipe insulation, heat conduction, convection, heat transfer coefficients, and radiation. It also accounts for time-dependent effects through the Ramey function.

Field Wide Simulation

The network simulation capability in PIPEPHASE can be used to model the interaction between the various elements of a complete oil or gas field, including all of the wells, gathering and injection lines, surface facilities, and contract delivery points. PIPEPHASE also allows the grouping of production from the same zones for simulating time-dependent reservoir pressure decline, and changing well production conditions (increasing GOR and water cut). These capabilities have been linked with the ability to simulate production contracts and changing facilities to create a field planning tool.
15

Introduction to PIPEPHASE

In a field of interconnected wells, the parameters in each individual well are interconnected. (i.e. changes in the pressure of well 1 may affect well 2). Consider Figure 12 where Well 2 has varying gas lift injection rate, and the resulting back pressure affects the performance of Well 1. Similarly, all of the surface facilities are also interdependent. PIPEPHASE incorporates these effects in performing an overall field calculation.
Figure 12: Field Wide Simulation

GU\\!

GU\\" gYdXWQc\YVd

Furthermore, PIPEPHASE is equipped with a new time-dependent production planning capability. One such feature is the Reservoir Decline option, which describes the cumulative production volume calculation based on well grouping. PIPEPHASE provides a simple tank depletion model for gas and condensate reservoirs. It also provides support for user-specified reservoir pressure decline curves, as well as for user-specified decline in well characteristics (changing gas-oil ratio, water cut). Another feature allows you to model changing facilities. The case study feature simulates changing operation setpoints, facilities and delivery contracts over multiple time periods. For instance, the field may require more power (e.g. in pumps) with time, and increasing the horsepower of the pumps affects overall field performance and costs. Regarding contracts, PIPEPHASE allows you to model the behavior of a given field that is under specific contractual constraints. For example, if the field is given a maximum production rate Q which cannot be exceeded due to contractual agreements, the individual components of field must be adjusted to meet the terms of contract. The performance of the field, however, will change with time. For instance, for the first five years, compressor horsepower must be regulated because the maximum field operation exceeds Q. After five years, however, even with maximum power, field production does not exceed Q, and the necessary adjustments must be made to meet production standards.

16

Defining the Simulation

Simulating Networks in PIPEPHASE

The first step in creating a new simulation is to define the simulation type and fluid type. If your fluid is compositional, you can also define the phase of the fluid. When creating a new simulation, by clicking the New button on the toolbar or by selecting File/New from the menu bar, the Simulation Definition dialog box will be opened automatically. If you need to access this dialog box at any time, select General/Simulation Definition from the menu bar.

Figure 13: Simulation Definition Dialog Box

Check the box beside Input Check Only when you want PIPEPHASE to perform a thorough check on your input before performing any calculations. If errors are found, it will not carry out the simulation.

Simulation Type

The simulation type indicates which solution algorithm will be used to solve the simulation. The options are:
s s s

Network Model Gas Lift Analysis PVT Table Generation

Select Network Model if the system you want to simulate is a gathering, distribution, or looped flowsheet system with one or more junctions, or if your system is a single link but you want PIPEPHASE to calculate the pressure at the source of a single link. Select Gas Lift Analysis if you wish to to perform individual well gas lift analyses. This option is for blackoil fluids only. Select PVT Table Generation if you want PIPEPHASE to generate a PVT data file for use in a subsequent run. Using PVT tables increases simulation speed by enabling PIPEPHASE to look up data from tables instead of performing flash calculations.

Introduction to PIPEPHASE

17

Fluid Models

A fluid model is non-compositional when it can be defined with average gravities at stock tank conditions. A fluid model is compositional when it can be defined in terms of its individual components either directly or via an assay curve. There are seven types of fluid modeled in PIPEPHASE:
s s s s s s s

Compositional Black oil Gas Condensate Gas Liquid Steam Compositional/Blackoil

The fluid type controls how the program is able to obtain the physical properties necessary for pressure drop and heat transfer calculations either from the PIPEPHASE databank, from built-in empirical correlations, or from user-supplied input. Steam is a special case of a non-compositional fluid, for which PIPEPHASE uses the GPSA steam tables. Non-Compositional Models A non-compositional fluid model must be defined as black oil, gas condensate, liquid, gas, or steam. Black oil and gas condensate are twophase, with one phase dominant. Gas and liquid fluid models are singlephase. Steam can be single or two-phase. When working with multi-phase non-compositional fluids in PIPEPHASE, you must supply specific gravity (reference density) data for gas, liquid, and water phases, even if you do not expect them all to be present. In the case of single phase fluids, you need specify the reference density of that phase only. PIPEPHASE employs empirical correlations (e.g. Vasquez, Standing, Glaso) to calculate certain fluid properties. You can define the method by which PIPEPHASE calculates these properties. For instance, you can choose Vazquez, Standing, or GLASO correlations for viscosity, or Standing or Hall-Yarborough correlations for compressibility factor. The default correlation depends upon the fluid being used.

18

Defining the Simulation

Blackoil Model

Black oil is a two-phase fluid model based on the reference gravities of the two phases and the volumetric phase ratio (Gas-Oil Ratio) at stock tank conditions. You must supply specific gravity data for gas, liquid, and water phases, even if you do not expect them all to be present.
Gas Condensate Model

Gas condensate is a multiphase non-compositional fluid with gas predominating. All properties of gas condensate are calculated by PIPEPHASE from the specific gravity and built-in correlations. Gas condensate models are very useful in simulating the behavior of light oil with APIs greater than 45.
Single-Phase Liquid Model

All properties of a non-compositional liquid are calculated by PIPEPHASE from the specific gravity and built-in correlations. You must define the liquid as water or hydrocarbon (oil), and supply its gravity.
Single-Phase Gas Model

All properties of a non-compositional gas are calculated by PIPEPHASE from the specific gravity, which you specify, and built-in correlations. You can also specify which correlation is to be used. Contrary to black oil, you cannot adjust the Standing correlation to match any available laboratory data.
Steam Model

Steam is a non-compositional fluid that is allowed to exist in two phases. You cannot override the steam table data contained within PIPEPHASEs data libraries. However, all pressure drop correlations which are available to compositional fluids are also available to the steam model. Compositional Model There are three methods for defining components in PIPEPHASE:
s s s

Selecting individual components from the PIPEPHASE library. Defining individual components as petroleum pseudocomponents. Defining an assay curve and having PIPEPHASE divide it into petroleum cuts.

PIPEPHASE will then predict the fluids properties by applying the appropriate mixing rules to the pure component properties. Unless PIPEPHASE is instructed otherwise, it will perform phase equilibrium calculations for the fluid and determine the quantity and properties of the liquid and vapor phases.
Introduction to PIPEPHASE 19

A compositional fluid can be defined in terms of any combination of these options. You can have different compositions at each source.
Pure Library Components

The SIMSCI library contains over 2000 components. For all components, the databank contains data for all the fixed properties and temperature-dependent properties necessary to carry out phase equilibrium calculations. For all common components, the databank also contains a full set of transport properties necessary to carry out the pressure drop and heat transfer calculations. If you need to supplement the data, or override the library data with your own, you can do so.
Petroleum Components

PIPEPHASE allows you to enter individual petroleum components, which are represented as cuts or sections of a hydrocarbon stream with defined average boiling points, specific gravities, and other thermophysical properties. You can define individual components as petroleum components by specifying at least two of the following three properties for each component:
s s s

Normal boiling point Gravity Molecular weight.

PIPEPHASE will predict the third property if you omit it. PIPEPHASE uses industry-standard characterization methods to predict all fixed and temperature-dependent property data for each pseudocomponent. You can select the method most suitable for your own mixture.

Click Petroleum... in the Component Selection dialog box and enter the data. You can provide names for the individual cuts, or have PIPEPHASE define names based on the cuts' NBPs.

Assay Data

A component breakdown for petroleum-based streams, such as crude oil, is difficult to obtain, because they contain thousands of distinct compounds. Usually these hydrocarbon streams are characterized in terms of laboratory test data (also known as assay data). This typically includes distillation data, gravity data, and an analysis of the low-boiling pure components (the lightends). PIPEPHASE derives a set of petroleum components from this assay data by using industry standard characterization techniques. These derived components are used to model the streams given by assay data.

20

Defining the Simulation

If your fluid is defined by an assay curve (TBP, D86, D2287, or D1160), PIPEPHASE will divide it into a number of cuts. You can control the number of cuts and the ranges they cover. Each of the cuts is then treated as a pseudo-component, as described previously. You can also define a lightends analysis to go with the assay curve. The lightends can be defined using the pure library components database. To construct the assay curve, along with the boiling point curve, you must supply average density, and you can also supply density curve data or molecular weight data. From user-supplied data, PIPEPHASE uses a specified curve fitting procedure to best fit the assay data. An example is the SPLINE method, in which a cubic spline is fitted to all internal points and the normal probability distribution is used for extrapolation beyond the first and last data points. This method is also the default fitting method. You should try to define the temperatures such that they encompass the TBP ranges for all stream assay data. Several correlations are available for calculating critical constants, molecular weights, and gravities.

Phase Designation

If you believe that the phase of your compositional fluid will not change throughout the simulation, you can specify that phase (liquid or gas). PIPEPHASE will bypass the flash calculations to increase the speed of your simulation. You must be sure that the fluid remains in the phase which you specify for the entirety of the simulation, since any liquid dropout or vaporization which may occur in reality will be missed, and results will then be erroneous.

Introduction to PIPEPHASE

21

Setting the Input Units of Measure


Almost every item of data you will enter in PIPEPHASEwill have units of measure. For simplicity, units of measure in PIPEPHASE have been arranged into four standard pre-defined sets: Petroleum, English, Metric and SI. You select the set that nearest matches the needs of your simulation and then override the pre-defined units for individual quantities. For example, you can select the Metric Set and override the Celsius temperature unit with Kelvin. To change the default units of measure set for a simulation, click the Units of Measure button on the toolbar or select General/Input Units of Measure to open the Input Dimensions dialog box. This dialog box (Figure 14) automatically appears when you define a new simulation.
Figure 14: Input Dimensions Dialog Box

By default, the standard Petroleum set is the global default used to start each simulation.

To change the default set, select a set from the System list. Make any changes to individual units, as desired and click when finished.
OK

22

Setting the Input Units of Measure

Standard Sets

The units of measure in the standard sets are shown below.


Table 9: Standard Units of Measure
Petroleum Temperature Pressure Molar Rate Weight Rate Liquid Volume Rate Gas Volume Rate Default Basis Conductivity Heat Transfer Coefficient Fine Length Coarse Length Pipe Length Water Density Oil Density Gas Density Power Duty Viscosity Velocity F psig lb-mol/hr lb/hr bbl/hr 106 ft3/hr liquid volume Btu/hr-ft-F Btu/hr-ft2-F in ft ft sp gr API sp gr hp 106 cP mph Btu/hr English F psia lb-mol/hr lb/hr ft3/hr 106 ft3/hr gas volume Btu/hr-ft-F Btu/hr-ft2-F in ft ft sp gr API sp gr hp 106 cP ft/s Btu/hr Metric C bar kg-mol/hr kg/hr m3/hr 106 m3/hr gas volume kcal/hr-m-C kcal/hr-m2-C mm m m kg/m3 kg/m3 kg/m3 kW 106 cP km/hr kcal/hr SI K kPa kg-mol/hr kg/hr m3/hr 106 m3/hr gas volume W/m-K kW/m2-K m m m kg/m3 kg/m3 kg/m3 kW 106 kJ/hr Pa-sec m/s

Output Units of Measure

Normally, the output report is in the same units as the input set. However, you can define a different set of units for the output. If you do want output in a different set of units it is good practice to get it in the input unit set as well, so that you can check the correctness of your input data.

Select General/Output Units of Measur . Check the Use Output Units of Measurement box, and select the set from the System drop-down list.

You can override specific variables by selecting the appropriate units from each drop-down list. By default, an additional report with the output dimensions is generated. If desired, the output dimensions can replace the input dimensions by checking the Replace Standard Output radio button in the Output Dimensions dialog box.

Introduction to PIPEPHASE

23

Entering Thermodynamic or PVT Data


The thermodynamic or PVT data required for the simulation depends on the fluid type defined as the simulation definition. For any non-compositional simulation, you can enter up to 99 property sets. The required data entry for each fluid type is described below. When creating a new simulation, the PVT Data dialog box will be opened automatically. If you need to access this dialog box at any time, click the Thermodynamic Data button on the toolbar or select General/ Thermodynamic Data... from the menu bar.

Blackoil Models
Figure 15: Blackoil/ Compositional PVT Data Dialog Box

For blackoil or blackoil/compositional mixtures, you must enter the gravities (or densities) for each of the three potential phases of the fluidoil, gas and water. All other data are optional.

You can enter a mole percentage for any or all of the listed contaminants (nitrogen, carbon dioxide and hydrogen sulfide). Entry of data here will effect a change in the compressibility factor for the gas phase according to built-in correlated curve relationships. Regarding Antoine viscosity data, you can enter one temperature and one viscosity to define a constant viscosity of the dead oil, or enter tw points for regression onto a two-point Antoine curve. The viscosities are interpolated and extrapolated on a log-scale for all other temperature conditions. If multiple sets of two-point viscosity data are supplied, then the two temperature points must be identical for each set.

24

Entering Thermodynamic or PVT Data

If laboratory data is available, you can adjust the properties that PIPEPHASE calculates from its built-in correlations so that they more closely fit the measured data. Since the data adjusts the properties computed by the Standing correlation, you must specify Standing for all properties on the Correlation list or dialog box. You can define the method that PIPEPHASE uses to predict a non-compositional compressibility factor. The available correlations are the Standing-Katz, Hall-Yarborough wet gas, and Hall-Yarborough dry gas methods. You can also define the methods that PIPEPHASE uses to calculate Formation Volume Factor (FVF) and Solution Gas Oil Ratio (SGOR). For the FVF, you can choose the TUFFP Vazquez/Beggs, Standing, or Glaso methods. To calculate SGOR, you can define the TUFFP Vazquez/ Beggs, Lasater, Standing, or Glaso correlations. There are numerous viscosity correlations available for each phase. For oil, there are the TUFFP Vazquez/Beggs, Beal-Standing/Chew-Conally and Glaso correlations. For the viscosity of gas, the Lee, et. al., and Katz, Carr, et. al. methods can be used. If you want to specify a specific correlation for mixing, you can choose one of three methods: Volumetric averaging, API Procedure 14b, and Woelflin (loose, medium, or tight). You can adjust the Woelflin Oil/ Water mixing correlations by entering your own data.

Gas Condensate and Gas Models

As for the blackoil model, you must enter are the gravities (or densities) for each of the three potential phases of the fluid, while all other data are optional. Enter the contamination concentrations as you did for a blackoil fluid. You must supply specific gravity data for gas, liquid and water phases, even if you do not expect them all to be present. You can define the amount of nitrogen, carbon dioxide, or hydrogen sulfide in the well which adjusts the compressibility factor calculations. You can also specify a gas specific heat ratio (c p/cv) to override the internal value set as a default. You can also specify which correlation is to be used. The available correlations for gas viscosity are the Lee and the Katz-Carr methods. For the z-factor, you can use the Standing-Katz, theHall-Yarborough wet gas, or the Hall-Yarborough dry gas model. In the case of gas condensate models, you do not have a choice as to which correlations are to be used for calculating fluid properties. Also,

Introduction to PIPEPHASE

25

as opposed to black oil calculations, you cannot adjust the Standing correlation to match any available data.
Figure 16: Gas Condensate PVT Data

The PVT dialog box for a single phase gas is similar to Figure 16 except that the data entry field, Condensate, is not an option.

SinglePhase Liquid Model

The liquid can be designated either as hydrocarbon or water. Depending on your selection, the appropriate correlations are used to calculate the physical properties. Hydrocarbon liquids are restricted to having a density less than pure water. If the liquid density is greater than or equal to 1.0 (specific gravity), the liquid must be defined as water. You must provide the gravity or density of the liquid. All of the physical properties will be calculated from the density using correlations. Youll want to define the heat capacity when it is important to calculate the heat transfer effects.

Figure 17: Single Phase Liquid PVT Data

If a hydrocarbon contains viscous tars, the default correlation used to estimate the viscosity may not be accurate enough. In this case, the viscosity can be set as a fixed value, or fit to a temperature-dependent Antoine equation. Either select Fixed Viscosity and enter a value, or select Antoine and enter two temperatures and their corresponding viscosity values.
26 Entering Thermodynamic or PVT Data

Note:

If two-point viscosity data is supplied for more than one property set, the temperature values must be the same. This is required to calculate the proper mixture viscosity when the tw fluids merge, for example at a junction node.

You can supply liquid viscosity data to override the internally predicted data. You can do this by either defining the viscosity as a single value or as a two-point viscosity curve. Similarly, you can supply a single constant value for liquid specific heat to override the internally predicted data. You can specify the correlation used to calculate oil or water viscosity. The options for viscosity correlations are: for oil, Vazquez, Standing, and GLASO; for water, Beal and ASME Steam tables. However, unlike black oil, you cannot adjust the Standing correlation to match any available laboratory data.

Steam Model

Enter the gravity, or density, of the water to represent the amount of dissolved salt present in the water, which becomes important if large elevation changes are present. When using steam, you can specify the gravity of the condensed water to be more than 1.0 to take into account dissolved solids. You can also specify steam quality if the steam is saturated. If the steam is superheated or the water is subcooled, you must specify both the temperature and the quality.

Figure 18: Steam PVT Data

Note that the steam (or any single component fluid) model is based on an enthalpy balance.

Introduction to PIPEPHASE

27

Compositional Model

For compositional models, PIPEPHASE can use a generalized correlation, an equation of state, or a liquid activity method to calculate thermodynamic properties at the flowing conditions and hence to predict the split between the liquid and vapor phases. The choice of the thermodynamic property calculation method depends on the components in the fluid and the prevailing temperatures and pressures. PIPEPHASE also provides a number of methods that can rigorously calculate vapor-liquidliquid equilibrium and solid-liquid equilibrium. Generally you must select methods for calculating these thermodynamic properties:
s s s s

Equilibrium K-values Enthalpies Entropies Densities.

In PIPEPHASE, thermodynamic methods are arranged into systems. When you choose a thermodynamic system, PIPEPHASE will provide default methods for each of these thermodynamic properties. You can override these defaults. For example, if the Soave-Redlich-Kwong thermodynamic system is selected, the default liquid density method is API. You can replace this with another method, for example, Lee-Kesler should you feel Lee-Kesler will predict the liquid densities more accurately for your simulation.
Figure 19: Thermodynamic Methods for Compositional Sources

28

Entering Thermodynamic or PVT Data

To cite a few method examples, for the calculation of K-values, the following methods can be used for heavy hydrocarbon systems:
s s s s

Braun K10 Grayson-Streed Peng-Robinson Soave-Redlich-Kw

For some systems, notably close-boiling mixtures, the standard equations do not adequately reproduce experimental phase equilibria data. You can improve the predictability of many of the equations of state, or liquid activity coefficient methods by inputting your own binary interaction parameter values. For example, you can tune the PR, SRK, BWRS, and LKP equations. If you have water in a hydrocarbon system, you can select a method for calculating aqueous liquid and vapor enthalpies either by a simplified method which assumes that the steam is at its saturation point, or by a rigorous method which takes into account the degree of superheat of the vapor, if any. Energy considerations in pipelines must take into account three main factors: (1) the energy transfer to the environment, (2) frictional forces, and (3) expansion cooling within the pipe, also known as the JouleThompson effect. In the Joule-Thompson phenomena, as pressure decreases, the gas expands and there is subsequent cooling of the fluid. In the case of large pressure drops, large fluid expansion may be observed, and the fluid temperature may drop below the ambient temperature.

Transport Methods

The SIMSCI databank contains pure component data for the thermal conductivity, surface tension, and viscosity of liquids and vapors as functions of temperature. You can choose to use these data and simple mixing rules to predict the flowing properties of the fluid. Alternatively you can choose to use the API Data Book property prediction methods and mixing rules for mixed hydrocarbons. Some 60 of the bank components have data for viscosity and thermal conductivity from the GPA TRAPP program. If you choose to use the TRAPP data, all of your components must be TRAPP components and you cannot have any pseudocomponents or assay data.

Introduction to PIPEPHASE

29

In the case of oil and water mixing, you can use the same correlations available to the black oil case: Volumetric averaging, API procedure 14B, and the three variations of the Woelflin emulsion procedure. To override the mixture liquid viscosity predictions, you can supply a two-point liquid viscosity curve for either the hydrocarbon liquid phase, the water phase or the total liquid. A different viscosity curve may be supplied for each source, however the temperature points must remain the same. In most cases, a single set of thermodynamic and transport methods is adequate for calculating properties of all sources. However, your flowsheet may contain sources with widely varying compositions or conditions such that they cannot be simulated accurately using just one set. To account for this, you can define more than one set of methods (there is no limit) and apply different sets to different sources.

30

Entering Thermodynamic or PVT Data

Specifying the Global Defaults


This chapter describes how you can set global defaults for pressure drop methods, thermal considerations, roughness, and transition Reynolds number. Click the Global Defaults button on the toolbar to set up these default methods and values. The Global Defaults dialog box appears (Figure 20). These settings will be used throughout the simulation unless specifically over-ridden. In this way, repetitive data entry can be avoided, particularly when entering device data.
Figure 20: Global Defaults Dialog Box

Flow Correlation Defaults

You must specify the Pressure Drop flow correlation to be used to calculate pressure drops along lengths of the pipes, risers, tubings, and annuli. The default is Moody. The correlations available depend on the fluid type: gas, liquid, compositional, blackoil, gas condensate or steam. The selected correlation will be used for all units of like type in the simulation unless you specify a different correlation on an individual device. You can also enter user-defined correlations supported by PIPEPHASE.

Click Flow Correlations..

to set the default flow code method.

Palmer Corrections

Palmer corrections are factors which can be used with any non-mechanistic pressure drop correlation except Orkiszewski and Beggs & Brill No-Slip, in order to adjust for uphill and downhill multiphase flow pressure drops. The defaults are those recommended for Beggs & Brill and Beggs, Brill & Moody correlations: 0.924 for uphill, and 0.685 for downhill.

Click Palmer Corrections... to set default values for Palmer uphill and downhill correction factors for pipes, tubing, risers, or annuli.

Introduction to PIPEPHASE

31

These data will be used for all units of like type in the simulation unless you specify different data for an individual link device.

Inside Diameter Defaults

You can specify default sizes for each of the riser, pipe, annulus and tubing devices. These data will be used for all devices in the simulation unless you specify different data for individual devices.

Click Inside Diameter Defaults.. to set default values for actual or nominal diameters and schedules for pipes and other flow devices.

The inside diameter can be specified on the basis of the actual inside diameter of the device or (except for annulus) as a nominal diameter. The relationship between nominal and inside diameter is determined by the schedule and is defined in the Flow Device Size database.

Thermal Defaults

PIPEPHASE allows you to select the heat transfer default method for calculating heat transfer for all pipes, tubing devices, risers and annuli in the simulation. As well, you can enter the default ambient temperature for the medium surrounding all pipes, and the default geothermal temperature gradient for all well tubing heat transfer calculations.

Click Heat Transfer Defaults... to select the default method for calculating heat transfer for all flow devices in the simulation. Click Heat Transfer Coefficients... to enter default heat transfer coefficients for all pipes, tubing devices, risers and annuli in the simulation. Click the appropriate button to set the defaults for the medium surrounding the pipes in the simulation. You can set heat transfer defaults for soil, water, air, and pipe insulation.

Miscellaneous Defaults

PIPEPHASE also allows you to set the flow device inside roughness for all devices, flow efficiency, transitional Reynolds number, and when the Hazen-Williams equation for single phase liquids has been enabled, the HW coefficient. Use the flow efficiency parameter to adjust pressure drops. It employs a linear relationship with the local flow rate in the flow device. This should be used to match field data only when all other relevant flow variables (such as roughness, heat transfer coefficient, etc.) have been evaluated for effect on pressure drop. Enter the transitional Reynolds number which is used internally as the transition point from the laminar to the turbulent flow regime.

32

Specifying the Global Defaults

Building the Flowsheet


The flowsheet you construct in PIPEPHASE acts as the blueprint for your process. Each component in the flowsheet will require user-specified data before the simulation is run. While building the flowsheet, PIPEPHASE will inform you of any missing or inconsistent data through message dialog boxes. The data entered in flowsheet construction in the GUI is automatically exported into a keyword file, upon which the simulation run is based.

Flowsheet Terminology

The flowsheet consists of nodes and links. Nodes are connected by Links. Each link starts at a node and ends at another node. A node can be a Source, a Sink, or a Junction. A source is a point at which fluid enters the piping system. A sink is a point at which fluid leaves the piping system. A junction is a point where two or more links meet. Each link consists of a series of flow devices: pipes, fittings, and process equipment and unit operations. The direction of flow is indicated by arrows on the flowsheet. If the fluid flows in a direction opposite to the arrows, then the results will indicate a negative flowrate.

Types of Networks

There are two basic types of networks tree networks and looped networks. Tree Networks Tree networks are those which involve the distribution of a large amount of fluid to a number of different sinks, or the gathering of a particular fluid from a number of sources. The latter is especially common in offshore black oil gathering systems. When all sink flowrates (q) are fixed, and the source pressure P is known, the network is called a spur network. In the case of the second figure above, the sum of the flow rates of nodes B through H equals the flow rate at the source P (node A). All the flow rates are known, and from these values, you can find the pressure at junction H through simple single link calculations. Since cumulative rates are known along with the starting pressure for every sub-branch of the network, the entire network

Introduction to PIPEPHASE

33

can be solved by simply marching towards each sink. Therefore, in the case of spur networks, different links need not be solved simultaneously. In some cases, only a few links in a network may be spur links. PIPEPHASE identifies these links and solves the remainder of the network first, using the PBAL algorithm to perform a simultaneous solution. Once it reaches this solution, PIPEPHASE continues to solve the remaining spur links. There may be some cases in which PIPEPHASE is able to solve the main body of the network, but may fail in solving the spur links. Looped Networks PIPEPHASE solves networks iteratively. Whichever algorithm you use, PIPEPHASE starts with an initial estimate of flowrates in all links and pressures at all nodes. It adjusts these values until it has reached a converged solution within a predefined tolerance. Because of the comple nature of some networks, PIPEPHASE allows you to make adjustments to a large number of parameters that it uses during the solution procedure. Networks which include loops fall into two basic categories -- those in which all link flow directions are known, and those in which one or more link flow directions are unknown. The former networks are described as simple loops while the latter are known as complex loops. In simple loops, you can instruct PIPEPHASE not to attempt to reverse flows during the solution procedure. However, if you incorrectly define a loop link flow direction, and then instruct PIPEPHASE not to reverse flows during simulation, the network will fail to converge. In such cases, PIPEPHASE will produce an error message, and you can inspect the iteration history to find which link is producing the error by identifying the link which has a near-zero flow. Some network simulations include more than one loop configuration, where one or more of the loops contains links in which the flow direction is not known. Such cases are known as complex loops.
C_ebSU C_ebSU CY^[

/
C_ebSU

/
CY^[

34

Building the Flowsheet

This is common in existing designs, and must be addressed in a special manner. Problems are usually not found in looped networks until at least one simulation has been run. If the problem has not converged, you can generate the full iteration output. You can then inspect this output report to diagnose the problem. In some cases, PIPEPHASE may decide to reverse the flow in a particular link in a loop. By doing this, the solution path begins to diverge and a final solution is no longer achievable. Placing a check valve in that link will prevent the flow reversal.

Introduction to PIPEPHASE

35

Entering Source and Sink Data


The most simplest flowsheet in PIPEPHASE is comprised of a source connected by a link to a junction or to a sink. The source, junction, and sink names must be unique, 4-letter alphanumeric names. For a network, the first source name defaults to S001 and the source number is automatically incremented as new sources are created. Then similarly, the first junction begins with J002, and the first sink begins with D003. For a single link, you must specify two of the following variables:
s s s

source flowrate (which is also the sink flowrate), source pressure, and sink pressure.

Inactivating Units You can inactivate any source, junction, or sink on the flowsheet by checking the box in the appropriate unit dialog box thus removing it from the calculations.

Sources

PIPEPHASE requires the properties of the fluid to calculate pressure drops, heat transfer, and phase separation. There are two major classifications of fluid models: compositional and non-compositional. The PIPEPHASE program supports all of the well known empirical methods for determining the properties of oil, water, gas, and oil-water emulsions. You must also define the total flowrate and pressure at the source. If these values are to be set operating conditions, then you can indicate that they are fixed values. If these are allowed to vary to meet specified production values, then they can be entered as estimated values. If the pressure is estimated, the inputted value will be used as an initial guess and PIPEPHASE will calculate the correct source pressure. Note that the choice of fixed or estimated may be limited by the boundary conditions of the simulation. Similarly, the source flowrate must be either fixed or estimated (default). You can reference a source to another defined source by selecting the Use Reference Source radio button. You can then define that flowrate, temperature and/or pressure will be copied from another source.

36

Entering Source and Sink Data

Non-Compositional Sources Besides the source name, the enthalpy, pressure, flowrate, gas/oil ratio and water cut are required data for blackoil sources. If you do not provide a value gas/oil ratio (GOR) or water cut, they will both be set to zero. A temperature value is also required for PIPEPHASE to compute enthalpy changes between nodes during calculations.
Figure 21: Black Oil Source

In addition to fluid composition and properties, you must specify the fluid enthalpy at the source. For steam sources, you must define the pressure and quality of a saturated steam source. The temperature must be specified only if the steam is superheated ( quality 100%) or subcooled (quality 0%). When working with downhole nodes, you can specify the temperature at a node if it is available (e.g. reservoir temperature). Compositional Sources Compositional sources are used to introduce fluid into the flowsheet for the compositional fluid type. Besides the source name, the enthalpy, pressure, flowrate and composition are required. The pressure and flowrate are the boundary conditions for the simulation and can be either fixed or estimated. Any parameter that is estimated will be solved for by PIPEPHASE. The PVT property set refers to the two-point viscosity PVT data which can be input and made available to any compositional fluid source. Therefore, if appropriate, select the set associated with the source fluid.

Introduction to PIPEPHASE

37

Figure 22: Compositional Source

Component data can be entered in three ways:


s

Enter the actual source composition, comprised of the library and petroleum components. Describe the source by distillation curve data rather than on a component-by-component basis. Reference the source composition to another source; flowrate, temperature and/or pressure can also be copied from another source.

The temperature is required for a multi-component source in order for PIPEPHASE to perform a flash calculation to ascertain fluid conditions at the source. For a source with only a single component, you can define the two phase enthalpy by the quality or single phase enthalpy by the temperature. Liquid is defined by quality = 0 and vapor by quality = 100 (default). Quality is entered as vapor mass percentage.

Junctions

A junction is a point at which at least three links enter and exit. If there is just one link going in and one link coming out, then the junction is not necessary and the link devices may be put on the same link. The net flowrate in the junction is zero, since the flow in must equal the flow out. PIPEPHASE allows a maximum of twenty sources linked to a given junction. If you want to attach more than twenty sources, you should enter them in sets of twenty into two separate junctions, and link the two junctions together with a very short, large diameter pipe. Besides the junction name, the junction pressure can be estimated. If a pressure estimate is not given for the junction, PIPEPHASE will calculate an estimated pressure. This pressure estimate is then used to deter-

38

Entering Source and Sink Data

mine the flowrate estimates based on the estimated pressure drop for each link. Although specifying the junction pressure is optional, an initial estimate may prove useful in speeding up the solution. You can enter the temperature of the rock formation at this junction, which is used when the junction is subsurface.

Sinks

Sinks are used to remove fluid from the flowsheet. The sink node requires two parameters to be specifiedpressure and flowrate. If these are desired set points, then they can be entered as fixed values. However, if they are to be calculated, you need to provide an initial estimate and PIPEPHASE will calculate the final values. Again, note that the choice of fixed or estimated may be limited by the boundary conditions of the simulation.

Figure 23: Sink

The sink temperature is generally calculated and is not available for data entry. However, the sink temperature is required for gas lift simulations when option 4, locate gas lift valve to match desired casing head, is used.

Introduction to PIPEPHASE

39

PIPEPHASE also provides you with two other units that you can add to the flowsheethydrates and the calculator. These are described below.

Hydrates

The Hydrates unit predicts the pressure and temperature regime in which the fluid at a node (source, sink, or junction) is vulnerable to hydrate formation. Different ranges of temperature and pressure can be examined. Calculations assume the presence of free water for hydrates to form. Hydrate calculations are available only for compositional fluid types. You can also study the effect of NaCl, methanol, ethylene glycol, di-ethylene glycol and tri-ethylene glycol hydrate inhibitors. You can associate a hydrate unit with any source, sink, or junction; however, you cannot associate a hydrate unit with a link.

Calculator

The calculator is a versatile utility module that allows you to perform FORTRAN-like calculations on information from the flowsheet and to transfer the results to other unit operations. The calculator interacts with, and is calculated along with other flowsheet modules. Therefore, placement is important for proper execution. You can associate a calculator with any source, sink, or junction; however, you cannot associate a calculator with a link. The calculator dialog box has two sections: the upper section for setup (assignment of unit parameters to be retrieved from the flowsheet, initialization of constants, descriptive labeling of results, and sizing of arrays); and the lower section for the procedure statements which perform the actual FORTRAN calculations.

40

Entering Source and Sink Data

Defining Links
Recall that a link is defined as a connection between two nodes. The link can consist of one or more devices, and can contain a number of flow, equipment, and completion devices. Figure 24 shows a typical link between a source and a sink.
Figure 24: Simple Link

CU`QbQd_b #DeRY^W 3X_[U @e]` ?`U^X_\U 3_]`\UdY_^ &@Y`U

CY^[

C_ebSU

Each link consists of a series of flow devices. Each flow device, in turn, is characterized by its structure, pressure drop, and heat transfer parameters. A pipe, riser, annulus, tubing, and Inflow Performance Relationship model are all flow devices. All but the latter have length, may be horizontal or vertical with an accompanying elevation change, and have defined diameters. Each flow device usually undergoes a pressure drop, which is dependent upon the flow codes, roughness, and flow efficiency of each device. The flow code defines which pressure drop and holdup method is to be used for the calculations. The roughness is the pipe inside roughness in short length units. Flow efficiency is given as a percentage. This parameter is recommended only when other parameters have been varied in order to match field data. Heat transfer parameters can also be user-specified or left to default values. The ambient temperature may or may not have a vertical gradient. The default overall heat transfer coefficient, U, is set to 1. More detailed heat transfer parameters, such as conductivity of surroundings, insulation, etc., are available if the you want to enter these values as well.

Introduction to PIPEPHASE

41

Pipe

Pipes are flow devices through which fluid flows from one point to another. Pipes can have any orientation (horizontal, vertical, or inclined). The elevation change is defined on a relative basis, and the ambient temperature is dependent upon the medium: air, water, or soil. Pipes can also be insulated or left bare. The mandatory data for a pipe device include name, length and diameter. The optional data include elevation change, roughness, heat transfer and pressure drop method.

<U

dX ^W

5\UfQdY_^ 3XQ^WU

For most systems, the total pressure drop is dominated by frictional forces. The friction factor is determined by the fluid velocity, the pipe roughness and the multiphase flow pattern. The fluid velocity is constrained by the flowrate and the inside diameter of the pipe. The heat transfer from the pipe is calculated at the same time as the pressure drop. The heat transfer can either be turned off (isothermal), set b an overall heat transfer coefficient or calculated from the specified surroundings. The pipe, insulation and ambient conditions can all be set by selecting the appropriate heat transfer option. Initial default values for the Pipe Inside Diameter, Pipe Roughness, Heat Transfer and Pressure Drop Method can all be set through the Global Defaults dialog box, which can be accessed by clicking the corresponding button on the toolbar:

Riser

Risers are vertical or near-vertical with flow in an upward direction only. Elevation is measured in an absolute basis, and there is usually an ambient temperature gradient with varying elevation. Heat loss is simulated using an overall heat transfer coefficient between the fluid and ambient conditions. To specify a downcomer, you can use a pipe with a negative elevation change. For oil or gas well applications, tubing should be used. Like the pipe, initial default values for the Inside Diameter, Roughness, Heat Transfer and Pressure Drop Method can all be set in the Global Defaults dialog box.

5 \UfQ dY_^ 3XQ ^WU

42

<U

^W

dX

Defining Links

Tubing and Annulus

Tubing and annuli have vertical or inclined flow. Wireline length is defined as the length from the surface to the pipe end. Depth is the actual vertical depth taken from the surface. Heat loss for tubing and annuli is simulated using an overall heat transfer coefficient and geothermal gradient. Initial default values for the Inside Diameter, Roughness, Heat Transfer, and Pressure Drop Method can all be set in the Global Defaults dialog box.

4U`dX

<U^WdX

Reservoir Inflow Performance Relationship (IPR)

The Inflow Performance Relationship (IPR) device models the relationship between flowrate and reservoir pressure draw-down or pressure drop at the sand face in a well. Several IPR models are supplied in PIPEPHASE. You can select from five standard models or you can write your own subroutine and use it to model the inflow performance relationship. The Productivity Index (PI) model is used for single-phase liquid systems. The Vogel coefficient model is more suitable for multiphase, liquid-dominated systems, while the gas flow model is best for multiphase, gas-dominated systems. Alternatively, user-defined IPR models may be linked to PIPEPHASE and data for them entered through the IPR device. You can enter tables of reservoir pressure, cumulative production, GasOil Ratio, Condensate-Gas Ratio, Water Cut and Water-Gas ratio. These are used in timestepping to simulate reservoir decline with time. You can enter curves that correlate reservoir pressure or cumulative production with flowing bottomhole pressure and flowrate. These data are then regressed onto one of the standard models. For an IPR with a gas basis, you can specify a drawdown formulation. The Flow Well Pressure, P wf, curves in Figure 25 are user-supplied curves generated from a reservoir simulator. Each individual curve is based on the current reservoir conditions. The time-dependency of each curve is based on the Reservoir Pressure, P r, or the Cumulative Production, Np. With increasing Reservoir Pressure and decreasing Well Pressure, the pressure gradient increases, and the production rate increases. Since cumulative production varies inversely as Reservoir Pressure, the opposite trend is observed for the dependence of production rate on Cumulative Production.

Introduction to PIPEPHASE

43

6\_gY^WGU\\@bUccebU @gV

Figure 25: Flow Well Pressure Curves

3e]@b_T^>
?B

BUc@bUccebU@ b

@b_TeSdY_^BQdUA

The Linear Productivity Index equation shown above is valid only for single-phase flow above Boiling Point Pressure (BPP). Q o denotes the production rate, and PI the productivity index. This equation is derived from the pseudo-steady state equation from Darcys Law. Q o = PI ( P r Pwf ) (1) Darcys Law applied to an oil well in the center of a reservoir is given as: kh ( P r P wf ) Q o = C --------------------------------------------------(2) B o o ( ln x 0.75 + S ) For gas wells, it is expressed as: kh ( P r P wf ) Q o = C -------------------------------------------------------------------- g T r Z ( ln x 0.75 + S + DQ ) where: k = effective permeability h = thickness Bo = oil formation volume factor g = viscosity x = shape factor S = skin factor D = non-Darcy flow constant It is important to specify the basis for the Productivity Index model. The default basis in PIPEPHASE is oil.
2 2 (3)

44

Defining Links

Solution Gas-Drive Reservoir The Linear PI model is not valid for flow below the bubble point, in which multi-phase flow may occur. This is the case with Solution GasDrive Reservoirs. The IPR curve varies with cumulative production. Vogel (1968) modeled this variation by deriving the following equation: P wf P wf 2 Qo - 0.8 ----------------- = 1.0 0.2 ------ Pr Pr Q max Above the bubble point: 1.8 ( Q max Q b ) PI = ------------------------------------Pb
(4)

(5)

where Qb is Qo at the bubble point.


Figure 26: Inflow Performance Curves; Vogels Curve Below Bubble Point
@ bY

@ gV

> @-

@ gV @b

> @ >

A_

A _A ]Qh

Fetkovichs Gas Flow Equation The Fetkovich equation (1975) is derived from the radial flow equation, and is expressed as: 2 2 n Q g = C p ( P r P wf ) (6) This equation can be expressed graphically by taking three well-test data points and plotting them on a logarithmic scale, as shown above. The resulting line will have a slope n, where 0.5 < n < 1.0, and the intercept is log Cp. The greater values of the slope n indicate laminar flow, while smaller values indicate turbulent flow. The Forsheimer (Laminar-Inertial-Turbulent) equation is analogous to the Fetkovich equation. ( P r Pwf ) = AQ g + BQ g Plotting (Pr2-Pwf2)/Qg will yield a line of slope B and intercept A.
2 2 2 (7)

Introduction to PIPEPHASE

45

Figure 27: Three-Point Isochronal Test for Gas Flow Coefficients

h C\_`U-^ \_WA 7 h h

9^dUbSU`d-\_W3 @

\_W@b"@gV"

Horizontal Wells Typically, one observes 3-10 times productivity increase in horizontal wells. The key simulation issues in these cases are:
s s s

IPR segmentation for increasing velocity Velocity gradient component of pressure drop Coning

Bottomhole Completions

Bottomhole completion describes the interface between a reservoir and a well. There are two types of completion: gravel packed and open perforated. The pressure drop through a completion is calculated from permeability and other data you input. PIPEPHASE uses the Jones model for gravel-packed completion and the McLeod model for open-perforated completions. The McLeod equations are based on radial flow, while the Jones equations are based on linear flow.

Figure 28: Completion Models

=S<U_T?`U^@UbV_bQdUT3_]`\UdY_^
SQcY^W SU]U^d 3becXUTj_^U @UbVTYQ]UdUb @U^UdbQdY_^TU`dX

:_^Uc7bQfU\@QS[UT3_]`\UdY_^=_TU\
deRY^W cQ^TcSbUU^ 3U^dUb\Y^U @UbVTYQ]UdUb

de^^U\\U^WdX TbY\\X_\UbQTYec

46

Defining Links

Equipment Devices

This section describes link devices available in PIPEPHASE that have not yet been described in this chapter. Pumps are equipment devices used to increase the pressure in a liquid line. Pump devices are not available for steam or single-phase gas fluids. The mandatory data for a pump device includes the pump name and one of the following: power, outlet pressure, or pump curve (flowrate vs. head). The optional data for a pump device include adiabatic efficiency number of stages, maximum pressure and maximum power. Pump devices should only be used for incompressible fluids. If the fluid is compressible, then the compressor unit should be used instead. You can also set limiting conditions in the form of maximum power and maximum pressure (discharge). To specify suction pressure, you must use the multi-stage compressor. The multi-stage compressor describes a single or multi-stage, multi-train compressor station. It can model the effect of intercoolers and scrubbers. This unit cannot be used for steam systems. If you specify the suction (inlet) pressure for this unit, a special subnetworking algorithm is invoked. This algorithm sizes the compressor power requirements. A heater/cooler simulates the addition or removal of heat to a fluid. You must specify pressure drop and either: total heater/cooler duty or outlet temperature. You may also set limiting conditions (optional) by specifying a maximum duty and/or a minimum/maximum temperature. A separator removes a defined portion of a selected phase from a multiphase stream. It can separate vapor, liquid, liquid water and/or condensate. The fluid that is removed is lost unless it is reinjected. You must specify either the flowrate or percentage of the required phase to be removed. This device does not operate with steam, and is valid for compositional fluids, black oil and condensate problems. The latter problems can be treated by selecting a qualifier for a particular effluent phase. The injection device is used for introducing an injection stream from a lateral source or re-introducing a stream from a separator to a point downstream. Equipment devices cannot be used on the separated stream, but you can flash the stream to the desired temperature and pressure. This device is only used for compositional fluids in single links, and it can also be used for compositional fluids from separators in networks. A check valve prevents flow reversal in a given link. You must specify a check valve diameter when implementing this device. You can change the check valve discharge coefficient. This device is especially useful in network calculations.

Introduction to PIPEPHASE

47

The gas lift valve injects a gas stream into the production tubing, to enhance fluid recovery. You must specify gas flowrate, and you can change gas solubility in oil. This device can be used only for blackoil fluids, and gaslift problems. A separate liftgas PVT data set is required in order to properly describe the gas used. A regulator is used to fix the pressure in the link immediately downstream from it if the upstream pressure is greater. If the stream pressure is lower than the regulator pressure, then the regulator does not change the downstream pressure. This device is especially useful in network calculations. The regulator unit allows you to specify suction pressure as well. A choke restricts flowrate and creates a pressure drop. This device introduces a discontinuity into the defined network structure. The balance between the parts of the network upstream and downstream of this device is solved by PIPEPHASEs subnetworking algorithm, which sizes the choke. You must specify the choke diameter, and you can vary the choke discharge coefficient, as well as the heat capacity ratio. An electric submersible pump is an equipment device used to increase the pressure in a liquid line. Pump devices are not available for steam fluids. You must provide one of the following: power, outlet pressure or pump curve plus motor horsepower, auxiliary power, head degradation, minimum submergence, casing head pressure, or vertical pressure gradient. Orifices, nozzles and venturimeters are fitting devices used to restrict or to measure the flowrate through the pipe. If being used to restrict the flowrate, the pressure drop across an individual orifice, nozzle or venturimeter may be large. You must supply the inside diameter of the inlet, type of orifice and the orifice diameter. Pipe tees are fitting devices used to merge two pipes into one or split one pipe into two directions. To be consistent, the tee should be the last device in a link going to a junction The junction node should have two other links either entering or exiting. Any other arrangement of a tee will be modeled as if the third end of the tee is capped off. Pipe bends are fitting devices used to change the direction of the flow. DP-DT devices simulate equipment for which no standard PIPEPHASE model exists. These devices are typically used to model the performance of specially designed valves and fittings. For these devices, you supply data relating the fluid flowrate, the pressure change and the temperature change in tabular form. These devices can model Wellhead Productivity accurately. If a wellhead flowrate versus pressure graph is available, data from the well test or from the simulation can be used to eliminate the wellbore from the problem.
48 Defining Links

Setting up a Case Study


The Case Study option provides the facility to perform parametric studies and to print multiple problem solutions in a single computer run. Case studies are always performed after the base case problem has been solved. If the base case problem cannot be solved for any reason, then no case studies are performed. Each case study analysis is performed based on the cumulative changes to the flowsheet up to that time. Case studies are an efficient means of obtaining solutions for multiple scenarios to a given problem, and result in large savings in both computer time and cost. For problems requiring iterative solutions, the converged results of the last solution are used as the starting values for the next run. This can result in large computer time savings in runs involving large networks, where it typically takes several iterations to move from the initial pressure estimates to the final converged solution. There is no limit on the number of parameters varied per case study or on the total number of case studies that can be in a given run. The cumulative changes up to a given case study run may be erased and the original base case restored at any time. PIPEPHASE allows you to perform 10 cases and 10 changes per case. Since the case studies are performed sequentially in the order you input, it is best to make changes in an orderly manner, proceeding from high values to low values or low values to high values, but not in random order. This enhances convergence and minimizes total computer time.

Entering Case Study Data

You can enter case study data before you run the base case. When the program runs, the base case will be executed first and the case studies will be executed afterwards. Alternatively, you can run the base case first, then enter case study data and execute the case studies. You can open an already solved flowsheet, add case study data to it and then execute the case studies. You must specify which parameters are to be changed. For each parameter you must supply the:
s

Change Variable Namesselect a source node, sink node, link device,

constraint, or network convergence parameter on which the case study is based.


s

Data Sourceset data to a specified value or have a calculator set the

values for you.

Introduction to PIPEPHASE

49

Parameterlist box displays all the parameters that can be changed

for that particular item. These are explained in greater detail later in this chapter.
s

Change Variable Tothe value for the parameter being changed.

Figure 29: Example Case Study Parameter

Change Types

You can make changes in three different ways.


Global Changes You can change one parameter in the entire problem

using a global command. You do this by supplying the type of parameter you want to change, its old value, and the new value. Only those specified parameters with that old value will then be changed.
Individual Changes Source, sink, and device parameters can be changed

individually. You must specify a name for each source, sink, or device where a parameter change is desired.
Cumulative ChangesWhen performing case studies, you must keep in

mind that any variable changes you input are cumulative. That is, the variable you change in the first case run (after the base case) remains changed for the next run, unless you specify that base case parameters are to be restored.

Variables

Source and Sink Variables When performing case studies on sources, you can vary the pressure, temperature, or flow rate at the source, regardless of fluid properties. The number of additional variable parameters is dependent upon the type of fluid you are working with.

50

Setting up a Case Study

When working with compositional fluids, you can also vary the composition of the source stream. In cases of black oil studies, the Gas/Oil Ratio (GOR) and Water Cut parameters can be changed. For Gas Condensate fluids, you can vary the condensate/gas ratio or the water/gas ratio. For steam, you can change the quality. Although there are few variables one can vary in the sink, these are of prime importance in the design of production fields. The desired flowrate (production) at the sink often determines the efficiency or feasibility of a given design. Thus, the flow rate is one of the allowable case study variables for the sink, as well as the pressure and the injectivity index. Pipe Variables In many wells, the inlet (reservoir) and outlet (wellhead) parameters are usually desired or fixed values, and the equipment linking the two are subject to adjustments to meet specific production goals. Such equipment includes the connections in the system, such as pipes, tubing, annuli, and risers. PIPEPHASE can vary the inner diameter (nominal or actual), roughness, heat transfer coefficient U, and/or the pressure drop for each of these connection devices. Additional parameters can be varied for each distinct component. For pipes, you can vary the length, the elevation change, and or the ambient temperature of the surroundings. For tubing and annuli, you can also vary the temperature gradient. When working with an annulus, you can also change the outer diameter. Device Variables Variation of device variables is especially useful when you are modeling an existing system. It would be impractical to change the connections, such as the pipes or tubing, and so if performance specifications are not being met, the easiest parameters to vary are found in these devices. For pumps and compressor, you can change the power, pressure, and efficiency. You can also vary the number of stages (i.e. single stage or multistage compressor/pump), and certain parameters such as curves and efficiencies can be varied for different stages. In heat exchange networks, you can vary the duty, outlet temperature and pressure drops of any heaters or coolers present. In links, when working with Inflow Performance Relationship devices (IPRs) you can vary the Productivity Index (PI), and/or the coefficient or the exponent in the corresponding IPR model (e.g. coefficient in Fetkovich gas deliverability model, exponent in the Vogel equation).

Introduction to PIPEPHASE

51

Executing the Case Study

Click the Run button to execute the simulation. By default, the Base Case and all case study cycles will be executed. You can restrict this using the Execution Options list option in Case Study Parameters and Results dialog box. A Case Summary report is always produced at the end of the output file. It shows the node pressures, temperatures, and flowrates for each case.

52

Setting up a Case Study

Working with Keyword Input Files


Keyword input files (.INP) are free format ASCII text files that define a PIPEPHASE simulation using specific commands known as keywords. You can import and run keyword files within the graphical user interface. Keyword files play many important roles in PIPEPHASE:
s

They provide an alternate interface with the PIPEPHASE calculational module. They allow you to maintain compatibility with simulations that were run with earlier versions of PIPEPHASE. If you need help with a simulation, you can send your keyword file to SIMSCI for technical support. They provide a compact means of storing simulation input. If you have several similar flowsheets to run, you can create the first simulation within the GUI and then modify its keyword file for each scenario.

s s

You can import existing keyword files into the GUI using the Import... option from the File menu. Keyword files are easy to read and understand and data are entered in the following order:
GENERAL DATA COMPONENT DATA NETWORK DATA THERMODYNAMIC DATA PVT DATA STRUCTURE DATA UNIT OPERATIONS DATA CASE STUDY DATA

Introduction to PIPEPHASE

53

Running the Simulation


The PIPEPHASE solution algorithm can be used to solve any type of pipeline network, from complex, multiphase looped systems to singlephase gas transmission lines. This chapter describes network calculation methods, techniques for achieving better convergence, and the run options available in PIPEPHASE. Internally, PIPEPHASE generates a set of material and pressure balance equations from the input data, and proceeds to solve these equations simultaneously using a Newton-Raphson scheme and a matrix solver. As will be seen in the following section, almost any combination of flow and pressure node conditions can be solved, which gives you tremendous flexibility in solving a wide variety of problems. To assist in setting up networks and to follow good simulation practice:
s

Each boundary node should have one fixed value and one estimated value. At least one boundary node pressure must be fixed.

Pressure Balance Method The methodology for determining the pressure and flow distribution in a pipeline network is based on a pressure balance ( PBAL) solution algorithm. From a network flow balance, the PBAL algorithm first identifies the set of starting link flows which is the minimum set of link flow rates that completely define the network flow distribution. Spur links, which are flowrate-specified isolated sections that do not affect the rest of the solution, are identified and solved, independently of the general network solution. The primary variables for the solution matrix are the starting link flowrates and all unknown pressure values at source boundaries. Pressure imbalances are computed at all fixed pressure sink junction node boundaries, as well as at nodes with two or more incoming flows. Mass Balance Method The mass balance (MBAL) solution method is used to provide PBAL with a good initial estimate of the flow and pressure distribution in the network. This method may also be selected for single phase networks. The algorithm is based on the principle that the sum of all flows into (and out of) all nodes in a network must equal zero in steady-state.

54

Running the Simulation

Calculation Methods

To perform pressure drop and heat transfer calculations, PIPEPHASE divides each flow device into calculation segments. The segment calculation takes into account frictional, elevational, and accelerational pressure drop components. Frictional pressure drop is due to the shear stress between pipe wall and fluid. Elevation pressure drop is a result of the conversion of fluid potential energy into hydrostatic pressure and the accelerational pressure drop is the gain or loss in pressure due to changes in velocity of the fluid. In addition to the pressure balance of the pipe segment, an energy balance is also performed. There must be a balance between energy coming into the segment and energy leaving it. Energy can enter or leave with the fluid or through the flow device walls. The transfer through the walls is governed by the temperature difference between the average fluid flowing temperature and the ambient temperature and by the overall heat transfer coefficient.

Forward Traverse

The calculation segment and pressure drop and temperature change equations are the heart of PIPEPHASEs calculational capability. For flow devices, the calculation segments are strung together and the solution procedure is sequential. Calculation begins at the inlet where the conditions are known. The heat and momentum balance equations are solved, in an iterative fashion for this first segment and the conditions at the other end are found. These calculated conditions become the known conditions for the inlet to the next segment. Calculations progress sequentially until the end of the device is reached. Further flow devices are calculated in the same way until the end of the link is reached. This calculational method is a forward traverse method, which means that the calculation proceeds in the direction of the flow. PIPEPHASE works in segments to determine the pressure, temperature, hold-up, and flow pattern distribution in all flow devices: pipe, riser, tubing string or annulus. A segment is the smallest calculation increment of a larger length of pipe, as shown in Figure 30.
WXgQ\\c VUbdXb_e c ^ bQ d d Q 8U
@1fWD1fW
1^W\U 6\eYT8UQd?ed @?edD?ed

Calculation Segment

Figure 30: Pipe Segment

@9^D9^ 6\eYT8UQd9^

Separate segment sizes can be specified for all horizontal (pipe) and vertical (tubing, annulus, riser) flow devices, either as segment length or the number of segments per device, through the Network Calculation MethIntroduction to PIPEPHASE 55

ods dialog box. These options should be considered prior to any simulation involving significant changes in fluid density. Almost all multiphase and single-phase gas applications, as well as single-phase liquid models with sharp thermal gradients fall under this classification. A flow device may be internally divided automatically by PIPEPHASE into several compositional segments based on a maximum limit to the enthalpy change per segment. This includes pipes, risers, or tubing. A shorter segment size will increase the accuracy of the simulation at the expense of computation time. If you are unsure of an optimal segment size, the simulation should be run first with default segmenting. In subsequent runs, you should adjust segment sizes on the basis of the results of the prior simulations until the optimal point is defined.

Solution Algorithm
Figure 31: PIPEPHASE Solution Algorithm

Figure 31 outlines the segment calculation procedure for every pipe, tubing, annulus, and riser for compositional and steam systems.
CD1BD 79F5>@!D!8!4<] 5CD9=1D5D@ D-D!D" 31<3E<1D5#85CD EC9>7851D21<1 @-@!@"

_edUb\__` @"-@!@5CD D"-D!#D 31<3E<1D58" 8-8"8!

Y^^Ub\__`

@-@5CD

31<36<E94@B?@C 31<3@5CD I5C

_85CD0#8_?#8

>?

D-D88?<4 @-@5CD

>?

_@5CD#0#@_?#3

CD?@

This procedure is iterative, and it requires average conditions of pressure and temperature in order to calculate the phase equilibria and physical properties of the system. These values are then used for the pressure drop and energy balance calculations. To achieve this, PIPEPHASE employs an inner loop for the convergence on pressure, and an outer loop for enthalpy convergence. For black oil or single-phase fluids where there are no enthalpy calculations, the segment calculation procedure reduces to a single iteration loop.

56

Running the Simulation

Line Sizing

For single links, PIPEPHASE can calculate the sizes of pipes, risers, and tubing to meet either a pressure drop or a maximum velocity criterion. You can select from three options:
s s

One flow device with fixed source and sink pressures. Multiple flow devices with fixed source pressure and maximum velocity specification. Multiple flow devices with sink pressure and maximum velocity specification.

With a fixed source pressure and sink pressure, PIPEPHASE sizes all flow devices to the same diameter. With a fixed source or sink pressure and maximum velocity, PIPEPHASE sizes each device separately. You can select all flow devices to be sized or you can select only particular ones for sizing. You can also supply a set of maximum velocities and a corresponding set of diameters or slip densities. During the sizing run, PIPEPHASE checks to see if a device size is such that a maximum velocity is not exceeded. If this specified or calculated maximum velocity is exceeded, then PIPEPHASE will select the next higher line size. Recall that if a range of line sizes is not specified, PIPEPHASE defaults to the schedule 40 inside diameters. You can override this list by specifying your own preferred line sizes. Note that the line sizing option does not result in a decrease of the device diameter. The maximum velocity can be based on one of two criteria. If desired, you can enter a set of maximum velocities corresponding to a set of inside diameters or densities (economic velocity). If you do not enter this data, PIPEPHASE will use the erosional maximum velocity criteria, VEM, as shown below. 100 Tabular Data Default VMAX = f ( f ) = -------(8) f You can change the value of the erosional velocity constant, which is 100 above. You can also enter values for the two-phase slip densities corresponding to the set of maximum velocities.

Sphering (Pigging)

Sphering of a wet gas pipelines is a common operating practice to improve the flow efficiency of the pipeline. PIPEPHASE uses a modified form of the Barua-modified-McDonald-Baker (MB) pigging model to simulate the sphering process. The MB model is a successive steady state model. Normal two-phase flow is represented in Figure 32.

Introduction to PIPEPHASE

57

Figure 32: Normal Two-Phase Flow (Stratified)

6\_g

The pig is launched after steady state flow has been reached. After the pig has been launched four distinct zones of flow occurs in the pipeline the re-established two phase flow zone, the gas flow zone, the liquid slug flow zone and the undisturbed two-phase flow zone. The model assumes that the inlet flow rate remains constant at the steady state rate after the pig has been launched.
Figure 33: Two-Phase Pipeline Flow with Spheres

6\_g

BUUcdQR\YcXUT Dg_@XQcU6\_g

<YaeYTC\eWJ_^U

E^TYcdebRUT Dg_@XQcU 6\_gJ_^U

PIPEPHASE predicts the pressure profile, length of each zone and the position of the sphere as a function of time. In addition, when the liquid slug reaches the end of the pipeline a special slug delivery model is used to model the slug delivery when the liquid slug accelerates. Next calculation continues after slug delivery is completed to calculate the time it takes for steady state flow to be re-established in the pipeline. The first sphere must be launched at the inlet of the first pipe. Subsequent pigs may be launched from downstream pig launching stations when the upstream pig(s) reach the downstream pig launching station. To model the pigging process the pig diameter must be specified in the first pipe. To specify downstream pig launching stations, specify the pig diameter for the corresponding pipe. The program interprets the launching station to be the inlet of the pipe.

Setting the Calculation Tolerances

For networks that require iterative calculations, you can set the pressure convergence tolerance for the solution. For instance, if you do not specify a tolerance pressure value, PIPEPHASE allows for a tolerance of 2 psi. It will then perform the required iterations until it reaches a pressure that is within 2 psi of the desired value. Setting tighter tolerances results in more accurate solutions, at the expense of more calculation time. The
Running the Simulation

58

tolerance should commonly range between 0.5 to 5 psi for pressure. If you anticipate a large drop in pressure, then it may be appropriate to set a higher tolerance. Conversely, for small pressure gradients, you should set a tighter tolerance value. PIPEPHASE allows you to specify tolerances for other parameters, as well. When using the MBAL method, you can specify the flow tolerance, with the units depending on the fluid type (bbl/day for liquid and black oil, MM ft3/day for gas and gas condensate, and MM lb/hr for compositional fluids and steam). You can also specify temperature tolerance for MBAL networks. For PBAL network solution methods, in addition to the pressure tolerance, you can also specify the rate to improve convergence in networks with chokes in critical flow.

Getting Better Convergence

The best way to ensure that PIPEPHASE calculations converge for a particular network is to make sure that the problem is structured properly before running the simulation. The following are a few general recommendations on how to set-up networks to avoid the majority of problems during the solution procedures. These recommendations are preventive measures rather than actual troubleshooting guides for non-converging simulations. Such simulations may require greater attention, depending on the severity of the error. If you specify fluid flowing from a node of low pressure to another of larger pressure, PIPEPHASE will not be able to calculate a solution, unless it reverses the flow. There are cases where the sink node will have a greater pressure than the source node after a solution is reached, as in the case of a pump in a single link. Also, in cases of downhill flows, if gravitational forces are dominant, the flow may be a direction contrary to the pressure gradient. Generally, you should supply pressure estimates only at nodes where a value can be confidently predicted. Every internal node (junction) must have at least one outflowing link and at least one inflowing link. The junction node should only be used in two circumstances:
s

1.

2.

The network structure dictates that one or more links are joining together or splitting apart. You require the generation of a phase envelope or two-phase flo map or flash report (compositional runs only) at a particular point in the network which is not described by any other node.

Introduction to PIPEPHASE

59

3.

There are no other reasons for using junction nodes other than the two previously given. Adding unnecessary nodes only serves to increase the size of the matrix and so increase computing time. Therefore, while there is a tendency for neatness in input by splitting long links into smaller links using junctions, you should bear in mind the possible detrimental effect on the simulation solution procedure. Thus, reducing the number of junctions results in quicker convergence. In the figure shown below, two extra junctions (unnecessary) have been taken out while still retaining all the flow devices.

Note:

Outside of their uses that have been previously indicated, junctions must be viewed as simulation devices only, and should not be confused with any physical representation of the plant.

4.

The first two primary guidelines for good simulation practice when setting up any network simulation in PIPEPHASE are:
s s

There should be only one link to a sink node. There should be only one link from a source node.

In the preceding discussion about junctions, we noted how useful it would be to eliminate superfluous nodes. In the case depicted below, it would seem that we are contradicting this principle by adding two junctions to the already existing design. However, the two guidelines given above take precedence over the number of junctions in the network. In other words, it is preferable to have more junctions rather than to have more than one link coming from a source or going into a node. In some cases, two or more links can be attached to a source or a sink, as shown below. To overcome this limitation, you can construct a dummy pipe to connect the source to a junction. This pipe should have a nearzero pressure drop (short length, large diameter). Similarly, you can connect a dummy pipe to the sink. PIPEPHASE can then solve the resulting network.
2UddUb

CX_bd@Y`U <QbWU94

CX_bd@Y`U <QbWU94

60

Running the Simulation

5.

Some solution paths may oscillate widely due to flow reversals. To prevent flow reversal in specific links, you can implement a regulator into the network. Regulators can be used as zero-pressure drop devices that force flow in a specific direction. For instance, if a certain link is experiencing multiple flow reversals, you can use a regulator to stabilize these oscillations. In the case of flow reversal in interconnected links, you should use the check valve only in the link that causes the first flow reversal. Generally, you should avoid the excessive use of check valves. If all the link flow directions are known, however, you can select the No Flow Reversal option instead of specifying a check valve in every link of the network. If solution path oscillates widely due to flow reversals:
s s s

Use No Flow Reversal option if flow direction in every link is known Use Check Valves in key links if direction is not known in every link Use Flow Rate Damping

Run Options

You can run a PIPEPHASE simulation in several ways:


s s

Interactivelyrun and solve the active simulation. Run Otherlaunch

other user applications from the PIPEPHASE simulation environment.

you to create a simulation on your PC and run it on a remote UNIX machine.

Run Remoteallows

Interactive Run Capabilities

To run your PIPEPHASE simulation interactively, click the Run button on the toolbar, or select File/Run from the menu bar. The Run Simulation and View Results dialog box appears. From this dialog box, you can check simulation data, run simulations, stop and restart simulations, and link to the Results Access System (RAS) programs.

Introduction to PIPEPHASE

61

Figure 34: Run Simulation and View Results Dialog Box

The following options can be selected for running a simulation:


Solve Networksolves the problem as a steady state solution. A keyword input file ( .INP) is first written and the batch execution is initiated. If an

input file already exists, you are asked if it should be overwritten.


Nodal Analysisperforms

detailed engineering analysis of nodes within a

single link.
Line Sizingperforms

detailed engineering analysis of line sizing within a keyword file from the designated source.

single link.
Create Keyword Filegenerates a Run Keyword Fileruns

the selected keyword file.

Component Lumpinggenerates

the binary components from the component lumping data. This option appears for compositional transient systems only. The component lumping operation can be run at any point in the modeling as long as components have been defined. [ TACITE only]
Transient Simulationsolves [TACITE only]

the system using transient simulation data.

Report options will be discussed in the next chapter.

62

Running the Simulation

Run Other

The Run Other option allows you to to launch other user applications from the PIPEPHASE simulation environment. This is useful for running additional engineering applications such as the POPOHZN horizontal well model developed by JNOC. To access other applications:

Click Run Other... within the Run Simulation and View Results log box.

dia-

Select Properties... to configure the application. This allows you to name the application and specify the commands used to invoke the application. Use Browse... to find an executable application.

The configuration also supports additional commands such as specification of the initialization file. For example, the RAS application could be configured as follows:
Application Title: Application Run File Application Argument List:
Results Access G:\SIMSCI\PPHASE\GUI\WINRAS.EXE /i=G:\SIMSCI\PPHASE\USER\PIPEPHASE.INI

Run Remote

PIPEPHASE gives you the ability to create a simulation on your PC and run it on a remote UNIX machine. When you install PIPEPHASE, a batch file named XXREMOTE.BAT will be added to your GUI directory, typically \PIPEPHASE\GUI. This file will allow you to access the remote batch capabilities of PIPEPHASE, assuming that you have the PIPEPHASE calculation engine on a networked UNIX machine. Normally, you should not need to modify this file. In order to use the Run Remote feature, you must define the settings for your configuration.

Select File/Remote Settings from the menu bar. Check the Run Calculations on Remote Computer box to enable this option. Check the Minimize Screen During Execution box to have the program run in the background.

You must supply the following information:


s s

The operating system local on your PC. The host name, user ID, and user files directory path for your remote host machine. Select either the TELNET or RSH option for communicating with the remote host. For the TELNET option, you must also supply a user password.
63

Introduction to PIPEPHASE

Viewing the Results


In addition to the standard output report format, you can generate and view plots, tables, and flowsheet diagrams from PIPEPHASE. This chapter describes how to view these simulation results through the flowsheet, output file, and the Results Access System, and how to integrate them into accurate, professional reports.

Interactive Output

You can interactively view summary results for sources, junctions, and sinks in two ways:
s

Select View Output from the menu bar, and make your selections from the View menu. According to your selection, the node and link labels, pressures, temperatures, and flowrates are displayed directly on the flowsheet.

In the View Output mode, double-click on a source, junction, or sink. The temperature, pressure, and total liquid flowrate (oil + water) for that node is displayed, as shown below.

You can interactively view summary results for links by double-clicking on the link when the program is in the View Output mode. The Link Plot Selection dialog box appears. PIPEPHASE provides you with four plot types.
Note:

To view these plots, select Device Detail as Part, and Plots as Part under Print Options from the General menu before running the simulation.

64

Viewing the Results

For example, the Pressure versus Distance plot is shown below.


Figure 35: Pressure vs. Distance Plot

Output Report

You can examine most of your simulation results through the output report (.OUT) file. PIPEPHASE contains a wide variety of report options for customizing your output format. In the Print Options dialog box, you can choose, amongst other things, which portions of the input data you would like reported. The default print options are given in Table 10 below.
Table 10: Default Print Options
Print Option RAS Database Input Reprint Device Detail Device Style Property Data Plots Flash Report Link Slug Report* Iteration Printout Connectivity Plot Flow Regime Map Optimization Printout Control Default Setting None Full Summary Both None None Full None Off On Off Part

* Item is activated only when Device Detail is set to Part or Full.

The output report for your simulation is automatically generated after the simulation has converged. To view the output report, select Output Report from the Report list box in the Run Simulation and View Results dialog box, and click View . The report is opened in the Programmers
Introduction to PIPEPHASE 65

File Editor, provided by PIPEPHASE. PIPEPHASE appends the .OUT extension to your file name and saves the output file in the same directory that you saved your simulation files. The default directory is C:\SIMSCI\PPHASE\USER. The output from a PIPEPHASE simulation is in three main sections which correspond to the three phases of the PIPEPHASE simulation run. These are the input check and input data reprint; intermediate solution history and output; and the final results output. PIPEPHASE will only continue from one section to the next if no errors are detected. If errors are found, either in the input data or during the solution procedure itself, self explanatory messages will be printed and the simulation will either terminate or, in the case of a solution procedure error, PIPEPHASE will try to resolve the problem and continue with the simulation. A reprint of your keyword input data file is always created for each output file. PIPEPHASE cross-checks the data for logic and consistency. By default, it also prints out the full set of input data which shows all the default values used, as well as the user-supplied data. All, or part, of this full input data reprint can be suppressed if desired via the Print Options dialog box. During solution of a network, PIPEPHASE iterates until it converges to within the tolerance you set, or that which is set by default. A summary of any errors or warnings encountered during that iteration will be produced at the end of each iteration. The iteration option can be used to request additional printout which shows flowrates and pressures at each iteration of the solution path. This can be particularly useful if you have inadvertently given conflicting specifications in the problem setup and the program has failed to resolve the inconsistencies. If well test data have been specified, the inflow performance coefficient is calculated before the solution calculations and the report appears in the intermediate output. The solution output is made up of a number of sections, as indicated below:
s s s s s s s

Flash Report Separator Report Link Summary Node Summary Device Summary Structure Data Summary Velocity Summary

s s s s s s s

Results Summary Link Device Detail Report Link Property Detail Report Slug Report Case Summary Sensitivity Analysis Sphering Report

66

Viewing the Results

Flash Report

A flash report is produced by default for each node in a compositional run unless property tables are being used. This report contains the temperature, pressure, composition, flowrate, and properties for each phase present at each node. The link summary is produced by default for all PIPEPHASE simulations and shows the flowrates, pressure, temperature, and holdups for each link in a tabular format. The flowrates displayed are the volumetric rates at actual flowing conditions for each phase. A negative flowrate indicates that the fluid flow is opposite to the way it is drawn on the flowsheet. The node summary is produced by default and shows the flowrates, pressure, and temperature at each node in a tabular format. The flowrate is shown for each phase, but the flow basis depends on the fluid type. For a single-phase liquid or gas, standard volumetric rates are shown. For a compositional fluid, weight flowrates and gravity are also given. The device summary is produced by default and summarizes each device (pipe, fitting, or item of process equipment) in the order in which they were defined in the link. The table in the report shows the correlation used, inside diameter, length, elevation change, liquid holdup, and the outlet temperature, pressure and liquid fraction. For compositional fluids, a phase envelope and its data points are shown. The Taitel-Dukler Flow Regime map is produced for two-phase flow.

Link Summary

Node Summary

Device Summary

Results Access System

The Results Access System (RAS) is a post-processing feature in PIPEPHASE that allows you to configure and view text reports, tables, and plots of transient results data. RAS provides multiple formats to display the data in an effort to satisfy the range of available software to all users. To prepare data for RAS, your run must contain the command to create a database in order to use the RAS. This command is found in the Print Options dialog box. The database is not required for Sensitivity Analysis and Gas Lift simulations as the RAS produces customized plots to view these results. To run the Results Access System:

After the simulation has converged, click Results Access System in the Run Simulation and View Results dialog box. To activate this dialog box, select File/New to create a new RAS database. Select your file with extension .RAS.

Introduction to PIPEPHASE

67

Figure 36 shows the PIPEPHASE RAS dialog box.


Figure 36: Results Access System

From the General menu, your options are:


Output Format Changeschange

the output units of measure of all results

for the current simulation.


Report Optionsallows

you to choose the plotter used to graph data.

Tables

Tables display results numerically, in a sorted or grouped manner with appropriate headings. They are viewed in a spreadsheet application. A minimum of one plot definition is required. PIPEPHASE RAS allows you to plot inlet/outlet data or all segments data for either the base case or the optimized case. The table is organized by device, link or variable, as you desire. Table title is optional and will be defaulted if left blank. The options within the X-Variable list box are Total Length, Horizontal Length, Device Length, Pressure, and Temperature.

To create a table, click View/Edit... for Table Options from the SIMSCI PIPEPHASE RAS dialog box (Figure 36). The RAS Table Options dialog box appears. Define the table type and the data to be tabulated. Click Add to specify the table variables from selections in the RAS Table Data Options dialog box.

Table data options depend on the simulation type and device link data.

Make your Device and Variable selections from the list boxes and click Add Selection when complete.
Viewing the Results

68

Figure 37: Table Data Options Dialog Box

When youve added all your selections, click to return to the Done RAS Table Options dialog box. Click View to display the table.

Figure 38 shows an example of a table created in RAS. Both the base case and case study are shown for both devices in the link.
Figure 38: RAS Table

Plots

PIPEPHASE allows you to view multiple user-selectable dependent variables on the same plot. You can analyze data along the length of the pipeline for the base case or any other case in the case study. When multiple segments are defined, there is an option to plot the segments at the actual location along the pipe, or plot all points with a starting length of zero. This option is recommended for comparing device data.

To create a plot, click View/Edit... for Plot Options from the SIMSCI PIPEPHASE RAS dialog box (Figure 36). The RAS Plot Options dialog box appears.

The options within the X-Variable list box are Total Length, Horizontal Length, Device Length, Pressure, and Temperature. Plot labels are optional and will be defaulted if left blank.
Introduction to PIPEPHASE

Define the data to be plotted and enter label names.


69

Click Add to specify the plot variables from selections in the RAS Plot Data Options dialog box.

Note that this dialog box is essential identical to the Table Data Options dialog box (Figure 37). Plot data options depend on the simulation type and device link data.

Make your Device and Y-Variable selection from the list boxes and click Add Selection when complete. When youve added all your selections, click Done to return to the RAS Plot Options dialog box. Click View to display the plot.

Figure 39 shows an example of a plot of the temperature profile along a heavy crude pipeline.
Figure 39: RAS Plot

Plot Viewer You have a choice of viewing these plots in either the SIMSCI Plot Viewer or Microsoft Excel 5.0/7.0 Plotter. Plotting graphs in the Plot Viewer is convenient in saving CPU time and conserving RAM. However, you cannot edit the format or display of the graph in this Plot Viewer. If you want to edit the presentation of the graph, such as format the axes labels, change the legend, or use different fonts for the title, etc., you should use Microsoft Excel.

70

Viewing the Results

Fluid Flow Basics


When one encounters the complexity of multiphase fluid flow, the question arises as to why it would not be simpler to design systems which separated phases at or close to the source, thereby encouraging single phase flow throughout the network. This would eliminate the need for the complex calculations that multiphase flow demands, saving time from both a design and maintenance perspective. So, why bother with multiphase flow at all? The answer lies in the practical and economical concerns in the construction of piping networks. Multiphase flow is especially economical in an offshore environment. Building large separation equipment at the wellhead would be difficult and expensive, due to the high cost of offshore platform space. Another concern regards safety issues. Bulky equipment offshore introduces greater fire hazards and requires more maintenance. Furthermore, it is easier to build and maintain a few separators in one site than to support a number of separators spread out across a large field. The most practical and economical design, therefore, would be to take the multiphase fluid at the source, transport it through pipes to the onshore facility, and perform the separations onshore.

SinglePhase Flow

The theoretical basis for fluid flow equations is the general energy equation, which expresses the balance or conservation of energy between two points in a system. The energy equation can be modified, using thermodynamic principles, to form a pressure gradient equation, as shown in equation (9). This equation describes the pressure variation in a pipe inclined at some angle to the horizontal. dP dP dP dP ------ = -----+ -----+ ----- dL elevation dL friction dL acceleration dL g d dP f - sin + ----------- + ----- ---------- = ---g dL 2 g c d g c dL c
2 (9)

The elevation change component is applicable to compressible or incompressible, steady state or transient flow, in both vertical and inclined flow. It is zero for horizontal flow only. For downward flow, sin is negative, and the pressure increases in the direction of the flow. The friction loss term applies to any flow at any pipe angle. It always causes a pressure drop in the direction of the flow. In laminar flow, friction losses are linearly proportional to fluid velocity. In turbulent flow, these losses are proportional to vn, where 1.7 n 2. The friction factor,
Introduction to PIPEPHASE 71

f, in the frictional losses term, is a function of the Reynolds number and pipe roughness. The acceleration term is zero for constant area, incompressible flow. For any flow condition in which a velocity change occurs, as in the case of compressible flow, pressure drops in the direction of increasing velocity.

Friction Factor

The friction factor, f, is a ratio of the pipe wall shear stress to the kinetic energy per unit volume. It is a function of the absolute roughness of the pipe divided by the inside diameter. It is also dependent upon the Reynolds number, which is the ratio of inertial forces to the viscous forces acting on the fluid. When the Reynolds number is small (Re < 3000) viscous forces are dominant, and the flow is said to be in the laminar flow region. Higher Reynolds numbers indicate dominant inertial forces, and this region is called turbulent flow. Laminar flow is characterized by a parabolic velocity profile, while a flat velocity profile is observed in turbulent flow. d --, Re , where Re = --------f = function d
(10)

Figure 40: Single-Phase Flow

BU,# <Q]Y^Qb6\_g

BU.# DebRe\U^d6\_g

@QbQR_\YS@b_VY\U

6\Qd@b_VY\U

Several correlations have been developed expressing the dependence of f upon the /d ratio and Reynolds number. One commonly used correlation for the single phase friction factor is the Moody diagram.

Multiphase Flow

In the past (and in some cases, even today), it was common practice to use the simplistic correlations used for single-phase flow, and to extrapolate them to describe multiphase flow. If pure liquid flow had some given flow characteristics, and pure gas flow had another, then logically, twophase flow should be a composite of these two flow regimes. Not only is this not the case, but the pressure drop between the two cases differs b at least one order of magnitude. As we shall see, the simple definitions that we have applied to parameters such as the friction factor, are subject to more rigorous analysis in the case of multiphase flow.

72

Fluid Flow Basics

Pressure Drop

The pressure gradient function given in equation (9) applies for any fluid in any steady state, one dimensional flow, in which friction ( f), density (), and velocity (v) can be defined. The definition of these variables is what causes most of the difficulty in describing two-phase flow. The calculation of pressure gradients requires values for certain flo conditions, such as velocity and fluid properties. These fluid properties include density, viscosity, and in some cases, surface tension. When calculating these values for multiphase flow, one encounters certain mixing rules and definitions unique to this application. Before adapting the previously derived pressure gradient for multiphase conditions, one should define and analyze some of the more important properties pertaining to multiphase flow. Equation (10) below is of an identical form as that for single phase flow, but one should note that the subscript m (for multiphase) denotes that these parameters are not set values, but can be dependent on the flow conditions. In particular, they are dependent on the relative distribution of the gas and liquid phases. dP dP dP dP -----+ -----+ ----------- = dL elevation dL friction dL acceleration dL f m m m m m d m g dP - m sin + ------------------ -------------- = ---- + -----------gc g c dL dL 2 gc d
2 (11)

Liquid Holdup
AG AL

Liquid holdup is defined as the ratio of the volume of a pipe segment occupied by liquid to the volume of the pipe segment. That is, AL volume of liquid in a pipe segmen - = -----------------H L = --------------------------------------------------------------------------------volume of pipe segment AL + Ag where V = Vg + VL and A = Ag + AL. The value of HL varies from zero, for single-phase gas flow, to one, for all liquid flow. The most common method of measuring liquid holdup is done by isolating a segment of a flow stream between two quick-closing valves, and then measuring the amount of liquid trapped. The remaining space is occupied by gas, and this space is referred to as gas holdup or gas void fraction. This is denoted by Hg and is related to HL by: Hg = 1 - HL No-Slip Liquid Holdup No-slip liquid holdup is defined as the ratio of the volume of the liquid in a pipe segment divided by the volume of the pipe segment which would exist if the gas and liquid traveled at the same velocity (no-slippage).
(12)

Introduction to PIPEPHASE

73

This ratio is calculated from the measured gas and liquid flowrates by the equation: qL H LNS = ---------------(13) qL + qg where qL and qg denote the in-situ liquid and gas flow rates, respectively. Note that the liquid holdup HL is not equal to the no-slip liquid holdup HLNS. To illustrate the difference between liquid holdup and no-slip liquid holdup, consider the example given in Figure 41. These two cases describe two-phase fluid flow along a pipe. The first case describes an uphill flow, while the second case indicates downward flow.
Figure 41: Liquid Holdup Dependency on Elevation

Uphill

Downhill

f7

f<

f<

f7

VL < VG HL > HLNS

VL VG HL HLNS

In the case of uphill and horizontal flow, the gas flows more quickly than the liquid. This is due to the greater influence of gravitational forces upon the liquid than the gas. Also, the less dense gas phase is much more buoyant, or lighter, than the liquid, and flows upward more easily. Therefore, since Vg (velocity of gas) is greater than VL (velocity of the liquid), then from the previous equations describing HL and HLNS, we can see that HL > HLNS. Mathematically, AL qL AL VL - = -----------------------------------H L = ------------------ > H LNS > ---------------AL + Ag q L + qg ( AL V L + A g V g )
(14)

In the case of downhill flow, gravitational forces exert a greater force upon the liquid than the gas, and therefore, the liquid is pulled downward at a greater velocity than the gas (due to greater liquid density). Since VL > Vg in this case, the same equation applies, but the inequality is reversed: HL HLNS
74 Fluid Flow Basics

Horizontal Flow Patterns

Whenever two fluids with different physical properties flow simultaneously in a pipe, a wide range of possible flow regimes exists. The flo pattern of a given system refers to the distribution of each phase in the pipe relative to the other phase(s). Numerous studies have given rise to standard names given to particular patterns, some of which are shown in Figures 42 through 44. 1^^e\Qb GQfi

Figure 42: Segregated Flow

CdbQdYVYUT

Figure 43: Distributed Flow

=Ycd

2eRR\U

Figure 44: Intermittent Flow

@\eW

C\eW

Many pressure loss correlations rely heavily on a knowledge of the existing flow patterns in a given pipe. The description of these flow patterns is what distinguishes the engineers approach to multiphase problems from other perspectives. To clarify this point, examine the following:
s

From a mathematical perspective , the introduction of another phase in a fluid flow problem introduces three new equations into the problem (mass balance, energy balance, and pressure gradient). The interdependence of these equations along with those of the other phase brings much complexity to the problem. From a design perspective, the new phase gives rise to another complication: flow patterns. From the acceptable flow patterns illustrated in these figures, one has another parameter to define the system. From a physicists perspective , the second phase modifies the sonic wave propagation of the system. Sound travels faster through a liquid medium than in a gaseous medium, and so one would expect sound to travel in a two-phase medium at a speed somewhere in between the liquid and gas systems. Contrary to this expectation,

Introduction to PIPEPHASE

75

sound actually travels an order of magnitude slower in two-phase systems than in either liquid or gas mediums.
s

Finally, from an engineering perspective, the addition of an extra phase gives rise to flow patterns, of which the slug flow pattern, illustrated in Figure 44, is the most troublesome and complex to deal with. In single phase flow, the goal was to maximize the capacity of the flow system. In multiphase flow, the goal invariably is to predict, minimize or even eliminate slug flow.

The prediction of flow patterns for horizontal flow is more difficult than for vertical flow. In horizontal flow, the phases tend to separate due to differences in density, causing a form of stratified flow to be very common. When a pipe is inclined at some angle other than vertical or horizontal, the flow patterns take other forms. For inclined upward flow, the pattern is almost always slug or mist. The effect of gravity on the liquid precludes stratification. For inclined downward flow the pattern is usually stratified or annular.

Flow Regime Correlations

Recall that the general pressure gradient equation was composed of three terms: an elevation term, a frictional term, and an acceleration term. The elevation term depends on the density of the two-phase mixture and is usually calculated using a liquid holdup value. The friction term requires the evaluation of a two-phase friction factor (recall Moody diagram in single phase calculations). The acceleration term is usually negligible unless dealing with cases of high flow velocities. The correlations that have been developed for predicting two-phase flowing pressure gradients differ in the manner they use to calculate the three individual pressure gradient components. The correlations are too numerous to describe in detail, so it will suffice to point out the main differences between the multiphase and single phase correlations. Multiphase correlations are based on mixture velocities (sum of superficial velocities, rather than actual velocities). Flow patterns must be taken into account, and these are functions of the superficial velocities, inclination angle, and fluid physical properties. Liquid holdup must also be known to calculate the corresponding density and viscosity values. The friction factor is dependent upon all these aforementioned parameters, and the choice of which correlation to use to evaluate f depends on the demands of the simulation or calculation. These equations are presented below: qL qG v SL = ---- , v SG = ----Superficial Velocities A A
Liquid Holdup

m = H L L + ( 1 H L ) G m = H L L + ( 1 H L ) G

76

Fluid Flow Basics

Mandhane Flow Regime Map The relative distribution of gas and liquid in pipes is known as flow pattern or flow regime. In 1972, G. W. Govier and K. Aziz demonstrated that the importance of relative volumes of each phase on flow pattern suggests that logical coordinates for a simple flow pattern map are vSG and vSL, the superficial velocities (as opposed to earlier work, which used mass flux rates as coordinate axes). In 1974, J.M. Mandhane extended the work of Govier and Aziz and constructed the Mandhane Horizontal Flow Pattern Map, which is shown in Figure 45.
Figure 45: Mandhane Flow Regime Map

"

=Ycd

C\eW

2eRR\U

1^^e\Qb
!

fC<

fC7

CdbQdYVYUT

GQfi

To illustrate the use of the Mandhane map, consider the following example: given the following data for a wet gas pipeline, calculate the flow regime: Gas flowrate = qg = 18.0 ft3/sec Liquid flowrate = qL = 0.77 ft3/sec Pipe diameter = 16.0 in. = 1.33 ft Calculating the superficial velocities yields values of 12.9 ft/sec and 0.55 ft/sec for the gas and the liquid, respectively. Using the Mandhane map, we see that this falls within the slug flow region. In fact, many of the problems encountered in industry reveal pipelines that flow in the slug flow regime. The work of Mandhane is restricted to horizontal pipes, but in common practice, it is almost impossible to get a completely horizontal pipelines. In most, if not all, cases, slight inclinations will occur, and even small changes in inclination angle (<1) can cause dramatic changes in the flow regime.

Introduction to PIPEPHASE

77

Taitel-Dukler-Barnea Flow Regime Map In 1976, Y. Taitel and A. Dukler extended the Mandhane study to account for variations in pipe inclination. The Taitel-Dukler Map is an excellent model which gives a mechanistic analysis of flow regime boundaries for horizontal and near-horizontal flow. (Barnea later extended this analysis to the range of inclination angles.) The basis for this model is that the most common flow regime for horizontal flow is stratified liquid. To consider other flow regimes, they examined the mechanism by which a change from stratified flow could be expected to occur.
Figure 46: Taitel-Dukler Flow Regime Map
'% ! 9^dUb]YddU^d

2eRR\i

fC<VdcUS

1^^e\Qb

CdbQdYVYUT C]__dX

CdbQdYVYUT GQfi

! ! !

fC7VdcUS

Taitel and Dukler presented criteria for the following changes of flow regimes:
s s s s s

Stratified to Intermittent Stratified to Annular Intermittent to Dispersed Bubble Stratified Smooth to Stratified Wavy Annular to Intermittent or Dispersed Bubble

They used this criteria to predict the flow regime for both horizontal and near-horizontal flow. They did not state an inclination angle at which their flow regime boundaries are no longer valid. They superimposed their criteria upon the existing Mandhane map to generate the flow regime shown in Figure 46, which shows the effect of inclination on transition boundaries. The Taitel-Dukler results reaffirmed the observation that slight positive inclination angles promote slug formation and slight negative inclina78 Fluid Flow Basics

tions promote stratification. Their studies revealed that angles as low as 1 cause significant changes. Duns and Ros Flow Regime Map The work of Duns and Ros is an example of the more rigorous studies involving vertical multiphase flow. They considered the contribution of both slip and flow regimes, eliminating common simplifications such as the no-slip condition. They developed correlations to predict liquid holdup and friction factor, and they also developed methods to predict which defined flow regime exists at a given point.
Figure 47: Duns and Ros Flow Regime Map

"

BUWY_^9
@\eW 6\_g 2eRR\U 6\_g

6b_dX6\_g

><F
!

BUWY_^99

BUWY_^999

C\eW6\_g ! !

DbQ^ cYdY_ ^

=Ycd6\_g !
#

"

>7F

The flow regimes are defined as functions of the dimensionless quantities Ngv (Gas Velocity number) and N Lv (Liquid Velocity Number). These are shown in Figure 47 above. There are four main flow regimes which may occur in a vertical pipe.
Region 1: Bubble Flow Region.

The pipe is almost completely filled with liquid and the free gas phase is present in small bubbles. The bubbles move at different velocities and except for density, have little effect on the pressure gradient. The liquid phase is always in contact with the pipe wall. The gas phase is more pronounced. Although the liquid phase is still continuous, the gas bubbles coalesce and form plugs or slugs which almost fill the pipe cross section. The gas bubble velocity is greater than that of the liquid. The liquid in the film may move downward at low velocities. Both the gas and the liquid have significant effects on the pressure gradient.

Region 2: Slug Flow Region.

Introduction to PIPEPHASE

79

Region 3: Mist Flow Region. The

gas phase is continuous and the bulk of the liquid is entrained as droplets in the gas phase. The pipe wall is coated with a liquid film, but the gas phase predominantly controls the pressure gradient. The change from a continuous liquid phase to a continuous gas phase occurs. The gas bubbles may join and liquid may be entrained in the bubbles. The gas phase effects are predominant, though liquid effects are also significant.

Transition Region.

Ansari Flow Pattern Map The Ansari correlation is also available in PIPEPHASE for modeling upward two-phase flow. In 1988, A.M. Ansari developed a comprehensive model composed of a sub-model for flow-pattern prediction and a set of independent mechanistic models for predicting flow characteristics such as holdup and pressure drop in bubble, slug, and annular flow. The first step in this analysis is the development or prediction of flo patterns. Based on the work of Barnea, Taitel, et.al., Ansari predicted different flow patterns by defining transition boundaries among bubble, slug, and annular flows. This Ansari Flow Pattern Map is shown in Figure 48.
Figure 48: Ansari Flow Pattern Map

4Yc`UbcUT2eRR\U
Ce`UbVYSYQ\<YaeYTFU\_SYdi]c !
"

1 2eRR\i

2
!

2Qb^UQ DbQ^cYdY_^ C\eW?b3Xeb^ 4 4


! Ce`UbVYSYQ\7QcFU\_SYdi !
"

1^^e\Qb

Boundary A shows the transition from Bubble to Dispersed Bubble flow which occurs at high liquid rates. In this transition, turbulent forces break large gas bubbles down into small ones. Boundary B shows the transition from Bubble to Slug flow, which is characterized by the coalescence of small gas bubbles into large Taylor bubbles.
80 Fluid Flow Basics

Boundary C is the transition that occurs at high gas velocities, in which the dispersed bubble flow is dominated by turbulence that prevents any agglomeration. Boundary D, the transition to annular flow, is based on the gas-phase velocity required to prevent the entrained liquid droplets from falling back into the gas stream. Barnea modified this transition point by taking into account the effect of liquid film thickness. The second step is the development of physical models for the flow behavior in each flow pattern. This results in distinct models for bubble, slug, and annular flow. Due to the complexity of churn flow, it is not modeled separately, but is treated as part of slug flow.

Addressing Problems Unique to Multiphase Flow

The approach one takes towards a multiphase problem is considerably different from that taken for a single-phase system. Although both concern the solution or evaluation of the pressure drop equation, the multiphase problem involves parameters that are not only dependent upon factors absent in single-phase calculations (i.e. holdup), but are also interdependent with each other. Many correlations for multiphase flow, therefore, demand a simultaneous or iterative solution for certain parameters. For instance, many equations used for predicting two-phase flowing pressure losses can be solved explicitly for a two-phase friction factor. However, the resulting equations are usually a function of liquid holdup. Therefore, a valid comparison of friction factor correlations would rely on using data for which measured holdup data, as opposed to predicted values, were available. These correlations themselves are dependent upon the flow regime. Many correlations for pressure drop and/or liquid holdup are only valid for specific regimes. Use of the Mandhane map for horizontal systems provides an accurate tool for placing a particular system in a flow regime. However, the Mandhane map is restricted to horizontal flow, and when inclinations are present, as they almost always are, then the TaitelDukler-Barnea Flow regime map provides a more accurate description of the system.

Phenomena Unique to Multiphase Flow

Heading Phenomena in Vertical Upward Flow In single-phase vertical upward flow, the pressure gradient increases with increasing flowrate, as expected. A different phenomena is observed for two-phase flow. To understand this, recall that the pressure gradient expression has three components: an elevation term, a friction term, and an acceleration term. At low flowrates, the pressure gradient is dictated by the elevation term. In this region, the pressure drop decreases with increasing flow rate. The flow is unstable at this level, and in indus81

Introduction to PIPEPHASE

try, one may observe sporadic, irregular fluid flow (i.e., alternating between no flow to sudden spurts of fluid flow).
Figure 49: Modeling Vertical Upward Flow

6bYSdY_^4_]Y^QdUT
Dg_@XQcU6\_g

@VbYSdY_^

5\UfQdY_^T_]Y^QdUT
E^cdQR\U 6\_g CdQR\U6\_g

@U\UfQdY_^

aWQc
When more gas is present, the elevation component is not as significant and the friction component begins to predominate. With lower pressure drops, the amount of gas in the pipe increases, and at a particular point (indicated by the minimum of the U-shaped curve in Figure 49) frictional forces dominate, and one observes an increase in the pressure gradient with increasing flow rate. This is the stable region of flow. This phenomena is unique to two-phase flow because of the large difference between liquid and gas densities. In single-phase flow, there is no critical point at which the density of the system changes dramatically with lower pressure or higher flowrate. Density remains roughly constant. When two-phases are present, however, one reaches a critical flowrate at which density, and consequently elevation, factors are overridden by frictional forces, giving rise to this phenomena. Terrain-Induced Slugging This phenomena is very common when liquid flows at a very slow velocity in a downward direction, then has to climb after a certain point. Low liquid velocity makes it very difficult for the fluid to ascend the pipe, and thus, liquid tends to settle down at the valley between the two pipes. Liquid builds up until the flow space is completely occupied, blocking any gas from passing through. At this point, pressure builds up constantly until it is large enough to actually force the liquid to flow upwards along the pipe. This type of flow falls in the slug flow regime, and gives rise to the term, terrain induced slugging.

.. .... . . ... .. .. . . ....

. . . . . .. .. . . . . . . .. .. . .. . . .. . ... . . . .. .. . . . .. .. .. . . . . . .. . . . .. . . .... . .. . . . .. . . . . . . . . .. . . .. . .

82

Fluid Flow Basics

Small Pressure Recovery in Downward Stratified Flows Gravitational forces predominate downward stratified flows. In single liquid-phase downward flow, one measures a distinct pressure gradient between the inlet and outlet of a pipe. In the presence of gas, however, this pressure recovery decreases significantly, due to gravitys negligible effect on the gas. Using gas phase models in these cases models the flow regime better, and in doing so, the calculated pressure recoveries are much lower than those expected for liquid systems. Flow Patterns As demonstrated in the Taitel-Dukler-Barnea map, flow patterns are strongly influenced by pipe inclination. This is especially significant because one almost always has slight inclination in even horizontal pipes. Angles of 1 can produce dramatic differences in flow regimes.

Heat Transfer Calculations

PIPEPHASE performs an energy balance on pipes, risers, tubing, and annuli. The heat transfer depends on the fluid temperature, properties, and flowrate, the temperature and properties of the surrounding medium, and the heat transfer coefficient between the fluid and the medium. PIPEPHASE does not model heat transfer to the surroundings for fittings and equipment devices. For non-compositional gas or liquid fluid models, you can suppress heat transfer calculations for individual flow devices, by specifying isothermal calculations in the general gata list. PIPEPHASE uses a default value for the overall heat transfer coefficient, U, of 1.0 BTU/hr-ft2F. You can also specify different U values either globally or for individual components. For a pipe or tubing, you can supply an overall coefficient or you can request detailed heat transfer calculations. Detailed heat transfer calculations are invoked when you input any one of the parameters required to carry out the calculations. You also supply data for ambient temperature and geothermal gradient. The resistance to heat transfer in wellbores consists of a steady-state component (resistance from tubing to wellbore) and a transient component (resistance from wellbore to rock). The transient effect is modeled by the Ramey FTD function, which is an analytical solution to the diffusivity equation for a homogeneous medium. For partially buried pipes, PIPEPHASE uses a modified form of the Neher formulation to account for heat transfer in the buried part. The Neher formulation applies to totally buried pipes.

Introduction to PIPEPHASE

83

PIPEPHASE uses the Churchill correlation to model heat transfer in the different flow conditions in a pipelaminar, turbulent, and the transition region between laminar and turbulent flow For many pipelines, a balance must be reached between the retention and addition of heat. Heavy crudes usually have such high viscosities and sensitive temperature-viscosity functions that it is important to keep the flowing temperature as high as possible. Waterflood lines in cold environments must be kept above the freezing point. Liquid dropout and hydrate formation in gas and gas/condensate lines can be limited by maintaining or increasing the flowing temperature. There are two ways of doing this insulate the line or install heaters along the line. PIPEPHASE allows up to five layers of insulation for pipes, with user-specified or default conductivities. For onshore pipelines, burying the line or covering it with earth is sometimes an effective means of retarding heat loss. For offshore pipelines, burying the pipe prevents damage by protecting it from anchors or offshore construction material. Generally, some combination of heaters, insulation, and burial constitutes an optimum or nearly optimum operation. Arctic environments usually disallow the burial option because of damage to the permafrost layer. If the compositional fluid model is used, PIPEPHASE performs rigorous heat transfer calculations while taking into account compression and expansion heating effects as well. In the case of downhole applications, you can also input a temperature gradient.

Temperature Calculations

Heat flow through pipes is characterized as: Q = u d ( Tf TA ) L 1 U = ---------------------------------Resistances


(15) (16)

PIPEPHASE calculates heat loss in pipes to determine the temperature changes. Equation 15 shows the basic function for calculating heat loss, Q, over a segment of length L. T f and TA are the temperatures of the fluid and ambient medium, respectively. The pipe diameter is given by d, and U represents the overall heat transfer coefficient. For pipes in PIPEPHASE, the U-value defaults to a value of 1.0 BTU/hrft2F, unless you specify otherwise in the input. PIPEPHASE is able to rigorously calculate the U-value, and also allows you to override individual heat transfer coefficients, if desired. Figure 50 shows a cross-section of a pipe, including each layer through which heat must pass to be transferred from the fluid to the surroundings, or vice-versa. These layers have an overall resistance comprised of the sum of the resistances of the individual layers.
84 Fluid Flow Basics

Figure 50: Insulation Layers

9^cYTU6Y\] Cebb_e^TY^Wc c_Y\QYb_bgQdUb 9^ce\QdY_^ @Y`UGQ\\

The U-value for a pipe is calculated from equation (16) above. Overall resistance is given by: Resistances = Rinside, film, + Rpipe + Rinsulation + Rsurr + Rinside + Routside + Rrad
Resistance RInside, Film RPipe RInsulation RSurr RInside ROutside RRad Due T Boundary layer on the inside of the pipe Material from which the pipe is made Insulation (up to five concentric layers) Surroundings (soil, air, water) An additional fluid resistance inside the pipe (user-defined) An additional ambient fluid resistance on the outside of the pipe (userdefined) Radiation

The last three terms, additional resistance inside the pipe, additional resistance outside the pipe, and radiation, are optional entries.

Large Elevational Changes

The phenomena previously described must be restricted to horizontal flow. When you impose large elevation changes in pipes, the temperature profile of the fluid takes on a different form than those shown in the preceding graphs. When fluid flows downward, as shown in Figure 51, heating effects occur due to the change in elevation (higher fluid velocity, and therefore, higher kinetic energy). Due to this heating effect, the fluid temperature actually approaches an asymptotic temperature that is greater than the ambient temperature. Note the pronounced difference between this case and the Joule-Thomson effect. In horizontal flow, the fluid temperature drops below the ambient temperature, but in the cases of large elevation, the fluid temperature does not even reach the ambient value.
<

Figure 51: Large Elevational Changes


z

Introduction to PIPEPHASE

85

PIPEPHASE performs more rigorous enthalpy calculations for the compositional model (to satisfy the enthalpy balance), and the resulting temperature profile for this case more accurately simulates that produced b a non-compositional model. A graphical comparison of the compositional and non-compositional model are shown in Figure 52.
Figure 52: Rigorous Heat Transfer
3_]`_cYdY_^Q\6\eYT

:_e\UDX_]`c_^S__\Y^W

1]RYU^d DU]`UbQdebU

>_^3_]`_cYdY_^Q\6\eYT

4YcdQ^SU

Gas lines coming down mountains often exhibit the behavior shown by the compositional model in Figure 52. This model incorporates the heating effects due to the change in elevation. Note that the fluid temperature does not drop to the level of the ambient temperature. In the case of the non-compositional model, the fluid temperature drops down to the ambient value. This illustrates that by employing more rigorous heat transfer calculations, severe design errors, such as wrong pipeline sizing, can be avoided.

Effects of Temperature

The importance of the effect of temperature on all system calculations cannot be overstated. Since temperature can have profound effects on fluid properties, phase split, pressure drop/holdup, hydrate formation, wax deposition, and flow pattern (among other parameters), any changes in temperature need to be modeled as accurately as possible. Of primary importance is the effect of temperature on fluid properties. These properties influence most, if not all, of the major calculations that PIPEPHASE performs. Since temperature affects the gas-liquid phase split, pressure drop and holdup calculations are very sensitive to temperature gradients. This determines the flow regime (flow pattern) of the system, upon which the pressure drop calculations are based (i.e., friction factor correlations). PIPEPHASE also has a built-in correlation to determine the point and the type of hydrate formation with the compositional model.

86

Fluid Flow Basics

Applying PIPEPHASE to Downhole Operations


PIPEPHASEs downhole capabilities include the following applications:
s s s

Gas Lift Analysis Electrical Submersible Pump (ESP) Time Dependent Production Planning

Gas lift analysis is used to investigate the effects of lift gas on well production. Another common method of artificial lift is the electrical submersible pump (ESP) . These pumps improve the productivity of wells with flow rates ranging from a few hundred barrels to tens of thousands of barrels per day. Production planning involves the time-dependent interaction between the producing formation(s), and all of the wells, gathering lines, and surface facilities in an oil or gas field, and the impact of this interaction on the overall development strategy of the operating company. PIPEPHASE supplies this capability through its time-stepping feature.

Gas Lift Analysis

ProblemThe

bottom hole pressure is too low to support the fluid column the density of the fluid column by injecting gas into the

in the well.
RemedyReduce

tubing.
DilemmaGas

injection creates additional back pressure which reduces production rate. Reservoir pressure decreases gradually once a field is brought into production. Often there arise situations where the reservoir pressure becomes so low that it is insufficient for the well fluids to reach the wellhead. In these cases, the pressure in the tubing must be artificially boosted, or lifted, to enable the reservoir fluids to reach the surface. Such procedures can be performed by using artificial lift methods. Gas lift is one of the more common artificial lift methods used in the petroleum industry. Other methods include sucker rod pumping, electric submersible pumps, and plunger/chamber lift, to name a few. In gas lift, the object is to introduce gas near the bottom of the tubing string. This injected gas lightens the fluid between the injection point and the wellhead. Thus, the available bottom hole pressure becomes sufficient to lift this column of aerated fluid to the top. Gas can be injected
Introduction to PIPEPHASE 87

continuously (continuous gas lift) or in spurts (intermittent gas lift). PIPEPHASE allows you to model a continuous gas lift analysis, in which you can specify the fluid properties of the gas, specify valve locations, as well as other parameters. Figure 53 shows a typical gas lift installation where gas is injected down a packed annulus and oil and gas are produced through the tubing. Although the reverse case is sometimes possible (though very unusual), it is not presently supported by PIPEPHASE.
Figure 53: Gas Lift

@G8 3QcY^W8UQT@bUcc @38@ 9^ZUSdY_^BQdUcaY^Z


! Vd

E^\_QTY^W7Qc<YVd FQ\fUc

"

Vd

?`UbQdY^W 7Qc<YVdFQ\fU

Vd

9^ZUSdY_^ 4U`dX

In this case, we assume that the static fluid level is somewhere between the topmost valve and the wellhead. Once gas is injected through the annulus, the topmost valve is designed to open first. This lightens the fluid above the topmost valve, causing a reduced pressure on the valve second from the top. The second valve then opens, injecting more gas into the tubing. This process repeats as more and more valves keep opening. Once a lower valve opens, the upper valves are normally designed to close. You will see that the gaslift effects generally increase with depth. Only the bottom most valve allows gas passage into the tubing. This is called the operating valve . The valves above this one merely help in bringing the well into production (i.e. unloading the well). They are therefore called unloading valves. In steady-state operation, PIPEPHASE can calculate the depth of the operating valve.

Designing a Gas Lift System

The main problems faced by the engineer in gaslift design include:


s s s

How much gas should be injected? At what depth should gas be injected? What is the casing head pressure limit?

88

Applying PIPEPHASE to Downhole Operations

s s

What is the wellhead pressure required for target flowrate? What is the depth of the operating valve?

There are four options in PIPEPHASE for gaslift analysis:


s

Generate the pressure profile for a fixed oil production and lift gas rate. Generate a table of oil production versus lift gas rate for fixed pressures. Locate the gas injection valve to match required tubing head pressure. Locate the gas injection valve to match required casing head pressure.

This dialog box appears as part of the simulation definition, and therefore you must enter data into one of these options before continuing on to the next dialog box. You can access these options again anytime by selecting Special Features/Gas Lift... from the menu bar. Gaslift analysis is limited to single link, black oil, continuous gaslift systems. You must follow certain basic rules when setting up gaslift problems, such as: 1. PVT data sets must be available for both the produced reservoir fluid and the injected gas. 2. The production string is automatically named PROD and the gas injection string (annulus) is named GASL. 3. Gas injection rates are user-specified. Option 1 Pressure Profile In Option 1, Pressure Profile, the casing-head pressure and the lift-gas injection rate are fixed. Given values for these parameters, PIPEPHASE calculates the pressure profiles in both the annulus and the tubing for the corresponding production rate. When specifying a gaslift calculation with this option, PIPEPHASE will prompt you to enter values for the lift gas injection pressure and temperature at the casing head, lift gas injection rate, and the vertical depth from the well head to the lift gas injection valve. You can also enter the percent of soluble lift gas which dissolves in the well fluid. This value is defaulted to 100%, and generally should not change.

Introduction to PIPEPHASE

89

Figure 54: Option 1: Pressure Profile


6YhUTBQdUQ^T @bUccebUV_b <YVd7Qc

6YhUT7<FQ\fU4U`dX

6YhUTBQdU6_bBUcUbf_Yb6\eYT

Since you know the injection rate along the well depth, obtaining the annulus pressure profile is relatively simple. Pressure profile calculations in the tubing are done as follows: 1. As oil rate is fixed (calculated from the injection rate), the bottomhole flowing pressure is known, then 2. Use formation GOR to calculate the pressure gradient from the bottomhole to the operating valve, 3. Use total GOR (formation = injection) to calculate the pressure traverse from the operating valve to the wellhead. Option 2 Injection Performance In Option 2, Injection Performance, PIPEPHASE generates a table of oil production versus lift gas rate, given fixed values for wellhead pressures, valve depth and the casing-head pressure. When selecting gaslift option 2, PIPEPHASE will ask you to further specify the injection rates. You can specify up to nine lift gas injection rates in standard gas volume units, and all entries must be greater than zero. As in option 1, you can also enter a value for the percent solubility of the lift gas in the well fluid (generally 100%). For each gas injection rate, there will be an oil flow rate that satisfies the system constraints. At lower gas injection rates, increasing the rate lightens the well fluid and therefore causes a production increase. However, at higher injection rates, the frictional losses in the tubing may be so high that this trend is reversed. There is, therefore, an optimal injection rate, as shown in Figure 56.

90

Applying PIPEPHASE to Downhole Operations

Figure 55: Option 2: Injection Performance

6YhUTG U\\XUQT @bUccebU BQ^WU_V6YhUT <YVd7 QcBQdUc

6YhUT7 <FQ\fU 4U`dX

Figure 56: Example Gas Injection Curve

@b_TeSdY_^BQdU

<YVd7QcBQdU

Note that continuously increasing lift gas rate does not necessarily result in increased production rate. When frictional forces dominate, higher injection rates actually decrease production. The optimal gas injection rate and the corresponding oil production achievable are indicated by the arrows. Option 3 Valve Location - Fixed Tubing Head Pressure (THP) When you select gaslift option 3, Valve Location - Fixed TH , PIPEPHASE will prompt you to specify lift gas injection temperature and pressure at the casing head, injection rate, and up to eight vertical depths from well head to lift gas injection valves. From these specified values, PIPEPHASE will then locate the gas injection valve to match the required tubing head pressure. Figure 57 shows a plot of injection depth versus the production string outlet pressure, which you must also specify. Note that greater injection depths process higher wellhead pressures.

Introduction to PIPEPHASE

91

Figure 57: Option 3: Valve Location Fixed THP

6YhUTBQdUQ^T@bUccebU 6_b<YVd7Qc

4U`dX

BQ^WU_V6YhUT FQ\fU4U`dXc

GU\\XUQT@bUccebU 6YhUTBUcUbf_Yb@bUccebU @9Q^T6\_gbQdU

Option 4

Valve Location - Fixed Casing Head Pressure (CHP) Option 4, Valve Location - Fixed CH , generates a casing head pressure versus gas injection depth curve. PIPEPHASE models valve performance by using the orifice gas pressure drop equation. Identical to option 3, PIPEPHASE prompts you to enter values for lift gas injection temperature and pressure at the casing head, injection rate, and up to eight vertical depths from well head to lift gas injection valves. Also, you can enter the percent solubility of the lift gas in the well fluid, which is generally 100%.
6YhUTBQdUQ^T@bUccebU 6_b<YVd7Qc

Figure 58: Option 4: Valve Location Fixed CHP

BQ^WU_V6YhUT FQ\fU4U`dXc

6YhUTBUcUbf_Yb@bUccebU @9Q^T6\_gbQdU

Gaslift option 4 allows you three additional entries: 1. Orifice inside diameters corresponding to the gas-lift injection valves. 2. Inside diameters of tubing above gaslift valves corresponding to the gas-lift injection valves. 3. Orifice coefficients corresponding to the gas-lift injection valves.
92 Applying PIPEPHASE to Downhole Operations

Electrical Submersible Pump (ESP)

Electrical Submersible Pumps (ESPs) are applicable to a wide range of operating conditions: deep formations, high viscosity fluids, directionally-drilled wells, etc. The primary limiting factor in the efficient operation of an ESP is the amount of associated free gas produced. Free gas (as opposed to gas in solution), which in limited quantities actually improves operation (by increasing overall fluid buoyancy), also progressively degrades performance due to cavitation, ultimately creating a gas lock, at which point the pump ceases operation. T prevent such performance degradation, free gas is frequently (partially) separated downhole, and reintroduced into the production stream downstream of the chok (venting to the atmosphere not being permitted in most areas). The ESP model in PIPEPHASE simulates a downhole pump in terms of its effects on the hydraulics of the well-bore. This includes logic to handle specific features such as gas separation at the inlet (and subsequent re-injection at the surface), and the effect of viscosity on pump performance. Clicking the ESP button in the Link Device Data window brings up the Electrical Submersible Pump dialog box, shown in Figure 59. This is the original Pump dialog box with an additional button for the entry of ESPspecific data.

Figure 59: Electrical Submersible Pump Dialog Box

Introduction to PIPEPHASE

93

There are two categories of data entry under the Electrical Submersible Pump dialog box. The first category is for data specific to the pump, and the second for data specific to a downhole separator located immediately upstream of the pump (to reduce the gas ingestion). Pump-specific data include auxiliary power, submergence depth, casing head pressure, and the vertical pressure gradient. A check box for the Riling correction factor is provided for viscosity-related corrections to the pump performance curves. The Head Degradation Curve (maximum of 5 points) allows the specification of degradation as a function of gas fraction. When a downhole separator exists, you are prompted for the separator name, and either the gas ingestion percent (GIP) rate for the pump, or the pump OD and casing ID, to calculate the GIP internally. Under the Electrical Submersible Pump Curve dialog box, you have a choice of entering up to ten data points or the three constants in each of the quadratic equations representing the head, efficiency and horsepower in terms of the in situ volumetric flow rate.

TimeStepping Production Planning

Although PIPEPHASE is a steady-state simulator, it can accurately model well behavior over an extended period of time. Typically, the time period of analysis extends from a few years to the entire producing life of the field. For such periods, a quasi-steady-state approach is expected to be an adequate representation of the time-dependent problem. This approach can be achieved through successive steady-state PIPEPHASE simulations, each representing a time-step in the operating history of the field. The main components of the time-stepping analysis are:
s s s

Well Grouping Reservoir Depletion Facilities Planning

Well Grouping

Each of the well completion zones in a gathering network from a specific formation or reservoir. The decline in the reservoir pressure with time and the changes in the characteristics of the fluid produced are a function of the total fluid volume produced form the reservoir. For the purposes of these claculations, a well completion is associated with a reservoir group. A reservoir group includes all of the producing zones that contribute to its depletion.

94

Applying PIPEPHASE to Downhole Operations

Reservoir Depletion

The depletion of a reservoir over the life of a field is represented by a decline in average reservoir pressure that affects the production capacity of the associated wells. Additionally, with time, the composition of the product fluid changes. For most reservoirs, the gas-oil ratio increases with time; for a reservoir with an active water drive, the produced water cut increases as the water table creeps up. The reservoir depletion feature will predict the average decline in reservoir pressure for all the completions in the reservoir as a function of the cumulative produced volume. In addition, at the end of every time step, it will update the water cut and GOR in each associated completion zone as simplified functions of the cumulative production rate (or reservoir pressure).

Figure 60: Reservoir Pressure Over Time

@b

ASe]

In PIPEPHASE, the user-specified data for reservoir depletion includes the initial cumulative production rate (Q cum) and the basis for Qcum calculations. The default value for initial Q cum is zero (virgin field) and the default calculation basis is oil (or gas for a gas field). At every time step, PIPEPHASE calculates Q cum by adding production from all the grouped wells. PIPEPHASE also calculates the change in the average pressure, Pr, average, for the reservoir. It is important to note that the initial value of the reservoir is taken to be the value you specified in the Source dialog box. Subsequent values of P r are calculated from Pr, average. This is a different case from the time-step calculations for fluid characteristics, water cut and GOR. In these cases, the initial values are taken from the initial IPR curves rather than those specified in the Source dialog box.

Introduction to PIPEPHASE

95

Well Depletion

Production Rate The reservoir pressure declines by an amount calculated from the grouped wells. This affects the IPR equation or the tabular data for the IPR, since the reservoir pressure, Pr, is the common variable in most IPR equations. Figure 61 illustrates the dependence of production rate upon wellhead pressure and reservoir pressure. As the reservoir pressure declines, so does cumulative production.

Figure 61: Wellhead Pressure as a Function of Production Rate

@b @gV gU\\XUQT `bUccebU

A_

Fluid Characteristics For an active water drive reservoir, the water cut, fw, will increase significantly with increasing production. The data for the f w decline curve can be input in the IPR Decline Data dialog box. However, you must also specify an initial value for fw in the input dialog box for the Source node. Therefore, an ambiguity may exist between the IPR calculated value for initial f w and that entered into the source data. To resolve any discrepancy, PIPEPHASE will use the value calculated from the IPR curve. This data is well specific, and therefore, gives a more reliable value than that input into the source node, which may be an average value.
Figure 62: Water Cut and GOR as a Function of Production Rate

Vg Vg _b 7?B 7?B

A Se]
Similarly, for a Solution Gas Drive Reservoir, the Gas:Oil Ratio (GOR) varies with increasing production. To properly model this time-dependent variation, PIPEPHASE uses the values from the IPR decline curve
96 Applying PIPEPHASE to Downhole Operations

(if you have supplied these). Otherwise, PIPEPHASE uses the initial GOR value youve specified in the Source node. In cases of enhanced oil recovery, PIPEPHASE allows you to specify additional parameters to more accurately model the system. In the case of pressure maintenance in an oil field, an additional well is used to inject fluid (for example, water), into the reservoir to prevent or hinder the decline of reservoir pressure. The cumulative production then becomes a function of the amount of fluid being injected and the physical properties of that fluid.
N

Q cum = Q cum, initial

i=1

w B -----Q t + Bo i

Qi t
i=1

(17)

injection well

production well

If water is injected into an oil reservoir, a given volume of water will not have the same pressure as an equivalent volume of oil. Therefore, PIPEPHASE allows you to enter a Formation Volume Factor (FVF), which takes into account the fluid properties. The FVF is represented by B in the equation above. PIPEPHASE also allows you to specify a deliverability basis for the calculations. The default basis is oil, and this is indicated by the Bo in the denominator within the summation above.

Introduction to PIPEPHASE

97

You might also like