wiki:u/ticket

Version 8 (modified by Erica Kaminski, 10 years ago) ( diff )

Goal:

Implement poisson solver for 2.5 D and 1D just using geometric source terms


Background:

Discretizing the Poisson Equation for each cell (i,j,k) in the mesh leads to system of equations that can be solved for the gravitational potential. The discretized Poisson equation at each cell leads to a stencil of cells whose coefficients comprise a matrix that is fed into Hypre for solution. For example, the Poisson equation for 2D Cartesian coordinates,

is expressed in a 2nd-order discretized form as:

Having the cell spacing be uniform in x and y, combining like terms, and rearranging gives,

The stencil is the 5 cells: (i,j), (i+1, j), (i-1, j), (i, j+1), (i, j-1), and their coefficients are {1, 1, 1, 1, -4}.

Thus, to solve the potential in other geometries means first finding the new sets of coefficients for the matrix.


2.5 D

This is cylindrical geometry with axial symmetry. Therefore we begin with the Laplacian in cylindrical coordinates, throwing out the theta derivative:

Multiplying the 1/r through the first term, and putting these derivatives into Poisson's equation gives,

where the capital D's now represent the derivative operators. Putting the operators into their discretized, 2nd-order forms gives for the LHS:

Collecting like terms:

Putting into the Poisson equation, and moving the delta r2's over:

Therefore the "modified" 2D 5-point stencil has the following coefficients in 2.5 D:

Note: See TracWiki for help on using the wiki.