STOMP uses Newton-Raphson linearization to solve the set of nonlinear algebraic equations formed by the discretized governing equations. This scheme has two major computational components: (1) to compute the Jacobian matrix and solution vector elements and (2) to solve the resulting linear system of equations.

The nonlinearities in the coupled flow and energy transport system of equations are resolved through the application of the iterative Newton-Raphson technique. The Newton-Raphson linearization technique is an iterative method for solving nonlinear algebraic equations of the form

where *f*(*x*) is differentiable in *x*. The linearization concept approximates *f*(*x*) with suitable tangents.

*NR Iteration (Conceptual Plot)*

Each iteration yields a new estimate of *x* as the intersection of the tangent to the function *f*(*x*) at the previous estimate of *x* and the abscissa axis, according to

In this formulation *f*(*x*) is considered the equation residual. For convergent systems, the residual decreases quadratically with iteration. In multiple variable systems, as with the coupled flow and energy transport system, the scalar function, *f*(*x*), is replaced with a vector function **R**(**x**), according to

The vector function, **R**(**x**), represents the system of nonlinear algebraic equations produced from discretizing the conservation equations for component mass and energy. The vector of unknowns, **x**, represents the set of primary variables for the system, which are determined by the operational mode and phase conditions. This can be rewritten in terms of increments to the primary variables, according to

The partial derivatives shown above form the Jacobian matrix.

The linear system of equations produced during Newton-Raphson iteration is solved with either a direct or iterative linear system solver. The user must choose one of three solver options when requesting the source code.

(1) A banded matrix solution algorithm from LINPACK (solver=bd) is included with the source code as a direct solver.

(2) A package of sparse iterative solvers, SPLIB (solver=sp), is included with the source code.

(3) A conjugate gradient solver with multi-threading capabilities from PETSc (solver=petsc) is compatible with STOMP following the additional download.

The banded matrix algorithm is appropriate for use with small to moderately sized problems (where the number of unknowns is on the order of less than 35,000).

Alternatively, the SPLIB and PETSc iterative solvers are more appropriate for larger problems (larger order numbers of unknowns).

The PETSc solver tends to run a bit faster than the SPLIB solver. It also has multi-threading capabilities compatible with some STOMP modules.

Bramley R and X Wang. 1995. *SPLIB: A library of iterative methods for sparse linear system*. Technical Report, Indiana Univeristy-Bloomington, Bloomington, IN-47405.

Dongarra, JJ., J Bunch, C Moler and GW Stewart. 1979. *LINPACK User’s Guide*. SIAM, Philadelphia, PA.