Example 2. Solve
Laplace's equation over a 21 by 21 grid with
boundary conditions
Top: 180
Left: 80
Bottom: 20
Right: 0
Solution 2.
This problem has the same boundary values as Example
1. Let's do it with a 21 by 21 grid which is about 5.5
times as much work.
It will require more iterations, but the graph will be
nicer. You most likely do not want to "look at" the data
structure which is a 21 by 21 matrix.
Next, solve it.
Plot the solution.
![[Graphics:../Images/EllipticPDEMod_gr_37.gif]](../Images/EllipticPDEMod_gr_37.gif)
We can make a contour plot of the solution. However, to get the orientation like the table and the 3D figure requires reversing the rows in the matrix.
![[Graphics:../Images/EllipticPDEMod_gr_41.gif]](../Images/EllipticPDEMod_gr_41.gif)
The contour graph is looking better when there are more grid points. However, because of the discontinuities in each corner, Mathematica is having difficulties computing the contour lines.
(c) John H. Mathews 2004