Numerical Example

 
Let's work through an example of solving Laplace's equations in two dimensions.  The problem that we will solve is the calculation of voltages in a square region of space.  The boundary conditions for this problem involve 0 V all around the square except the top side, which is held at 100V.  What is the voltage as a function of space inside the square?

Our first step is to sample the square space so that we can describe it using a computer.  For simplicity, we will use a 5 x 5 array of voltage values, as shown below:

 
This way, a 2D computer array can hold all the voltages that describe this square region of space.  In this representation, all of the border elements in the matrix are set to boundary conditions; they do not change during our calculation.  There are 9 unknown voltage values in the center that are not boundary conditions; these are what we will solve.
 
 
 
 
 
 
 
 

2003-present Georgia Tech, all rights reserved