You are on page 1of 6

Computation Sequence in Solving Equations

The Sequential Modular Approach specifies the sequence in which the unit modules are solved. It does not dictate the sequence of solving individual equations within each module. In the Equation Oriented Approach the entire process flowsheet is modeled as a set of equations, which has to be solved simultaneously for all the unknowns. It is thus necessary to find a sequence to solve the equations, either individually or as smaller sub-sets of the original set. This sequence can be found in a way similar to partitioning a flowsheet, provided we first represent the structure of the equations as a digraph. For this we need to prepare the Incidence /Occurrence Matrix of the equation set first. In this the equations are represented as rows and the variables as columns. For example consider the following set:

f 1 ( x1 ) = 0 f 1 ( x1 , x 2 ) = 0 f 1 ( x 2 , x3 ) = 0
The Incidence /Occurrence Matrix is then given by:

f1 f2 f3

x1 x 2 1 0
1 0 1 1

x3
0 0 1

While solving each equation at a time we would like to know what the output variable is for that equation. This is known as the Output Assignment problem. In the above example, we can assign the variable x1 to equation f 1 , the variable x 2 to equation f 2 and finally the variable x3 to the equation f 3 . This assignment can be represented by highlighting the diagonal elements in the Incidence Matrix as follows:

f1 f2 f3

x1 x 2 1* 0
1 0 1* 1

x3
0 0 1*

The computation sequence can be represented as a digraph as follows:

f1

x1

f2

x2

f3

x3

In this example, it can be seen that the set can be solved sequentially, one equation at a time. Consider a second example:

f1 ( x1 , x 2 ) = 0 f 2 ( x 2 , x3 ) = 0 f 3 ( x3 , x1 ) = 0
The corresponding Incidence /Occurrence Matrix is then given by:

f1 f2 f3

x1 x 2 1* 1
0 1 1* 0

x3
0 1 1*

If we select the diagonal elements once again as representing the output assignment, we get the following digraph:

f3 x1 f1 x2 f2
Thus it can be seen that the digraph has a cyclic structure , indicating the coupling of the equations. There are two ways to solve this set: Solve all three equations simultaneously. Tear the coupling and converge iteratively. In general, if we can permute the rows and columns of an occurrence matrix so that it is lower triangular with the output variables on the diagonal, then the equations may be solved sequentially one at a time in the order of the rows and the columns. Such a system of equations is said to be reducible. If a system of equations can be reduced to a block diagonal form, it is said to be decomposable, and the blocks may be solved in any order. For example, consider the following set of of equations:

x3

f1 ( x1 , x 2 ) = 0 f 2 ( x1 , x 2 ) = 0 f 3 ( x3 , x 4 ) = 0 f 4 ( x3 , x 4 ) = 0
The Incidence /Occurrence Matrix is already in the block diagonal form:

x1 f1 f2 f3 f
4

x2
1 1 0 0

x3
0 0 1 1

x4
0 0 1 1

1 1 0 0

The two blocks can be solved in any order. Consider another example:

f1 ( x 2 ) = 0 f 2 ( x1 , x 2 , x3 ) = 0 f 3 ( x1 , x3 , x 4 , x5 ) = 0 f 4 ( x1 , x5 ) = 0 f 5 ( x3 , x 4 , x5 ) = 0
The Incidence /Occurrence Matrix is given as follows:

x1 f1 f2 f3 f4 f5
0 1 1 0 0

x2
1 1 0 0 0

x3
0 1 1 0 1

x4
0 0 1 0 1

x5
0 0 1 1 1

After inspection, re-arranging the rows and columns, we get:

x2 f1 f4 f3 f5 f
2

x5
0 1 1 1 0

x3
0 0 1 1 1

x4
0 0 1 1 0

x1
0 1 1 0 1

1 0 0 0 1

The highlighted elements indicate the output assignment. With this assignment we can represent the structure of the equations as a digraph as follows:

x1 f1 x2 f2 x1 f3 x5 x4 x3 x3 f4 x5 f5

This digraph can be analyzed for the recycle loops, which can then be torn to put the computations in sequence. First, we see that the recycle loops in this digraph are:

{x1 , x3 }, {x1 , x5 , x3 }, {x3 , x 4 }


Since x3 is common to all the loops, it makes a good choice as a tear variable. The same conclusion can be arrived at by a different approach, following the Design Variable Selection Algorithm of Rudd and Watson: Consider the Incidence Matrix for the above problem:

x1 f1 f2 f3 f4 f5
0 * * 0 0

x2
* * 0 0 0

x3
0 * * 0 *

x4
0 0 * 0 *

x5
0 0 * * *

Look for a single entry column. If there is one, assign that particular variable as the output to that particular equation, represented by the row in which the entry occurs. Cancel that row and that column and continue. If there are no single entry columns, calculate: = min(k j ) 1 where k j is the number of occurrences in the j th column. Remove any set of equations from the table and try assigning outputs. If the assignment is still not possible, increase by one and continue. In the above matrix, we find that, there are no single entry columns and that = 1 . So we arbitrarily remove equation f 3 and try assigning outputs as follows:

First we assign x 4 Then we assign x5 Then we assign x1 Finally we assign x 2

f5 . f4 . f2 . f1 .

Now the computation sequence will be in the reverse order, and can be represented as follows:

x3

f1 x2

f2 x1

f4 x5

f5 x4

f3

The tear variable is shown as a dashed line in the flow diagram for the sequence of computations, since it is first assumed a value, and then converged iteratively. Now consider another example:

f 1 = x12 + 2.5 exp( x 2 ) + 25 = 0


3 f 2 = x1 + x3 + exp( x 4 ) + 10 = 0
3 f 3 = x 2 + 2 x3 + x 4 x5 + 2 f 4 = x4 +

x1 + x6 2.5

+5= 0

10 =0 x5 + x 6

Here there are six variables but there are only four equations. Therefore two variables should be selected as the design variables, whose values will be specified by the design engineer so that the remaining four unknowns can be determined. The problem is to choose the variables in such a way that the four equations can then be, ideally, solved one at a time. The Incidence matrix for this set of equations is given by:

x1 f1 f2 f3 f
4

x2
* 0 * 0

x3
0 * * 0

x4
0 * * *

x5
0 0 * *

x6
0 0 * *

* * * 0

Here also we find that there are no single entry columns and the value of = 1 . So we arbitrarily remove equation f 3 and try the output assignment algorithm as follows: Assign x 2 Assign x1 Assign x 4

f1 f2 f4 and x6

We are left with the two variables x5

We choose these two as our design variables and sequence the computations as follows:

x3

x5 f4 x6

x4 f2

x1 f1

x2 f3

The tear variable is shown as a dashed line and the variables which need to be specified in advance are shown with thick arrows.

Adjacency Matrix
An adjacency matrix may represent a digraph. In a node adjacency matrix the rows and columns both represent the vertices. The (i, j ) th entry is assigned a non-zero value if there is a directed edge from vertex i to vertex j . The node-adjacency matrix for the above digraph is as follows:

f1 f1 f2 f3 f4
0 1 0 0

f2
0 0 1 1

f3
1 0 0 0

f4
0 0 0 0

In a stream-adjacency matrix, the edges are represented by the rows and the columns. The (i, j ) th entry is assigned a non-zero value if edge i is incident into, and edge j is incident out of the same vertex.

x1 x1 x2 x3 x4
0 0 1 1

x2
1 0 0 0

x3
0 1 0 0

x4
0 0 0 0

You might also like