Repository navigation
Additional features for working with modes #6
Description
Activity
Hey @Jan-David-Black ,
Glad you like the library!
A few commonts on each of your points:
- I accepted PR Include Poynting Vector calculation #7 .
- Sticking to the Lumerical definition is the smart choice. It still is a leading standard on its own.
- I agree that generalizing some of the formulas for non-cartesian or non-uniform meshes is a good idea.
- We could add a group index function to the mode object which runs another mode simulation with exactly the same settings but a slightly perturbed wavelength. If we document this behavior (i.e. that this calculation is not instant) it might be a good solution.
jan-david-fischbach commented
on Jan 23, 2023 CollaboratorAuthorMore actionsTidy3D doesn't yet seem to support non-equidistant meshes: flexcompute/tidy3d#652
Lumerical does however.We could add a group index function to the mode object which runs another mode simulation with exactly the same settings but a slightly perturbed wavelength. If we document this behavior (i.e. that this calculation is not instant) it might be a good solution.
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
Reacted by Floris LaporteI would love to be able to also easily get the group index. That would however require multiple frequency points to do a finite difference differentiation on the effective index with frequency/wavelength, right?
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.
Reacted by Troy Tamas, Floris Laporte and Dominic DuffyThanks @smartalecH , I'll try that once I find some time :)
Reacted by Alec Hammondjan-david-fischbach commented
on Apr 30, 2023 CollaboratorAuthorMore actions@smartalecH, you are talking about this formula, right?
$$ \tilde{v}_{\mathrm{g}}=-2 \frac{\tilde{\beta}}{k} \frac{c}{\lambda^3} \int_{A_x} \Psi^2 \mathrm{~d} A / \int_{A_x} \Psi^2 \frac{\mathrm{d}}{\mathrm{d} \lambda}\left(\frac{n^2}{\lambda^2}\right) \mathrm{d} A . $$ Which is equation 33-16 of Snyder and Love.
you are talking about this formula, right?
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.crossis 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.trapzevaluations.