4.2 A Problem and its Decomposition
We will model a Belusov-Zhabotinsky oscillator in which we've crafted
the initial conditions to prevent oscillations, resulting in a
travelling wave solution instead.
The system can be thought of as a reactant (
) turning into a
product (
) in a temperature field (
). The
temperature, reactants, and products diffuse in space, from regions of
higher concentration to regions of lower concentration. The initial
conditions are such that the reactant is unevenly distributed in
space, so it starts diffusing while simultaneously producing
products. These products are produced only where the reactant is
present, so they too start diffusing the moment they are produced.
The reaction term for the reactant is such that it is always positive
(think of the reactant being produced from an infinite substrate), so
it does not run out. It also diffuses out, thus forming a traveling
wave. The same thing is reflected in the product; however its
production gets shut off when it reaches a certain level, vis-a-vis
the reactant concentration.
This system can be described by the following PDE on domain
 |
= |
D( , , ,...;kD) + R( ;kR) |
|
(x, t = 0) |
= |
(0) |
|
(x, t) |
= |
q(x)  |
(4.1) |
This equation consists of two terms (on the right hand side):
D
, which includes spatial derivatives and
R
, which is a
local term. Each of these terms are dependent on parameters
kD
and
kR
. Initial and Dirichlet boundary conditions are also
prescribed. We further define
D
and
R
to be
where
kD =
,
kR = {0,
, 1}
and
= (
+ q)/f
,
q = 0.01, f = 0.3
.
is the
Laplacian operator.
We wish to solve this equation on the 2D unit square defined on
0
x
1, 0
y
1
.
q(x) = {0.1, 0.1, 0.1},
= 10-3
. The initial condition for
,
are 0.1, while for
,
(x, 0) = 0.1 + 0.01 exp(- a(x - x1)2) + exp(- a(x - x2)2) |
(4.3) |
where
a = (0.03)-2,x1 = {0.35, 0.35},x2 = {0.65, 0.65}
While this equation can be solved in many ways, we will use
second-order centered finite-difference stencils for
, i.e.
where
=
(i
x, j
y)
. We will use a
conventional RK2 time-integrator to solve this set of equations. We
will use a
Nx x Ny
mesh (i.e. there will be
Nx x Ny
grid cells) to discretize
and a time step of
t
;
Nx
,
Ny
and
t
will be inputs into the
code. Note, that
Nx
,
Ny
and
t
are not independent;
t
min{Nx-2, Ny-2}
for stability.
will be stored at cell-centers, and each cell will be
x x
y
in size,
x = 1/Nx
and
y = 1/Ny
. Fig. 4.1 depicts the mesh.
Figure 4.1:
2D central differences stencil.
|
|
Solving this equation requires the following functionalities:
- a Mesh, which discretizes the domain;
- a data object, that contains the dependent variables on the
cell-centers of the mesh;
- initial conditions, to impose
(0)
;
- boundary conditions, to impose
q(x)
;
- an RK2 integrator, to advance in time;
- physics components, to evaluate
D
and
R
;
- data output components, to store the data and a
visualizer, to visualize the data; and
- a driver, to orchestrate the creation of variables, and the
time-stepping.
These functionalities, implemented as components, can be used to solve the PDE
and form a starting point for a PDE-solving toolkit.
2010-08-11