What is it?
The FlowRegimeEngine is a computer program which calculates frictions, volume fractions and flow regimes for two- and three-phase pipe flow. It is used as a building-block in third-party software for multi-phase flow assurance simulations.
When run in steady-state mode, the FlowRegimeEngine takes superficial velocities, fluid properties and pipe data as input. It returns velocities, volume fractions, mass fractions, pressure losses, forces on each phase, and the flow regime. When used for transient calculations, the input superficial velocities are replaced by the phases’ velocities and volume fractions, while the returned variables are the same as for steady-state.
The third-party calling program typically calculates all parameters in many points along the line. The FlowRegimeEngine is therefore designed to be thread-safe, meaning multi-core computers can make calls in parallel to enable fast computing.
Is it commercially available?
Yes, it is well documented and in use in various commercial simulation programs. Currently, one of the user with most active licenses for transient multiphase flow is Pemex, the Mexican state oil company. The FlowRegimeEngine is also integrated in two of our in-house programs: The FlowRegimeAnalyzer and FlowlinePro.
How does it work?
When developing mathematical models for two- and three-phase flow in long pipelines, the most difficult challenge is to model the frictions, volume fractions and flow regimes accurately. The FlowRegimeEngine combines three different methods when confronting that problem: Dimensional analysis, mechanistic models, and Neural Networks (NNs). Those methods supplement each other in important ways.
Like all other modern multiphase pipe flow simulators, the FlowRegimeEngine uses mechanistic models to describe the flow. But it is well known that current models suffer from being relatively inaccurate or even outright misleading in some situations. Part of the problem stems from the fact that nearly all data used to verify the mechanistic models rely on laboratory measurements. They have been carried out on much smaller pipes and with different fluid properties than what is encountered in industrial flowlines. It has therefore always been necessary, but also very difficult, to extrapolate laboratory results to full-scale conditions.
Another big problem is that the number of published models is very high, and it is fair to say that the models do not generally agree well with each other. Figuring out which ones work best under various conditions is therefore a big – and not always very successful – part of developing any commercial Flow Assurance simulation program. As explained in /1/, that part of the challenge has been automated by using NNs, enabling the FlowRegimeEngine to very efficiently utilize a large part of the comprehensive, but frustratingly inconsistent scientific literature on the subject.
Why use dimensional analysis?
Dimensional analysis offers two significant advantages: It reduces the number of independent parameters, and it helps predict what would happen if some of the parameters were increased to sizes not tested in the laboratory setups. It can be used for up-scaling three-phase flow to so that laboratory measurements tells us more about flow in industrial flowlines. That approach has been of limited value because a full dimensional analysis leads to no less than 14 dimensionless groups (for three-phase flow). That many groups are difficult to handle, and it is common to simplify by in effect ignoring most of them. By using a full dimensional analysis for all flow conditions, the FlowRegimeEngine avoids the uncertain simplification process, but at the cost of having to deal with very many parameters.
Why use Neural Networks?
NNs offer a way to make sense of problems containing very many variables. Designing the networks and training them is in principle straight forward, but in practice rather difficult. A pure “black box” training approach would require an unrealistically large amount of training data, and it would also fail in certain situations (such as when one of the phases’ velocity approaches zero). Therefore, the FlowRegimeEngine is based on training various correction factors inserted in the mechanistic models. The mechanistic models become more accurate during training, and the results are also forced to become dimensionally consistent. The theory is described in greater detail in /1/. At this point in time, it appears the FlowRegimeEngine is the only commercially available simulator combining a complete dimensional analysis with NNs to improve the performance of the underlying mechanistic models for multi-phase pipe flow.
- The dimensional analysis helps overcome one of the main challenges in multiphase pipe flow: To upscale laboratory measurements so they become more relevant for full-size flowlines.
- The mechanistic theory can be used to produce adequate results on its own in the way it is common in other simulation programs, but it is hard to make results very accurate and fully dimensionally consistent that way.
- The NNs take the results from the mechanistic models and modify them so that the overall accuracy is increased. Due to the way the NNs interact with the dimensionless groups, this also forces the results to become fully dimensionally consistent even when the underlying mechanistic model is not.
- The NNs can use any reliable information as input to the training, including measured data, CFD-results and data generated by other methods.
- Every time additional knowledge becomes available, it is easy to account for by including it in the training set and simply re-train the NNs.
- The friction, fraction and flow regime calculations are generally fast, since no iterations are necessary, neither for steady-state nor transient simulations.
The best way to see how it works is probably to watch a video of the FlowPatternAnalyzer, a graphical user interface built on top of the FlowRegimeEngine, or by studying the reference below.
/1/ Bratland, O: Combining Dimensional Analysis and Neural Networks to Improve Flow Assurance Simulations. IPTC-19146-MS. IPTC, Beijing, 2019.