Changes between Version 34 and Version 35 of u/erica/PoissonSolver
- Timestamp:
- 10/30/13 11:56:52 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
u/erica/PoissonSolver
v34 v35 27 27 [[latex($\triangledown ^2 u = 0$)]] 28 28 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.29 The 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. 30 30 31 31 As 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. … … 33 33 = Equation Discretization = 34 34 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), 35 The 2nd-order discretized version of Poisson's equation in 1D for fixed cell size is, 37 36 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$)]] 39 38 40 39 Here, 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. … … 65 64 Note that the above discretized Poisson equation can be rearranged for u at a given grid point, 66 65 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) $)]] 68 67 69 68 This 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.