Discrete Poisson Equation - On A Two-dimensional Rectangular Grid

On A Two-dimensional Rectangular Grid

Using the finite difference numerical method to discretize the 2 dimensional Poisson equation (assuming a uniform spatial discretization, ) on an m × n grid gives the following formula:


( {\nabla}^2 u )_{ij} = \frac{1}{\Delta x^2} (u_{i+1,j} + u_{i-1,j} + u_{i,j+1} + u_{i,j-1} - 4 u_{ij}) = g_{ij}

where and . The preferred arrangement of the solution vector is to use natural ordering which, prior to removing boundary elements, would look like:


U =
\begin{bmatrix} u_{11}, u_{21}, \ldots, u_{m1}, u_{12}, u_{22}, \ldots, u_{m2}, \ldots, u_{mn}
\end{bmatrix}^T

This will result in an mn × mn linear system:

where


A =
\begin{bmatrix} ~D & -I & ~0 & ~0 & ~0 & \ldots & ~0 \\ -I & ~D & -I & ~0 & ~0 & \ldots & ~0 \\ ~0 & -I & ~D & -I & ~0 & \ldots & ~0 \\ \vdots & \ddots & \ddots & \ddots & \ddots & \ddots & \vdots \\ ~0 & \ldots & ~0 & -I & ~D & -I & ~0 \\ ~0 & \ldots & \ldots & ~0 & -I & ~D & -I \\ ~0 & \ldots & \ldots & \ldots & ~0 & -I & ~D
\end{bmatrix},

is the m × m identity matrix, and, also m × m, is given by:


D =
\begin{bmatrix} ~4 & -1 & ~0 & ~0 & ~0 & \ldots & ~0 \\ -1 & ~4 & -1 & ~0 & ~0 & \ldots & ~0 \\ ~0 & -1 & ~4 & -1 & ~0 & \ldots & ~0 \\ \vdots & \ddots & \ddots & \ddots & \ddots & \ddots & \vdots \\ ~0 & \ldots & ~0 & -1 & ~4 & -1 & ~0 \\ ~0 & \ldots & \ldots & ~0 & -1 & ~4 & -1 \\ ~0 & \ldots & \ldots & \ldots & ~0 & -1 & ~4
\end{bmatrix},

and is defined by


b =
-\Delta x^2\begin{bmatrix} g_{11}, g_{21}, \ldots, g_{m1}, g_{12}, g_{22}, \ldots, g_{m2}, \ldots, g_{mn}
\end{bmatrix}^T.

For each equation, the columns of correspond to the components:


\begin{bmatrix} u_{1j}, & u_{2j}, & \ldots, & u_{i-1,j}, & u_{ij}, & u_{i+1,j}, & \ldots, & u_{mj}
\end{bmatrix}^{T}

while the columns of to the left and right of correspond to the components:


\begin{bmatrix} u_{1,j-1}, & u_{2,j-1}, & \ldots, & u_{i-1,j-1}, & u_{i,j-1}, & u_{i+1,j-1}, & \ldots, & u_{m,j-1}
\end{bmatrix}^{T}

and


\begin{bmatrix} u_{1,j+1}, & u_{2,j+1}, & \ldots, & u_{i-1,j+1}, & u_{i,j+1}, & u_{i+1,j+1}, & \ldots, & u_{m,j+1}
\end{bmatrix}^{T}

respectively.

From the above, it can be inferred that there are block columns of in . It is important to note that prescribed values of (usually lying on the boundary) would have their corresponding elements removed from and . For the common case that all the nodes on the boundary are set, we have and, and the system would have the dimensions (m − 2)(n − 2) × (m − 2)(n − 2), where and would have dimensions (m − 2) × (m − 2).

Read more about this topic:  Discrete Poisson Equation