Solving electrostatics problems with scuffstatic
scuffstatic is a tool within the scuffem code suite for solving a broad class of electrostatics problems.
The calculations that scuffstatic can perform include the following:

Compute the capacitance matrix (i.e. the self and mutual capacitances) of a collection of conductors.

Compute the DC polarizability of a conducting or dielectric body.

Compute the electrostatic potential and field at arbitrary userspecified points in the vicinity of conducting or dielectric bodies, with the conductors maintained at arbitrary userspecified potentials and (optionally) an arbitrary userspecified external forcing field.

Compute the Cmatrix, a sort of electrostatic version of the "Tmatrix" used to characterize the scattering properties of bodies at nonzero frequencies. The Cmatrix was shown in this paper to be related to quantummechanical entanglement entropy.
As a technical detail, we note that the implementation of scuffstatic actually differs in some significant ways from the other codes in the scuffem suite; in particular, as compared to the scuffem core library, scuffstatic uses different basis functions and a different formulation of the boundaryelement method, as appropriate for zerofrequency problems. (More specifically, scuffstatic expands surface electric charge densities on PEC and dielectric surfaces using ``pulse'' basis functions, which are constant on individual triangles and vanishing everywhere else.) However, from the implementation standpoint, it turns out that the calculations needed to implement the electrostatics calculations in scuffstatic are a proper subset of the calculations already implemented in scuffem. Moreover, from the user's standpoint, the work needed to set up a scuffstatic problem (create surface meshes, write geometry files, etc.) is similar to the setup needed for the nonzerofrequency codes in the scuffem suite. This is why it makes sense to package these codes together.
Here is a brief technical memo discussing the implementation of scuffstatic, including both the underlying BEM electrostatics formulation and the execution of the various types of calculation (capacitance, polarizability, etc.) that the code can do.
1. scuffstatic commandline options
Common options
scuffstatic recognizes the following subset of the list of commonly accepted options to scuffem commandline codes.
geometry
TransFile
EPFile
Options requesting capacitancematrix output
CapFile MyCapacitanceMatrix.dat
TransFile MyTransFile.trans
If you specify a file name using CapFile
, scuffstatic
will compute the full capacitance matrix for your geometry
and write the data to the specified file. (The file will be
overwritten if it already exists.)
The optional TransFile
option may be used to specify a
list of
geometrical transformations
to be applied to your geometry. In this case, the full capacitance
matrix will be computed for each specified transformation.
Options requesting polarizability output
PolFile MyPolFile.dat
If you specify a file name using PolFile
, scuffstatic
will compute the DC polarizability of each object in your
geometry and write the data to the specified file. (The file
will be overwritten if it already exists.)
Options requesting computation of electrostatic fields
EPFile MyEPFile
PlotFile MyPlotFile.pp
PotFile MyPotFile
ConstField [XYZ]
PhiExt PhiFile
If you specify a list of field evaluation points using
EPFile MyEPFile
, then scuffstatic will compute
the electrostatic potential and field at each evaluation
point and write the results to a file named MyEPFile.out
.
(The file will be overwritten if it already exists.)
The file will contain a header explaining how to interpret
its contents.
The PlotFile
option may be used to request
creation of a gmsh visualization file plotting
the induced charge density on all conducting and
dielectric surfaces in the geometry.
If you say PlotFile MyPlotFile.pp
, then you
will get a file named MyPlotFile.pp
which
may be opened in gmsh for visualization purposes.
By default, all conductor surfaces will be held
at zero potential. If you wish to set one or more
conductor surfaces to nonzero potential, you may do this
by saying PotFile MyPotFile
(here "pot" is short
for "potential). MyPotFile
should be simply a
list of (surface label, potential value) pairs,
like this:
UpperSurface 1.2
LowerSurface 3.4
where UpperSurface
and LowerSurface
are the
labels you assigned to the surfaces in question
in the .scuffgeo
file. (The label is the string
following the OBJECT
or SURFACE
keyword
in the .scuffgeo
file.) This would set the
conductor surface UpperSurface
to a potential of
1.2 volts and the conductor surface LowerSurface
to a potential of 3.4 volts.
By default, the calculation will be performed with
no external electrostatic field. You can say e.g.
ConstField X
to request that the calculation
be performed in the presence of a constant unitstrength
electrostatic field pointing in the positive
direction.
Alternatively, you may use the PhiExt
option
to specify the name of a file describing a more
complicated (nonconstant) external field.