Skip to content

Additional features for working with modes #6

Description

@jan-david-fischbach

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:

  • Poynting flux: auxiliary properties to calculate the poynting flux in x,y and z.

$$ \vec{P} = \vec{E} \times \vec{H} $$

An implementation using np.cross is probably most sensible. Addressed in #7.

  • Effective mode area: another auxiliary measure I tend to use relatively frequently. It is not that well defined/ agreed on in literature but I would use the definition as in lumerical's implementation:

$$ A_{eff} = \frac{\left(\int|\vec{E}|^2dA\right)^2}{\int|\vec{E}|^4dA} $$

  • Implementation of the field energies for irregular meshes: At this moment the modal energies are computed by summing over the energy densities, which for equidistant meshes leads to a value proportional to the actual modal energy.:
def electric_energy(mode: Mode) -> float:
    """get the electric energy contained in a `Mode`"""
    return electric_energy_density(mode).sum()

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.

  • I 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions