21.3. Tearing algorithm

The tearing algorithm consists of the following steps:

  1. Let and assume there is an initial guess and to Equation 21–2 .

  2. Solve (update torn variables) "outer iteration"

  3. Solve " inner iteration"

  4. If then and goto 2

Here, "Tear_tol" is the convergence error tolerance for the outer loop, typically specified by the user. In practice it is also wise to limit the number of tear iterations to some maximum value in case of non-convergence. Therefore the jump in step 4 back to step 2 is done provided i is less than some maximum number of tear iterations allowed.

Convergence is obtained if and only if:

where TearRel and TearAbs are the relative and absolute tear tolerances, respectively. In other words, we iterate until the "tear convergence ratio" is less than unity, that is,

(21–4)

This is both a relative and absolute convergence test. The test is absolute when Θk becomes close to zero and relative otherwise. It avoids using an explicit switch from a relative to absolute test when Θk tends towards zero.

To make the progress of the tear algorithm transparent to the user, convergence information is reported per outer iteration and includes:

  1. The current iteration number "i ".

  2. The maximum value of (the tear convergence ratio) over all k, together with the corresponding variable name corresponding to the maximum value (which is the tear stream that is showing the current largest error).

  3. A diagnostic option of showing the p (default 0) largest values of the tear convergence ratios, listed in order from largest to smallest. This shows the streams that are hardest to converge (or close).

An iterative scheme based on Newton's method, is used to solve in 3 of the algorithm and typically this will find a solution within some prescribed non-linear equation residual or variable tolerance. Therefore the choice of values for TearRel and TearAbs should take into account (and generally be larger than) the tolerances used to solve .

In the formulation above, the torn equations are non-linear and also require an iterative scheme to solve for . However in practice the torn equations are usually linear in and therefore easy to solve and usually in one of the following forms:

  1. where is a user-prescribed function that maps to , for example, a chemical properties procedural calculation;

  2. — that is, stream connectivity equations — in the case of torn recycle streams.