0
$\begingroup$

I need an algorithm to solve Poisson's equation for gravitational potential.

$$ \nabla^2\phi = 4\pi G\rho $$ where, $\phi$ is Gravitational Potential.

I am trying PDE for the first time so, I need a numerical method with its proper algorithm to solve this in $x-y$ plane. Could anyone help me with itP

$\endgroup$
4
  • $\begingroup$ There are many different algorithms, but the natural one to use for such a problem is an algorithm from the finite elements (FEM) family (but FEM cannot be explained quickly in a concise physics.SE answer.) $\endgroup$ Commented Mar 15, 2022 at 18:51
  • $\begingroup$ @SebastianRiese I had trouble in implementing the FDM programmatically that's why I reached out for a proper algorithm. Could you provide the proper algorithm for any? $\endgroup$ Commented Mar 15, 2022 at 18:54
  • $\begingroup$ Finite difference methods are usable as well (but typically have worse convergence properties than FEM). While some problems can easily be solved with FDM methods (namely those that describe an initial value problems – you get a system of ODEs that you can integrate pointwise numerically), boundary value problems are transformed to systems of linear equations that you have to solve using a solver for linear equations. All of this is not really on topic on physics.SE. It may be on topic on scicomp.SE or math.SE. $\endgroup$ Commented Mar 15, 2022 at 19:59
  • 1
    $\begingroup$ Starting off solving a 2D PDE? Why not start off with just 1D and once that works, try extending it to 2D? $\endgroup$ Commented Mar 15, 2022 at 22:57

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.