Environmental Engineering Reference
In-Depth Information
4.4 Numerical Solution Using MATLAB ® pdepe
Here another method for solving the transport equation is presented which is based
on the pdepe solver for partial differential equations (pde's). It is necessary to
introduce this third method, as it offers more possibilities and can be applied for a
much broader class of problems. Several species and/or temperature can be treated
simultaneously; for that reason the vector variable u is used in this sub-chapter to
gather all dependent unknown variables. The coefficients may have dependencies,
either on time or on space, i.e. on the independent variables x and t , or on the
dependent variables u . Various forms of additional terms can be taken into account,
in order to consider complex sources or sinks. This capability of pdepe opens the
possibility to simulate networks of reacting biogeochemical species. Moreover,
initial conditions are allowed to be space dependent and boundary conditions to be
time dependent. The field of possible applications is so wide that only a few
examples can be presented within here.
pdepe is a MATLAB
command. Like for any other command the help system
delivers some information and instructions. In the command window one may also use
®
in order to get the basics. The information supplied by the help system is brief and
directed to a mathematically skilled audience. Therefore we provide an introduc-
tion, which can be understood without being used to mathematical presentations.
On the other hand the focus here is on transport equations, which are typical for
environmental models, and not on those numerous other partial differential
equations, which can also be treated using pdepe .
pdepe solves 'pde'-systems of partial differential equations which can be written
in the following form
@t ¼ x m @ x m f
@
u
ðÞ
@x þ
c
s
(4.10)
help system is
adopted. It was already mentioned that the unknown variables which have to be
determined are gathered in the vector u . The coefficients of the time derivatives are
gathered in a diagonal matrix c (has nothing to do with concentrations). The
functions f and s on the right side of ( 4.10 ) are vector functions too, depending
on x; t;
In the notation of ( 4.10 ) the terminology of the MATLAB
®
=@x . Also for c these dependencies can be valid. The integer value
m may take the values 0, 1 and 2, representing slab, cylindrical, or spherical
symmetry, respectively. In favour of simplicity m ¼
u and
@
u
0 will be valid in the introduc-
tory examples.
Let's look at an illustrating example. The distributions of species A and B are to
be simulated in a system in which advection, dispersion and reaction are the
Search WWH ::




Custom Search