Poisson-solver-2D

Finite difference solution of 2D Poisson equation math--6-

Current version can handle Dirichlet, Neumann, and mixed (combination of Dirichlet and Neumann) boundary conditions:

(Dirichlet left boundary value)

(Dirichlet right boundary value)

(Dirichlet top boundary value)

(Dirichlet bottom boundary value)

(Dirichlet interior boundary value)

(Neumann left boundary value)

(Neumann right boundary value)

(Neumann left boundary value)

(Neumann right boundary value)

The boundary values themselves can be functions of (x,y).

Package requirements

  • NumPy
  • SciPy (sparse matrices, sparse linear algebra)

Version notes

  • version 1.3

    • It is now possible to apply Neumann and mixed boundary conditions
  • version 1.2

    • It is now possible to define arbitrary Dirichlet boundary points at the interior of the solution domain
  • version 1.1

    • Fixed a bug regarding the right-hand function
    • Figure size and font size adjusted
  • version 1.0 notes

    • Sparse matrix implementation. CSR format (Compressed sparse row matrix) matrix.

Sample Output

Dirichlet boundary conditions at outer walls

Solution of math--5- with boundary conditions math--4- is shown below:

Laplace_figure_output

Dirichlet boundary conditions at outer wall and inner regions

Solution of math--3- with boundary conditions math--2- is shown below:

Laplace_figure_output_3

Mixed boundary conditions (both Dirichlet and Neumann boundary conditions)

Solution of math--1- with boundary conditions math is shown below:

Laplace_figure_output_4

GitHub

https://github.com/zaman13/Poisson-solver-2D