Orthogonal 3D Basis Functions in Spherical Coordinates

Click For Summary

Discussion Overview

The discussion focuses on expanding a 3D scalar function, ##f(r,\theta,\phi)##, using orthogonal spherical 3D basis functions. Participants explore various approaches for the radial component and the implications of using spherical harmonics for the angular component, considering numerical computation and convergence issues.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant suggests using spherical harmonics for the angular component but is uncertain about the best choice for the radial direction, considering options like exponential decay, polynomial decay, or a sudden cutoff.
  • Another participant proposes representing ##h(r,\theta,\phi)## as an expansion of orthonormal functions, detailing the orthonormality conditions for both angular and radial components.
  • There is a discussion about using ##f_n(r) = \sin(n\pi r/r_0)/r## for the radial component, which raises concerns about convergence to the desired function ##h## near ##r=0##.
  • Some participants mention the possibility of using hydrogenic radial wavefunctions due to their orthonormality but express hesitation due to their specific context in quantum mechanics.
  • One participant explores the idea of fitting an expansion to ##h(r) - \alpha r## to address the linear behavior near ##r=0##, while noting the angle dependence of ##h## complicates this approach.
  • A later reply shares a resource on Fourier analysis in polar and spherical coordinates, which may provide additional insights.

Areas of Agreement / Disagreement

Participants express various viewpoints and approaches, with no clear consensus on the best method for the radial component or the overall expansion strategy. Multiple competing ideas remain unresolved.

Contextual Notes

Participants note limitations regarding convergence of certain proposed functions near ##r=0## and the computational intensity of some families of functions, which may affect their suitability for the task at hand.

dreens
Messages
40
Reaction score
11
I'd like to expand a 3D scalar function I'm working with, ##f(r,\theta,\phi)##, in an orthogonal spherical 3D basis set. For the angular component I intend to use spherical harmonics, but what should I do for the radial direction?

Close to zero, ##f(r)\propto r##, and above a fuzzy threshold ##r_0## I don't really care about the value of f anymore. So I can make it go to zero exponentially, polynomially, or just cut it off suddenly depending on which allows me to have the best numerical computation time for the expansion I obtain.

It seems like I have a number of options, like the normalized hydrogenic radial wavefunctions since they're automatically orthonormal by virtue of being the solution of Schrödinger's equation. This seems silly though since my scalar has nothing to do with hydrogen or Schrödinger's equation.

Maybe the spherical bessel functions, but they don't seem to converge when I integrate them, since they go to zero to slowly.

I suppose I could just do a Fourier expansion with a cutoff at ##r_0## and just divide the basis functions by r so that when I do the spherical integral the ##r^2## in the Jacobean gives me the usual Fourier orthogonality. Anything wrong with this way?
 
Okay, I have an update and I'll try and add some more details and pretty equations :-).

So I'd like to represent ##h(r,\phi,\theta)## as an expansion of orthonormal functions:

$$h(r,\theta,\phi) = \sum_{n=0}^\infty \sum_{l=0}^\infty \sum_{m=-l}^l A_{nlm} f_n(r)g_{lm}(\theta,\phi)\\$$

Where by orthonormality I mean that the families ##g_{lm}## and ##f_n## satisfy the following:
$$\int_0^\pi\sin(\theta) d\theta\int_0^{2\pi}d\phi\,g_{lm}(\theta,\phi)g_{l^*m^*}(\theta,\phi)=\delta_{ll^*}\delta_{mm^*}\\
\int_0^{r_0}r^2dr f_n(r)f_{n^*}(r)=\delta_{nn^*}$$

Which would allow me to calculate each ##A_{nlm}## by convolving h with the corresponding members of the orthonormal families:

$$A_{nlm} = \int_0^{r_0}r^2dr\int_0^\pi\sin(\theta) d\theta\int_0^{2\pi}d\phi\,h(r,\theta,\phi)\cdot f_n(r) g_{lm}(\theta,\phi)$$

The reason I want to do this is that I only have access to a numerical approximation of ##h## evaluated on a grid of data points, but I'd like to perform a routine that would involve calculating symbolic second order derivatives of ##h##, which I could do if I first represent ##h## as an expansion of differentiable analytic functions.

For ##g_{lm}## I am using the well known spherical harmonics, with a slight modification to focus on my real rather than complex scalar:

$$g_{lm} = N_{lm} P_l^m(\cos(\theta))\text{sincos}(m,\phi)\\
\text{sincos}(m,x) = \begin{cases}
\cos(x) & m<0 \\
1& m=0 \\
\sin(x)& m>0
\end{cases}\\
N_{lm}\text{ defined s.t. }\int_0^\pi\sin(\theta) d\theta\int_0^{2\pi}d\phi \left(N_{lm}P_l^m(\cos(\theta))\text{sincos}(m,\phi)\right)^2 = 1
$$

In my first post above, I mentioned my intention to try using ##f_n(r) = \sin(n\pi r/r_0)/r##: We can check orthogonality:

$$ \int_0^{r_0}r^2dr\,\sin(n\pi r/r_0)/r\sin(m\pi r/r_0)/r = N_n^2\delta_{nm} $$

The ##r^2## cancels the two ##1/r##'s, leaving the usual Fourier orthogonality, and we can make the related orthonormal set ##\tilde{f}_n=f_n/N_n##.

Unfortunately this fails to converge to my desired function ##h##, because I know that close to ##r=0##, ##h(r)\propto r##, whereas the sinc function ##\sin(r)/r\propto1##. If I could take a large number of terms, it would do better and better, but I would be better off choosing a family of functions ##f_n(r)## such that for all ##n##, ##f_n(r)\propto r## near ##r=0##. Does anyone know such a family that also satisfies the requisite orthogonality?

I also tried the family of Hydrogen wavefunctions, since at least for l=1, their radial components go to ##r=0## like ##r##. The Laguerre and Legendre polynomials proved a bit too computationally intensive for my dataset. I may still be able to get it to work, but I'd rather hunt for a better functional family.

Another idea I had was to just fit an expansion to ##h(r) - \alpha r##, where I just subtract away the linear behavior close to ##r=0## and then use the sinc family to fit the rest. This would still give me the analytic expression for ##h## I desire, even though one of the terms wouldn't truly belong to my chosen functional family. I'm stalled on this approach however, because actually there's angle dependence: ##h(r) = \alpha(\theta,\phi)\cdot r## as ##r\rightarrow 0##. I suppose I could first fit alpha with a 2D spherical expansion and go from there. But again, it would be nice to find the right family of functions and do a single complete 3D expansion.
 
  • Like
Likes   Reactions: S.G. Janssens
Thank you, I read bits and pieces (time permitting), but I wanted to let you know that I appreciate your follow-up.
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 139 ·
5
Replies
139
Views
11K
  • · Replies 10 ·
Replies
10
Views
6K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 22 ·
Replies
22
Views
4K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 8 ·
Replies
8
Views
1K