Solving the 3D Poisson equation

debilo
Messages
6
Reaction score
0
TL;DR
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 ?
 
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?
 

Similar threads

Replies
11
Views
3K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
2
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
Replies
10
Views
4K
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K