CSI 801

Solving Poisson's Equation

assigned November 10, 1998

due November 23, 1998

...a potentially difficult problem

Solving Poisson's Equation using Finite Difference Methods

Due November 23, 1998

Description

Poisson's equations is a second order elliptical PDE. In this assignment, you will write a FORTRAN (77/90) or C/C++ code which solves Poisson's equation for a fixed set of boundary conditions and a given density distribution.

We will extensively discuss this problem on November 12 in class.



Assignment

Required Data

  1. The physical shape of the region is rectangular. Xmin = 0, Ymin = 0, Xmax = 1.0, Ymax = 1.5
  2. The boundary conditions for phi at the Xmin boundary are Dirchlet. Specifically, phi(0, y)= -0.1
  3. The boundary conditions for phi at the Xmax boundary are Neumann. Specifically, dphi(1.0, y)/dx = 0.1
  4. The boundary conditions for phi on the Ymax and Ymin boundaries are periodic. Specifically, phi(x,0) = phi(x,1.5).
  5. There is a charge (NOT CHARGE DENSITY) of 1.0 at (0.3,0.4)
  6. There is a charge (NOT CHARGE DENSITY) of -0.5 at (0.7,1.2)

Procedure

  1. Create an n x m grid for the system. Let h be the step size in the x direction and k be the step size in the y direction.
  2. Write down the second order center difference version of Poisson's equation for location (i,j) based on the grid spacing.
  3. Implement a routine which creates a sparse matrix for the Poisson equation which takes into account the boundary conditions. You need to solve only at the locations where there is an unknown value (ie not on the boundary).
  4. Map the charges the the correct locations in the rho matrix. Make sure they have the correct values for the given matrix size.
  5. Use a sparse matrix solve (ie from IMSL) to find the solutions of this problem.
  6. Solve the system for two different values of n and m. First, try a low resolution matrix (8,16). Then try the same solver using (64,96).
  7. Use a visualization package to graphically display the results. The final result should be a contour plot or color image of the potential values.
  8. Summarize your conclusions in a paragraph or two.

Placing it On-Line

When you have produced all the plots, create a web page for this assignment named elliptical.html and place it in your "public_html" directory. Make sure I can access it through the web. On this page, you should have links to your summary, your graphs, you programs, and the Makefile. Make sure the links work through the net.



Copyright John Wallin 1997. All rights reserved.
Last Modified : Mon November 10 12:31:00 EST 1998 < jwallin@gmu.edu>