## Problem Formulation

The equations used to model a dynamic process form a set of differential algebraic equations (DAEs). The numerical solution of these equations requires them to be reduced to a matrix of algebraic equations (AEs) and ordinary differential equations (ODEs). The number of differentiation steps required to complete this task is referred to as the index of the problem. Numerical solution methods are now available for systems of equations with an index greater than one (i.e. high index problems) but these methods are significantly more complex to implement and are not presently included in most commercial dynamic simulators. Therefore, it is crucial to formulate problems to be of index of zero or one, wherever possible.

The index of a problem is determined by the structure of the equations and the boundary conditions specified. A valid set of equations (derived from correct and consistent mass and energy balances and valid assumptions about the process) and boundary conditions can still result in a problem with index greater than one. Although a dynamic solution might not be available, high index problems can often readily be solved in the steady state using conventional algorithms.

The problem index is not immediately apparent before solution commences and the determination of the index is, itself, a difficult task where many equations are present (e.g. the model of a basic distillation column with several stages might contain over 1000 equations). Corollaries to this observation are that the cause of a high index problem is often difficult to ascertain and that a method for remedying an index problem might not be readily available. There has been speculation on the causes of high index problems (e.g. Gani and Cameron, 1992; Unger et al., 1995) and practical approaches to overcoming this impediment where the number of equations prevents a detailed matrix analysis have only recently become available.

Distillation processes have been shown to be particularly susceptible to index problems in the solution of the global set of DAEs (Ponton and Gawthrop, 1991; Unger et al., 1994). An important precaution in avoiding such a problem is to ensure that the overall model must be fully closed (Moe et al., 1995). This requires that algebraic relationships exist between the constitutive equations, balance equations and rate equations. In practice, this requires elaboration of the relationships between stage-to-stage pressure drop, stage-to-stage hold-up and vapour and liquid internal flows.

The potential for index in reactive distillation appears to be even higher (due to the influence of the reaction) and there have been several claims that the formulation of a problem with an index less than two is not possible for a system in both phase and chemical equilibrium using conventional methods (e.g. Moe et al., 1995; Perez-Cisneros et al., 1996). A transformation for the composition co-ordinates has been recommended (Barbosa and Doherty, 1992; Perez-Cisneros et al., 1996) as a means for circumventing the index problem by making the concentration variables independent of the extent of reaction but it has not been demonstrated that this is necessary.

Despite the absence of lucid direction in the literature, some general conclusions can be drawn about modelling techniques that can lead to high index problems:

• invalid assumptions can lead to equations where one variable or set of variables in the system of ODEs is independent of a particular state variable, resulting in an ODE matrix with a rank deficiency (a sign of high index);

• modelling one parameter in two different ways can produce an equation in the ODE matrix with no unknowns, even if the overall degrees of freedom constraint is satisfied;

• the choice of the set variables (boundary conditions) can sometimes transform a consistent set of equations into a higher index problem (examples of this have been shown by Gam and Cameron, 1992 and Unger et al., 1995);

• models must be closed so that balance equations, constitutive equations and rate equations are all related (Moe et al., 1995).

With respect to distillation and reactive distillation, some further considerations are applicable for dynamic simulation problems (but not necessarily for steady state simulations):

• no state variable can be set arbitrarily at a constant value (e.g. overhead pressure);

• simplifying assumptions for pressure drop (e.g. constant pressure drop for each stage, independent of vapour or liquid flow rates) and hold-up (eg. constant volume per stage, independent of liquid flow) are not valid for dynamic simulations;

• equilibrium stage equations are generally straight forward to define but must include relationships for pressure drop and hold-up to 'close' the model;

• condenser and reboiler configurations and boundary conditions are critical -small and apparently insignificant changes can be sufficient to change the index of a problem.

As the problem index is dependent on both the equations structure and the boundary conditions (set variables), high index problems are still possible with a fully 'closed' model. However, by adding extra variable relationships and replacing variables with constants where possible, the number of variables to be specified can be limited to the feed conditions and the fundamental degrees of freedom for operation. This reduces the likelihood of an illegal combination and an index problem arising from boundary conditions.

An index problem can also arise from the linking of models whose individual indices are zero or one. This results from the formation of equation groups that are linked in a cyclic arrangement by, for example, pressure drop relationships. It is possible to create a situation where the pressure at one point (usually the reboiler or condenser) is overspecified while the pressure at another point is essentially independent of feed streams to that stage.

There are certainly pitfalls in the problem formulation but a dynamic reactive distillation model of index one can be produced without employing any numerical tricks or internal variable transformations. Such a model is described below in section 7.2 and implemented for the ETBE column described in Chapter 3.