HomerReid / scuff-em

A comprehensive and full-featured computational physics suite for boundary-element analysis of electromagnetic scattering, fluctuation-induced phenomena (Casimir forces and radiative heat transfer), nanophotonics, RF device engineering, electrostatics, and more. Includes a core library with C++ and python APIs as well as many command-line applications.
http://www.homerreid.com/scuff-em
GNU General Public License v2.0
128 stars 51 forks source link

Non-physical results with geometric transformations (TransFile) #245

Open izod2 opened 1 year ago

izod2 commented 1 year ago

The concept behind modifying geometric orientations is documented here, but it does not appear to work.

Here is a MWE example for a scuff-scatter calculation involving two side-by-side spheres. Relevant files are copied below.

Case 1: No TransFile is used (it is commented out in Args): Output of the PFT file makes sense (as expected, both spheres have the same absorbed/scattered powers, etc.

# omega surface-label absorbed power (watts) scattered power (watts) ...
1.1 Sphere1 8.085983e-05 9.520283e-03 ...
1.1 Sphere2 8.081348e-05 9.501876e-03 ...

Case 2: A TransFile displaces both spheres along y:

Spheres.trans

TRANS Default
TRANS 1.0 OBJECT Sphere1 DISP 0 1 0 OBJECT Sphere2 DISP 0 1 0

Output of the PFT file should be the same as Case 1 - this is physically the same configuration. Instead, reported powers are not only different for the two spheres, but negative values show up for Sphere2 (?!)

# omega transform surface-label absorbed power (watts) scattered power (watts) ...
1.1 Default Sphere1 7.719171e-05 9.213488e-03 ...
1.1 Default Sphere2 -5.444921e-04 8.524173e-03 ...
1.1 1.0 Sphere1 7.719171e-05 9.213488e-03 ...
1.1 1.0 Sphere2 -5.444921e-04 8.524173e-03 ...

Does anyone know what is going on here? I tried several different configurations/frequencies (for both regular and abbreviated .trans file syntax) but the results never seem to make sense.

Relevant files: Args

ARGS="${ARGS} --geometry    Spheres_327.scuffgeo"
ARGS="${ARGS} --Omega       1.1"
ARGS="${ARGS} --TransFile   Spheres.trans"   # comment out 
ARGS="${ARGS} --PFTFile     Spheres_327.pft"
ARGS="${ARGS} --pwDirection     0 0 1"
ARGS="${ARGS} --pwPolarization  1 0 0"

_Spheres327.scuffgeo

MATERIAL Gold
    wp = 1.37e16;
    gamma = 5.32e13;
    Eps(w) = 1 - wp^2 / (w * (w + i*gamma));
ENDMATERIAL

OBJECT Sphere1
    MESHFILE Sphere_327.msh
    MATERIAL Gold
ENDOBJECT

OBJECT Sphere2
    MESHFILE Sphere_327.msh
    MATERIAL Gold
        DISPLACED 2.5 0 0 
ENDOBJECT

(Sphere_327.msh is from the solid-sphere built-in example in scuff-em)