You are on page 1of 15

Plugin Documentation

Plugin Title: Valves & Fittings


Plugin Type: User Equipment – Surface equipment

Plugin DLL file name: fittings.dll

Video demo: Yes, fittings_2016.mp4

Language/environment: Intel Fortran XE 2013 SP1 update2; Visual Studio 2012

PIPESIM Compatibility: PIPESIM 2017.2 and later versions

Revised Date: December 12, 2018

Version No.: 0.80

Schlumberger Proprietary: No

Author(s)/contact: Mack Shippen (mshippen@slb.com)

Tom Connor (Woodgroup Mustang)

Summary: Allows users to model valves and fittings in surface production


systems

Disclaimer: The user defined plugin described in this documentation was developed independently
based on the published PIPESIM plugin architecture (see “plugins” topic in PIPESIM User Guide). Plugins
may be used to add functionality to PIPESIM not presently available in the commercial release and/or to
prototype functionality that may eventually be added natively to PIPESIM. As such, the plugin described
here has not undergone the same level of rigorous testing performed on the commercial PIPESIM
software and should therefore be considered Beta quality (i.e. not officially supported). Feedback to the
author is encouraged.

Contents:

How to Register
How to Use
Technical Description
References
Troubleshooting

Schlumberger-Private
PIPESIM User Defined Plugin Documentation: Valves and Fittings

How to Register

To register this plugin:

1. Save the .dll file to a local directory.


2. From within PIPESIM, select Workspace > Options > Plugins.
3. Select “Register” and then browse to the dll location.

Once registered successfully, you should see the plugin listed:

Note: when sharing models with other users, they must first register the same plugin.

How to Use

Once registered, you may insert a valve/fitting into the surface network schematic by dragging from the
Insert Tab as shown below:

You will see the fitting in the network schematic and may edit its properties by double-clicking on the
object.

Schlumberger-Private
PIPESIM User Defined Plugin Documentation: Valves and Fittings

All other properties have default values shown in blue which you should edit to reflect the actual fitting
data. It should be noted that the specifications are fixed and some items may not be relevant for the
method or fitting type selected. These situations are explained in the property descriptions in the table
below.

Fitting Parameter Description


Method Select the calculation method used to determine the pressure change
across the valve or fitting
Valve-Fitting type Select the specific type of valve or fitting to model
Nominal diameter The nominal diameter of a valve fitting is an approximate major
diameter and varies with the grade of the fitting. The Crane friction
factor table is based on nominal diameter and is the only place where
nominal diameter is used by this module. The Major diameter is used
for all other calculations.
Major diameter Inside diameter of largest cross sectional area of valve/fitting (typically
the ID of the connecting pipe). If major diameter is undefined, nominal
diameter will be used
Minor diameter Inside diameter of constriction in valve/fitting (if present). This is
ignored for valve/fitting types with no constriction
User Specified K value If the valve/fitting type is set to “User Specified K-value”, the value
specified here is used, otherwise it is ignored. This value will override
the Kf value in equation 1.4.
User Specified Valve If the valve/fitting type is set to “User Specified Valve Coefficient, Cv”,
Coefficient, Cv the value specified here is used, otherwise it is ignored. This value will
be converted to Kf using eqn. 1-6 and then used in equation 1.4.

Schlumberger-Private
PIPESIM User Defined Plugin Documentation: Valves and Fittings

Equivalent length Specify the number of pipe diameters such that the pressure loss is
computed, using the appropriate single phase or multiphase
procedures, to be equal to that for a horizontal section of pipe with a
specified roughness and a length equal to the product of the specified
multiplier and diameter. The specified value will be used if the
Equivalent Length Method is selected and ignored otherwise.

Running Simulations:

If a Valve or Fitting is defined, it will be used in all PIPESIM simulation tasks. Certain tasks (PT Profile,
Nodal Analysis and System Analysis) allow you to select any fitting property as a sensitivity variable.

Results:

