Solving electromagnetic scattering problems with scuffscatter
scuffscatter is a tool within the scuffem code suite for solving classical scattering problems involving userspecified incident fields impinging on a material geometry.
To run a scattering calculation using scuffscatter, you will

Create a scuffem geometry file describing the shapes and material properties of the scattering objects in your geometry

Choose the incident field that will scatter off your objects: a plane wave, a gaussian beam, a point dipole source, or some combination thereof

Run scuffscatter with commandline options specifying the geometry, the frequencies, the incident field, and the type of output you wish to get back.
The various output quantities that you can ask scuffscatter to generate include the following:

The components of the scattered and total electric and magnetic fields at arbitrary userspecified points away from scattering surfaces. (The points may lie inside or outside the scattering objects).

The components of the total electric and magnetic fields on the scattering surfaces. (These quantities may alternatively be interpreted as effective surface currents and charges that give rise to the scattered fields.)

The electric and magnetic dipole moments induced by the incident field on the scattering objects. (These are obtained from the interpretation of the tangential fields as effective sources that radiate the scattered fields.)

The total power scattered by, and the total power absorbed by, the scattering objects from the incident field.

The total force and/or torque exerted on the scattering objects by the incident fields (radiation pressure).

Visualization files plotting the electric and magnetic surface currents, and the associated charge densities, induced by the incident fields on the scattering objects.

Visualization files plotting field components and Poynting fluxes on arbitrary userspecified surface meshes.
For more sophisticated users, scuffscatter also offers an advanced mode of operation that exposesat the commandline levelsome of the key efficiencies of the surfaceintegralequation formulation implemented by the scuffem core library. This offers significant speedup for certain types of computations, at the expense of a slightly more effort required to set up your calculation.
1. scuffscatter commandline options
Common options
scuffscatter recognizes the following subset of the list of commonly accepted options to scuffem commandline codes.
geometry
EPFile
Omega
OmegaFile
Cache
ReadCache
WriteCache
Options defining the scattering problem
geometry MyGeometry.scuffgeo
Specifies the geometry input file.
Omega 3.1415
OmegaFile MyOmegaFile
Lambda 0.5
LambdaFile MyLambdaFile
Specifies the angular frequencies at which to
run calculations. (Angular frequencies are interpreted
in units of rad/sec.)
The Omega
option may be used more than once
to specify multiple frequencies. Alternatively,
the OmegaFile
option may be used to specify the
name of a file containing a list of frequencies (one per
line) at which to run calculations.
The options Lambda
and LambdaFile
may alternatively
be used to define the frequencies at which to run calculations
in terms of the corresponding freespace wavelength
, interpreted in units
of microns. Thus Omega 3.1415
and Lambda 0.5
are equivalent; both specify an angular frequency
rad/sec,
corresponding
to a freespace wavelength of m.
Note: Even if you use Lambda / LambdaFile
instead of Omega / OmegaFile
to specify the
computational frequencies, the output files
will still report data in terms of the frequency
(the equivalent Omega
values), not the
wavelength. To plot your data versus wavelength
instead of frequency, just plot versus the
quantity .
Options defining the incident field
The options for specifying incident fields in scuffem are described in detail on the page Incident fields in scuffem; here we just list the available options without commentary.
pwDirection nx ny nz
pwPolarization Ex Ey Ez
psStrength Px Py Pz
psLocation xx yy zz
gbDirection nx ny nz
gbPolarization Ex Ey Ez
gbCenter Cx Cy Cz
gbWaist W
(As in scuffscatter, these options may occur multiple times to define superpositions of multiple types of incident field.)
Options requesting scattered and total fields
EPFile MyEPFile
Specifies a list of evaluation points at which to compute and report components of the scattered and total fields. This option may be specified more than once to define multiple sets of field evaluation points.
Options requesting power, force, and torque data
PFTFile MyGeometry.PFT
EMTPFTFile MyGeometry.EMTPFT
OPFTFile MyGeometry.OPFT
DSIPFTFile MyGeometry.DSIPFT
Each of these options requests that power, force, and torque (PFT) data be written to a file of the specified name. The resulting files all have the same file formatreporting absorbed and scattered power, force (radiation pressure), and torque for all objects in the geometry at all frequencies you requested (see the file header for details)but differ in the algorithm used to compute the force:

The "energymomentumtransfer" PFT (EMTPFT) method computes powers, forces and torques by considering the Joule heating of, and Lorentz force on, the surface currents in the presence of the total fields. (This is the default, so the
PFTFile
option is synonymous withEMTPFTFile
.) 
The "displacedsurfaceintegral" PFT (DSIPFT) method computes PFTs by integrating the Poynting vector and Maxwell stress tensor over a bounding surface surrounding the body.

The "overlap" PFT (OPFT) method computes PFTs directly from the surface currents by exploiting the relationship between the surface currents and the total electric and magnetic fields at body surfaces.
2. scuffscatter advanced mode
For some types of calculation it is possible to achieve significant computational accelerations by taking advantage of certain efficiencies inherent in the particular mathematical strategy used by the scuffem core library to solve Maxwell's equationsnamely, the discretized surfaceintegralequation (SIE) formulation.
You can read about all the gory details of SIE solvers here, but for the purposes of this discussion all you really need to know is this: For a given material geometry irradiated by a given incident field at a given frequency, scuffem assembles and solves a linear system of the form where

c represents the unknown surface currents for which we are solving,

the RHS vector f depends on the geometry, the frequency, and the incident field,

the matrix M depends on the scattering geometry and the frequency but not on the incident field. More specifically, for a scattering geometry consisting of N objects (or N surfaces in a regionsandsurfaces geometry specification), the matrix M has an N×N block structure in which the (m,n) block describes the interactions of object m with object n.
Armed with just this much knowledge, we can understand the two key efficiencies possible in SIE scattering calculations:

(1) First, suppose that, in a geometry consisting of 2 or more bodies, we would like to perform calculations for various different relative geometric configurations of the bodiesfor example, different separation distances or rotation angles between bodiesat the same frequency. The diagonal blocks of the M matrix, which represent the selfinteractions of objects and are the most costly blocks to compute, are independent of the relative configuration of the various objects in the geometry, and thus need only be computed once for a given geometry at a given frequency, after which they may be reused for any number of calculations involving rearrangements of the relative positions and orientations of the bodies.
Thus, if we are interested in running calculations for a spherecube geometry at (say) 7 different values of the surfacesurface separation, it greatly behooves us to assemble the diagonal (selfinteraction) blocks just once per frequency, then reuse these blocks for each of the 7 separation distances. The spherecube interaction block of the matrix must be recomputed at each separation distance, but this is relatively cheap compared to the cost of computing the spheresphere and cubecube selfinteraction blocks.

(2) In the equation above, the LHS is independent of the incident field. This means that, once we have assembled and LUfactorized the M matrix for given geometry at a given frequency (a procedure which scales asymptotically like with the total number of triangles in our surface meshes) we can solve scattering problems for any number of incident fields with cost per incident fieldthat is, essentially for free compared to the cost of assembling and factorizing the matrix.
Thus, if we are interested in observing the scattering properties of our geometry under irradiation by 7 different types of incident field (say, plane waves originating from 7 different angles) it greatly behooves us to form and LUfactorize the M matrix just once for this frequency, then reuse the factorized matrix to solve the linear system above for the 7 different types of incident field.
To take advantage of efficiency (a), scuffscatter supports the commandline option
transfile MyTransFile
where MyTransFile
is a
list of geometrical transformations.
To take advantage of efficiency (b), scuffscatter supports the commandline option
IFFile MyIFFile
where MyIFFile
is a list of incident fields.