Unexpected RuntimeError 3D Near-to-Far Fields with a *k-point* #2861
Unanswered
gummyequation
asked this question in
Q&A
Replies: 1 comment 1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Unexpected RuntimeError when computing Near-to-Far Fields
I am simulating a square lattice nanowire in 3-D using MEEP, using the tutorial “Near-to-Far Field Spectra” as a reference. I’ve defined the parameters for a square lattice nanowire, such as the geometry, PMLs, source, and k-point, near2far_box, and finally the computation to get the far-fields without a k-point.
I have successfully obtained the near fields with DFT and PadeDFT methods, and the plots agree with simulations done in COMSOL with the same simulation properties.
The near-to-far-fields work as expected without a k point, (besides vispy render) however with a k-point added to sim.Simulation( ) this error emerges:“RuntimeError: meep: dft_near2far requires surfaces in a homogeneous medium” .
Unless I understand the contents of the tutorial and the information in the documentation incorrectly, or I am badly implementing them the error does not make sense. The error seems to stem from the “ _meep.fields_add_dft_near2far(self, *args)” — as the traceback suggests — yet the parameters of the near2far_box are what they should be.
Visualization with VisPy has a few issues. The first being the apparent orientation of the near2far planes. Additionally, the direction arguments of the near2far object change nothing.
Either vispy provides accurate information of the parameters of the simulation or, there are issues with how vispy renders the provided data.
I find it difficult to learn how to obtain the far fields from the near field with my parameters. I am trying to solve for the fields and not the flux and the documentation is a bit vague about computing the far fields. I understand that the near to far box needs to be a in homogenous medium, the expressions for coordinates satisfy that condition, yet the runtimerror still occurs.
An additional note on vispy, the second issue is when the dpml is increased beyond 0.3 the unit cell expands as well, even if the thickness of the PML only changes in one direction.
Please let me know if anyone has run into a similar issue or has any advice to give.
Vispy or MEEP insists those coordinates are what they should be ....
Beta Was this translation helpful? Give feedback.
All reactions