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

Spatially-resolved EM quantities #43

Closed vifehu closed 9 years ago

vifehu commented 9 years ago

Hi Homer,

I have been using SCUFF-EM and it is a really nice tool for computing electromagnetic quantities. It has worked perfectly in all my previous experiences. However, I believe that it could include an additional option to be more powerful. It would be great if SCUFF-EM was able to resolve spatially the different quantities it can calculate. That would provide us with a lot more physical insight in the different problems we study. Do you think it is possible to implement that in SCUFF-EM?

Thank you in advance,

Best,

Víctor

HomerReid commented 9 years ago

Thanks for the suggestion. I think you are referring to SCUFF-NEQ in particular? (Other codes in the SCUFF suite, including SCUFF-SCATTER, SCUFF-RF, and SCUFF-STATIC, already handle spatially-resolved calculations).

As for SCUFF-NEQ, as of 5fd499bdae3bd232e16ef54f27bf198ff87a8b11 the --EPFile option is now supported, and there is a partially-documented example here:

http://homerreid.dyndns.org/scuff-em/doc/examples/TipSubstrate/TipSubstrate/

Running with the --EPFile option produces an output file called Geometry.SRFlux, which reports 12 output numbers for each evaluation point: the three components of the Poynting vector (PV) and the 9 components of the Maxwell stress tensor (MST). (More accurately, the quantities reported are certain temperature-independent frequency-resolved contributions to the PV and MST; they must be temperature-weighted and frequency-integrated to yield the total PV and MST.) This is discussed in a little more detail here:

http://homerreid.dyndns.org/scuff-em/doc/applications/scuff-neq/scuff-neq/#3-scuff-neq-output-files

Please let me know how this works for you.

vifehu commented 9 years ago

Thank you very much Homer, that was exactly what I had in mind! The option --EPFile works perfectly up to now.