NazariMoghaddam2017 Report ChokeModelsInADGPRS
NazariMoghaddam2017 Report ChokeModelsInADGPRS
Publication date
2017
Document Version
Final published version
Citation (APA)
Nazari Moghaddam, R. (2017). Implementation of Choke Models in AD-GPRS.
Important note
To cite this publication, please use the final published version (if applicable).
Please check the document version above.
Copyright
Other than for strictly personal use, it is not permitted to download, forward or distribute the text or part of it, without the consent
of the author(s) and/or copyright holder(s), unless the work is under an open content license such as Creative Commons.
Takedown policy
Please contact us and provide details if you believe this document breaches copyrights.
We will remove access to the work immediately and investigate your claim.
Report
September 2017
Author:
Rasoul Nazari Moghaddam
[email protected]
(Post-Doctoral researcher)
Reviewer:
Prof. dr. ir. Jan Dirk Jansen (TU Delft)
[email protected]
(Supervisor)
1
Abstract
This report concerns the addition of a new well control option ‘Flow Through Surface Choke’
(CHK) to AD-GPRS, the Automatic Differentiation General Purpose Research Simulator
developed at Stanford University. The report provides background information on the
modelling of fluid flow through surface chokes and gives details of the implementation in
AD-GPRS.
Table of Contents
Abstract ...................................................................................................................................... 2
Table of Contents ....................................................................................................................... 2
AD-GPRS ................................................................................................................................... 3
The Structure of AD-GPRS........................................................................................................ 3
The Multi-Segment Well in AD-GPRS ..................................................................................... 5
Automatically Differentiable Expression Templates Library .................................................... 7
Flow Through Chokes ................................................................................................................ 8
Empirical models for critical flow .......................................................................................... 8
Empirical models for sub-critical flow ................................................................................... 9
Implementation of Choke Models in AD-GPRS...................................................................... 10
Constraint Equations and Jacobian Matrix Structures .......................................................... 10
Choke Option in the WCONPROD Keyword ...................................................................... 14
Acknowledgments .................................................................................................................... 15
References ................................................................................................................................ 15
EqnSelector LinearSolver
1) Switch variables 1) Solve
AX=B
2) Full set to primary set
As mentioned earlier, it is aimed to explain the choke implementation into AD-GPRS which
has been performed as a part of this research. The choke option was implemented in MSWell
Figure 5. Schematic of the ADscalar and ADvector data types available in ADETL.
As mentioned, an ADscalar data type contains a value member and a gradient member or
members in a customized data type. In the next section, it will be explained that the ADscalar
data type should be used to define the variable parameters (such as gas and liquid flow rates)
to keep the gradient members with respect to the other parameters. Constants used in choke
models can be defined as simple double type value.
where 𝑃1 is the pressure upstream of the choke, 𝑞𝑙,𝑠𝑐 is the liquid flow rate through the choke,
𝑅𝑔𝑙 is the producing gas-liquid ratio, 𝑑𝑐ℎ is the choke diameter and A, B, C, D, E and F are
experimentally-determined constants which are different for different empirical models.
These constant are given in Table 1 in two different units.
𝑑𝑃1 (3d)
𝑞𝑙, 𝑠𝑐 = 𝑞𝑙,𝑠𝑐,𝑐𝑟𝑖𝑡 ∶ = 𝑃1,𝑐𝑟𝑖𝑡 ′
𝑑𝑞𝑙, 𝑠𝑐
provided that the four coefficients are derived from Equation 3a to 3d. It can be shown that
these coefficients are (Jansen, 2017):
𝑐0 = 𝑃4 (6a)
𝑐1 = 0 (6b)
It is noted that there is no discontinuity between the results obtained from the critical and the
sub-critical choke models at critical pressure. Hence, these models can be implemented in the
simulator without the risk of sharp changes of calculated upstream pressures near critical
values.
where 𝐽𝑅𝑊 is the sector of the Jacobian corresponding to the derivatives of the reservoir
equations with respect to the MSWell variables, and 𝐽𝑅𝑅 , 𝐽𝑊𝑅 , and 𝐽𝑊𝑊 are defined in a
similar manner. 𝑅𝑟 and 𝑅𝑤 are the residual vectors of the reservoir and well equations
respectively. 𝛿𝑢𝑟 and 𝛿𝑢𝑤 are the corrections for the reservoir and well variables from the
Newton iteration. Now assuming a well with pressure control, the constraint equation can be
written as:
𝑅1 𝑠𝑒𝑔 = 𝑃1 𝑠𝑒𝑔 − 𝑝𝑡𝑎𝑟𝑔𝑒𝑡 (8)
The structure of the corresponding Jacobian matrix is shown in Figure 7. The dark blue cells
represent non-zero elements. The first twelve rows of the matrix are derived from the
reservoir equations, and the remaining twelve rows are from the well equations. The
constraint equation is the first well equation, which corresponds to the 13th row of the matrix
and is labelled with “ctrl”. The first twelve columns represent the reservoir variables and the
remaining columns represent the well unknowns.
It is noted that 𝑅𝑐𝑡𝑟𝑙 depends on both formation and segment pressures at the perforations. It is
a function of the sand face fluid saturation as well. Therefore, the derivatives of Equation 8
𝜕𝑅 𝑠𝑒𝑔 𝜕𝑅 𝑠𝑒𝑔
with respect to formation pressure ( 𝜕𝑃1 𝑟𝑒𝑠 ), segment pressure (𝜕𝑃1𝑠𝑒𝑔 ), and sand face fluid
𝑗 𝑗
𝜕𝑅1 𝑠𝑒𝑔
saturation ( 𝜕𝑆 𝑠𝑒𝑔 ), should be taken into account. As can be seen in Figure 8, these values are
𝑗
non-zero.
or similarly:
(𝐷 − 𝑃1 𝑠𝑒𝑔 )(𝐹𝑑𝑐ℎ )𝑐
𝑅1 𝑠𝑒𝑔 = 𝑞𝑙,1 𝑠𝑒𝑔 − ( 𝐵 ) (12)
𝐴(𝐸𝑅𝑔𝑙 𝑠𝑒𝑔 )
It is noted that 𝑞𝑙,1 𝑠𝑒𝑔 , 𝑅𝑔𝑙 𝑠𝑒𝑔 and 𝑃1 𝑠𝑒𝑔 should have an ADscalar data type. Hence the
derivatives of the constraint equation can be calculated automatically within AD-GPRS. For
the sub-critical flow, the constraint equation is defined as
𝑅1 𝑠𝑒𝑔 = 𝑃1 𝑠𝑒𝑔 − (𝑐0 + 𝑐1 𝑞𝑙,1 𝑠𝑒𝑔 + 𝑐2 𝑞𝑙,1 𝑠𝑒𝑔 2 + 𝑐3 𝑞𝑙,1 𝑠𝑒𝑔 3 ) (11)
where 𝑐0 to 𝑐3 are defined from Equation 6. In this case, 𝑃1,𝑐𝑟𝑖𝑡 ′ , 𝑞𝑙,1 𝑠𝑒𝑔 , 𝑅𝑔𝑙 𝑠𝑒𝑔 and 𝑃1 𝑠𝑒𝑔
should have the ADscalar data type.
WCONPROD
W1 OPEN CHK 5* 10 10 0.04 1*/
Acknowledgments
This research was carried out within the context of the Integrated Systems Approach to
Petroleum Production (ISAPP) knowledge centre. ISAPP is a joint project of TNO, Delft
University of Technology, ENI, Statoil and Petrobras. The authors acknowledge
Schlumberger for providing multiple academic Eclipse licenses for this work. The authors
also acknowledge Stefano Raniolo for assistance in setting up the simulation models.
Reference
Jansen, J.D., 2017: Nodal analysis of oil and gas production systems. SPE Textbook Series.
SPE, Richardson. ISBN: 978-1-61399-564-8.