M. T. Homer Reid MIT Home Page
Physics Problems Research teaching My Music About Me Miscellany


Under the hood: the algorithms implemented by scuff-em

This page offers some top-level overview sketches of the basic algorithms implemented by the various codes in the scuff-em suite.

For more details on the implementation of these algorithms, see Data Structures and Class Methods in scuff-em.

For further technical details on the scuff-em core library, check out the libscuff Implementation Notes and Technical Reference, available as a PDF document.

The core library (libscuff)

At its heart, the scuff-em core library is an implementation of the surface-integral-equation / boundary-element method (SIE / BEM) for solving electromagnetic scattering problems.

More specifically, scuff-em implements the EFIE and PMCHW formulations of the SIE / BEM with RWG basis functions used to expand tangential currents on the surfaces of compact 3D objects.

If all of those acronyms went by a little quickly, here's a sketch of the basic problem addressed by the scuff-em core library. We have a collection of homogeneous material objects (maybe gold or silicon spheres or cubes) embedded in some medium (generally vacuum or a dielectric liquid), we irradiate the configuration with some known electromagnetic disturbance (such as a plane wave), and we seek to compute the electromagnetic fields scattered from the objects. In a surface-integral-equation (SIE) method, we do this by first computing the surface currents induced on the object surfaces by the incident field. (For perfectly conducting scatterers we have only electric surface currents K; for general scatterers we have both electric and magnetic (N) surface currents.) Once we have solved for the surface currents, we can use them to evaluate the scattered fields anywhere we like.

To solve for the surface currents, we write down an integral equation relating the surface currents to the incident field. This integral equation basically says that the tangential components of the scattered field (the field due to the surface currents) should precisely cancel the tangential components of the incident field at the object surfaces. (This statement is more of a mnemonic than a rigorous description; see the technical memo for a more thorough treatment.) Schematically, the integral equation looks something like this:

where Γ involves the dyadic Green's function for Maxwell's equations. Here the surface integral extends over the surfaces of all scattering objects in our scattering geometry, and the equation is required to hold at all points x on all object surfaces. (The equation is understood to apply only to the surface-tangential components of the vectors on the two sides.)

This is the surface-integral-equation (SIE) formulation of our scattering problem. To solve the integral equation numerically, we now proceed to discretize it by expanding the K and N surface currents in some basis of expansion functions. The particular functions used by libscuff are the "RWG" basis functions, which were defined in this paper:

The RWG basis functions are defined by meshing the surfaces of compact 3D objects into flat triangular panels, and assigning to each internal edge in the discretization a localized surface current that is sourced and sunk at the panel vertices opposite that edge:

Having introduced a discrete basis of expansion functions, our integral equation becomes a simultaneous system of linear equations:

This approach to solving surface integral equations is known as the boundary-element method (BEM), and the linear system in the equation above is sometimes known as the BEM system. The scuff-em core library provides routines for assembling the BEM matrix M, and the right-hand side vector of incident-field expansion coefficients, for arbitrary scattering geometries and arbitrary incident fields at arbitrary frequencies.

Then, using the matrix and RHS vector assembled by the core library, you can use external linear algebra software like lapack to solve the linear system, after which you can again use routines provided by the scuff-em core library to compute the scattered fields at arbitrary points in space.

The standalone scattering codes

The standalone scattering codes distributed with the scuff-em suite are scuff-scatter and scuff-scatter-periodic.

The former of these, scuff-scatter, is essentially just a command-line interface to the core library for solving scattering problems involving compact 3D bodies using the algorithms outlined above.

