Simulator Capability Extension Using a Dynamic Load Library to Enable H2S Reactions in Thermal EOR
Authors: Donatti C. N. , Muenz E. G. , Aliaga T.. , Girardi V.. , Kabche J. P. , Li G.. , Evans P.. , Shi W.. 
Published: September 2016

A two-way coupling methodology between two commercial reservoir simulators and external libraries to simulate complex phenomena occurring in the reservoir during the recovery process is proposed herein. Such methodology was implemented by using two approaches: the first one employs dynamic library loading at runtime; and the second, communication performed via file. These two-way coupling mechanisms allow third party software developers to extend the capability of a commercial simulator. A formulation applied to model Aquathermolysis reactions in a steam flood reservoir model was implemented with this two-way coupling method. This method can be used to model other phenomena, such as in-situ combustion and acidification, among others.

The two-way coupling Application Programming Interface (API) provides the reservoir grid cell properties such as pressure, temperature, saturation, composition, pore volume and source terms to the external modules. The external module reads some properties (e.g. temperature and compositions) from the reservoir simulator to compute the reaction terms providing a source term to the reservoir simulator. The frequency of the reaction source term update can be specified at runtime, and it can be for only Newton iteration 0 (explicit) or all Newton iterations (operator splitting sequential implicit). Moreover, the reaction rate constant is modeled as a function of temperature using the Arrhenius equation or a lookup table.

The coupling has been tested with commercial reservoir simulators herein designated as A and B. To prove the capability to couple reservoir simulators to an external module, the methodology presented considers both two-way coupling runtime library loading (Simulator A) and two-way coupling file-based (Simulator B) approaches, at time-step (Simulator B) and Newton iteration (Simulator A) levels. Results were evaluated using synthetic cases comparing the coupled solution with a numerical solution obtained by modeling the reactions in Simulator C (a reservoir simulator capable to model the same reactions implemented in the proposed two-way coupling). Results of a field case available in the literature were also evaluated. The great match obtained for the synthetic cases and, together with a good agreement with the field case, proved the capability of the proposed coupling. The simulation time between a coupled solution and a traditional solution without the reactions was compared for both methods and the file-based approach was shown to have a significant impact on simulation time; while using an API showed no significant simulation time increase for the tested cases.

The novelty of the proposed coupling is the capability of modeling complex reservoir phenomena using external modules, which is usually not the focus of reservoir simulators. Although the methodology has thus far only been applied to the Aquathermolysis phenomena, it can easily be extended to solve other EOR problems.