Solving the 3D Poisson equation

AI Thread Summary
The discussion revolves around solving the 3D Poisson equation in spherical coordinates using spherical harmonics. The equation involves the gravitational potential, φ, and mass density, ρ, with boundary conditions set at infinity. The user employs a hyperbolic transformation to manage the infinite grid and utilizes LU-decomposition for solving the equation. They successfully computed the potential for a spherical mass distribution, achieving good results by fixing a maximum radius. However, they encountered challenges in setting the potential to zero at infinity, particularly when approaching the limits of their transformation. After some exploration, they found a solution and expressed interest in sharing it for the benefit of others facing similar issues. A request was made for the user to post their solution to foster further discussion and improvement.
debilo
Messages
6
Reaction score
0
TL;DR Summary
I try to solve 3D Poisson equation with boundaries condition at infinity.
Hello !

I want to solve the 3D Poisson equation using spherical coordinates and spherical harmonics.
First I must solve this : ##d^2\phi/dr^2 + 1/rd\phi/dr - l*(l+1)/r^2 = \rho (r)## with ##\phi (\infty ) = 0## (here ##\phi## is the gravitationnal potential and ##\rho## is the mass density).
To deal with the infinite grid I tried to use the hyperbolic transformation ##r = X*arctanh(R)## with ##X## a constant and ##R## between 0 and 1.
I use a LU-decomposition method to solve this. For ##\phi (0)## I apply symmetrical conditions.
I tried to solve the problem in the case of a spherical mass distribution. I compared the calculated potential with the theoretical potential.
I find a pretty good result when I fix the value in rmax.
But for ##\phi (\infty )## I have a problem. In fact I obviously get in trouble when I let R go to 1 (or 0) ; so I take ##Rmin = 0+\varepsilon## and ##Rmax = 1-\varepsilon##.

My question is : do you know a trick to really set the value of the potential to zero at infinity ?
 
Physics news on Phys.org
I finally found a solution it's ok !
 
Are you going to post it here? I'm sure others would be interested and they may see something you can to make it even better.
 
debilo said:
I finally found a solution it's ok !
Hi, can you please post the solution?
 
Back
Top