The latter code, scuff-scatter-periodic, extends the method described above to the case of periodic 2D arrays of scatterers. In this case, the usual 3D Helmholtz kernels (the Γ dyadics in the integral equation above) that enter into the computation of the BEM matrix elements must be replaced by their periodic versions, which include contributions from all cells in the infinite lattice weighted by Bloch phase factors. To accelerate the computation of these lattice sums, scuff-scatter-periodic implements the Ewald-summation method discussed in this paper:

  • "An Efficient Numerical Evaluation of the Green's Function for the Helmholtz Operator on Periodic Structures," by Kirk E. Jordan, Gerard R. Richter, and Ping Sheng, Journal of Computational Physics 63 222 (1986) (http://dx.doi.org/10.1016/0021-9991(86)90093-8).

The Casimir codes

The scuff-em suite includes three standalone codes for Casimir computations.

scuff-cas3d is an implementation of the "fluctuating-surface-current" (FSC) approach to Casimir computations for compact 3D objects. In this case, the Casimir energy of a configuration of objects, and the force on one of the objects, are given by the expressions

where the matrix M is simply the BEM matrix for the given configuration of objects, evaluated at imaginary frequency ω=iξ. (The matrix in the denominator of the first equation is just the BEM matrix for the configuration in which all objects are separated from each other by infinite distances, which amounts to just zeroing out the off-diagonal blocks of the original matrix. The derivative of the matrix in the second equation is taken with respect to a rigid displacement of the object on which we are computing the force.)

In its default invocation, what scuff-cas3d does is to evaluate the imaginary-frequency integrals in the above equations (or the Matsubara sums that replace them for finite-temperature calculations), with the BEM matrix and its derivatives computed at each frequency by the standard libscuff routine for assembling the BEM matrix.

The FSC approach to Casimir computations, and in particular the fact that the Casimir energy and force can be computed directly from the BEM matrix, was first noted in my PhD thesis (see also my thesis defense presentation) and in these references:

  • "Fluctuating Surface Currents: A New Algorithm for Efficient Prediction of Casimir Interactions among Arbitrary Materials in Arbitrary Geometries. I. Theory," by M. T. Homer Reid, Jacob White, and Steven G. Johnson (http://arxiv.org/abs/1203.0075v1)

  • "Computation of Casimir Interactions between Arbitrary 3D Objects with Arbitrary Material Properties," by M. T. Homer Reid, Jacob White, and Steven G. Johnson, Physical Review A 84 010503(R) (2011) (http://dx.doi.org/10.1103/PhysRevA.84.010503")

  • "Efficient Computation of Casimir Interactions between Arbitrary 3D Objects," by M. T. Homer Reid, Alejandro W. Rodriguez, Jacob White, Steven G. Johnson, Physical Review Letters 103 040401 (2009) (http://dx.doi.org/10.1103/PhysRevLett.103.040401)

scuff-cas2D is an implementation of the FSC approach approach to Casimir computations for quasi-2D objects---that is, 3D objects of infinite spatial extent in one direction and constant cross-sectional shape in the transverse directions.

scuff-caspol computes the Casimir-Polder potential for a polarizable molecule near a surface or a collection of surfaces. The method used is essentially that discussed in Section 5.2 (equation 401) of this paper:

The RF / microwave code

The microwave engineering code distributed with the scuff-em suite is scuff-rf.

The functionality implemented by scuff-rf is akin to that of scuff-scatter, but with a couple of important extensions that are not present in the scuff-em core library. These are:

  • Support for RF/microwave ports in meshed geometric structures. A port is a region of the structure through which the simulator forces a fixed current; the fields radiated by the currents forced through the port regions of the geometry are used as the incident fields in a scattering calculation.

  • Functionality to compute port "voltages" as the sum of in the "scattered" scalar potential difference between two points in a structure plus the line integral of the vector potential between those points.

  • Functionality to compute z-parameters (impedance parameters) for a multiport network by driving a single port with a unit-strength current and computing all the resulting port voltages. (After we have computed the matrix of z-parameters it is a simple transformation to convert them into the more commonly encountered s-parameters.)

Core Library

Under the hood: the algorithms implemented by scuff-EM, by Homer Reid
Last Modified: 11/16/16