Changes between Version 34 and Version 35 of u/erica/PoissonSolver


Ignore:
Timestamp:
10/30/13 11:56:52 (11 years ago)
Author:
Erica Kaminski
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • u/erica/PoissonSolver

    v34 v35  
    2727[[latex($\triangledown ^2 u = 0$)]]
    2828
    29 The solutions to both Poisson's and Laplace's equations satisfy the Uniqueness theorem (see Griffith's E&M textbook). That is, if the solution satisfies the aforementioned 2 conditions, it is the ''unique'' solution to the equation.
     29The solutions to both Poisson's and Laplace's equations satisfy the Uniqueness theorem. That is, if the solution satisfies the aforementioned 2 conditions, it is the ''unique'' solution to the equation.
    3030
    3131As is, Poisson's equation is set up to solve for f (be it charge density, or matter density, etc.) given some u (e.g. potential- either electrical or gravitational, etc.). However, in most situations we have the opposite information about a system -- given the density, we seek the potential. This requires some numerical techniques for solving this 2nd order differential equation, especially for those systems that do not admit closed-form solutions.
     
    3333= Equation Discretization =
    3434
    35 By replacing the 2nd-order derivatives of Poisson's equation with 2nd-order central finite differences, we have the discretized version of Poisson's equation in 1D (See Leveque,
    36 Finite Difference Methods for Ordinary and Partial Differential Equations),
     35The 2nd-order discretized version of Poisson's equation in 1D for fixed cell size is,
    3736
    38 [[latex($\frac{1}{h}(u_{i+1} + u_{i-1} - 2 u_i) = f$)]]
     37[[latex($\frac{1}{h^2}(u_{i+1} + u_{i-1} - 2 u_i) = f$)]]
    3938
    4039Here, 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.
     
    6564Note that the above discretized Poisson equation can be rearranged for u at a given grid point,
    6665
    67 [[latex($u_i = \frac{1}{2}(u_{i-1}+ u_{i+1} - h f_i)   $)]]
     66[[latex($u_i = \frac{1}{2}(u_{i-1}+ u_{i+1} - h^2 f_i)   $)]]
    6867
    6968This then can be rewritten as an iteration equation, where the left hand side (LHS) is the iterated, or updated solution, at grid point i, and the RHS is the value of the grid point's neighbors prior to the iteration step.