Biomedical Engineering Reference
In-Depth Information
In this way, given some initial conditions for
x
at
t
=
t
0
, we can define a recurrence
relation:
x
0
=
a
,
x
n
+
1
=
x
n
+
∆
tf
(
x
n
,
t
n
)
,
where:
x
n
=
x
(
t
n
)
,
t
n
=
t
0
+
n
t
(4.33)
which can be solved iteratively. The error in the approximation is dependent on the
size of
t
, the step-size, with schemes being said to be
n
th order accurate in a given
variable (or variables), meaning that the error is essentially a constant multiplied by
the step-size raised to the
nth
power [1]. As well as governing this truncation er-
ror, one must also ensure that the spatial and temporal step-sizes used do not make
the set of equations unstable, resulting in erroneous answers. For instance, explicit
difference equations (DEs), where the values at time-step
n
1 are calculated us-
ing only values known at time
n
as in Equation 4.33 above, tend to have stability
problems. Thus, compartmental models, a common finite difference method used to
solve the diffusion equation (Equation 4.2) [14, 24, 26], are hampered by the fact
that for stability:
+
D
t
1
2
n
2
≤
(4.34)
(
∆
x
)
where
D
is the diffusion coefficient,
n
is the spatial dimension and
t
are the
spatial and temporal step-sizes respectively [37]. This puts a limitation on the size
of the time-step to be used which, in less abstract terms, means that, in one space
dimension, it must be less than the diffusion time across a cell of width
x
and
x
.
However, different schemes have different stability properties and so the restric-
tive bounds of the compartmental model can be avoided. For instance, implicit DEs,
where values at time
n
1 are defined in terms of each other, are often stable for all
step-sizes. However, while explicit DEs are inherently easy to solve as the solution
is simply propagated forward in time, implicit DEs require the solution of a set of
simultaneous Equations [30]. In order to avoid computationally intensive routines, it
is therefore important that the DE is designed so that the resulting system of equa-
tions is tridiagonal.
†
One such equation, known as the Crank-Nicholson scheme, is
recommended for diffusive problems in one space dimension [37]. Applied to the
one-dimensional version of Equation 4.2 we have, using the notation of Equation
4.34:
+
D
u
n
+
1
i
−
1
+
u
i
+
1
−
u
i
−
1
2
u
n
+
1
i
u
n
+
1
u
n
+
1
i
u
i
2
u
i
+
i
+
1
−
+
−
=
(4.35)
t
2
(
∆
x
)
†
A tridiagonal system of equations
Ax
=
b
is one where the matrix
A
is tridiagonal, that is, where the
elements of
A
,
a
ij
, equal 0 if
i
>
j
+
1or
j
>
i
+
1. In other words, if the row and column number differ by
more than one, the entry must be zero. The entries are otherwise unrestricted. In non-mathematical terms
this means that the resulting equations can be solved quite straightforwardly in O(n) operations where n
is the number of equations, which in the context of difference equations equates to the number of spatial
points at which the equation is to be evaluated.
Search WWH ::
Custom Search