A number of calculated results are provided as output. Detailed results are listed under the Node
(equipment) results. For single branch operations (System Analysis, PT Profile, Nodal Analysis) these
may be plotted as well on System Plots.

Fitting Result Description


Temperature differential (DT) Temperature change across the valve/fitting
Pressure differential (DP) Pressure change across the valve/fitting
Enthalpy differential (DH) Enthalpy change across the valve/fitting
Set T Valve/fitting outlet temperature
Reynolds number Reynolds number based on inlet pipe diameter
K-Value Calculated “equivalent” K value based on the selected method
(echoed if user specified)
Valve Coefficient, Cv Calculated “equivalent” Cv value based on the selected method
(echoed if user specified).
Equivalent length (L/D) Equivalent length/diameter ratio based on the method selected (if
Equivalent Length is the method, this will simply be an echo of the
input except for cases where there is an expansion/contraction)
Equivalent length Equivalent length of pipe that would exhibit a pressure loss equal
to that of the valve-fitting

To view detailed results of the valve/fitting, from the Node/Branch or Profile results tab (Network
Simulation) or the System Results or Profile tab (PT profile, Nodal Analysis, System Analysis), filter on
“User Equipment” and select the row as shown below:

Schlumberger-Private
PIPESIM User Defined Plugin Documentation: Valves and Fittings

Schlumberger-Private
PIPESIM User Defined Plugin Documentation: Valves and Fittings

Technical Description
Pressure losses occurring across valves and fittings may be modeled using several approaches.
Generally, fitting losses are minor compared to pressure losses occurring in pipelines, however, for cases
such as piping systems, the combined effects of fitting losses may be substantial.

The pressure drop across the fitting according to the following equation:

𝐾𝑉𝑚2 𝜌𝑚 (1.1)
∆𝑃 = 𝑃2 − 𝑃1 = −
2𝑔𝑐
Where,
(1.2)
𝑉𝑚 = 𝑉𝑠𝑙 + 𝑉𝑠𝑔
(1.3)
𝜌𝑚 = 𝜌𝑙 𝐻𝑙 + 𝜌𝑔 (1 − 𝐻𝑙 )
And,

𝐾 = resistance coefficient (see eq. 1.4)


𝑉𝑠𝑙 = superficial liquid velocity at inlet conditions (ft/s)
𝑉𝑠𝑔 = superficial gas velocity at inlet conditions (ft/s)
𝜌𝑙 = liquid density at inlet conditions (lbm/ft3)
𝜌𝑔 = gas density at inlet conditions (lbm/ft3)
𝜌𝑚 = mixture density at inlet conditions (lbm/ft3)
𝐻𝑙 = in-situ liquid volume fraction at inlet conditions
𝑔𝑐 = 32.2 ft-lbm/lbf-s2
𝑃1 , 𝑃2 = inlet and outlet pressures respectively (lbf/ft3)

This equation is used for all four methods described below, with the only difference being in the way the
K value is calculated – specifically 𝐾𝑓 . The K value itself is comprised of 3 terms:

𝐾𝑓 + 0.5𝑎(1 − 𝛽 2 ) + 𝑏(1 − 𝛽 2 )2 (1.4)


𝐾=
𝛽4
Where,
𝑑1 (1.5)
𝛽=
𝑑2
And,
𝐾𝑓 = frictional resistance coefficient
𝑎 = contraction term multiplier
𝑏 = expansion term multiplier
𝛽 = contraction ratio
𝑑1 = minor diameter
𝑑2 = major diameter

Schlumberger-Private
PIPESIM User Defined Plugin Documentation: Valves and Fittings

The first term in the K equation, Kf, represents the friction due to the shape of the pipe fitting and is the
only term that differs between methods. Kf may optionally be user specified – to do this, select any
method (except equivalent length) and enter a Kf value. The second term is the resistance due to
sudden contraction through any constriction in the fitting and the third term is the resistance due to
sudden expansion after a restriction.

A valve coefficient may be specified as an alternative to Kf. The valve coefficient, Cv, is defined as:

890.9𝑑14 (1.6)
𝐶𝑣 = √
𝐾𝑓

