Modeling nonequilibrium electromagnetic fluctuations with scuffneq
scuffneq is an application code in the scuffem suite for studying nonequilibrium (NEQ) electromagneticfluctuationinduced phenomenaspecifically, for computing radiative heattransfer rates and nonequilibrium Casimir forces and torques for bodies of arbitrary shapes and arbitrary (linear, isotropic, piecewise homogeneous) frequencydependent permittivity and permeability. scuffneq implements the fluctuatingsurface current (FSC) approach to numerical modeling of nonequilibrium fluctuation phenomena.
Mechanically, working with scuffneq is similar in many ways to working with the equilibrium Casimir code scuffcas3d. In particular,

As in scuffcas3d, you can request either (a) frequencyresolved information on heattransfer rates and NEQ Casimir forces (in which case you will specify a list of frequencies and will get back a list of frequencyspecific values of energy and momentum fluxes) or (b) frequencyintegrated information, in which case you will assign temperatures to each body in your geometry and numerically integrate the fluxes, weighted by appropriate BoseEinstein factors, to obtain the total heattransfer rate or NEQ Casimir force. (scuffneq doesn't actually do the frequency integrationthat's handled by the separate utility code scuffintegrate, as discussed below in the section what scuffneq actually computes.)

As in scuffcas3d, you can specify an optional list of geometrical transformations describing various displacements and rotations of the bodies in your geometry; in this case you will get back values of the frequencyresolved or frequencyintegrated quantities for each transformation you specify.
A bonus feature of scuffneq that is not present in scuffcas3d is the ability to obtain spatiallyresolved information on energy and momentum fluxes. More specifically, you can specify to scuffneq a list of evaluation points and you will get back values of the frequencyresolved Poynting flux and Maxwell stress tensor at each spatial point you requested, which scuffintegrate will integrate to yield thermally and temporallyaveraged quantities.
In addition to numerical output on heattransfer rates and Casimir quantities, you can also request visualization outputs that plot the spatial distribution of the heat or momentum flux.
For Casimir forces and torques, the quantities computed by scuffneq are only the nonequilibrium contributions to the total force and torquethat is, the contributions arising from the temperature differences between individual bodies and the surrounding environment. To get the total force, these must be added to the equilibrium contributions, which are the Casimir forces and torques for the case in which all bodies are at the temperature of the environment. These contributions must be computed by doing a separate scuffcas3d calculation, on the same geometry, at the temperature of the external medium. (For heattransfer rates there is of course no equilibrium contribution, as there is no net power transfer between bodies at thermal equilibrium.)
One difference between scuffcas3d and scuffneq is that,
whereas scuffcas3d reports only the Casimir force on one body in
a geometry (namely, the first body listed in the .scuffgeo
file),
scuffneq reports forces and heattransfer rates for all bodies
in the geometry. [The extra information would typically
be redundant in an equilibrium Casimir calculation, since the equilibrium
Casimir force on the second body (in a twobody geometry) is just equal
and opposite to the force on the first body; but in general no such
relation holds in the nonequilibrium case.]
In fact, the output from scuffneq is even more detailed than that: in addition to the total power/force/torque on each body, you also get the contributions of each individual source body to those quantities. All of this means that the output from scuffneq requires some effort to interpret, as discussed in more detail below.
1. What scuffneq actually computes
scuffneq implements the FSC approach to nonequilibrium fluctuation phenomena, an algorithm for computing the thermal averages of power, force, and torque (PFT) quantities in geometries consisting of homogeneous material bodies at various temperatures embedded in an finitetemperature or zerotemperature environment. scuffneq can compute both spatiallyresolved and spatiallyintegrated PFT quantities. (Examples of spatiallyresolved quantities include components of the average Poynting flux or Maxwell stress tensor at individual points in space. Examples of spatiallyintegrated quantities include the total power absorbed by, or the total force or torque on, a compact homogeneous body. Spatiallyintegrated quantities are generally obtained by integrating spatiallyresolved quantities over closed bounding surfaces, although this is not necessarily the way they are computed by scuffneq.)
In general, for a geometry consisting of multiple homogeneous material regions, PFT quantities receive contributions from source fluctuations in all regions and at all frequencies, and the the thermal average of a PFT quantity Q may be written in the form
where is the temperature of region , is a temperatureindependent generalized flux describing the contribution of frequency source fluctuations in region , and is the BoseEinstein factor.
The sum over regions in this equation includes the contributions of the external environment. To isolate these contributions it is convenient to decompose into a sum of two terms:
where
The quantity is the average value of that would obtain if the temperature in all material regions were equal to the environment temperature that is, it is the equilibrium value of at temperature . The equilibrium value of PFT quantities may be computed by methods that are less costly than scuffneq. (For example, if is a spatiallyintegrated force or torque, then is just the equilibrium Casimir force, which is computed efficiently by scuffcas3d. On the other hand, if is a spatiallyintegrated power transfer quantity, then identically.) Thus this contribution is not computed by scuffneq.
The quantity is the extent to which deviates from its equilibrium value, and the sum in its definition ranges only over the source bodies in the geometry, not including the environment contribution. The job of scuffneq is to compute the quantity known as a generalized flux that enters the integral defining ; scuffneq will do this computation at each of multiple frequencies that you specify in advance. These data are then used by the separate scuffintegrate utility to evaluate the actual integrals and compute thermallyaveraged power, force, and torque quantities at various temperatures.
2. scuffneq commandline options
Common options
scuffneq recognizes the following subset of the list of commonly accepted options to scuffem commandline codes.
geometry
EPFile
Omega
OmegaFile
Cache
ReadCache
WriteCache
Options requesting output quantities
PAbs
PRad
XForce
YForce
ZForce
XTorque
YTorque
ZTorque
Specifies the quantities in which you are interested:
absorbed power (PAbs
), radiated power (PRad
),
Cartesian force components, or Cartesian torque components.
You may specify none, all, or any subset of these options,
but each option you specify will generally increase
the computation time (you can scrutinize the
.log
file to see how much additional time each
extra output quantity takes to compute).
Option requesting visualization output
PlotFlux
This option directs scuffneq to produce visualization files (in addition to its usual output files) which may be opened in gmsh to visualize, for each spatiallyintegrated PFT quantity you requested, the spatial distribution of the Poynting flux or Maxwell stress on the surfaces of objects or the displaced bounding surfaces over which those quantities are integrated to compute the total PFT quantity.
Options controlling the computation of power, force, and torque
ForceDSI
DSIPoints 302
DSIRadius 5.0
DSIMesh BoundingMesh.msh
DSIFarField
As detailed in this paper, there are several ways to compute PFTs in surfaceintegral formulations, including the "displacedsurfaceintegral" (DSIPFT), "equivalence principle" (EPPFT), and "overlap" (OPFT) methods.
By default, scuffneq uses different algorithms for different cases of the PFT computation:
 Power computation (self term): EPPFT
 Power computation (nonself terms): EPPFT
 Force/Torque computation (self term): DSIPFT
 Force/Torque computation (nonself term): OPFT
