Page 165 - Numerical Methods for Chemical Engineering
P. 165
4 Initial value problems
Armed with techniques for solving linear and nonlinear algebraic systems (Chapters 1
and 2) and the tools of eigenvalue analysis (Chapter 3), we are now ready to treat more
complex problems of greater relevance to chemical engineering practice. We begin with
the study of initial value problems (IVPs) of ordinary differential equations (ODEs),in
which we compute the trajectory in time of a set of N variables x j (t) governed by the set of
first-order ODEs
d
x = ˙x = f (x) (4.1)
dt
[0]
We start the simulation, usually at t 0 = 0, at the initial condition, x(t 0 ) = x . Such prob-
lems arise commonly in the study of chemical kinetics or process dynamics. While we have
interpreted above the variable of integration to be time, it might be another variable such as
a spatial coordinate.
Our task will be to develop iterative rules for updating the trajectory by taking small steps
forward in time. We would like the numerical trajectory to agree with the exact solution
' t
x(t) = x [0] + f (x(t ))dt (4.2)
t 0
Therefore, this problem is closely related to that of numerically computing the values of
definite integrals
' b
I F = f (x)dx (4.3)
a
Thus,wefirstconsiderthesubjectofnumericalintegration(quadrature). Aswecancompute
I F analytically when f (x) is a polynomial,
N N
k c k k+1 k+1
f (x) = c k x I F = b − a (4.4)
k + 1
k=0 k=0
our first topic will be polynomial interpolation, the representation of an arbitrary function
f (x) by an approximating polynomial.
Following a discussion of polynomial interpolation and numerical integration, a survey
is presented of the major techniques for solving IVPs, as implemented in MATLAB. Then,
the issues of numerical accuracy and stability are treated at depth for commonly-used ODE
solvers. Next, we consider differential-algebraic equation (DAE) systems that contain both
154