The valve coefficient Cv is defined as the flow rate of 60°F water (in gpm) which can be passed by a valve
with a pressure differential of 1 psi where the minor diameter is in inches.

The Beta term represents the ratio of contraction – that is the minor diameter divided by the major
diameter. If the major diameter is not specified, the nominal diameter of the fitting is used.

Note: For reducers and expanders, the Hooper and Darby methods are expressed differently – refer to
tables below.

Equivalent Length (L/D) Method


The equivalent length method1 is the oldest and simplest approach whereby the K value is fixed based
on the type of valve or fitting. The K value is determined based on the equivalent length of pipe that
would result in the same pressure loss across the component. The equivalent length is specified based
on a ratio of the length of pipe to internal diameter (L/D).

The K value is then calculated based on the equation below:


𝐿 (1.7)
𝐾𝑓 = 𝑓
𝐷 𝑡

Where 𝑓𝑡 is the turbulent friction factor calculated using the Crane1 method. T lists various L/D values
used for different valves and fittings based on this approach.

This approach does not distinguish between laminar and turbulent flow that may occur in the equivalent
pipe length and also does not properly account for the exact scaling of valves and fittings.

Crane Method
The Crane method uses a more rigorous approach to calculate K values based on geometric parameters
associated with valves and fittings. However, this method assumes turbulent flow and does not reflect
any Reynolds number dependence.
(1.8)
𝐾𝑓 = 𝐾𝑐 𝑓𝑡
The full set of equations used to calculate these K values are given in Crane Technical paper 4101.

Schlumberger-Private
PIPESIM User Defined Plugin Documentation: Valves and Fittings

Hooper 2K Method
The Hooper 2K Method may also be used for calculating pressure losses across valves and fittings. This
method addresses two of the shortcomings of the Crane method in that it accounts for the Reynold’s
number and partially adjusts for scaling effects. For this method, the resistance coefficient is calculated
using the equation,
𝐾1 1 (1.9)
𝐾𝑓 = + 𝐾2 [1 + ]
𝑅𝑒 𝐷
Where,
𝐷
( ) 𝑉𝑀 𝜌𝑁𝑆 (1.10)
𝑅𝑒 = 12
𝜇𝑀
And,

𝐾𝑓 = resistance coefficient
𝐾1 = Hooper K1 parameter
𝐾2 = Hooper K2 parameter
𝐷 = pipe inside diameter (inch)
𝑉𝑀 = Fluid mixture velocity (ft/s)
𝜌𝑁𝑆 = Fluid mixture density (lbm/ft3 )
𝜇𝑀 = mixture viscosity (lb/ft-s)
𝑅𝑒 = mixture Reynolds number

Vm is defined by equation (1.2) and 𝜌𝑁𝑆 is defined using equation (1.3). The downstream pressure P2
can then be computed using equation (1.1).

Darby 3K Method
The Darby 3K method is generally considered to be the more advanced method and is recommended.
This method is essentially an extension of the Hooper 2K method to better account for scaling effects.
𝐾𝑚 𝐾𝑑 (1.11)
𝐾𝑓 = + 𝐾𝑖 [1 + 0.3 ]
𝑅𝑒 𝐷
Where,
𝐾𝑓 = resistance coefficient
𝐾𝑚 = Darby Km parameter
𝐾𝑖 = Darby Ki parameter
𝐾𝑑 = Darby Kd parameter
𝐷 = pipe inside diameter (inch)
𝑅𝑒 = mixture Reynolds number (eqn. 1.9)

Schlumberger-Private
PIPESIM User Defined Plugin Documentation: Valves and Fittings

Tables of Valve/Fitting Coefficients


E
Length Crane Hooper Hooper Darby Darby Darby expansion contraction

Valve/Fitting type L/D Kc/Ft K1 K2 Km Ki Kd a b

Valve: Globe: Std 340 340 1500 4 1500 1.7 3.6  


Valve: Globe: Angle 45-BWeld/Flgd 55 55 1000 2 950 0.25 4.0  
Valve: Globe: Angle 90-Flgd 150 150 1000 2 1000 0.69 4.0  
Valve: Globe: Angle 90-BWeld 55 55 1500 1.5 1500 0.46 4.0  
Valve: Swing Check Y Body-Thrd. 100 100 1500 1.5 1500 0.46 4.0 0 0
Valve: Swing Check Top Entry-
BWeld/Flgd 50 50 1500 1.5 1500 0.46 4.0 0 0
Valve: Lift Check-Std. Globe 600 600 2000 10 2000 2.85 3.8  
Valve: Lift Check-Y Body Globe 55 55 1000 2 950 0.25 4.0  
Valve: Ball-Std. 3 3 300 0.1 300 0.017 3.5 see A-1 below see A-2 below
Valve: Gate-Std. 8 8 300 0.1 300 0.037 3.9 see A-1 below see A-2 below
Valve: Plug-Std. 8 18 300 0.1 300 0.084 3.9 1 see A-3 below
Valve: Plug-3 Way Branch Flow 90 90 500 0.15 500 0.41 4.0 1 see A-3 below
Valve: Plug-3 Was Flow Through 30 30 300 0.1 300 0.14 4.0 1 see A-3 below
Elbow: Std.Thrd.45 (R/D=1) 16 16 500 0.2 500 0.071 4.2 0 0
Elbow: Std.Thrd.45 (R/D=1.5) 12 12 500 0.15 500 0.052 4.0 0 0
Elbow: Std.Thrd.90 (R/D=1) 30 30 800 0.2 800 0.071 4.2 0 0

Elbow: Std.Thrd.90 (R/D=1.5) 16 16 800 0.2 800 0.071 4.2 0 0


Bend: Std. Flanged,Welded (R/D=1.0) 20 20 800 0.25 800 0.14 4.0 0 0
Bend: Std. Flanged,Welded (R/D=1.5) 14 14 800 0.2 800 0.066 3.9 0 0
Bend: Std. Flanged,Welded (R/D=3.0) 12 12 800 0.32 800 0.056 3.9 0 0
Bend: Std. Flanged,Welded (R/D=6.0) 17 17 800 0.32 800 0.075 4.2 0 0
Tee: Thru Run-Thrd. (R/D=1) 20 20 200 0.1 200 0.091 4.0 0 0
Tee: Thru Run-BWeld/Flgd (R/D=1) 11 11 150 0.5 150 0.05 4.0 0 0
Tee: Thru Run-StubIn Branch 1 1 100 0 100 0 0.0 0 0
Tee: Thru Branch-Thrd. (R/D=1) 60 60 500 0.7 500 0.274 4.0 0 0
Tee: Thru Branch-Thrd. (R/D=1.5) 31 31 800 .4 800 .14 4.0 0 0

Tee: Thru Branch-StubIn Branch 75 75 1000 1 1000 0.34 4.0 0 0

E
Length Crane Hooper Hooper Darby Darby Darby expansion contraction

Reducer/Expander type L/D Kc/Ft K1 K2/Ft Km/Ft Ki Kd a b

Reducer: Sudden/Sharp 0 0.5 0.6 0.48 1.92 0.6 1.6 0 see A-4 below
Reducer: Concentric: 60 deg Taper 0 0.5 0.6 0.48 1.92 0.6 1.6 0 see A-4 below
Reducer: Eccentric: 45 deg Taper 0 0.5 0.6 0.48 1.92 0.6 1.6 0 see A-5 below
Expander: Sudden/Sharp 0 0.5 2 0.8 3.2 5.2 2.6 see A-6 below 1
Expander: Concentric: 60 deg Taper 0 0.5 2 0.8 3.2 5.2 2.6 see A-6 below 1

Expander: Eccentric: 45 deg Taper 0 0.5 2 0.8 3.2 5.2 2.6 see A-7 below 1

Schlumberger-Private
PIPESIM User Defined Plugin Documentation: Valves and Fittings

Crane Hooper 2K Darby 3K


𝜃
𝑖𝑓 𝜃 < 45°: 𝑎 = 1.6 sin ( )
2
A-1 𝜃 same same
𝑒𝑙𝑠𝑒: 𝑎 = √ sin ( )
2

𝜃
𝑖𝑓 𝜃 < 45°: 𝑏 = 2.6 sin ( )
A-2 2 same same
𝑒𝑙𝑠𝑒: 𝑏 = 1
𝜃
A-3 𝑏 = sin ( ) same same
2

𝜃 Overall 𝐾 term Overall 𝐾 term


A-4 𝑏 = √sin ( ) calculated by B-1 calculated by B-1
2
below below

𝜃 Overall 𝐾 term Overall 𝐾 term


A-5 𝑏 = √sin ( ) calculated by B-2 calculated by B-2
2 below below
𝑏=1 Overall 𝐾 term Overall 𝐾 term
A-6 calculated by B-3 calculated by B-3
below below
𝜃 Overall 𝐾 term Overall 𝐾 term
𝑏 = sin ( )
A-7 2 calculated by B-4 calculated by B-4
below below
Table A: Expansion – Contraction term multipliers

Where θ is the deflection angle.

10

Schlumberger-Private
PIPESIM User Defined Plugin Documentation: Valves and Fittings

Hooper 2K Darby 3K
𝑅𝑒 ≤ 2500: 𝑅𝑒 ≤ 2500:
160 1 4 𝜃 160 1 4 𝜃
𝐾 = [(2𝐾1 + ( )) (( ) − 1)] √sin ( ) 𝐾 = [(2𝐾𝑖 + ( )) (( ) − 1)] √sin ( )
𝑅𝑒 𝛽 2 𝑅𝑒 𝛽 2
B-1 𝑅𝑒 > 2500: 𝑅𝑒 > 2500:
1 2 1 2 𝜃 1 2 𝜃
𝐾 = (𝐾1 + 𝐾2 ) ( ) (( ) − 1) √sin ( ) 𝐾 = (𝐾𝑖 + 𝐾𝑚 ) ( ) √sin ( )
𝛽 𝛽 2 𝛽 2

𝑅𝑒 ≤ 2500: 𝑅𝑒 ≤ 2500:
4
160 1 𝜃 160 1 4 𝜃
𝐾 = [(2𝐾1 + ( )) (( ) − 1)] 1.6 (sin ( )) 𝐾 = [𝐾𝑑 (2𝐾𝑖 + ( )) (( ) − 1)] (sin ( ))
𝑅𝑒 𝛽 2 𝑅𝑒 𝛽 2
B-2 𝑅𝑒 > 2500: 𝑅𝑒 > 2500:
1 2 1 2 𝜃 1 2 𝜃
𝐾 = (𝐾1 + 𝐾2 ) ( ) (( ) − 1) 1.6 (sin ( )) 𝐾 = 𝐾𝑑 (𝐾𝑖 + 𝐾𝑚 ) ( ) (sin ( ))
𝛽 𝛽 2 𝛽 2

𝑅𝑒 ≤ 4000: 𝑅𝑒 ≤ 4000:
4
1 𝐾 = 𝐾𝑖 (1 − 𝛽 4 )
𝐾 = 𝐾1 (1 − ( ) ) 𝑅𝑒 > 4000:
𝛽
B-3 𝑅𝑒 > 4000:
2 𝐾 = (1 + 𝐾𝑚 )(1 − 𝛽 2 )2
1 2
𝐾 = (1 + 𝐾2 ) (1 − ( ) )
𝛽

𝑅𝑒 ≤ 4000: 𝑅𝑒 ≤ 4000:
1 4 𝜃
𝐾 = 𝐾1 (1 − ( ) ) 𝐾 = 𝐾𝑖 (1 − 𝛽 4 ) (sin ( ))
𝛽 2
𝑅𝑒 > 4000:
B-4 𝑅𝑒 > 4000:
2
1 2 𝜃
𝐾 = (1 + 𝐾2 ) (1 − ( ) ) 𝐾 = 𝐾𝑑 (1 − 𝐾𝑚 )𝛽4 (sin ( ))
𝛽 2

