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

Magnetic dipole in scuff-scatter #98

Open hdierckx opened 8 years ago

hdierckx commented 8 years ago

Hi Homer,

I'm a new user to scuff-em. We would like to study the scattered field of a magnetic dipole source on a metal object of arbitrary shape. I found in the documentation that only electrical dipole sources can be used with scuff-scatter, and for magnetic dipoles one needs to use the API version in order to change the type parameter LIF_ELECTRIC_DIPOLE to LIF_MAGNETIC_DIPOLE. Is there perhaps a simple workaround to get magnetic dipoles working in scuff-scatter?

Thank you

HomerReid commented 8 years ago

Your timing is good---just recently I have added an "advanced mode" to SCUFF-SCATTER which allows the specification of magnetic point sources. Depending on when you last updated your code repository, you may need to pull from GitHub and rebuild to get this feature.

In this mode of operation, instead of using the --psLocation and --psStrength command-line arguments to SCUFF-SCATTER, you will want to write a little text file describing the source(s) of your your incident field(s). Then pass this file as a command-line option using the --IFFile argument.

Here is the documentation for how to write the file listing incident fields:

http://homerreid.github.io/scuff-em-documentation/reference/IncidentFields/#specifying-an-entire-list-of-incident-fields

Note that magnetic point sources are specified by the keyword MPS.

A bonus feature of doing things this way is that you can specify

Please let me know how it works. Feel free to ask further questions, or close the issue if satisfied.

hdierckx commented 8 years ago

I've implemented a toy problem on geophysical sensing now: given a PEC sphere of radius a=0.1m and a magnetic dipole at height h above its surface, what is the secondary magnetic field ($H^s$) in the same position and direction as the source dipole? The exact solution is found in Grant&West, Interpretation Theory in applied geophysics (1965), Fig 17-20. It is independent of the frequency, since skin depth goes to zero for a PEC.

I computed the same curve numerically with scuff-scatter, see graph below. Different colors indicate different levels of mesh refinement (red: clscale=0.5, green: clscale=0.4, blue: clscale=0.3) double_dipole_sensor

I have 2 questions here:

Thank you.