Professional Documents
Culture Documents
2 - A Generalized Model For Distillation
2 - A Generalized Model For Distillation
00
Printed in Great Britain. All rights rcsemd Copyright 6 1986 Pcrgamon Journals Ltd
Abstract-Numerical and computational aspects related to the solution of complex distillation dynamic
problems are presented. Consideration is given to the behavior and characteristics of the equation systems
which constitute the problem description. The interaction of these characteristics with the application of
numerical methods is investigated, demonstrating that it is necessary to apply appropriate numerical
procedures to insure accuracy, efficiency and robustness of the methods. The most important imple-
mentation aspects to achieve this arc investigated.
ScuFThe numerical solution of the equation systems resulting from a dynamic simulation model of
distillation processes requires robust and reliable methods. In order to apply the methods most suited to
the equation system, it is necessary to understand and appreciate the characteristics displayed by such
systems.
Thus, an analysis of the equation systems arising from distillation dynamics is made. The problem
structure is analyzed in terms of the sparsity pattern of the equations resulting from the generalized and
simpli8ed versions of the model. It is shown that for the simplified version the sparsity pattern can be
generated automatically from the problem topology, whereas in the generalized version complications
arise from the effects of plate hydraulics. For this case, approximate patterns are obtained by numerical
means and the implications of the approximate patterns on the behavior of the numerical routines is
investigated.
Model stability is also investigated and the classical measure of theoretical stiffness for the system is
shown to be inadequate in characterizing the behavior of the problem. A measure of computational
stiffness is introduced and shown to be preferable.
Two classes of discretization methods are investigated as being an efficient means of solving the
equations. An extensively modified version of the Hindmarsh (11 implementation of the linear k-step
methods and backward-differentiation methods (BDF) is used with sparse matrix techniques to solve the
equation systems. Also, a class of implicit Runge-Kutta (RK) methods known as diagonally implicit
Runge-Kutta methods @IRK), implemented by Cameron [2], is also investigated. Various imple-
mentation changes are tested and found to provide marked improvements in code performance. The
ability to use judiciously, both stiff and non&f discretixation methods depending on the problem
characteristics has also given further evidence that improvements can be made. Future work envisaged
in this area is also outlined.
cone1osI0rlsand signicance-The algorithms presented have proved extremely reliable and robust in the
solution of distillation dynamics problems. For low-accuracy requirements (local error tolerances of lo-),
lo-‘) the DIRK code is efficient and extremely robust. At higher accuracies the BDF code become
preferable. It is shown that the combined use of stiff and nonstiff methods can significantly reduce
computational effort. Also, the effects of certain implementation aspects on the code efficiencies arc also
shown to be worthwhile.
THE MATHEMATICAL PROBLEM component and energy holdups for the column
The model for a distillation column or train of stages. The procedures are self-contained subroutines
columns consists of a set of ordinary differential which are used to calculate physical properties, plate
equations (ODES) plus a set of procedures which hydraulics, controller responses and the like.
incorporate the algebraic equations. In the present We can write the above set of equations in the form
formulation of the problem, as given in Part I [3, this
Y’ = f(Y, p, 1)s (I]
issue, pp. 181-1981 the differential variables are the
where
tPresent address: Chemical Engineering Department, Uni-
versity of Queensland, St Lucia, Queensland, Australia. YER”, PoRm, r~[u,b]
$To whom all correspondence should be addressed at his
present address: Instituttet for Kemiteknik, Danmarks and
Tekniske Hojskole, Bygning 229, 2800 Lyngby,
Danmark. f:R” x R” x R1+R”,
199
200 et al.
I. T. CAMERON
and where the procedures P can be written in the niques in, or close to, the steady-state region. This
general form numerical aspect is explained further in the section on
stiff and nonstiff regions.
P = g(y, z, t), (2)
where Model behavior
The model behavior in the transient phases de-
ZER’
and pends on the mode of simulation being undertaken.
There are essentially two simulation modes which are
g:R”xR’xR-+R”. common to distillation column(s) operation. These
Hence the procedures are functions of the are:
differential variables y, a set of algebraic variables z -discontinuous mode (start-up/shutdown or feed
and the system parameters. The algebraic variables changeover operations);
that appear in the procedures include such variables -continuous mode (perturbation around the
as plate pressures, pressure drops, physical properties steady state).
and component concentrations in the vapor and
liquid phase. The model thus leads to a large set of In the discontinuous mode the columns experience
ODES with right-hand sides (r.h.s.) incorporating an severe transient behavior combined with numerous
extensive number of complex procedures. discontinuities in operations. These d&continuities
are physical effects due to changes in vapor and liquid
flows in the columns. In turn, these physical features
Problem structure
greatly affect the solution methods used in the simu-
The problem structure depends on the complexity lation, as the numerical procedures must deal
of the model (see Part I). The simplest versions give efficiently with these phenomena.
a set of equations (1) which is predominantly banded In the continuous (perturbation) mode, the simu-
in structure, due to the mass and energy balances lation is performed around an operating or steady
around each plate. However, the introduction of state. Here the responses to various changes in feed
control-loop equations and recycles from down- rate, reflux rate, reboiler duty, product rates and the
stream columns means that there will also be off-band like are examined. These changes not only affect the
elements. The most complex generalized version of column in which they occur but it is possible to
the model will have many off-band elements. ’ examine the interaction on the other columns in the
The presence of the off-band elements has a train. It is of course possible that perturbations
significant effect upon the types of iterative tech- around a steady-state operating point may bring the
niques used to solve the nonlinear algebraic system column operation into the discontinuous region,
resulting from the use of implicit integration meth- where flooding, weeping or column dumping will
ods. The problem structure is not only predominantly occur. In the case of closed-loop (i.e. with controllers)
banded, but by implication it is also sparse due to the responses, the model equations are influenced by the
topology of the problem. The sparsity pattern is forcing functions of the controller (or controllers).
determined by the configuration of the columns as Depending on the variable being manipulated and the
well as recycle streams and control loops. The spar- size of the changes, the discontinuities of the forcing
sity allows the use of sparse matrix techniques in the function may translate into discontinuities in the
solution of the algebraic systems. differential and algebraic variables. However, in real-
The use of banded solvers for the linear systems is ity, the differential variables never become discon-
generally inadmissible due to the significance of tinuous. It is only the algebraic variables which do so,
off-band elements. Hence, in this work a general also during start-up operations and for large abrupt
sparse solution technique has been adopted. In this changes (which usually lead to column stability prob-
case, the sparse routines require a description of the lems). Of course, if the control frequency is made too
sparsity pattern. For the simplified model it is a short, the step size of the integrator may be affected.
relatively straightforward task to generate the pattern This also reflects the physical situation that for better
analytically, knowing the configuration and topology control, the frequency should be enlarged. Again, the
of the system. However, in the case of the generalized numerical routines must detect these situations and
model, the far-reaching effect of the hydraulics means deal efficiently with them. This aspect of the dynamic
that there is a diminishing influence of the behavior simulation of distillation systems will be the subject
of the hydraulics of plate p and adjacent plates. This of a future paper. Here we restrict ourselves essen-
essentially means that the bandwidth of the complex tially to the problem of the continuous mode simu-
problem is larger than the corresponding simplified lation.
model. This effect can also have significant effects on
the numerical behavior of the solution in the steady Model stability
state region if the stated sparsity pattern is not close The mathematical problem (1) posed by the simu-
enough to the correct pattern. In some circumstances lation of a column or train of columns can be
it can be advantageous to use dense matrix tech- classified as neutrally stable, ultrastable or unstable
A generalized model for distillation columns--II 201
depending on the behavior of the solutions to equa- nonstiff regions. For the case where there exist
tion (1) in the neighborhood of the particular solu- eigenvalues with positive real parts, the solution is
tion w(t). Within such a neighborhood the solutions “unstable” and the solution method must be chosen
can be approximated by the linearized, variational carefully in order to simulate the correct behavior.
equations given by This is not the case for general dynamic simulation of
columns unless the imposed control structure gener-
Y’= f(w, P, t) + Jl(w, t)(y - w), (3) ates the instability.
where 9(w, f) denotes the Jacobian matrix of partial We can see from equation (5) that during the
derivatives given by transient phases of the solution, where h is reduced to
achieve the required accuracy, the value of Re( - 1,/z)
(g+g.q, evaluated at (w, t). may be quite small and often < 1 in magnitude. It
may be small enough that it falls well within the
The behavior of the solution y in equation (3) is stability limits of the nonstiff methods, even though
characterized by the eigenvalues L,:i = l(l)n of some of the li are very large. If this is the case, the
J(w, t). This is of course a localizing assumption, problem in these regions is “computationally
since in general for nonlinear problems the eigen- nonstiff” even though the problem could be classed
values of J will change throughout the interval [a, b]. as “theoretically stiff” based on definition (4). If we
In the case where all eigenvalues have small negative can take advantage of this distinction by the judicious
real parts, the problem can be termed “neutrally use of nonstiff and stiff methods then significant
stable” and conventional methods such as the Adams savings can be achieved in computation time due to
or Rung+Kutta (RK) processes can be used to solve a reduction in the number of Jacobian evaluations. It
equation (1). If, however, there are some eigenvalues is also clear from equation (5) that as the steady-state
with large negative real parts, then the problem is region is approached and the step length increases
termed “ultrastable”. The more common term “stiff” rapidly, the computational stiffness will also increase
is synonymous. This implies a well-behaved mathe- significantly, with Re( - &h) 9 1, and then we must
matical problem but the behavior has a severe effect use stiff solution methods.
upon the efficiency of certain inappropriate numerical In the particular context of distillation dynamics,
techniques applied to such problems. It must be the simplified version of the model, as given in Part
emphasized that the “stiff” region is where the solu- I [3], is generally neutrally stable in behavior and
tion is changing slowly with respect to the largest thus conventional integration methods, such as the
negative real part of the eigenvalues of J(w, t). Hence, Adams-Bashforth (AB) or Adams-Moulton (AM)
during the initial transient region the problem is not methods, can be used for the solution. In some cases,
normally regarded as stiff since step length is gener- however, depending on product specifications and the
ally controlled by local error requirements of the cor@uration, the simplified model can exhibit
integrator. It is thus often misleading from the com- significant stiff behavior. For the more complex
putational viewpoint to refer to a theoretical version of the model which incorporates variable
“stiffness ratio”, St(t), which characterizes the degree energy holdup and nonlinear pressure profiles, the
of stiffness of the problem and which has been problem possesses regions of stiffness (ultrastability)
traditionally defined by which necessitate the use of stiff integration tech-
niques. It can be advantageous, in computational
max IWA) I terms, to be able to switch between stiff and nonstiff
s,(t) = : (4) methods during the course of the solution procedure.
mm IRe( ’
The criteria to be used to make the switching decision
In fact, there is no satisfactory way of truly quan- are based on numerical aspects as well as the behavior
tifying stiffness without considering the particular of the particular integration method being used. Any
integration method being used. In this context we criteria based on the analysis of eigenvalues is not
adopt a more practical measure of computational feasible due to the work involved in evaluating them
stiffness, S,(t) which we detine as: for a large system of equations.
NUMERICAL PROCEDURRS
s-stage formulae for problem (1) are given by can be used for many steps provided that the con-
vergence rate is acceptable.
In some simple cases the mass-balance equations
for a distillation system can be written in the form
where
dy
%=“y+b, (15)
Yn,i= Yn+ h i a,f(Yn,jvPn,j*tn,j)* i = l(l)s,
j- I where y is the vector of mole fractions. In this case.
and the Jacobian J is simply the matrix of coefficients A
tn,, = t, + hcj . (12) and hence can be evaluated at little computational
cost. Prokopakis and Seider [lo] used this formu-
The RK methods can be written in the form of a
lation of the problem for azeotropic columns sub-
Butcher block which displays the coefficients as
sequently solving the equation (15) system using an
c a adaptive Rosenbrock code.
(13) However, in the case of the generalized model
+ b’ proposed in Part I of this paper [3], the problem
formulation is not of the form represented by equa-
If the matrix A is lower triangular then the methods tion (15). Thus the Jacobian evaluation becomes a
will be explicit, whereas if the matrix A includes the significant part of the computation. The determin-
diagonal elements we call these methods “semi- ation of the Jacobian via finite differencing necessi-
implicit” Runge-Kutta (SIRK). In particular, if tates the use of the SIRK and DIRK methods which
a, = y, i = l(l)s, we call these methods diagonally do not require an analytic Jacobian to maintain
implicit RungeKutta (DIRK). accuracy.
This is not to be confused with a linearized form For this paper we will concentrate on the SIRK
of the RK method often used in chemical engineering methods, and in particular DIRK methods, as an
applications and originally due to Rosenbrock [5]. efficient means of solving equation (1). The methods
The Rosenbrock methods can be written in the can be written as
following form for the autonomous version of
problem (1): Ym + I = Yn+ h i bif(Yn,irPn,i, t,i) (16)
i=l
order formula for local error control, the method account the column interconnections and associated
parameters being (see Cash [13]) control loops, and thus the pattern can be auto-
matically generated from the problem description.
y = 0.43586652150846,
However, for the generalized model the use of an
uz, = 0.28206673924577, analytic pattern generator is more difficult. The alter-
native approach to Jacobian pattern generation is to
u3i = b, = 1.2084966491760,
obtain an approximate pattern using numerical tech-
as2 = b2 = -0.64436314068446, niques. In this case an initial dense Jacobian is
generated using the standard finite-differencing tech-
aj3 = b, = y
nique, as given by
c2 = 0.71733260764229
f(y + bjej, p, t) - fti, P, t)
Ji,zAv= 3 (19)
and
6,
cj = 1.0. where S, is an increment and e, is the normalized jth
coordinate vector. This procedure requires (n + 1)
The method is thus essentially second-order using
evaluations of the n derivatives f, and the selection of
a third-order method for local error control. In
the increment S, is important in minimixing trun-
practice, we use local extrapolation and carry the
cation and roundoff errors in 4. The procedure
solution forward with the third-order method.
outlined by Hindmarsh [1] was used for the selection
It is also feasible to construct DIRK methods
of sj.
which operate in variable-step, variable-order mode
Once the dense Jacobian elements Ju have been
(Cameron [14]). These can be advantageous com-
obtained, a drop tolerance L is used to distinguish
pared to the fixed-order methods, however, here we
between the nonzero and zero values in the Jacobian.
will only consider a fixed second/third-order method
The criterion used requires that if ]Jd > L, then the
for simplicity.
element (i, j) is regarded as a nonxero, otherwise the
Due to the lower-order method used, it is necessary
element is regarded as a zero and dropped from the
to appreciate that as accuracy requirements become
Jacobian. In practice, two distinct values for the drop
more stringent, the efficiency of the method rapidly
tolerance are applied to Jacobian elements. One drop
decreases. For this reason, the low-order DIRK
tolerance is used for the mass-balance derivatives and
methods should be used at local error tolerances in
the other tolerance for the energy-balances deriva-
the range of 10-3-10-4.
tives. This is done to account for the difference in
magnitude in the function values of the energy bal-
IMPLEMENTATION ASPECIS ances with respect to the mass balances.
There can, however, be several difficulties associ-
Here we consider some of the more important
ated with obtaining a Jacobian pattern via numerical
implementation aspects which alfect the code per-
means. Firstly, the correct pattern may not be gener-
formance. It is often the case that the implementation
ated due to the fact that the initial conditions may
aspects of the codes have a greater impact on the
lead to some of the f, being zero. This is normally a
robustness and general efficiency than do the basic
rare situation but can be a potential problem. Hence
formulae being used.
the resultant Jacobian will be deficient of partial
Sparse matrix techniques derivative information. Secondly, due to roundoff
error and truncation error the Jacobian may contain
In both the BDF and DIRK methods we are
extra (spurious) partial derivative information de-
required to solve a set of nonlinear algebraic equa-
pending on the values of the chosen drop tolerances.
tions at each step or stage calculation depending on
It is therefore necessary to reassess the Jacobian
the method. This is generally done using a Newton-
throughout the integration interval in order to arrive
like iteration:
at the correct Jacobian pattern. In practice, the drop
(0 - hy,,)Ay(“+‘) = $ + hyf(y”‘) - y”‘, tolerances are chosen to initially give more nonzero
elements than the true pattern, the number of non-
v = 1,2.... (18)
zeros being reduced to the correct value as the
The first problem in the solution of the above integration proceeds and further pattern analyses are
iteration is to generate the partial derivative data of performed.
the Jacobian J. To enable this to be done efficiently In the use of the generalized model, the Jacobian
the structure or pattern of the Jacobian needs to be pattern is quite complex, since the plate hydraulics
known. This pattern can be obtained in two distinct have a diminishing but sign&ant intIuence beyond
ways. just the adjacent plates. Further work is needed here
Firstly, we can generate the pattern analytically by to enable an analytic pattern to be derived solely on
explicity stating the row and column indices of the the basis of the number of components, inter-
Jacobian elements. For the simplified version of the connections and control structure, and this work is
model this can be done quite easily, taking into now in progress.
A generalized model for distillation columns--II 205
The elements of ,D for the other plates are affected We can now define the error reduction factor
because of the diminishing effect. That is, although (ERF) at the vth iteration as
the variables that appear are only for plates j - 1, j
and j + 1, the hydraulics of plate j affect not only ERF, -- IlY* -- Y~'+1)I1 '
(25a)
j - 1 and j + 1 but also, in a diminishing manner,
plates j + 2 and j - 2 and so on. This is because giving, from equation (24),
changes in the liquid holdup (and also liquid e n -
ERFv = (0 - ~ J ) - ' [ a ( J * - J) + (a - ~i)3]. (25b)
thalpy) on a plate affect the plate pressure and
downcomer holdup, which in turn affect their corre- If we now assume that a = ~, as will be the case, we
sponding plate holdups. have that
In both the BDF and D I R K codes, the linear
systems (18) at each iteration are solved using the ERF, ~< [{(H- aJ)-'a(,g* - J)}{
suite of subroutines in the Harwell package MA28 ~< {[a(,J*-'~)11-< {aiil'J*-Jl{- (25c)
[15]. Other sparse packages such as Y12M [16] or the
Yale code [17] could also be substituted. This relationship shows how the ERF, is directly
In order to minimize the amount of work involved affected by the error in the Jacobian matrix II.n* - Jl{.
in generating the Jacobian via finite differencing, the Also the bound on the ERF is proportional to the
technique of Curtis et al. [18] is used to minimize the step length, since a =/W-
For the case where we are using an approximated
number of function calls by grouping together the
variables associated with independent columns. This pattern produced by the use of a drop tolerance, the
effect of the drop tolerance is to partition the matrix
reduces the computational effort significantly, since
,D. This partitioning process directly affects the ERF
the evaluation of the functions given by equation (1)
if some of the Jacobian elements are missing, since
is extremely expensive.
the variables associated with the missing elements will
be subject to functional iteration and hence will
Convergence of the iteration reduce the overall ERF. Thus, the iteration sequence
The quality of the iteration matrix ( B - h T J ) is (20) reduces to
directly influenced by the partial derivative data y(,+ l) = ~ + af(y(,)). (26)
generated by the program. This in turn affects the
convergence properties of the Newton-like iteration Due to the cost of evaluating the Jacobian via finite
given by equation (18). differencing, we want to use the partial derivative
We can examine the convergence behavior of the information for as long as possible. There exists a
iteration and the effect of errors in the parameters maximum value of the ERF above which the benefit
and partial derivative data by considering the iter- of retaining the old partial derivative information is
ation equation (10) and the true solution of the outweighed by the increase in the number of iter-
implicit formula (8) [19]. Letting h7 = a, we can write ations needed to converge the Newton-like iteration.
equation (10) in the alternate form This limit has been set conservatively at 0.2, based on
numerical experience. Hence, when there is a step
y~+') = ~ + af(y(V)) + a J(y~V+ 1)- yCv)), (20) length increase we can use the bound for the ERF at
with the true solution given by the current step n to predict the ERF bound at step
n + 1 using
y* = ~ + af(y*). (21)
From equations (20) and (21) we obtain ERF,+, ~- an + ,. max(ERF,). (27)
a,
y, _ y(V+1)_ air(y*) - - f(yCv))] If ERF, +, < 0.2 then we use the partial derivative
_ dj(y~, + 1)- y~,)), (22) data from a copy of the previously computed
Jacobian. It should be realized that in practice, the
where ~ is used in the iteration matrix (fl - aJ) as an actual ERF computed from the function residuals of
approximation to the true value a. the Newton-like iteration is often much smaller than
Upon subtracting d,Py* from both sides of equa- the computed bound. Hence the Jacobian should be
tion (22) and rearranging, we obtain retained for as long as possible, certainly up to the
y , _ y~,+ l) = (0 -- fiJ)-' {air(y*) -- f(y~))] bound of 0.2, which has been found to be conser-
vative. The larger the problem, the more important it
- ~J(y* - y(~))}. (23) becomes to utilize the partial derivative information
Applying the mean value theorem we can write for as long as possible.
The policy of retaining a copy of the Jacobian
y, _ y(,+ 1)= (0 - ~J)-~ [a(,J* - ,D depends on computer storage limitations and the size
of the problem. On limited-memory machines it may
+ (a - ~ ) J ] ( y * - f ) ) , (24)
not be possible to take advantage of using the
where we let ,~* be the Jacobian evaluated between y* Jacobian copy facility. On virtual memory machines
and y~'. the practice is strongly recommended. There are also
206 I. T. CAMERON et al.
other advantages in the use of Jacobian copies. In the Recently, Petzold [20] proposed a particular imple-
case of convergence failures after a recent step in- mentation of the linear k-step methods in order to
crease, the BDF codes generally reduce step length by switch between stiff and nonstiff methods. This imple-
a factor of 4. If the previous ERF was satisfactory, mentation requires at least two iterations per step of
then it can be assumed that the step increase was too the AM method in order to generate a lower bound
large. In this case, when the step length is reduced, a for IlJ I), which is used as a measure of a,,,,. This can
new Jacobian should not be evaluated. In the case of be expensive in computational terms for large systems
an error failure in the integrator, it is good practice derived from distillation dynamics simulation. A
to use a copy of the Jacobian, since any decrease in more heuristic approach based on monitoring con-
step length will not only improve the predictor accu- vergence failures, order selection and step length can
racy but will also increase the ERF on the next step. identify the region where stiffness becomes a prob-
lem. It has been found that when the problem
Stzfl and nonstzf regions
becomes computationally stiff, there is an order re-
It has already been emphasized in the section on duction and convergence failure. At this point a
model stability that the stiff region of integration is switch is made to the BDF methods.
where the largest eigenvalue of J is changing slowly Initial step length. It is possible to select auto-
(valid at least for distillation models). From our matically the initial step length for both the BDF and
alternative definition of computational stiffness given DIRK methods, based on the initial derivative
by equation (5), we can see that in general, when the values. The computation of initial step length is also
integration is proceeding within the transient region, useful in discontinuous problems, where the user does
h will be small for reasons of accuracy and thus SC(t) not want to be involved in selecting the step length
will be small. Hence for the nonstiff regions 1la.J11will arbitrarily. For the BDF code, the initial method is
be small, and in most cases will be such that of first order (backward Euler) and thus
effects of implementation changes based on numer- gained by using a nonstiff routine such as the AM
ical analysis considerations. methods coupled with functional iteration during the
Table 1 gives the results of two test problems, initial transient region where S,(t) is small.
solved using the nonstiff AM method and with the Once the initial transient has been integrated then
stiff stable BDF methods. The first example was for the stiff BDF methods with a Newton-like iteration
a mixture of pentan~benzene-sulfolane in a 15plate can be used, since the stiffness S,(f) begins to increase
column, whilst the second problem is for the sepa- significantly. At present, the point of changeover
ration of benzene-water-ethanol using a 20-plate between the AM and BDF methods has been based
column. All the runs are for a 10% change in feed on numerical experience. Further work is being done
rate with increasing product purity for each particu- to automatically detect the stiff and nonstiff regions,
lar run. For these runs, the option of the simplified within the integration methods being used.
model with checking only for unstable hydraulic In Table 2a we present some overall integration
conditions was used. statistics showing the behavior of the numerical
Table 1 gives some basic data on each problem routines on a variety of distillation problems. The test
including the theoretical stiffness ratio, maximum problems quoted in the table correspond to those in
and minimum eigenvalues (at the steady state) and Part I of this paper [3]. All the integration statistics
the number of function evaluations for each method.
Also given in Table 1 is the time at which the number
1450
of function evaluations using AM methods with
functional iteration is equal to the number of func-
tion evaluations using BDF with the modified New- 1160
ton iteration.
The theoretical stiffness ratio, was measured at the g
beginning and end of the simulation and was found 2
u) 870
to be relatively constant. The following points should 6
be noted from Table 1. For both problems the P
580
theoretical stiffness ratio increases as the product
specification becomes tighter; however, for the first
problem the maximum eigenvalue increases in mag-
290
nitude as the minimum eigenvalue decreases. For the
second problem, the maximum eigenvalue is rela-
tively constant, the theoretical stiffness ratio in- 0
creasing due to a corresponding decrease in the
minimum eigenvalue. These results show that there is
a changeover point in the integration beyond which 1680
Table 2b. Integration statistics of problems with and without unstable conditions
Problem description Integration statistics Final
Test integration Hydraulic
Problem Method Model No. of ODES Sttl NFE NJE NSTEP time ill1 unstabilitv
4 BDF Simplified’ 16 >106 360 13 104 1.4 No
BDF ckn-* 24 >106 952 28 155 1.4 Yes
BDF GeneraWdb 30 >106 9821 235 1022 0.9 start-up
‘Refiux drum and bottom dynamics not inch&d; %etIuxdrum and bottom dynamics included.
data correspond to simulation of dynamic responses advantage of any potential savings. It can also be
due to perturbations around a reference steady state. noticed that at a local error tolerance oft = 10T6 the
The results are given for a stringent local error code is not competitive with BDF in terms of com-
tolerance of r = 10e6. These results indicate the rela- putation time. This is because the DIRK code uses
tive performance of the codes using the options stricter tolerances on the stage calculation con-
available. vergence as well as local error tolerances. Normally
For Problem 5, using the simplified model, the the DIRK code delivers a global error an order of
advantage of using sparse matrix technique8 with the magnitude better than the BDF code.
BDF method is clearly seen in the significant reduc- Problem 2 with 197 ODEs (generalized model)
tion in computational efforts, as illustrated by the shows the necessity of using the BDF code because
reduction in function evaluations. Also the advantage of stiffness considerations. The difference in the the-
of using the sparse option coupled with the nonstilT oretical stiffness ratio due to the addition of plate
method during the initial transient period again hydraulics (general&d model) should be noted here.
benefits computational performance. In general, it was found that although the addition of
Problem 17, using the simplified model shows that plate hydraulics calculations increases the theoretical
for the BDF method, the use of a copy of the stiffness of the problem, the presence of physical
Jacobian can be very advantageous in reducing the instability does not necessarily increase S,. It was
overall computational effort. In this case the number observed that, for the general&d model, the step size
of new Jacobian evaluations was reduced from 15 to is initially very small and gradually increases to large
9, resulting in a reduction of almost 25% in the values when there are no “disturbances”. If, however,
computational effort. For the same test problem, the some discontinuity or disturbance (perturbation of a
DIRK code did not show a significant saving in variable or physical instability) occurred, there would
computing effort when using the copy option for the be a sharp decrease in the step size. The hydraulic
Jacobian. This was because the code local error instabilities that caused a decrease in the step size
criterion is quite conservative and very few con- were found to be flooding and entrainment. Weeping
vergence or error failures were committed. For this did not affect the step size (or the computational
problem, the code committed one error failure, which stiffness). In the case of simulations during start-up,
produced a saving in one new Jacobian evaluation. there is a combination of discontinuities and dis-
The DIRK code used in these experiments did not turbances. Table 2b gives the integration statistics for
employ the strategy of checking the error bound problems with and without hydraulic instability and
value for the next step and hence did not take also for start-up operations. It should be noted that
A general&d model for distillation columns-II 209
I .-•
computed using the runs of Table 3, showing very
0.15 little change in the computed values using the DIRK
2 routine. The most significant changes occurring in the
c
distillate (D) and bottoms (B) flow rates.
0.10 Finally, in Table 5 we give the CPU time in seconds
I.
L-.
n Nehydmulks on a ‘VAX 11/780 running under VMS for the
. Hydmulks
stert-q evaluation of the r.h.s. of the equation system. This
0.05 L
./‘--
&L*-• is the “function evaluation”. Data is given for the
generalized model and simplified model using Test
0.00- I I I Problem 2. Also, data is given for the multiple
0.0 0.5 1.0 1.5
column (Problem 5). Two values are quoted for both
Time (h)
the function evaluation and the equilibrium calcu-
Fig. 2. Step size as a function of time for simulation of
lations, which form a significant part of the total
problems with and without plate hydraulics.
function evaluation time. The first value in each case,
i.e. F’ and EQ’, refers to the time required for the first
except during start-up operations, at the presence of calculation, whereas F and EQ are the CPU times for
flooding (or entrainment), the simulation was subsequent calculations. Results for the generalized
stopped. Figure 2 illustrates how the step size change and simplified versions of the model using a thermo-
during simulation of a continuous operation dynamic package based on the Chao-Seader equa-
(simplified and generalized models) and a start-up tion of state are given in Table 5.
operation. The result for the multiple-column Test Problem 5
The infhtence of reducing the demanded local-error demonstrate the dramatic reduction in computation
in the DIRK code can be seen in Table 3 (Test ’ time when the thermodynamic package is replaced by
Problem It). As the tolerance is relaxed the lower- polynomial representation of the thermodynamic
order DIRK routine becomes quite efficient. This is properties. In this case the CPU time is -an order of
to be expected for a second/third-order method. Also, magnitude lower compared to the use of the full
it has been noted that if the maximum order of the thermodynamic package.
BDF code is restricted to 2 or 3 (equivalent to DIRK) Table 6 gives a summary of the number of iter-
ations required and the accuracy achieved for the R” = The m-dimensional vector space
equilibrium calculations for the generalized and R” = The n-dimensional vector space
simplified models. Very high accuracy is achieved in S,(t) = The measure of computational stiffness
S,(t) = The theoretical measure of stiffness
only one or two iterations once the initial values have ,t = The independent variable, time
been computed. ta = The discretizedindependentvariableat nth Point
One significant advantage of the dynamic model t,,, = A Runge-Kutta quadraturepoint with respectto
formulation as set out in Part I of this paper [3] is that
T = temperature (“R)
the equilibrium prediction equations exist as alge- w = A particular solution of the variational equations
braic procedures and are not included explicitly in the x = Mole fraction
set of model equations which are solved simulta- y = The vector of differential or state variables
neously. Hence the equilibrium calculations being Y,,+~= The vector of differential variables at the jth
point in equation (6)
solved in the model have no problems with thermo-
y,,,= The vector of differential variables at the jth
dynamically infeasible phase predictions. quadrature point in equation (12)
Current work is proceeding in the area of start-up a = The vector of algebraic or procedure variables
and shutdown simulation using efficient methods for
Greek symbols
handling the discontinuous problem. Future work
a = The jth coefficient in the linear k-step methods
will concentrate on using a modified version for
t$= The jth coefficient in the linear k-step methods
robust steady-state solutions as well as the in- y = A coefficient of the implicit discretization meth-
vestigation of control system structures, safety and OdS
operational aspects of single- and multiple-column A, = The (i,j) element in the discretized Jacobian
I, = The ith eigenvalue of the Jacobian J
configurations. Y= An iteration index
r = The user-set local error tolerance
+ = A vector of known values in equation (8)
NOMENCLATURE
a=Theproductofhy
d = Approximation to a RBFMWNCES
a, = Value of a at tn
a,, = A Runge-Kutta coe5cient 1. A. C. Hindmarsh, GEAR-ordinary differential equa-
A = The matrix of Runge-Kutta coefficients ay tion system solver. Report UCID-30001, Rev. 3, LLNL,
b = The vector of Rung+Kutta graduate weights Livermore, Calif. (1974).
B = Bottoms flow (mol/h) 2. I. T. Cameron, Numerical solution of differential-
C = The vector of RungeKutta graduate points algebraic systems in process dynamics. Ph.D. Thesis,
D = Distillate flow (mol/h) Univ. of London (1981).
fm+j = Function value at point j with respect to time t. 3. R. Gani, C. A. Ruix and I. T. Cameron, A generalized
in the linear k-step methods model for distillation columns-I. Model description
f =The vector of r.h.s. values of the differential and applications. Comput. ckem. Ehgng 10, 181 (1986).
equations 4. C. W. Gear, Numerical Initial Value Problems in Ordi-
g = The vector of procedure functions nary Deferential Equations. Prentice-Hall, Englewood
h = The step length of the discretization method Cliffs, N.J. (1971).
h, = The initial step length 5. H. H. Rosenbrock, Some general implicit processes for
0 = The unit matrix the numerical solution of differential equations. Com-
J = The system Jacobian put. J. 5, 329 (1963).
.I* = The approximate system Jacobian 6. D. A. Calahan, A stable, accurate method of numerical
Jo = The (i,j) element of the Jacobian J integration for non-linear systems. Proc. IEEE (Lett.)
k, = Summation limit for the linear k-step methods S6,%4 (1968).
kr = Summation limit for the linear k-step methods J. B. Cailland and L. Padmanabhan, An improved
I= Number of algebraic or procedure variables semi-implicit RI method for stiff systems. C&m. Engng
L = The Lipschitz constant of the Jacobian J. 2, 227 (1970).
m = Number of procedures I. Y. N. Chan. Numerical solution of stiff differential
n = Number of state or differential variables systems. Ph.D..Thesis, Princeton Univ. Princeton, N.J.
p = The order of the linear k-step methods (1978).
Pi = The vector of procedures A. Feng, C. D. Holland and S. E. Gallun, Development
P “+,,=The vector of procedures at the pth point in and comparison of a generalized semi-implicit
equation (7) Run~Kutta method with Gear’s method for systems
R, = The unit space of coupled differential and algebraic equations. Comput.
R’ = The I-dimensional vector space them. Engng & 51 (1984).
A generalized model for distillation columns-11 211
10. G. J. Prokopakis and W. D. Seider, Dynamic simu- YlZM-solution of large and sparse systems of
lation of axeotropic distillation towers. AZChE JI 29, linear algebraic equations. Report No. 80/16, Recku,
1017 (1983). Denmark (1980).
11. S. P. Nor&t, Semi-explicit RK methods. Report 6/74, 17. S. C. Eisenstatt, Yale sparse matrix package I Sym-
Maths Dept, Univ. of Trondheim, Trondheim, Norway metric and II Non-symmetric codes. Reports 112 and
(1974). 113, Department of Computer Science, Yale Univ.,
12. R. Alexander, Diagonally implicit RK methods for stiff New Haven, Conn. (1977).
ODES. SZAM JI numer. Analysis 14, 1006 (1877). 18. A. R. Curtis, M. J. D. Powell and J. K. Reid, On the
13. J. R. Cash, Diagonally implicit RK formulae with error estimation of sparse Jacobian matrices. J. Inst. Math.
estimates. J. Inst. math. Applic. 24, 293 (1979). Appfic. 13, 117 (1974).
14. I. T. Cameron, Solution of DAEs using DIRK meth- 19. L. F. Shampine, Implementation of implicit formulae
ods. ZMA Jl3, 273 (1983). for the solution of ODEs. Report SAND79-0694, SNL,
15. I. S. Duff, A set of FORTRAN subroutines for sparse Albuquerque, N.M. (1979).
unsymmetric linear equations. AERE Harwell Report 20. L. Petxold, Automatic selection of methods for solving
R8730, HMSO, London (1979). stiff and non-stiff ODEs. SIAM Jl scient. stat&. Com-
16. A. Zlatev, J. Wasniewski and K. Schaumburg, put. 4, 136 (1983).
C.A.C.E. 10/3--c