1
$\begingroup$

The FTCS method comes from the discretization of a diffusion PDE like this:

$$ a^{2} \frac{u_{i+1}^{k}-2 u_{i}^{k}+u_{i-1}^{k}}{\Delta x^{2}}=\frac{u_{i}^{k+1}-u_{i}^{k}}{\Delta t} $$

If I have the FTCS method in the Finite difference method:

$$ u_{i}^{k+1}=r\left(u_{i+1}^{k}+u_{i-1}^{k}\right)+(1-2 r) u_{i}^{k} \qquad \text { with } \qquad r=a^{2} \frac{\Delta t}{\Delta x^{2}} $$

It's stability condition is:

$$ r = a^{2} \frac{\Delta t}{\Delta x^{2}} \leq \frac{1}{2} $$

Question: What is the relation of this stability condition with the round-off error and the truncation error of the method?

$\endgroup$
4
  • 1
    $\begingroup$ So have you tried anything? $\endgroup$ – Kyle Mandli May 12 at 0:48
  • $\begingroup$ I suspect that this stability condition is an upper bound due to the truncation error (since I know how it's derived) but, should there not be a lower bound condition for the round-off error? I don't know how to progress. $\endgroup$ – LongJohn May 12 at 7:13
  • 1
    $\begingroup$ That is correct. I would highly recommend that you add your attempt at a solution to your question rather than just asking it directly. $\endgroup$ – Kyle Mandli May 12 at 13:39
  • $\begingroup$ the Courant number $r$ remains less or equal to $1/2$ , the error is second order convergent,wrt to the grid parameter $h$.Notice that to have $r \leq 1/2$ we must take the time step smaller and smaller appropriately as $h \to 0$ $\endgroup$ – user38211 May 12 at 13:57
2
$\begingroup$

The stability analysis is made considering two close trajectories, if the difference between the state is guaranteed to reduce after one iteration, it means that the method is stable, the numerical errors introduced in one iteration (rounding errros) will not accumulate.

The numerical solutions satisfy the equation

$$ u_i^{k+1} = r\,(u_{i+1}^k + u_{i+1}^k) + (1 - 2r)u_{i}^k$$

Now consider the evolution of the same initial state with a perturbation $\Delta u_i^{k}$, at iteration $k$ in the update equation and you get

$$ u_i^{k+1} + \Delta u_i^{k+1} = r(u_{i+1}^k + \Delta u_{i+1}^k + u_{i-1}^k + \Delta u_{i-1}^k) + (1 - 2r)(u_i^k + \Delta u_i^k) $$

After one iteration the difference between the perturbed trajectory and the original trajectory satisfies

$$ \Delta u_i^{k+1} \le r(|\Delta u_{i+1}^k| + |\Delta u_{i-1}^k|) + |1 - 2r|(|\Delta u_i^k|) $$

Let $\Delta u^k = \max_{i} |\Delta u_i^k|$, then we can say

$$ \begin{eqnarray} |\Delta u^{k+1}| &\le& |r|(|\Delta u^k| + |\Delta u^k|) + |1 - 2r||\Delta u^k| \\ &\le& |2r| |\Delta u^k| + |1 - 2r||\Delta u^k|\end{eqnarray} $$

If $0 \le r \le 1/2$ we have

$$ |\Delta u^{k+1}| \le 2r |\Delta u^k| + (1 - 2r)|\Delta u^k| = |\Delta u^k| $$

And that means that the error will reduce each iteration.

When you compute using finite precision, at each iteration a new perturbation is added to $\Delta u_i^{k+1}$ and that is guaranteed to be small, if the method is stable it will keep small, if the method is not stable i.e. $|\Delta u^{k+1}|$ is not guaranteed to be smaller than $|\Delta u^k|$, then the rounding errors may be amplified in the subsequent iterations, being impossible to get an accurate solution.

$\endgroup$
4
  • $\begingroup$ I suppose $\Delta u$ represents round-off error. You are assuming that both $u$ and $u+\Delta u$ satisfy the same difference equation. This is not correct. $\endgroup$ – cfdlab May 24 at 4:47
  • $\begingroup$ $u + \Delta u$ is what follows the equation, $u$ is a hidden variable that you are trying to compute. $\endgroup$ – Bob May 24 at 7:33
  • $\begingroup$ How did you get the inequality for $\Delta u$ ? You assumed $u$ also satisfies same difference equation and you subtracted the two equations. $\endgroup$ – cfdlab May 24 at 7:39
  • $\begingroup$ Yes, I am computing the maximum divergence between any two trajectories, one starting at $u$, other starting at $u + \Delta u$ will diverge after one iteration. $\endgroup$ – Bob May 24 at 8:03
0
$\begingroup$

Consider a scheme written on paper $$ u^{n+1} = H(u^n) $$ On a computer we have finite precision and round off error, so a computer computes $$ v^{n+1} = \bar H (v^n) $$ Note that $H$ and $\bar H$ are different. let $$ u = v + \epsilon $$ Then roundoff error $\epsilon$ satisfies $$ \epsilon^{n+1} = u^{n+1} - v^{n+1} = H(u^n) - \bar H(v^n) = [H(v^n) - \bar H(v^n)] + [H(u^n) - H(v^n)] $$ The first part of the error can be controlled using a high enough precision. The second part is controlled by stability of the scheme $H$. For example, if $$ \| H(u^n) - H(v^n) \| = \| H(u^n) - H(u^n - \epsilon^n) \| \le \| \epsilon^n \| $$ then the second part of the error will not grow.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.