-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Additional features for working with modes #6
Comments
Hey @Jan-David-Black , Glad you like the library! A few commonts on each of your points:
|
Tidy3D doesn't yet seem to support non-equidistant meshes: flexcompute/tidy3d#652
Interesting idea. We already have the cell available, so it should be relatively easy to do. Lumerical directly returns the group index. So in that case we can just cache it and avoid the second calculation. When I have time I'll open a PR |
@Jan-David-Black we have all these things in femwell, and started trying to combine it with MEOW to do EME (https://github.com/HelgeGehring/femwell/blob/main/femwell/eme.py). Not quite there yet, however |
You can actually compute the group index from the fields directly (a simple integral from Snyder and Love, or you can rederive it using the Hellmann-Feynman theorem). No need to do any extra simulations by perturbing the wavelength etc. |
Thanks @smartalecH , I'll try that once I find some time :) |
@smartalecH, you are talking about this formula, right? $$ Which is equation 33-16 of Snyder and Love. |
Yep that's right. There's lots of ways you can massage it into various forms depending on what the problem looks like and what you are after. |
Hey @flaport,
I am a big fan of meow. Besides its EME capabilities, I think it makes quite a lot of sense to use it as an abstraction layer over different FDE algorithms, as switching between "simulation backends" can otherwise necessitate significant code rework (for the structure definition alone). Maybe even interesting for gdsfactory (@joamatab) (We could also build a femwell backend for meow). With that in mind, there is a couple of things I'd like to add:
An implementation using
np.cross
is probably most sensible. Addressed in #7.The proportionality constant can be eliminated by normalization, as it is not dependent on the field distribution. This does however not hold for non-equidistant meshes, as finely meshed regions are over-emphasized compared to the more coarsely meshed regions. I would therefore suggest dividing by the mesh step in x and y before summing or even better do a proper integration over the energy densities e.g. using nested
np.trapz
evaluations.The text was updated successfully, but these errors were encountered: