0% found this document useful (0 votes)
90 views11 pages

Flow Computer Application Architecture

The document describes the flow calculation process used in a flow computer application. It involves: 1. Receiving measured field values and checking their validity before calculation. 2. Allowing entry of well composition percentages. 3. Performing flash calculations using pressure, temperature and composition to determine phase properties. 4. Calculating apparent mass flow rates using differential pressure and standards like ISO 5167-4. 5. Applying corrections like De-Leeuw/ISO 11583 to account for liquid presence affecting measurements. The application breaks calculations into modular blocks and uses industry standards to determine critical flow properties and rates.

Uploaded by

jittshong8072
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
90 views11 pages

Flow Computer Application Architecture

The document describes the flow calculation process used in a flow computer application. It involves: 1. Receiving measured field values and checking their validity before calculation. 2. Allowing entry of well composition percentages. 3. Performing flash calculations using pressure, temperature and composition to determine phase properties. 4. Calculating apparent mass flow rates using differential pressure and standards like ISO 5167-4. 5. Applying corrections like De-Leeuw/ISO 11583 to account for liquid presence affecting measurements. The application breaks calculations into modular blocks and uses industry standards to determine critical flow properties and rates.

Uploaded by

jittshong8072
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Confidential – Calculation Block Diagram and Flow Calculation

1. Flow Computer Application Architecture

Our application is also defined as block-oriented application. The application is built


with “blocks” of functions which are interconnected with each other to complete the
whole flow computation. Each “block” has its own functionality to do specific
computation such as “ISO5167”, “ISO6976”,”Flash”, “Totalizer” and etc. All these
formula calculation or functionality has already been proven for its integrity and
compliance to international standards such as ISO, API and etc.

In the figure below its software architecture is shown.

2. Read transmitter values and provide selection mechanism


The FC receives the signals coming from the IOM-001 (hardwired from field to IOM)
via SynEnergy program using Modbus protocol. Within the FC the validity of the
incoming measured values are checked based on the OPC communication status of
the SynEnergy with the field transmitter. When the communication is broken, the
status will change to bad and the FC will fall back upon last good reading or on
keypad values. The FC will also check the input value range and if it is out of the
range, it will also fall back to last good reading or keypad values.

For the FC the following inputs are used per stream. All inputs are retrieved via the
Ethernet link from the IO Module.

1x Differential Pressure (Flow measurement)


1x Differential Pressure (Pressure loss)
1x Pressure
1x Temperature
1x Watercut Meter
Confidential – Calculation Block Diagram and Flow Calculation

3. Well composition input function


The well composition can be entered as keypad values from the SynEnergy HMI parameter
page. The components will be entered as mole %, for each run individually. The following
components will be supported:

Component Description Component Description


C1 Methane C23 Tricosane

C2 Ethane C24 Tetracosane

C3 Propane C25 Pentacosane

iC4 i-Butane C26 Hexacosane

nC4 n-Butane C27 Heptacosane

iC5 i-Pentane C28 Octacosane

nC5 n-Pentane C29 Unitnacosane

neoC5 neo-Pentane C30 Triacontane

C6 Hexane C2H4 Ethene


C6H14_22 2,2-Dimethylbutane C3H6 Propene
C6H14_23 2,3-Dimethylbutane C4H8 1-Butene
C6H14_2 2-Methylpentane C5H10 Cyclopentane
C6H14_3 3-Methylpentane C6H6 Benzene
nC7 n-Heptane C6H12 Cyclohexane
C7H16_2 2-Methylhexane C6H12 Methylcyclopentane
C7H16_3 3-Methylhexane C7H8 Toluene
nC8 n-Octane C7H14 Methylcyclohexane
nC9 n-Unitnane C8H10_O O-Xylene

nC10 n-Decane C8H10_P P-Xylene


C11 Undecane C8H10_M M-Xylene
C12 Dodecane C9H12 1,2,4-Trimethylbenzene
C13 Tridecane N2 Nitrogen
C14 Tetradecane CO2 Carbon Dioxide

C15 Pentadecane CO Carbon Mounitxide

C16 Hexadecane He Helium

C17 Heptadecane H2S Hydrogen Sulphide

C18 Octadecane H2O Water

C19 Unitnadecane CH3OH Methaunitl


Confidential – Calculation Block Diagram and Flow Calculation

Component Description Component Description


C20 Eicosane O2 Oxygen

C21 Heneicosane H2 Hydrogen


C22 Docosane Ar Argon

Unit: all component units are defined in mol-%

Table 1 Well Composition Entry

4. Flash Calculation
The FC application will have a dedicated function block that will:
a) Interact with the Multiflash DLL for on-line flash calculation and
b) Perform some calculations itself in order to get the information required such as condensate
density, gas density, flashed composition and product ratios by providing the well composition
and line conditions such as pressure and temperature.
Because the FC can perform on-line flash calculations, the FC does not require for setting up
interpolation tables which need to be updated and downloaded periodically.
The inputs needed (units converted) for the flash calculation are:
Input Units
Upstream Pressure (measured) [barg]
Upstream Temperature (measured downstream, and converted from down- to [deg C]
upstream by ISO 5167
Well composition (key-in value) [Mole fraction]

Table 2 Inputs for flash calculation

The outputs obtained from the flash calculation are:


Output Units

Line density for wet gas ρwetgas,line [kg/m3]

Line density for condensate  condensate,line [kg/m3]

Line density for gas  gas,line [kg/m3]

Line density for liquid (condensate+water) ρliquid,line [kg/m3]

Gross gas mass fraction relative to the overall composition m gas [-]

Condensate Gas Ratio CGR [-]


Water Gas Ratio, WGR [-]
Flashed gas composition [Mole fraction]

Table 3 Outputs for Flash Calculation


Confidential – Calculation Block Diagram and Flow Calculation

5. Mass flow rate calculation using ISO-5167-4

From the line density of the gas ρ gas,line , upstream pressure and downstream temperature, the
flow computer will calculate the apparent mass flow rate of the gas fraction in the 2-phase
mixture q gas,uncorr [kg/s] and the upstream temperature [deg C] according to the ISO 5167-
4:2003 standard.

q g (tp )  C d EAd 2  gas,line ptp

Where:
q g (tp ) Apparent mass flow rate of the gas fraction in the 2-phase mixture, in
[kg/s]
Cd Discharge coeff. of the Venturi (as determined by calibration), in [-]
Ad Area of the Venturi throat at operating conditions, in [mm2]
 gas,line Density at operating conditions of the gas in the mixture, in [kg/m3]
ptp Differential pressure induced by the two phase flow, as measured
by the venturi meter, in [mbar]

6. Correction for over-reading using De-Leeuw / ISO 11583 algorithm


Because of a liquid presence in the gas flow, the differential pressure meter will over-
read the gas mass flow rate. The over-reading is caused by generally two conditions:
1. The direct blockage of the pipe area by the liquid (both upstream and at the
throat) causing the gas velocity to increase ;
2. The additional energy loss incurred by the gas phase as it accelerates the
liquid through the meter.

Hence, De-Leeuw / ISO 11583 algorithm is applied to correct the over-reading value:

q g (tp )
q gas,corr 
(1  CX  X 2 )

where:

q gas,corr Corrected mass flow rate of the gas fraction (without condensate or
water), in [kg/s]

q g (tp ) Apparent mass flow rate of the gas fraction in the


2-phase mixture, in [kg/s]
Confidential – Calculation Block Diagram and Flow Calculation

X is the Lockhart-Martinelli parameter which is derived as follows:

1  m gas  gas,line
X 
m gas  liquid ,line

with:

mgas Gross gas mass fraction (including water vapour),


relative to overall composition, in [-]

liquid,line Density of liquid (condensate + water), in [kg/m3]

 gas,line Density of gas, in [kg/m3]

C is given by the following equation:

n n
  liquid ,line    gas,line 
C    
    
 gas, line   liquid ,line 

with:

n  0.606(1  e 0.746Frg ) for Frg  1.5

n  0.41 for 0.5  Frg  1.5

Where applicable,
−0.8 𝐹𝑟𝑔𝑎𝑠
𝑛 = max [ 0.583 − 0.18 𝛽 2 − 0.578 exp ( ) , 0.392 − 0.18 𝛽 2 ]
𝐻
H depends on the liquid and is equal to 1 for hydrocarbon liquid, 1.35 for water at ambient
temperature, and 0.79 for liquid water in a wet-steam flow. It is a function of the surface tension
of the liquid.
Confidential – Calculation Block Diagram and Flow Calculation

Frg is the gas Froude number and is given by the following equation:

 v gas    gas,line 

Frg   
 gD  
    liquid ,line   gas,line  

in which:

v gas Superficial gas pipe velocity, in [m/s]

g Local acceleration due to gravity, in [m/s2]

D Upstream pipe diameter, in [m]

v gas can be derived by using an iterative method and ‘seeding’ a velocity based on the q g (tp )
. It can be calculated as follows:

q g ( tp )
v gas 
 D 2 
 gas,line  
 4 

For further iterations q g (tp ) is replaced by 10 consecutives q gas,corr values. It is assumed that
the equation converges to a solution within 10 iterations.

Further correction is applied on the q gas,corr , qcond,corr and qwater ,corr . The correction factor is
determined from the average (deduced correction factor) measurements, which are performed
periodically through tracer dilution. The factor will be stored in the FC as a parameter for the
computation and can be updated manually via the SynEnergy HMI parameter page.

The equations being used are:

qgas,corr,CF  qgas,corr  CF

where:

qgas,corr,CF Corrected gas mass flow rate using correction factor, in [kg/s]

q gas,corr Corrected gas mass flow rate from De-Leeuw equation, in [kg/s]

CF Correction factor, in [-]


Confidential – Calculation Block Diagram and Flow Calculation

qcond,corr,CF  qcond,corr  CF

where:

qcondensate,corr,CF Corrected condensate mass flow rate using correction factor, in [kg/s]

qcondensate,corr Corrected condensate mass flow rate from De-Leeuw equation, in


[kg/s]

CF Correction factor, in [-]

qwater,corr,CF  qwater,corr  CF

where:

qwater ,corr ,CF Corrected water mass flow rate using correction factor, in [kg/s]

qwater,corr Corrected water mass flow rate from De-Leeuw equation, in [kg/s]

CF Correction factor, in [-]

With the condensate-gas-ratio CGR and water-gas-ratio WGR that we obtained from the
MultiFlash calculation, we are able to acquire the mass flow rate for condensate and water
respectively.

The equations being used are:

qcondensate  q gas,corr,CF  CGR

qwater  qgas,corr,CF  WGR

where:

qgas,corr,CF Corrected gas mass flow rate using correction factor, in [kg/s]

qcondensate Mass flow rate for condensate, in [kg/s]

q water Mass flow rate for water, in [kg/s]

CGR Condensate-gas-ratio from flash calculation, in [-]

WGR Water-gas-ratio from flash calculation, in [-]


Confidential – Calculation Block Diagram and Flow Calculation

The CGR and WGR are calculated as follows on a mass basis of the flash computation:

X hl
CGR 
X hg

where:

X hl Condensate mass fraction relative to overall composition, in [-]

X hg Dry gas (without water vapour) mass fraction relative to


overall composition, in [-]

X wl
WGR 
X hg

where:

X wl Water mass fraction relative to overall composition

X hg Dry gas (without water vapour) mass fraction relative to


overall composition, in [-]

Water Liquid Ratio (WLR) is derived from external watercut meter and is expressed in
percentage (%) value into the system.
𝑊𝐿𝑅 = 𝑃𝑒𝑟𝑐𝑒𝑛𝑡𝑎𝑔𝑒 (%) 𝑣𝑎𝑙𝑢𝑒 𝑓𝑟𝑜𝑚 𝑊𝑎𝑡𝑒𝑟𝑐𝑢𝑡 𝑀𝑒𝑡𝑒𝑟
𝑇𝑜𝑡𝑎𝑙 𝑙𝑖𝑞𝑢𝑖𝑑 𝑥 𝑊𝐿𝑅 = 𝐶𝑜𝑛𝑑𝑒𝑛𝑠𝑎𝑡𝑒 & 𝐴𝑞𝑢𝑒𝑜𝑢𝑠 𝑃ℎ𝑎𝑠𝑒
Confidential – Calculation Block Diagram and Flow Calculation

7. Convert composition to a reduced composition


The flashed gas composition obtained from the Flash calculation is a list of 62 components.
This list is reduced to a smaller list before it can be used in other calculation blocks, such as
ISO 6976.
The table below shows the correlation between the flashed composition and reduced gas composition:

Component Component name Formula Acronym Reduced gas


number component
00 METHANE CH4 C1 C1
01 ETHANE C2H6 C2 C2
02 PROPANE C3H8 C3 C3
03 BUTANE C4H10 nC4 nC4
04 2-METHYLPROPANE C4H10 iC4 iC4
05 PENTANE C5H12 nC5 nC5
06 2-METHYLBUTANE C5H12 iC5 iC5
07 2,2-DIMETHYLPROPANE C5H12 neoC5 neoC5
08 HEXANE C6H14 C6 C6
09 2,2-DIMETHYLBUTANE C6H14 2-2-MethylButane C6 (1)
10 2,3-DIMETHYLBUTANE C6H14 2-3-MethylButane C6 (1)
11 2-METHYLPENTANE C6H14 2-MethylPentane C6 (1)
12 3-METHYLPENTANE C6H14 3-MethylPentane C6 (1)
13 HEPTANE C7H16 C7 C7
14 2-METHYLHEXANE C7H16 2-MethylHexane C7 (2)
15 3-METHYLHEXANE C7H16 3-MethylHexane C7 (2)
16 OCTANE C8H18 C8 C8
17 UNITNANE C9H20 C9 C9
18 DECANE C10H22 C10 C10
19 UNDECANE C11H24 C11 - (2)
20 DODECANE C12H26 C12 - (2)
21 TRIDECANE C13H28 C13 - (2)
22 TETRADECANE C14H30 C14 - (2)
23 PENTADECANE C15H32 C15 - (2)
24 HEXADECANE C16H34 C16 - (2)
25 HEPTADECANE C17H36 C17 - (2)
26 OCTADECANE C18H38 C18 - (2)
27 UNITNADECANE C19H40 C19 - (2)
28 EICOSANE C20H42 C20 - (2)
29 HENEICOSANE C21H44 C21 - (2)
30 DOCOSANE C22H46 C22 - (2)
31 TRICOSANE C23H48 C23 - (2)
Confidential – Calculation Block Diagram and Flow Calculation

Component Component name Formula Acronym Reduced gas


number component
32 TETRACOSANE C24H50 C24 - (2)
33 PENTACOSANE C25H52 C25 - (2)
34 HEXACOSANE C26H54 C26 - (2)
35 HEPTACOSANE C27H56 C27 - (2)
36 OCTACOSANE C28H58 C28 - (2)
37 UNITNACOSANE C29H60 C29 - (2)
38 TRIACONTANE C30H62 C30 - (2)
39 ETHENE C2H4 Ethene - (2)
40 PROPENE C3H6 Propene - (2)
41 1-BUTENE C4H8 1-Butene C4H8
42 CYCLOPENTANE C5H10 Cyclopentane C5H10
43 BENZENE C6H6 Benzene C6H6
44 CYCLOHEXANE C6H12 Cyclohexane C6H12
45 METHYLCYCLOPENTANE C6H12 Methylcyclopentane C6H12
46 TOLUENE C7H8 Toluene C7H8
47 METHYLCYCLOHEXANE C7H14 Methylcyclohexane C7H14
48 O-XYLENE C8H10 O-Xylene C8H10_O
49 P-XYLENE C8H10 P-Xylene - (2)
50 M-XYLENE C8H10 M-Xylene - (2)
51 1,2,4-TRIMETHYLBENZENE C9H12 1,2,4-Trimethylbenzene - (2)
52 NITROGEN N2 N2 N2
53 CARBON DIOXIDE CO2 CO2 CO2
54 CARBON MOUNITXIDE CO CO CO
55 HELIUM HE He HE
56 HYDROGEN SULPHIDE H2S H2S H2S
57 WATER H2O H2O H2O
58 METHAUNITL CH3OH Methaunitl CH3OH
59 OXYGEN O2 O2 O2
60 HYDROGEN H2 H2 H2
61 ARGON AR Argon AR

Table 4 Conversion to Reduced Composition

Remarks:
(1) Pseudo-components are combined to the corresponding reduced gas component in order
to generate the reduced gas composition table
(2) Reduced gas composition table is created to expedite real-time calculations at each
iteration by the FC
Confidential – Calculation Block Diagram and Flow Calculation

8. Calculation of gas density at reference conditions (ISO 6976)

Using the ISO 6976 (1995) standard, the base density for gas  gas,base is calculated using
the reduced composition as specified in paragraph 7.
The reference conditions are:
Standard conditions will be 15 deg C and 1.01325 bara.

9. Calculation of condensate density at reference conditions (API 2540)


To obtain Standard Volume Flow rate for condensate, gas and water, following equations
can be applied:

q gas,corr ,CF
Qgas,std 
 gas,base
where:
Qgas,std Standard volume flow rate for gas, in [Sm3/hr]
qgas,corr,CF Corrected gas mass flow rate using correction factor, in [kg/hr]
 gas,base Density of gas at reference conditions, in [kg/Sm3]

q condensate
Qcondensate, std 
 condensate,base
where:
Qcondensate,std Standard volume flow rate for condensate, in [Sm3/hr]
qcondensate Mass flow rate for condensate, in [kg/hr]
 condensate,base Density of condensate at reference conditions, in [kg/Sm3]

q water
Qwater , std 
 water ,base
where:
Qwater,std Standard volume flow rate for water, in [Sm3/hr]
q water Mass flow rate for water, in [kg/hr]
 water,base Density of water at reference conditions, in [kg/Sm3]

Density of water is a parameter and set to 999.102 kg/m3 (15 deg C, 1.01325 bara) in
accordance to API MPMS 11.4.1 (2003). This parameter can be modified via SynEnergy
HMI parameter page. The well specific water density could be obtained from the Process
Datasheet.

You might also like