next up previous
Next: 5.3.1 Relaxation and Multigrid Up: 5. Partial Differential Equations Previous: 5.2.5 Resumé: Conservative-parabolic DE


5.3 Boundary Value Problems: Elliptic DE

Standard problem: two-dimensional potential equation,
$\displaystyle \frac{\partial^{2} u}{\partial x^{2}}
+\frac{\partial^{2} u}{\partial y^{2}}$ $\textstyle =$ $\displaystyle -\rho(x,y)$  

For general $\rho(x,y)$ this is Poisson's equation; if $\rho \equiv 0$ it is called Laplace's equation.

Assuming $\Delta y = \Delta x \equiv \Delta l$ we have

$\displaystyle \frac{1}{(\Delta l)^{2}} \left[ \delta_{i}^{2} u_{i,j}
+\delta_{j}^{2} u_{i,j} \right]$ $\textstyle =$ $\displaystyle -\rho_{i,j}$  

or
$\displaystyle \frac{1}{(\Delta l)^{2}} \left[ u_{i+1,j} \right.$ $\textstyle -$ $\displaystyle \left. 2u_{i,j}+ u_{i-1,j} +u_{i,j+1}-2u_{i,j}+u_{i,j-1} \right]
= - \rho_{i,j}$  
    $\displaystyle \hspace{6em}(i=1,2,\dots N;\;\; j=1,2,\dots M)$  



Construct a vector $\mbox{$\bf v$}$ of length $N.M$ by linking together the rows of the matrix $\{ u_{i,j}\}$:
$\displaystyle v_{r}$ $\textstyle =$ $\displaystyle u_{i,j}\,,\;\;\;\;{\rm with}\;\; r=(i-1)M+j$  

The potential equation then reads
$\displaystyle v_{r-M}+v_{r-1}-4v_{r}+v_{r+1}+v_{r+M}= - (\Delta l)^{2} \rho_{r}$      

or
$\displaystyle \mbox{${\bf A}$} \cdot \mbox{$\bf v$}$ $\textstyle =$ $\displaystyle \mbox{$\bf b$}$  

with $\mbox{$\bf b$} \equiv - (\Delta l )^{2} \{ \rho_{1}, \dots \rho_{N.M}\}^{T}$ and
$\displaystyle \mbox{${\bf A}$}$ $\textstyle \equiv$ $\displaystyle \left(
\begin{array}{cccccc}
-4 & 1 & \dots & 1 & & \\
1 &-4 & 1...
...dots &\ddots &\ddots & & \\
1 & & & & & \\
&\ddots & & & &
\end{array}\right)$  



Treating the boundaries:

Assume $u_{i,j}=u_{i,j}^{0}$ to be given along the sides: $\Longrightarrow$ $v_{1}=u_{1,1}^{0}$ etc.

\begin{figure}\includegraphics[width=120pt]{figures/f5pot9.ps}
\end{figure}


At the interior points we have
$\displaystyle -4v_{7}+v_{8}+v_{12}$ $\textstyle =$ $\displaystyle - (\Delta l)^{2} \rho_{2,2}-u_{2,1}^{0}-u_{1,2}^{0}$  

etc., yielding a modified system matrix $\mbox{${\bf A}$}$ and vector $\mbox{$\bf b$}$.
More specifically, the matrix $\mbox{${\bf A}$}$ has the form
Figure 5.4: Treatment of Dirichlet-type boundary conditions $u_{i,j}=$ $u_{i,j}^{0}$ in the case of a $5 \times 5$ lattice
\begin{figure}\parbox{90pt}{\hfill}
\begin{displaymath}
\left(
\begin{array}{rr...
...\vert& -& -& -& \vert& -& -& -
\end{array}\right)
\end{displaymath}\end{figure}
The vector $\mbox{$\bf v$}$ consists of the nine elements $v_{7},v_{8},v_{9},$ $v_{12},v_{13},v_{14},$ $v_{17},$ $v_{18},$ $v_{19}$, and the vector $\mbox{$\bf b$}$ has components
$\displaystyle b_{7}$ $\textstyle =$ $\displaystyle - (\Delta l)^{2} \rho_{7}-u_{1,2}^{0} - u_{2,1}^{0}$  
$\displaystyle b_{8}$ $\textstyle =$ $\displaystyle - (\Delta l)^{2} \rho_{8}-u_{1,3}^{0}$  
$\displaystyle b_{9}$ $\textstyle =$ $\displaystyle - (\Delta l)^{2} \rho_{9}-u_{1,4}^{0} - u_{2,5}^{0}$  
$\displaystyle b_{12}$ $\textstyle =$ $\displaystyle - (\Delta l)^{2} \rho_{12}-u_{3,1}^{0}$  
$\displaystyle b_{13}$ $\textstyle =$ $\displaystyle - (\Delta l)^{2} \rho_{13}$  
$\displaystyle b_{14}$ $\textstyle =$ $\displaystyle - (\Delta l)^{2} \rho_{14}-u_{3,5}^{0}$  
$\displaystyle b_{17}$ $\textstyle =$ $\displaystyle - (\Delta l)^{2} \rho_{17}-u_{4,1}^{0} - u_{5,2}^{0}$  
$\displaystyle b_{18}$ $\textstyle =$ $\displaystyle - (\Delta l)^{2} \rho_{18}-u_{5,3}^{0}$  
$\displaystyle b_{19}$ $\textstyle =$ $\displaystyle - (\Delta l)^{2} \rho_{19}-u_{4,5}^{0} - u_{5,4}^{0}
\nonumber$  

Figure 5.5: Potential equation on a $5 \times 5$ lattice: at the points $\circ $ the values of the potential $u(x,y)$ are given (Dirichlet boundary conditions)
\begin{figure}\includegraphics[width=180pt]{figures/f5pot9.ps}
\end{figure}

Neumann boundary conditions of the form

\begin{displaymath}
\left( \frac{\partial u}{\partial x} \right)_{i,j} = \alpha_...
...ft( \frac{\partial u}{\partial y} \right)_{i,j} = \beta_{i,j}
\end{displaymath}

may be treated using a linear approximation for $u(x,y)$ at the rim. Again considering the previous example, we proceed as follows: $\Longrightarrow$Same form of the discretized Poisson equation as in the interior region but with ``effective'' charge densities.

Putting things together, we find

\begin{displaymath}
\left(
\begin{array}{ccccccccccccccc}
-4& 2& & & & \vert& 2...
...& \vert& & & & & & \vert& & &\\
\end{array}\right) \nonumber
\end{displaymath}

Treatment of Neumann-type boundary conditions in the case of a $5 \times 5$ lattice



Subsections
next up previous
Next: 5.3.1 Relaxation and Multigrid Up: 5. Partial Differential Equations Previous: 5.2.5 Resumé: Conservative-parabolic DE
Franz J. Vesely Oct 2005
See also:
"Computational Physics - An Introduction," Kluwer-Plenum 2001