Changes between Version 24 and Version 25 of u/erica/PoissonSolver


Ignore:
Timestamp:
08/19/13 14:11:57 (11 years ago)
Author:
Erica Kaminski
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • u/erica/PoissonSolver

    v24 v25  
    3838[[latex($\frac{1}{h}(u_{i+1} + u_{i-1} - 2 u_i) = f$)]]
    3939
     40Here, h is the internode size, which for a 1D line of mesh points is h=L/m+1, where L is domain length, and m is the number of grid points.
    4041
    4142which can be re-arranged for
     
    4748= Matrix form, relaxation form =
    4849
    49 
    50 
    51 - Discretizatiion leads to a syustenm of eqns. There are 2 ways to solve the equations. Matrix direct methods and relaxtiuon iteration mrethods.
     50Generally speaking, discretization leads to systems of equations. For the Poisson equation, there are 2 broad ways of solution. The first is called direct methods, and these relate to solving a large matrix (see next section). The second type of technique are known as relaxation or iteration methods. This was the type I pursued. 
    5251
    5352== Matrix form (not followed) ==
    5453
     54
    5555I did not write a code that uses a direct matrix method for solving the system of equations, but include this section here for completeness.
    5656
     57Given the discretized Poisson equation for a region actually constitutes a system of m unknowns (one equation for each of the m grid points, and boundary conditions are specified for flanking points), we can write the system in matrix form,
     58
     59
     60[[latex($\hat{A} \vec{x} = \vec{b}$)]]
     61
     62To get this form, first specify the ordering of unknowns in the vector x. This will fix the ordering of the source terms in the vector b. Then, following the discretized equation you can fill in the matrix A.
     63
     64Depending on your ordering, your matrix will have a different look. The properties of the system can be studied by studying this matrix. See Numerical Recipes for details.
     65 
     66
    5767== Relaxation form (followed) ==
     68
     69This is the type of method I used to solve Poisson's equation numerically.
    5870
    5971Error, accuracy, convergence, solution is guaranteed to converge