However, you can override this default behavior
by specifying ForceDSI
, in which case DSIPFT
will be used in all cases.
The other options here set specific parameters that are only used for DSIPFT calculations.
DSIMesh
specifies the name of a mesh file
(such as a GMSHproduced .msh
file) that
defines the bounding surface over which the
surface integrals are computed. (This surface is
automatically displaced and rotated appropriately
for each object in accordance with any
geometrical transformations that may be
specified in the .scuffgeo
file and/or the
.trans
file.) The surface integral is evaluated
via a onepoint cubature over the surface of
each panel in the bounding mesh; thus, the
finer the bounding mesh, the more accurate and
the more expensive the computation).
If you do not specify a DSIMesh
, then the
surface integral for each object is computed
using Lebedev cubature over a bounding sphere
centered at the origin of coordinates of the
object mesh (appropriately displaced if the
object has been displaced via statements in
the .scuffgeo
or .trans
files.) In this case,
you may use DSIRadius
and DSIPoints
to
set the radius of this sphere (in microns) and
the number of Lebedev cubature points (the more
points, the more accurate and expensive the calculation).
To see the possible values that may be specified
for DSIPoints,
type scuffneq help.
Finally, you may use DSIFarField
to request
that the Poynting vector and Maxwell tensor
on the bounding surface be computed using only
the farfield (radiationzone) contributions
of the surface currents to the fields.
Other options
OmitSelfTerms
Omit the contributions of sources in individual bodies to the total PFTs on those bodies themselves.
3. scuffneq output files
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.
Output files for spatiallyintegrated PFTs: The .SIFlux
file
If you requested the computation of any spatiallyintegrated
PFTs (by setting commandline options such as PAbs
or YForce
),
you will get back a file with extension .SIFlux
(for
"fpatiallyintegrated flux") reporting values
of the generalized fluxes at each frequency you requested.
Generalized fluxes represent frequencyresolved contributions to
thermallyaveraged rates of energy and momentum transfer;
as noted, above, they are multiplied by BoseEinstein
factors and integrated over frequency to yield full
thermally and temporallyaveraged data.
To understand what is written to these files, let be the spatiallyintegrated PFT on a destination body , and write the FSC decomposition of the thermal average of in the form
In this equation,

