# How to tackle 2D Poisson equation?

**URL:** https://discourse.julialang.org/t/how-to-tackle-2d-poisson-equation/48185
**Category:** Numerics
**Created:** [October 11, 2020, 10:25pm UTC](https://discourse.julialang.org/t/how-to-tackle-2d-poisson-equation/48185 "2020-10-11T22:25:04Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![sw72](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@sw72](https://discourse.julialang.org/u/sw72)
#### Post date: [October 11, 2020, 10:25pm UTC](https://discourse.julialang.org/t/how-to-tackle-2d-poisson-equation/48185/1 "2020-10-11T22:25:04Z")

</div>

Can anyone point me in the right direction for solving a 2D Poisson equation in a circular region?

I’m a little overwhelmed by the number of different Julia packages which a google search returns, and it can be hard to work out what’s current, which packages are abandoned or superseded by others, etc.

Ideally I’m looking for something which is Julia all the way through, rather than a wrapper for a third party application.

I don’t know much about numerical methods for differential equations, having previously used Mathematica which takes care of all the details behind the scenes. I’m not averse to learning a bit more, but I’m not sure where to begin.

---

<div class="post-metadata">

### Author: ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)
#### Post date: [October 11, 2020, 10:48pm UTC](https://discourse.julialang.org/t/how-to-tackle-2d-poisson-equation/48185/2 "2020-10-11T22:48:40Z")

</div>

[https://github.com/PetrKryslUCSD/FinEtoolsHeatDiff.jl/blob/master/examples/steady\_state/2-d/Poisson\_examples.jl](https://github.com/PetrKryslUCSD/FinEtoolsHeatDiff.jl/blob/master/examples/steady_state/2-d/Poisson_examples.jl)  
Heat conduction with non-zero heat generation rate is a Poisson’s eqn. Where does your circular-domain mesh come from? FinEtools can generate it if you need to.

---

<div class="post-metadata">

### Author: ![dlfivefifty](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dlfivefifty/32/1959_2.png) [@dlfivefifty](https://discourse.julialang.org/u/dlfivefifty)
#### Post date: [October 12, 2020, 9:58am UTC](https://discourse.julialang.org/t/how-to-tackle-2d-poisson-equation/48185/3 "2020-10-12T09:58:31Z")

</div>

The nicest approach would be to use Zernike polynomials which avoids meshes. FastTransforms.jl gives a fast expansion in Zernike polynomials. and then Poisson can be reduce to tridiagonal linear solves (the different Fourier modes decouple). This used to be wrapped up in an ApproxFun.jl add on [MultivariateOrthogonalPolynomials.jl](https://github.com/JuliaApproximation/MultivariateOrthogonalPolynomials.jl/blob/master/src/Disk/DiskSpace.jl) though I’m afraid this code is quite stale.

I’m planning to update the code so will let you know when that happens.

EDIT: the transform part is in this [example](https://github.com/JuliaApproximation/FastTransforms.jl/blob/master/examples/disk.jl)

---

<div class="post-metadata">

### Author: ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)
#### Post date: [October 12, 2020, 11:27am UTC](https://discourse.julialang.org/t/how-to-tackle-2d-poisson-equation/48185/4 "2020-10-12T11:27:08Z")

</div>

Another alternative is the Gridap.jl project: [1 Poisson equation · Gridap tutorials](https://gridap.github.io/Tutorials/dev/pages/t001_poisson/#Tutorial-1:-Poisson-equation-1)
