Popis: |
In a thermal-compositional reservoir simulator, pressures, saturations, temperature and compositions in all the existing phases must be solved. When this equation system is solved implicitly, a system of nonlinear equations results, which is solved by the Newton's method. This requires computation of the Jacobian matrix of partial derivatives. If the appropriate dependent variable is not lined-up with the correct equation, zero pivot elements are generated in the Jacobian matrix. This situation is complicated by the fact that new phases may appear, and existing phases may disappear leading to the type and number of dependent variables changing constantly. Elimination of these zero pivot elements using pivoting is computationally expensive for large matrix systems. In this paper, we present a robust algorithm for lining-up the dependent variables and the equation system appropriately to avoid zero pivots in the Jacobian. This technique can be applied to the thermal-compositional model with any number of components and phases and there is no constraint on the number of thermal equilibrium relationships. In a system with Nc components and Np phases, and Ne thermal equilibrium constraints, Nc+Np+Ne+2 dependent variables are lined with appropriate equations (pressure and temperature are the two additional variables). Any phase equilibrium calculation (K-value based, equation of state) can be used in this approach. The motivation for equation line-up and some previous methods are presented followed by a description of the conservation and constraint equations in thermal modeling. A brief description of the simulator framework that allows coupling different physical models and discretization methods is provided. The rules of variable selection for avoiding zero pivots are discussed in detail, including a method to obtain analytical derivatives. As proof of concept, two applications are discussed: a steamflooding example in a fractured system, using the discrete-fracure modeling approach and in situ combustion. A control volume finite-element discretization is used in steamflooding while a finite-difference approach based on the Cartesian grid is employed in the in situ combustion application. |