Spectrum discretisation (discretisation)

Discretise the Fourier spectrum under boundary conditions.

DiscreteSpectrum(radius, condition, highcut)

Discrete Fourier spectrum under radial boundary conditions.


class harmonia.algorithms.discretisation.DiscreteSpectrum(radius, condition, highcut, maxdeg=None, lowcut=0.0, mindeg=0, comm=None)[source]

Discrete Fourier spectrum under radial boundary conditions.

The spectral modes are indexed by tuple \((\ell, n)\), where \(\ell\) is the spherical degree associated with the spherical harmonic and Bessel functions, and \(n\) is the spherical depth associated with roots of the spherical Bessel function.

The discrete wavenumbers are

\[k_{\ell n} = \frac{u_{\ell n}}{R} \,, \quad \text{where} \quad \{ u_{\ell n}: n = 1, \dots, n_{\textrm{max},\ell} \}_{\ell}\]

are zeros of the spherical Bessel functions of order \(\ell\) if the boundary condition is Dirichlet, or zeros of their derivatives if the boundary condition is Neumann. The maximum spherical depth \(n_{\textrm{max},\ell}\) corresponds to the largest wavenumber allowed in the cutoff range.

The normalisation coefficients derived from completeness relations are

\[\begin{split}\kappa_{\ell n} = \begin{cases} (2/R^3) j_{\ell+1}^{-2}(u_{\ell n}) \,, \quad \text{for Dirichlet boundary conditions;} \\ (2/R^3) j_{\ell}^{-2}(u_{\ell n}) \left[ 1 - \ell (\ell + 1) / u_{\ell n}^2 \right]^{-1} \,, \quad \text{for Neumann boundary conditions.} \end{cases}\end{split}\]
Parameters:
  • radius (float) – Boundary radius.

  • condition ({‘dirichlet’, ‘neumann’}) – Either Dirichlet or Neumann boundary condition.

  • highcut (float) – Upper cutoff wavenumber of the spectrum.

  • maxdeg (int or None, optional) – Maximum spherical degree (default is None).

  • lowcut (float, optional) – Lower cutoff wavenumber of the spectrum (default is 0.).

  • mindeg (int, optional) – Minimum spherical degree (default is 0).

  • comm (mpi4py.MPI.Comm) – MPI communicator.

Variables:
  • degrees (list of int) – Spherical degrees associated with the discrete spectrum.

  • depths (list of int) – Spherical depths associated with each spherical degree.

  • mode_counts (list of int) – Total number of spectral modes associated with each spherical degree counting spherical order multiplicities.

  • roots (dict) – Spherical Bessel roots associated with the discrete spectrum as a dictionary accessed by integer spherical degrees.

  • attrs (dict) – Discrete spectrum attributes including the following keys: ‘min_wavenumber’ and ‘max_wavenumber’ for minimum and maximum wavenumbers, ‘boundary_radius’ and ‘bounded_volume’ for the boundary radius and bounded volume, and ‘boundary_condition’ for the imposed boundary condition.

property wavenumbers

Discrete mode wavenumbers \(k_{\ell n}\).

Returns:

Mode wavenumbers as a dictionary accessed by doublet tuples \((\ell, n)\).

Return type:

dict

property normalisations

Normalisation coefficients \(\kappa_{\ell n}\).

Returns:

Normalisation coefficients as a dictionary accessed by doublet tuples \((\ell, n)\).

Return type:

dict