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

Using KN coefficients as RHS #78

Open gevero opened 8 years ago

gevero commented 8 years ago

Hi Homer

I am using with success the scuff-em python interface. One of the advantages of the approach is that I can easily create and access directly all the RHS and KN coefficients. In this context I was wondering if it is possible to use the KN coefficients of one simulation, as the RHS input of another one. One example could be the following:

  1. Illuminate with a plane wave a PEC rod
  2. Use the KN coefficients of the PEC rod to model an extended current distribution instead of a point dipole?

It seems to me that it could be ok since, the way I see it, the KN are scattering coefficients that can model incident fields too... I am looking forward to hearing your opinion.

Best

Giovanni

HomerReid commented 8 years ago

Sure, this should work fine. The only thing is that the RHS vector has a -1/ZVAC factor built into the electric-current portions (and a ZVAC factor built into the magnetic-current portions, although that's not relevant for a PEC body) so if you don't account for that your results may be scaled and sign-flipped compared to what you expect.

If you already know the current distribution you want to model, the RWGGeometry class has a method called ExpandCurrentDistribution that computes the expansion coefficients for an arbitrary user-specified surface-current distribution. This routine takes an input parameter of type IncField, which is a user-specified function that inputs a point X and computes the electric and magnetic surface currents at that point (the electric and magnetic currents K and N should be packaged into the E and H portions of the EH vector returned by the GetFields routine). This way you can get the RWG basis-function expansion of your surface-current distribution without having to assemble BEM matrix or solve a system, and the minus signs and ZVAC factors are handled automatically.

gevero commented 8 years ago

Hi Homer

Thanks! This is pretty cool! The ExpandCurrentDistribution approach seems the most promising, but I guess I shall need some time to grasp it. What I really need here is to model a line current (the should mimic a Near Field Optical Microscope tip with a size of about 100nm), larger than a typical point source. I shall close the issue as soon as I get a basic understanding of all the process. In the meantime, if you have a line current source ready to go, please feel free to share it with me! :)

Thanks a lot

Giovanni

HomerReid commented 8 years ago

You could mimic an infinitely-extended line-current source by doing something like this:

1) Create a surface mesh describing the one-dimensional unit cell of an infinite cylinder. Something like this:

http://homerreid.github.io/scuff-em-documentation/examples/SiliconBeams/SiliconBeams/

but describing a right circular cylinder instead of a beam.

2) Create a .scuffgeo file describing an infinitely-extended cylinder consisting of this unit cell periodically replicated over a 1D lattice, similar to what is done in the above example.

3) Solve a scattering problem in which the incident field is a linearly-polarized plane wave traveling in the z direction with the E-field pointing in the x direction. Set kBloch[0]=0.0.

4) Use the resulting KN vector in calls to GetFields (with the IF parameter set to 0) to get the field radiated by the surface-current distribution induced on the cylinder. As the radius of the cylinder decreases, this will approximate the field of a line current source.