8
2 Motivation
2.2 First Steps with Finite Differences
2.2.1 Finite Time Step and Time Level
With the use of a discrete time step Δt, we may formulate (2.1) as:
C
n+1
− C
n
Δt
= −κC
n
(2.2)
where the integer n refers to a certain time level. This time index must not be confused with “to the power of”. Conventionally, n = 0 gives the concentration at start
time of your simulation, n = 1 refers to the concentration after one time step (of Δt
in duration), n = 2 refers to the concentration after two time steps, and so on.
2.2.2 Explicit Time-Forward Iteration
It is convenient to move the unknown variable in (2.2) to the left-hand side of the
equation and shuffl all known terms to the right-hand side. This gives:
C
n+1
= C
n
− Δt · κ · C
n
= (1 − Δt · κ) C
n
(2.3)
where C
n=0
refers to the initial concentration that needs to be prescribed together
with values of κ and Δt. This iterative method uses values known at a certain time
level n to predict the value of C at the next time level n + 1 and is therefore called
explicit time-forward iteration.
2.2.3 Condition of Numerical Stability for Explicit Scheme
As can be seen from (2.3), with every time step, the concentration becomes decimated by a certain fraction in an iterative manner. This fraction is given by the
product κ · Δt. It is at hand to request that this product be less than unity, otherwise the predicted concentration would become negative, which would not make
sense. For κ · Δt > 2, the magnitude of concentration would even increase. The
corresponding condition:
Δt <
1
κ
(2.4)
is called a condition of numerical stability. Hence, the prediction of (2.3) is only stable when (2.4) is satisfied Accordingly, the maximum time step that can be chosen
depends on the value of κ.
Précédent

- 22/185

Suivant