Consistency Error for Runge-Kutta-Methods

326 Views Asked by At

I'm thinking about an old exercise concerning the Friedrich Scheme

$$u_{j}^{n+1} = \frac{1}{2}\left(u_{j+1}^n + u_{j-1}^n\right) - \frac{r}{2}\left(u_{j+1}^n - u_{j-1}^n\right)$$

where $u_j^n \approx u(x_j,t_n)$ and $$|r| = \left|\frac{b\Delta t}{\Delta x}\right| \leq 1$$ (the so called CFL condition).

Assume that a solution $u\in C^4$ to the transport equation $$\begin{eqnarray*}\partial_t u(x,t) + b\partial_x u(x,t) &=& 0\\ u(x,0) &=& g(x)\end{eqnarray*}$$ exists.

Just to give a full description of the problem: The domain is $\Omega = (0,1)\times(0,T)$.

First I define the discrete operator $$D:=u_j^{n+1} - \frac{1}{2}\left(u_{j+1}^n - u_{j-1}^n\right) - \frac{r}{2} \left(u_{j+1}^n - u_{j-1}^n\right)$$

The task is now

Show that the Friedrich-Scheme has consistency order 1 in time and 2 in space, i.e. $|\tau_j^n| \in \mathcal{O}(\Delta x^2 + \Delta t)$ with the consistency error $$\tau_j^n := \partial_t u(x_j,t_n) + b\partial_x u(x_j,t_n) - D$$

Then I insert my $C^4$ function $u$ into $\tau_j^n$ and then I use Taylor-expansion:

$$\begin{eqnarray*}u(x_j,t_{n+1}) &=& u(x_j,t_n)+\Delta t\partial_t u(x_j,t_n) + \mathcal{O}(\Delta t^2)\\ u(x_{j+1}^n) &=& u(x_j,t_n) + \Delta x\partial_x u(x_j,t_n) + \mathcal{O}(\Delta x^2)\\ u(x_{j-1}^n) &=& u(x_j,t_n) - \Delta x\partial_x u(x_j,t_n) + \mathcal{O}(\Delta x^2)\end{eqnarray*}$$

After inserting this I get $$D = \left(\frac{1}{2} + \frac{r}{2}\right)\bigg(\underbrace{2\Delta x\partial_x u(x_j,t_n) + \mathcal{O}(\Delta x^2)}_{=u(x_{j+1},t_n) - u(x_{j-1},t_n)}\bigg) - \underbrace{u(x_j,t_n)-\Delta t \partial_t u(x_j,t_n) - \mathcal{O}(\Delta t^2)}_{=u(x_j,t_{n+1})}$$

For me, nothing seems to vanish if I plug this into the definition of $\tau$. Normally, I want the continuous equation in $\tau$ to vanish, but from the discrete operator I get $$\Delta x\partial_x u(x_j,t_n) + \Delta t\partial_t u(x_j,t_n)$$ What am I missing?

Even after using the CFL condition (which gives $\Delta t\in\mathcal{O}(\Delta x)$) nothing vanishes.

I had in mind that this was easy... Can anyone help me?

1

There are 1 best solutions below

5
On BEST ANSWER

Substitute $$\partial_t u(x_j,t_n) = \frac{u_i^{n+1}-\tfrac{1}{2}(u_{i+1}^{n}+u_{i-1}^{n})}{\Delta t}+O(\Delta t)$$ $$b\partial_x u(x_j,t_n) = b\frac{u_{i+1}^{n}-u_{i-1}^{n}}{2\Delta x}+O(\Delta x^2)$$ and $$D=u_j^{n+1} - \frac{1}{2}\left(u_{j+1}^n - u_{j-1}^n\right) - \frac{b\Delta t}{2\Delta x} \left(u_{j+1}^n - u_{j-1}^n\right)$$ into

$$\tau_j^n := \partial_t u(x_j,t_n) + b\partial_x u(x_j,t_n) - \Delta t D$$ This will work.

Note, you have continuous operator $$Lu=\partial_t u(x_j,t_n) + b\partial_x u(x_j,t_n)=0$$ and discrete operator $$L^{\Delta x,\Delta t}u=\frac{u_i^{n+1}-\tfrac{1}{2}(u_{i+1}^{n}+u_{i-1}^{n})}{\Delta t} + b\frac{u_{i+1}^{n}-u_{i-1}^{n}}{2\Delta x}=0$$ so $$\tau_h = Lu-L^{\Delta x,\Delta t}u = Lu-\Delta t D$$ because your $D$ is $$D=\frac1{\Delta t}L^{\Delta x,\Delta t}$$