Writing the implicit scheme using matrices

33 Views Asked by At

\A= \begin{bmatrix} 2 & -1 & 0 & . & . & . & 0 \\ -1 & 2 & -1 & . & . & . & . \\ 0 & . & . & . & . & . &. \\ . & . & . & . & . & . & 0 \\ . & . & . & . & -2 & 2 & -1 \\ 0 & . & . & . & 0 & -1 & 2 \end{bmatrix} So the matrix is called A.

The implicit difference scheme has the following expression:

$\frac{v_j^{m+1}-v_j^m}{\Delta t}=\frac{v_{j-1}^{m+1}-2v_j^{m+1}+v_{j+1}^{m+1}}{\Delta x^2}$ (Equation 1)

In order to write the expression in a more convenient form the vector $v^m$ is introduced: $v^m=(v_1^m,...,v_n^m)^T$. The scheme can then be written like this:

$(I+\frac{\Delta t}{\Delta x^2}A)v^{m+1}=v^m, m \geq0$ (Equation 2). I is the identity matrix.

My question is how it is possible to go from equation 1 to equation 2.

1

There are 1 best solutions below

1
On BEST ANSWER

Multiply Equation 1 by $\Delta t$ and add $v_j^m$: $v_j^{m+1}=Iv_j^{m+1}=v_j^m+ \frac{\Delta t (v_{j-1}^{m+1}-2v_{j}^{m+1}+v_{j+1}^{m+1})}{\Delta x^2}$.

Now you observe that $v_{j-1}^{m+1}-2v_{j}^{m+1}+v_{j+1}^{m+1}$ can be written as a multiplication of the Matrix $-A$ on the vector $v^{m+1}$; the $j$-th component of this vector is denoted by $v_j^{m+1}$.