Submitted:
15 December 2023
Posted:
19 December 2023
You are already at the latest version
Abstract
Keywords:
1. Introduction
1.1. Background
1.2. Previous work
1.3. Structure of paper
2. System description
2.1. System topology
2.2. Fluid properties
2.3. Well-bore production
2.4. Pump models
Electric Submersible Pump
Booster pump
Pump control input
2.5. Valve models
2.6. Friction loss
2.7. Why dimensionless models?
Example: ESP pump model
Example: control valve
3. Dynamic model
3.1. Balance laws
3.2. Vertical pipes with ESP
- Pressure forces at inlet and outlet of the pipe,
- Flow against gravity, with a vertical height h,with
3.3. Manifold
3.4. Transport pipe
3.5. Combined model
4. Simulation tools



- In Modelica, the independent temporal variable has a fixed name (time), and the time differentiation operator has a fixed name (der). In ModelingToolkit, both of these can be freely named by the user. In order to make unit models work together (e.g., in a standard library), it is, however, necessary to standardize on a name for time (commonly t); differentiation can be given a name as, e.g., Dt = Differential(t) or similar.
- In Modelica, quantities need to be specified with a type (e.g., Real), and are prepended with a qualifier (e.g., constant, parameter) — except for variables. For Julia and ModelingToolkit, the data type is inferred, unless explicitly stated. In the code above, quantities in MTK are grouped within begin...end blocks in macros (identifiers prepended by @, e.g., @parameters).
- Modelica has a simple way to handle implicit algebraic equations, and in many cases an initial guess of the algebraic variable is not required (see variable p_c_ _i in the Modelica code). In ModelingToolkit, initial values for unknowns after structural simplification (“states”) must be provided with numeric values (see variable p_c_ _i in the MTK code).
- In ModelingToolkit, initial values of differential variables can be changed outside of the code, hence default values can be written as Vd_v(t)=23.15e-3. In Modelica, only parameters can be changed outside of the code (after compilation), hence a parameter has been defined to hold the default initial value Vd_v(start = Vd_v0, fixed = true.
- Modelica uses symbol = for mathematical equality; MTK uses symbol ~ since Julia already uses symbol = for assignment.
5. Results
5.1. Reservoir heel to manifold
5.2. Reservoir heel to separator
5.3. Linearized model
5.4. Single-loop controller tuning
5.5. Double-loop controller tuning
- Specify inner loop damping, to provide (over-) damping.
- Compute inner gain from Eq. 71.
- Choose a “small” value for to make the above design valid.
5.6. Controller implementation with nonlinear model
6. Conclusions
Funding
Acknowledgments
Conflicts of Interest
Abbreviations
| CFD | Computational Fluid Dynamics |
| ESP | Electric Submersible Pump |
| MTK | ModelingToolkit |
| R2M | Reservoir heel-to-Manifold |
| R2S | Reservoir heel-to-Separator |
Appendix A. Parameters and Operating Conditions
| Parameter |
|---|
| Parameter |
|---|
| Parameter |
|---|
| Variable |
|---|
| Variable |
|---|
References
- Sharma, R.; Glemmestad, B. Modeling and Simulation of an Electric Submersible Pump Lifted Oil Field. International Journal of Petroleum Science and Technology 2014, 8, 39–68. [Google Scholar]
- Lie, B. ESP Lifted Oil Field: Core Model, and Comparison of Simulation Tools. Scandinavian Simulation Society 2023, pp. 159–166. [CrossRef]
- Sharma, R.Optimal Operation of Gas Lifted and ESP Lifted Oil Fields: An Approach Based on Modeling, Simulation, Optimization and Control. PhD thesis, University of South-Eastern Norway, Kjølnes Ring 56, N-3918 Porsgrunn, Norway, 2014.
- Binder, B.J.T.; Pavlov, A.; Johansen, T.A. Estimation of Flow Rate and Viscosity in a Well with an Electric Submersible Pump Using Moving Horizon Estimation. IFAC-PapersOnLine 2015, 48–6, 140–146. [Google Scholar] [CrossRef]
- Krishnamoorthy, D.; Bergheim, E.M.; Pavlov, A.; Fredriksen, M.; Fjalestad, K. Modelling and Robustness Analysis of Model Predictive Control for Electrical Submersible Pump Lifted Heavy Oil Wells. IFAC-PapersOnLine 2016, 49–7, 544–549. [Google Scholar] [CrossRef]
- Delou, P.d.A.; de Azevedo, J.P.A.; Krishnamoorthy, D.; Jr, M.B.d.S.; Secchi, A.R. Model Predictive Control with Adaptive Strategy Applied to an Electrical Submersible Pump in a Subsea Environment. IFAC PapersOnLine 2019, 52–1, 784–789. [Google Scholar] [CrossRef]
- Santana, B.A.; Fontes, R.M.; Schnitman, L.; Martins, M.A.F. An Adaptive Infinite Horizon Model Predictive Control Strategy Applied to an ESP-lifted Oil Well System. IFAC PapersOnLine 2021, 54–3, 176–181. [Google Scholar] [CrossRef]
- Justiniano, M.; Romero, O.J. Inversion Point of Emulsions as a Mechanism of Head Loss Reduction in Onshore Pipeline Heavy Oil Flow. Brazilian Journal of Petroleum and Gas 2021, 15, 13–24. [Google Scholar] [CrossRef]
- Brkić, D. Review of Explicit Approximations to the Colebrook Relation for Flow Friction. Journal of Petroleum Science and Engineering 2011, 77, 34–48. [Google Scholar] [CrossRef]
- Fritzson, P. Principles of Object-Oriented Modeling and Simulation with Modelica 3.3: A Cyber-Physical Approach, second ed.; Wiley-IEEE Press: Piscataway, NJ, 2015.
- Fritzson, P.; Pop, A.; Asghar, A.; Bachmann, B.; Braun, W.; Braun, R.; Buffoni, L.; Casella, F.; Castro, R.; Danós, A.; Franke, R.; Gebremedhin, M.; Lie, B.; Mengist, A.; Moudgalya, K.; Ochel, L.; Palanisamy, A.; Schamai, W.; Sjölund, M.; Thiele, B.; Waurich, V.; Östlund, P. The OpenModelica Integrated Modeling, Simulation and Optimization Environment. Proceedings of the 1st American Modelica Conference; LIU Electronic Press, www.ep.liu.se: Cambridge, MA, USA, 2018.
- Ma, Y.; Gowda, S.; Anantharaman, R.; Laughman, C.; Shah, V.; Rackauckas, C. ModelingToolkit: A Composable Graph Transformation System For Equation-Based Modeling. arXiv 2021. [Google Scholar] [CrossRef]
- Rackauckas, C.; Nie, Q. DifferentialEquations.Jl — A Performant and Feature-Rich Ecosystem for Solving Differential Equations in Julia. Journal of Open Research Software 2017, 5. [Google Scholar] [CrossRef]
- Lie, B.; Palanisamy, A.; Mengist, A.; Buffoni, L.; Sjölund, M.; Asghar, A.; Pop, A.; Fritzson, P. OMJulia: An OpenModelica API for Julia-Modelica Interaction. Proceedings of the 13th International Modelica Conference, 2019, pp. 699–708. [CrossRef]
- Skogestad, S. Simple Analytic Rules for Model Reduction and PID Controller Tuning. Journal of Process Control 2003, 13, 291–309. [CrossRef]
- Skogestad, S. Simple Analytic Rules for Model Reduction and PID Controller Tuning. Modeling, Identification and Control: A Norwegian Research Bulletin 2004, 25, 85–120. [Google Scholar] [CrossRef]
- Haugen, F. Comparing PI Tuning Methods in a Real Benchmark Temperature Control System. Modeling, Identification and Control 2010, 31, 79–91. [Google Scholar] [CrossRef]
- Nandong, J. Double-Loop Control Structure for Oscillatory Systems: Improved PID Tuning via Multi-Scale Control Scheme. 2015 10th Asian Control Conference (ASCC). IEEE, 2015. [CrossRef]
| 1 | |
| 2 | DigiWell: see Funding. |
| 3 | |
| 4 | Isothermal compressibility is the inverse of bulk modulus. |
| 5 | |
| 6 | “Brake Horse Power”, BHP, in the original publication. |
| 7 | |
| 8 | E.g., https://en.wikipedia.org/wiki/ Darcy%E2%80%93Weisbach_equation |
| 9 | The Colebrook equation, or sometimes known as the Colebrook-White equation. |
| 10 | Slight change in notation. |
| 11 | With quantity x, is the unit of the quantity. |
| 12 | E.g., Microsoft Store |
| 13 | |
| 14 | It was not tested whether ModelingToolkit can handle this implicit algebraic equation. |
| 15 | On-going work on a JuliaSimCompiler.jl for a commercial extension of Julia will increase the possible system size. |
| 16 | Julia’s DifferentialEquations.jl package can be accessed from Python and R. |
| 17 | |
| 18 | It is assumed that the same speed is used for both ESP:s in the vertical pipes. |
| 19 | ModelingToolkit for Julia has support for automatic discretization of PDEs. |























Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).