Table B: Expansion/Contraction resistance coefficient formulas for Hooper & Darby methods

11

Schlumberger-Private
PIPESIM User Defined Plugin Documentation: Valves and Fittings

Sudden Expansions Contractions due to Adjacent Pipes of Differing Diameters


PIPESIM will by default calculate the pressure losses associated with sudden expansions or contractions
associated with sudden pipe diameter changes. Therefore, this effect should not be modeled with the
valve/fitting plugin described in this document. You can of course do this and by inserting the
valve/fitting into the flow diagram to divide the two pipes, the PIPESIM calculation is ignored. This may
be advisable for concentric/eccentric reducers and expanders (i.e. not “sudden”).

The approach PIPESIM uses for sudden expansions and contraction is described as follows.

When a change in pipe diameter occurs, the junction between the non-matching diameters are assumed
to be straight-edged, and to cause pressure reduction due to turbulence effects. This approach is based
on the method described by Perry5.

The pressure loss is calculated as:

𝐾𝑉𝑚2 𝜌𝑚 (1.12)
∆𝑃 =
144 ∗ 2𝑔𝑐
Where for expansions,
𝑎1 2 (1.13)
𝐾 = (1 − )
𝑎2

And for contractions,


𝑎2 (1.14)
𝐾 = .5357 − .5414 ( )
𝑎1
Where,

𝑎1 = pipe area of upstream segment (ft2)

𝑎2 = pipe area of downstream segment (ft2)

Notes:

1. Eqn. 1.13 is fitted to a straight line from data in Perry and is very close to Crane1 equation 2-10
2. The calculation is skipped for Reynolds numbers of less than 2000

The results of this calculation are only reported in the output file if the pressure loss exceeds a specified
limit. By default this limit is 10 psi, however this can be changed by entering the following single branch
keyword in the Simulation Settings > Advanced menu:
OPTIONS SECLIM = X

Where X is the threshold (in psi units) below which SEC losses are not reported. When SEC losses are
reported, they appear in the output file as shown in this example:

12

Schlumberger-Private
PIPESIM User Defined Plugin Documentation: Valves and Fittings

Note: By default the engine output file is not shown. To display the engine output file, go to Workspace
> Options > Advanced and select the option to “Show Engine Output Files”.

13

Schlumberger-Private
PIPESIM User Defined Plugin Documentation: Valves and Fittings

References
1. Crane Co.: "Flow of fluids through valves, fittings and pipe", Crane Technical Paper No. 410, New
York, 1988.
2. Hooper, W. B.: “The Two-K Method Predicts Heat Losses in Pipe Fittings”, Chemical Engineering.
88, 17, p. 97-100, August 24, 1981.
3. Darby, R. “Correlate Pressure Drops through Fittings”, Chemical Engineering, Pg. 101-104, July,
1999.
4. Darby, R. “Chemical Engineering Fluid Mechanics”, Second Edition, Taylor and Francis, 2001.
5. Perry, R. H., Green, D.W.: “Perry’s Chemical Engineering Handbook”, 7th ed., McGraw-Hill, 1997.

14

Schlumberger-Private
PIPESIM User Defined Plugin Documentation: Valves and Fittings

Troubleshooting

Issue: Registration fails due to lack of access to plugins configuration file:

Solution:

To get around this, do the following:

1. Right-click on the PIPESIM Desktop icon or its listing from the Start Menu and select
“Properties”.
2. From the “Compatibility” tab, select the check box “Run this program as administrator”.
3. Select “Apply”

From within Windows Explorer, for each of these directories:

• C:\ProgramData\Schlumberger\Production
• C:\Program Files\Schlumberger

1. Right-click on these directories and select “Properties”


2. Uncheck the “read only” square and select Apply.

Issue: On occasion (after copying/pasting a valve/fitting) the properties are not visible:

Solution: Save and reopen the model.

15

Schlumberger-Private

You might also like