This post continues with the overview of the FCC model. Moving down from the top level FCC user function, the next function is the SME function. This function provides the solution to the carbon and energy balances around the regenerator. The carbon balance is shown below. The energy balance is longer so it will not be shown.
The "M" in the balance is the nested array solution of the rest of the model. I will discuss this matrix in the next post. The text under the error equation provides a brief description of the terms in the equation.
Minimizing the errors
The errors in the carbon and energy balance are minimized using the Mathcad Minerr routine. This routine determines the values of C.rgc and T.rgn, the coke and temperature of the regenerated catalyst. In the solve block below, these variables are x and y, respectively.
The Minerr statement produces a set of results called the SME function. It is a function because the argument list is provided to allow feeds to the regenerator and reactor to be specified.
Below the solve block, the SME function has been called to produce a set of result values. The two results produced by the SME function are placed in a vector, S2 in the example above. The first element is the coke level and the second element is the temperature.
The Mathcad Find routine could also have been used instead of Minerr because there are two equations and two unknowns.
The SI function
In the solve block above, M has been replaced in the err_C and err_h arguments with a call to SI, the solution of the rest of the model. The arguments for both the error functions and SI include the reactor feed conditions. When SME is called within the FCC user function described in the last post, the feed conditions are passed to SME by FCC.
So far, still not very complicated, correct?