Phase equilibrium calculations can consume a significant fraction of total CPU time in compositional reservoir simulations. Thus, reducing the number calculations based on information from previous time steps is a common practice. Nevertheless, each time step requires a certain number of phase equilibrium calculations, and their computational cost ultimately depends on the speed at which the individual calculation is performed. The non-linear nature of phase equilibrium calculations requires an iterative solution procedure. A common approach is to combine successive substitutions and Newton iterations. However, accelerated successive substitutions, quasi-Newton methods, and reduced methods can reduce the number of iterations or the computational cost per iteration. Unfortunately, the importance of code optimization is rarely discussed in the literature. This paper investigates the impact of a handful of optimization techniques on the execution speeds of phase equilibrium algorithms. A series of benchmarks indicates that improving the instruction level parallelism in dense linear algebra operations and in the evaluation of transcendental functions leads to a 2X speed-up. An additional 3X performance improvement is achieved by a combination of SIMD vectorization and mixed precision implementations.

You can access this article if you purchase or spend a download.