Photonics

Photonics

Topics related to Lumerical and more

How to get magnetic field from electic filed?

    • qk c
      Subscriber

      Hello, When I run a 3D simulation in lumerical FDTD, a plane monitor records the distribution of complex amplitudes of Ex, Ey and Ez in the plane. But I forgot to record the distribution of the magnetic field Hx, Hy and Hz. Then I'm thinking could I calculate magnetic field. I tried to use the equation given in Calculating magnetic fields in far field projections – Ansys Optics . I found that I can easily calculate the partial derivative of field in the x and y directions, such as the partial derivative of Ez in the x direction is approximately equal to (Ez(n+1,:)-Ez(n,:))/(X(n+1,:)-X(n,:)). But how could I get the partial derivative of field in the z direction? Is there any command in fdtd that can simply derive the magnetic field distribution from the electric field distribution? Or, Is there any method to calculate?Thank you!

    • Guilin Sun
      Ansys Employee

       

      FDTD can give you accurate simulated H fields. If you simulation does not take too long time, it will be much better to resimualte it by enabling the recording of H.

      In case you want to calculate H from E, things can be different. This is because, FDTD is discrete method, and E/H components are displaced:

      the small space dislocaiton can cause power calculation incorrect depending on settings.

      To avoid this, the regular output of the frequency-domain monitor is already interpolated into one point for each Yee cell.  However, the plane monitor does not have z span since it is in xy plane. So you will need to use farfieldexact to project the fields to dz. Then you can calculate H. However, dependig on the gradient of fields, the result might be depedent on dz.

      Another method is to extrac the raw data using option 1: https://optics.ansys.com/hc/en-us/articles/360034409834-getdata-Script-command

      Please refer to the script in this example: https://optics.ansys.com/hc/en-us/articles/360042165534-Planar-silicon-solar-cell

      Please note the FDTD mesh is usually non-uniform. For better result, please interpolate to uniform mesh when you calculate the difference.

    • qk c
      Subscriber

      Thank you very much for your reply! Your answer was very helpful, but when I use command "farfieldexact" to project the fields, it prompt that "in farfieldexact3d, the requested monitor with the necessary data cannot be found", it seems that the command need all the E and H be recorded in the raw data?

    • Guilin Sun
      Ansys Employee

      yes, farfieldexact needs H data so in your case this method does not work.  Therefore you will need to resimulate with H enabled in the monitor, since the plane monitor does not have dz information.

Viewing 3 reply threads
  • You must be logged in to reply to this topic.