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
125 stars 50 forks source link

Compound sources in SCUFF-LDOS #126

Closed psv2 closed 7 years ago

psv2 commented 7 years ago

Two related questions about SCUFF-LDOS:

  1. Does SCUFF-LDOS support compound point sources? I would like to simulate a Gaussian source by forming a compound of many point sources sampled with a Gaussian weight (given some center and width), adding them up first and then solving the SIE once instead of solving the SIE for each sample point and then taking the weighted sum. Would SCUFF-SCATTER be better for this?
  2. Typically, the LDOS is defined as trace(Im(G(\omega, x, x))), which corresponds to the source and field points being coincident. Can SCUFF-LDOS operate at imaginary frequency (and give a sensible result), and can it more generally give G(\omega, x, x') where x and x' need not coincide, or is SCUFF-SCATTER better for this?
HomerReid commented 7 years ago

Can SCUFF-LDOS operate at imaginary frequency (and give a sensible result

Yes.

and can it more generally give G(\omega, x, x') where x and x' need not coincide

Yes. Just specify 6 numbers on each line of the EPFile instead of three numbers. The first three numbers are the coordinates of the destination (evaluation) point, and the last three numbers are the coordinates of the source point. By default the code will report only the scattering contribution to the dyadic Green's functions, but you can ask it instead to report the full two-point DGFs (including the direct contribution of the source) with the --FullTPDGF option.

Does SCUFF-LDOS support compound point sources?

No, by definition SCUFF-LDOS computes the response to a single point source. But by linearity you can get the fields due to a weighted superposition of point sources by constructing a weighted superposition of single-point-source fields.

I would like to simulate a Gaussian source by forming a compound of many point sources sampled with a Gaussian weight (given some center and width), adding them up first and then solving the SIE once instead of solving the SIE for each sample point and then taking the weighted sum. Would SCUFF SCATTER be better for this?

Here are three ways to do this.

  1. Use SCUFF-LDOS to compute two-point Green's functions for each (eval point, source point) pair. Then post-process the data to compute, for each eval point, a weighted sum of the contributions from all source points, with the weight for each source point corresponding to the magnitude and direction of the point source at that point.

  2. Use SCUFF-SCATTER with an IFFile describing your compound source.

  3. Write an API code with a homemade incident-field function you would write to compute the field of your Gaussian source.

psv2 commented 7 years ago

Thanks for the tips. It would seem like for trying to simultaneously treat multiple sources and evaluation points, SCUFF-SCATTER may be more efficient, but I'll keep SCUFF-LDOS in mind too, just in case. I'll close this issue.