treams.lattice

Lattice sums.

Calculates the lattice sums of the forms

\[D_{lm}(k, \boldsymbol k_\parallel, \boldsymbol r, \Lambda_d) = \sideset{}{'}{\sum_{\boldsymbol R \in \Lambda_d}} h_l^{(1)}(k|\boldsymbol r + \boldsymbol R|) Y_{lm} (\theta_{-\boldsymbol r - \boldsymbol R}, \varphi_{-\boldsymbol r - \boldsymbol R}) \mathrm e^{\mathrm i \boldsymbol k_\parallel \boldsymbol R}\]

and

\[D_{m}(k, \boldsymbol k_\parallel, \boldsymbol r, \Lambda_d) = \sideset{}{'}{\sum_{\boldsymbol R \in \Lambda_d}} H_m^{(1)}(k|\boldsymbol r + \boldsymbol R|) \mathrm e^{\mathrm i m \varphi_{-\boldsymbol r - \boldsymbol R}} \mathrm e^{\mathrm i \boldsymbol k_\parallel \boldsymbol R}\]

that arise when translating and summing the spherical and cylindrical solutions of the Helmholtz equation in a periodic arrangement. These sums have a notoriously slow convergence and at least for lattices with a dimension \(d > 1\) it is not advisable to use the direct approach. Fortunately, it is possible to convert them to exponentially convergent series, which are implemented here. For details on the math, see the references below.

The lattice of dimension \(d \leq 3\) (\(d \leq 2\) in the second case) is denoted with \(\Lambda_d\) and consists of all vectors \(\boldsymbol R = \sum_{i=1}^{d} n_i \boldsymbol a_i\) with \(\boldsymbol a_i\) being basis vectors of the lattice and \(n_i \in \mathbb Z\). For \(d = 2\) the lattice is in the z = 0 plane and for \(d = 1\) it is along the z-axis. The vector \(\boldsymbol r\) is arbitrary but for best convergence it should be reduced to the Wigner-Seitz cell of the lattice. The summation excludes the point \(\boldsymbol R + \boldsymbol r = 0\) if it exists, which is indicated by the prime next to the summation sign.

The wave in the lattice is defined by its – possibly complex-valued – wave number \(k\) and the (real) components of the wave vector \(\boldsymbol k_\parallel \in \mathbb R^d\) that are parallel to the lattice.

The expressions include the (spherical) Hankel functions of first kind \(H_m^{(1)}\) (\(h_l^{(1)}\)) and the spherical harmonics \(Y_{lm}\). The angles \(\theta\) and \(\varphi\) are the polar and azimuthal angle, when expressing the points in spherical coordinates. In the first case, the degree is \(l \in \mathbb N_0\) and the order is \(\mathbb Z \ni m \leq l\). In the second case \(m \in \mathbb Z\).

Available functions

Accelerated lattice summations

lsumcw1d

lsumcw1d_shift

lsumcw2d

lsumsw1d

lsumsw1d_shift

lsumsw2d

lsumsw2d_shift

lsumsw3d

Direct summations

The functions are almost only here for benchmarking and comparison.

dsumcw1d

dsumcw1d_shift

dsumcw2d

dsumsw1d

dsumsw1d_shift

dsumsw2d

dsumsw2d_shift

dsumsw3d

Miscellaneous functions

area

cube(d, n)

All integer points in a d-dimensional cube of sidelength 2n

cubeedge(d, n)

All integer points on the surface of a d-dimensional cube of sidelength 2n

diffr_orders_circle(b, rmax)

Diffraction orders in a circle.

reciprocal

volume

Cython module

cython_lattice

Cython versions of lattice functions.

References