The SI function: everything else
The SI function solves the heat and mass balances for all of the tanks in the regenerator and riser reactor. For the current model, there are 16 tanks for the regenerator and 10 tanks for the reactor.
The regenerated catalyst stream, in red, is a given, being set by the SME function for the current iteration. The catalyst stream from the top of the reactor is not used in the balances for the SI function.
The solve block used to determine the SI function is several pages long. The final line in the solve block specifies the unknowns (on the right) and the SI function and its arguments.
Using the SI Function
The figure below shows an example call to the SI function. The results for each unknown listed in the Find list above are stacked into a vector. This vector has been named MI here.
Since the results are arrays of different dimensions or scalars, the MI vector becomes what is called a "nested array" in Mathcad.
To see or use a specific result, first specify the position in the MI vector using a subscript, then specify the desired element in the sub-array with a second level subscript(s). If the entire sub-array is desired, only the first level subscript is needed. For this worksheet, the array numbering starts with 0.