gevero / py_gmm

A Generalized Multiparticle Mie code, especially suited for plasmonics
GNU General Public License v3.0
22 stars 12 forks source link

Calculating magnetic field components in the near-field? #28

Open MSMattei88 opened 1 year ago

MSMattei88 commented 1 year ago

Hello, Thanks very much for creating this wonderful python package. I am working on some calculations for clusters of gold nanospheres, and this is much faster than FDTD!

I have a question regarding calculating the magnetic field components. I would like to plot the magnetic fields in the near-field, much like you've done with the electric fields in the Ag/Au dimer example. I see there is a way to do this for the far field components (since one can use E and the poynting vector to get B), but digging around through the documentation and source code, I don't see an obvious way to get B in the near-field (my command of Fortran is not very good, though, so it's likely I just missed something).

Is there a way to calculate near-field components of the B field using your package? If so, could you please recommend a method?

Thanks! M

gevero commented 1 year ago

Hi

Calculating the B (or H) component is conceptually very easy, but requires a non trivial modification of the fortran code. I am a bit short on time right now, I will expand on this concept later.

Giovanni