is a dimensionless frequency variable: , where rad/sec. (Thus agrees numerically with the arguments to the
omega
option.) 
is a dimensionless version of the usual BoseEinstein factor, defined by .

is the difference between the dimensionless BoseEinstein factors of source body and the environment.

is the temperatureindependent generalized flux describing the contributions of fluctuations in source body to the power, force, or torque on destination body . Values of this quantity are written to the
.SIFlux
output file. 
is the spectral density of temperatureweighted contributions from fluctuations in source body to the PFT on destination body . Values of this quantity are written to the
.SIIntegrand
output file. 
Finally, is the total thermallyaveraged PFT on body . Values of this quantity are written to the
.NEQPFT
output file.
In all of these files, each single line corresponds to a single frequency, a single geometric transformation, and a single pair of (source,destination) objects.
At the top of each output file you will find a file header
explaining the significance of each of the various
columns in the file. One of the columns will be
described in the header as # (source object, dest object),
and will take values like 12
, 22
, or 02.
The first case (12
) indicates that the data on that
line correspond to the contributions of object 1 to the
PFT on object 2. (The ordering of objects corresponds
with the order of their appearance in the .scuffgeo
file). The second case (22
) indicate that the data
on that line correspond to the selfcontributions of
object 2 to its own PFT. The third case (02
)
indicates that the data on that line correspond to
the total PFT on object 2that is, the sum of
contributions from all source objects.
Output files for spatiallyresolved PFTs: The .SRFlux
, .SRIntegrand
, and .PVMST
files
If you requested the computation of spatiallyresolved
power and momentum flux (by specifying the EPFile
commandline option), you will get back files reporting
various contributions to these quantities. The breakdown
here is similar to that described above for spatiallyintegrated
quantities. To understand this, let be
a spatiallyresolved PFT quantity (a component
of the Poynting vector or Maxwell stress tensor)
at a point . Then the thermal average of
may be written in the form
In this equation,

is the temperatureindependent generalized flux describing the contributions of fluctuations in source body to the Poynting flux or Maxwell stress at . Values of this quantity are written to the
.SRFlux
output file. 
is the spectral density of temperatureweighted contributions from fluctuations in source body to the Poynting flux or Maxwell stress at . Values of this quantity are written to the
.SRIntegrand
output file. 
Finally, is the total thermallyaveraged Poynting vector or Maxwell stress tensor at . Values of this quantity are written to the
.PVMST
output file.
In all of these files, each line corresponds to a single frequency, a single geometric transformation, and a single source object. At the top of each output file you will find a file header explaining how to interpret the various data columns on each line.
Units of output quantities

The units of the total (frequencyintegrated) spatiallyintegrated output quantities reported in the
.NEQPFT
file are watts for power, nanoNewtons for force, and nanoNewtons microns for torque. 
The quantities in the
.SIIntegrand
output file are the PFT quantities per unit dimensionless frequency, so have the same units as the corresponding quantities in the.NEQPFT
file. 
The quantities in the
.SIFlux
output file are the quantities per unit dimensionless frequency per watt of thermal energy, so these quantities have the same units as the quantities in the.NEQPFT
and.SIIntegrand
file, but divided by watts: thus the power flux is dimensionless, the force flux has units of nanoNewtons / watts, and the torque flux has units of nanoNewtons microns/watts.