next up previous
Next: The fast Fourier transform Up: Poisson's equation Previous: 2-d problem with Dirichlet


2-d problem with Neumann boundary conditions

Let us redo the above calculation, replacing the Dirichlet boundary conditions (149) with the following simple Neumann boundary conditions:
\begin{displaymath}
\frac{\partial u(x,y=0)}{\partial y} = \frac{\partial u(x,y=L)}{\partial y} = 0.
\end{displaymath} (161)

In this case, we can express $u(x,y)$ in the form
\begin{displaymath}
u(x,y) = \sum_{j=0}^{\infty} U_j(x)\,\cos(j\,\pi\,y/L),
\end{displaymath} (162)

which automatically satisfies the boundary conditions in the $y$-direction. Likewise, we can write the source term $v(x,y)$ as
\begin{displaymath}
v(x,y) = \sum_{j=0}^{\infty} V_j(x)\,\cos(j\,\pi\,y/L),
\end{displaymath} (163)

where
\begin{displaymath}
V_j(x) = \frac{2}{L} \int_0^L v(x,y)\,\cos(j\,\pi\,y/L)\,dy,
\end{displaymath} (164)

since
\begin{displaymath}
\frac{2}{L}\int_0^L \cos(j\,\pi\,y/L)\,\cos(k\,\pi\,y/L)\,dy = \delta_{jk}.
\end{displaymath} (165)

Finally, the boundary conditions in the $x$-direction become
\begin{displaymath}
\alpha_l\,U_j(x) + \beta_l\,\frac{dU_j(x)}{dx} = \Gamma_{l\,j},
\end{displaymath} (166)

at $x=x_l$, and
\begin{displaymath}
\alpha_h\,U_j(x)+ \beta_h\,\frac{dU_j(x)}{dx} = \Gamma_{h\,j},
\end{displaymath} (167)

at $x=x_h$, where
\begin{displaymath}
\Gamma_{l\,j} = \frac{2}{L} \int_0^L \gamma_l(y)\,\cos(j\,\pi\,y/L)\,dy,
\end{displaymath} (168)

etc. Note, however, that the factor in front of the integrals in Eqs. (164) and (168) takes the special value $1/L$ for the $j=0$ harmonic.

As before, we truncate the Fourier expansion in the $y$-direction, and discretize in the $x$-direction, to obtain the set of tridiagonal matrix equations specified in Eqs. (158), (159), and (160). We can solve these equations to obtain the $U_{i,j}$, and then reconstruct the $u(x_i, y_j)$ from Eq. (162). Hence, we have solved the problem.


next up previous
Next: The fast Fourier transform Up: Poisson's equation Previous: 2-d problem with Dirichlet
Richard Fitzpatrick 2006-03-29