Laplace & Poisson Problems

Laplace & Poisson Problems 1. Find the electric potential for all points inside the charge-free square shown on the left of Figure 5.2. The bottom and sides of the square are grounded, while the wire at the top is kept at 100 V. Listing 5.2 is our code LaplaceLine.py that solves Laplace’s equation within the square of Figure 5.2.

a. Create a surface plot of the potential V (x, y).

b. Run 10-1000 iterations, and note when convergence occurs.

c. Modify the code so that it quits iterating once the sum of the diagonal elements P|Vi,i| converges to some measure of precision such as 10−4 .

d. Investigate the effect of varying the step size ∆. Draw conclusions regarding the stability and accuracy of the solution for various ∆’s.

e. Investigate the effect of using Gauss-Seidel versus Jacobi relaxation. Which converges faster? Do the answers agree?

Sample Solution