Computing thermalequilibrium Casimir energies, forces, and torques with scuffcas3d
scuffcas3d is a commandline application within the scuffem suite for modeling Casimir interactions between compact or extended homogeneous bodies of arbitary shape and arbitrary (linear, isotropic, piecewise homogeneous) frequencydependent permittivity and permeability. scuffcas3d implements the fluctuatingsurface current (FSC) approach to numerical Casimir modeling.]
scuffcas3d handles equilibrium Casimir interactions, in which all interacting bodies and the external medium in which they are embedded exist at the same temperature (which may be absolute zero). If you need to model Casimir interactions between bodies at different temperatures, the tool you want is scuffneq. (However: if your exterior embedding medium is not at zero temperature, then the total Casimir forces will involve both nonequilibrium contributions computed with scuffneq and equilibrium contributions (at the temperature of the exterior medium) computed with scuffcas3d.
The basic flow of a typical scuffcas3d run goes something like this:

You create a scuffem geometry file describing the interacting objects or surfaces in your geometry.

Optionally, you define a list of geometric transformations to be applied to the geometry for Casimir computations. For example, if your geometry consists of two nanoparticles, you might ask for the Casimir force between the particles at 10 different values of the surfacesurface separation.

You run scuffcas3d with various commandline options specifying the desired output quantities (energy, force, etc.), whether you want frequencyresolved or frequencysummed data, and other options. This produces various textbased output files, which you will typically plot using gnuplot or other plotting or postprocessing tools.
1. What scuffcas3d actually computes
1a. Compact objects
The Casimir energy of a collection of compact bodies, and the directed Casimir force and torque on one of those bodies, are computed in the FSC approach as integrals over the positive imaginary frequency axis () of the form
(This is for the zerotemperature case; at a finite temperature the imaginaryfrequency integration is replaced by a Matsubara sum according to the prescription where the primed sum indicates that the term is to be weighted by )
The heart of the FSC algorithm implemented by scuffcas3d is an efficient technique for computing the quantities that is, the contributions of individual imaginary frequencies to the total Casimir quantitiesat arbitrary frequencies . The question of which frequencies are sampled depends on the commandline options you specify:

If you use the
Xi
orXiFile
commandline options to specify one or more particular values of , then scuffcas3d will compute and report just the integrand at those values. In this case, the code will produce a.byXi
file, but no.out
file. 
If, instead, you use the
temperature
commandline option to specify a temperature at which to calculate, then scuffcas3d will evaluate the Matsubara sums to compute the full Casimir quantities at the given temperature. In this case you will get both a.byXi
and a.out
file; the.byXi
file will report data on the Casimir integrands at the Matsubara frequencies for 
If you don't specify any of the above, then scuffcas3d defaults to performing a full numerical frequency integration to compute zerotemperature Casimir quantities. In this case, you will get both a
.byXi
and a.out
file; the.byXi
file reports data on the Casimir integrands at the frequencies chosen by the builtin integrator.
1b. Extended objects
For an extended material configuration described by a periodic geometry with Blochperiodic boundary conditions, the Casimir force density (that is, the force per unit length for a 1D extended geometry, or per unit area for a 2D extended geometry) is computed in the FSC approach as multidimensional integrals over both imaginary frequencies and Bloch vectors :
(Expressions for the Casimir energy and torque are similar). The Bloch vector is a onecomponent vector for 1Dextended geometries (such as infinitelength cylinders or beams, and a twocomponent vector for 2Dextended geometries (such as infinitearea slabs). The integral here ranges over the Brillouin zone (BZ)
scuffcas3d uses the FSC algorithm to compute values of the integrand at individual points.
The FSC algorithm implemented by scuffcas3d is an efficient technique for computing the quantity that is, the contributions of individual (imaginary frequency, wavevector) pairs to the total Casimir quantities. The question of which ( points are sampled depends on the commandline options you specify:

If you use the
XikBlochFile
commandline option to specify a list of points, then scuffcas3d will compute and report just the integrand at those values. In this case, the code will produce a.byXikBloch
file, but no other output files. 
If you use the
Xi
orXiFile
commandline options to specify one or more particular values of (but not specific values of ), then scuffcas3d will numerically evaluate the Brillouinzone integral over and will report the resulting value of the quantity at each value. In this case, the code will produce two output files (1) a.byXi
file reporting values of at the points you specified, and (2) a.byXikBloch
file reporting values of the integrand at each of the points sampled by the builtin integrator. 
If you use the
temperature
commandline option to specify a temperature at which to calculate, then scuffcas3d will evaluate the Matsubara sums to compute the full Casimir quantities at the given temperature. In this case you will get three output files: (1) a.out
file reporting the full Matsubarasummed Casimir quantities, (2) a.byXi
file reporting values of the function at each Matsubara frequency; and (3) a.byXikBloch
file reporting values of the integrand at each point sampled by the builtin integrator. 
If you don't specify any of the above, then scuffcas3d defaults to performing a full numerical frequency integration to compute zerotemperature Casimir quantities. In this case, you will get the same three output files as in the case of the previous item (
.out
,.byXi
,.byXikBloch
); the only difference is that the points reported in the.byXi
and.byXikBloch
files are the quadrature points chosen by the builtin integrator instead of the Matsubara frequencies.
2. scuffcas3d commandline options
Common options
scuffcas3d recognizes the following subset of the [list of commonly accepted options to scuffem commandline codes][CommonOptions].
geometry
TransFile
Xi
XiFile
XikBlochFile
XiQuadrature
XiMin
BZQuadrature
BZSymmetry
MaxBZSamples
AbsTol
RelTol
FileBase
Cache
ReadCache
WriteCache
Options requesting Casimir output quantities
Energy
XForce
YForce
ZForce
Torque ax ay az
Specifies the Casimir quantities in which you are
interested: the energy, the Cartesian components
of the force, or the torque about an axis
passing through the origin and the point with
Cartesian coordinates (ax,ay,az).
(Thus, for
You may specify more than one of these options, but you must specify at least one.
Note: scuffcas3d always computes the force and torque
on just one of the objects or surfaces in your geometrynamely,
the one described by the first OBJECT
or SURFACE
specification in your .scuffgeo
file. For geometries
consisting of just two objects or surfaces, the force/torque
on the second object/surface is just the negative of the
force/torque on the first.
Options specifying temperature
Temperature 300
Sets the simulation temperature in units of Kelvin,
so that temperature 300
requests roomtemperature calculations.
This option implies that you are asking scuffcas3d
to compute full Matsubarasummed Casimir quantities, so it is
incompatible with options such as Xi
or XiFile
that
specify particular frequencies at which to compute.
3. scuffcas3d output files
The base file name of all output files produced by
scuffcas3d
may be specified using the FileBase
commandline option; if this option is not specified
then the file base is taken to be the base file
name of the .scuffgeo
file you specified using
the geometry
option.
For all data output files (.out
, .byXi
,
.byXikBloch
), the output file contains a
header (a sequence of text lines starting with#
)
explaining how to interpret the contents of the file.
The .log
file
Like all commandline codes in the scuffem suite,
scuffcas3d writes a .log
file that you
can monitor to keep track of your calculation's progress.
The .out
file
If you requested the calculation of
full frequencyintegrated or Matsubarasummed
Casimir quantities, these will be written to
the .out
file.
The .byXi
file
For any problem involving compact geometries,
and for any problem involving extended geometries
in which you requested Brillouinzone integrations,
the contributions of individual imaginary frequencies
will be written to a file named .byXi
.
The .byXikBloch
file
For any problem involving extended geometries,
the contributions of individual (frequency, Bloch vector)
points will be written to a file
named FILEBASE.byXikBloch
.
4. Examples of Casimir calculations using scuffcas3d

Casimir forces in a compact geometry: A cube and a torus immersed in ethanol

Casimir forces in a 1D extended geometry: infinitelength silicon beams

Casimir forces in a 2D extended geometry: infinitearea silicon slabs