next up previous
Next: 3-d problems Up: The diffusion equation Previous: An example 2-d diffusion

An example 2-d solution of the diffusion equation

Let us now solve the diffusion equation in 2-d using the finite difference technique discussed above. We seek the solution of Eq. (214) in the region $0\leq x\leq 1$ and $0\leq y \leq 1$, subject to the following initial condition at $t=0$:
$\displaystyle T(x,y,0)$ $\textstyle =$ $\displaystyle 1\mbox{\hspace{1cm}for~~$\vert x-0.5\vert<0.1$~~and~~$\vert y-0.5\vert<0.1$,}$  
$\displaystyle T(x,y,0)$ $\textstyle =$ $\displaystyle 0\mbox{\hspace{1cm}otherwise.}$ (229)

The boundary conditions are simply $T(0,y)=T(1,y)=T(x,0)=T(x,1)=0$.

Figure 74: Diffusion in two dimensions. Numerical calculation performed using $D=1$, $\delta t = 10^{-4}$, and $N=J=128$. Density plots of $T(x,y,t)$ are shown at $t=0.000$ (top-left), $t=0.001$ (top-right), $t=0.002$ (middle-left), $t=0.003$ (middle-right), $t=0.004$ (bottom-left), and $t=0.005$ (bottom-right).
\begin{figure}
\epsfysize =5in
\centerline{\epsffile{temp.eps}}\end{figure}

Figure 74 shows the evolution of $T(x,y,t)$ for a calculation performed with the previously listed 2-d diffusion equation solver using $D=1$, $\delta t = 10^{-4}$, and $N=J=128$.


next up previous
Next: 3-d problems Up: The diffusion equation Previous: An example 2-d diffusion
Richard Fitzpatrick 2006-03-29