Page 100 - Numerical Methods for Chemical Engineering
P. 100
Example. Steady-state modeling 89
In addition to coding a routine to return the function vector, we also had to provide an initial
guess of the solution. Above, we used simply the inlet concentration values, but ideally, we
want our initial guess to be as close as possible to the true solution for Newton’s method
to be robust and efficient. Here, we were able to find a solution with this initial guess, but
this does not always occur. We thus may have to propose many different guesses, perhaps
at random, before we find a solution.
We can take a more systematic approach to the generation of initial guesses by using
some insight into the nature of the equations through a technique known as homotopy.If
we study the structure of the equations for the CSTR model, we note that the nonlinearity
is associated with the reaction terms. In the limit that the residence time, V/υ, goes to
zero (i.e., if we make the flow rate very large), the convective terms will be much larger in
magnitude than the reaction terms, and the system of equations becomes
υ(c A,in − x 1 ) ≈ 0
υ(c B,in − x 2 ) ≈ 0
(2.113)
υ(c C,in − x 3 ) ≈ 0
υ(c D,in − x 4 ) ≈ 0
As υ/V →∞, the reactor concentrations are very near those of the inlet, providing very
natural and accurate initial guesses,
x 1 ≈ c A, in x 2 ≈ c B, in x 3 ≈ c C, in x 4 ≈ c D, in (2.114)
If we were to find it difficult to generate an initial guess that converges to a solution for some
smaller value of υ/V , a good strategy would be to solve the system first with a very large
value of the flow rate, for which Newton’s method converges quickly. Then, to compute the
concentrations at the flow rate of interest, we decrease the flow rate value incrementally,
and for each new value, use as an initial guess the solution from the previous step.
This approach, known as homotopy, allows us to move gradually from a region of parame-
ter space in which it is easy to solve the set of equations to a region where solution is difficult,
but always to operate Newton’s method in the vicinity of a solution where convergence is
robust and rapid. With a bit of insight into the structure of the equations, this approach is very
powerful. An efficient implementation of homotopy, arc-length continuation, is described
in Chapter 4. CSTR 2D NAE.m demonstrates the use of the simple homotopy algorithm
described above to solve the steady-state CSTR system.
Example. Steady-state modeling of a condensation
polymerization reactor
The most common form of nylon, nylon-6,6, is made by polycondensation of the two
monomers hexamethylene diamine (HMD) and adipic acid (ADA). The first step in the
reaction sequence is the condensation of two monomers to form a dimer with an amide
linkage, −CONH−, and a water molecule (the condensate).
HOOC(CH 2 ) 4 COOH + H 2 N(CH 2 ) 6 NH 2
⇔ HOOC(CH 2 ) 4 CONH(CH 2 ) 6 NH 2 + H 2 O