WOLFRAM|DEMONSTRATIONS PROJECT

Solving the Diffusion-Advection-Reaction Equation in 1D Using Finite Differences

This Demonstration shows the solution of the diffusion-advection-reaction partial differential equation (PDE)
c
u
xx
=d
u
t
+au+f(x,t)
in one dimension. The domain is discretized in space and for each time step the solution
u
at time
t
n+1
is found by solving for
n+1
u
from
A
n+1
u
=B
n
u
+
n
f
+
n+1
f
2
. The boundary conditions supported are periodic, Dirichlet, and Neumann. The solution can be viewed in 3D as well as in 2D. You can select the source term
f(x,t)
and the initial conditions from the menus in the main display. Selected preconfigured test cases are available from the dropdown menu. In the above PDE
c
u
xx
represents the diffusion,
d
u
t
represents the advection, and
au
the reaction.