Question about non-uniform permittivities #2838
-
I'm having some trouble with the example (https://meep.readthedocs.io/en/latest/Python_Tutorials/Mode_Decomposition/#diffraction-spectrum-of-liquid-crystal-polarization-gratings and https://github.com/NanoComp/meep/blob/master/python/examples/polarization_grating.py) used to show how to implement non-homogeneous (position-dependent) permittivities.
Thanks for the help. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Any offdiagonal elements of the epsilon tensor are currently ignored by The epsilon data used by Lines 600 to 602 in bba8d5b As described in the documentation, |
Beta Was this translation helpful? Give feedback.
-
Thanks. Could you please explain a little more about the trace thing? I was playing with some examples but I can't seem to understand how to get it to work -- for example, shouldn't these two custom-made materials have the same color in plot2D, or am I missing something?
Also, are there other examples besides the nematic grating of how to implement the position-dependent permittivity? |
Beta Was this translation helpful? Give feedback.
-
What Meep actually stores is Computed here: Lines 385 to 408 in bba8d5b |
Beta Was this translation helpful? Give feedback.
-
OK, that's good to know. But I'm still confused about the non-homogeneous permittivity -- in the nematic grating example, I took out parts not related to that issue (to save time) and included a plot2d line, but I don't see any position-dependence in the grating region. Am I not understanding this example? Is there another example that shows how to implement the position-dependence in all entries of the permittivity matrix?
|
Beta Was this translation helpful? Give feedback.
-
After looking into this a little more, it's possible that the reason plot2D isn't showing a clear position-dependence in epsilon is because it just so happens that because of the way epsilon is plotted (the 3/Tr[1/epsilon] calculation) that any variation gets obscured, even though the tensors really are changing from point-to-point. I'm not 100% sure if that's it, but does that seem plausible? Here's a more direct question: I wanted to confirm this using |
Beta Was this translation helpful? Give feedback.
What Meep actually stores is$\varepsilon^{-1}$ , not $\varepsilon$ , and if I remember correctly, what it plots is $\frac{3}{\text{trace}[\varepsilon^{-1}]}$ , i.e. the harmonic mean of the eigenvalues of $\varepsilon$ .
Computed here:
meep/src/array_slice.cpp
Lines 385 to 408 in bba8d5b