Open oskooi opened 6 years ago
This is really interesting. I am curious, what situations would this be useful in, specifically a homogeneous volumetric source? LEDs, gain systems? I've only seen volumetric sources utilized in situations when a known field profile is to be injected, which as you said, is provided by amp_func
.
One application would be for designing grating in-couplers for silicon photonics where a cleaved fiber is used as the input source and placed in the near-field of the grating. See e.g., Optics Express, Vol. 18, pp. 18278-83, 2010. Another application would be to model a VCSEL source, which also tend to have cylindrical cross sections, for use in e.g., next-generation displays such as AR/MR smart glasses.
Once this feature is ready, we will then need to modify the eigenmode source such that even though it is computed from a given volume/cross-section it can be placed anywhere in the cell.
@oskooi, I don't think we actually need a geometric-object source for that application:
As you say, the eigenmode source would have to be modified anyway to map it to an oblique slice, and once you did that you probably wouldn't need the geometric-object source.
Even easier, you can take a Cartesian x/y/z slice of an oblique waveguide and use an ordinary eigenmode source, with one modification — tell MPB that the third lattice vector is in the oblique direction, not orthogonal to the plane. This should make it compute an oblique cross-section of the mode traveling down your oblique waveguide, and create the corresponding current source via the principle of equivalence.
The following schematic demonstrates the functionality that we are trying to enable. An eigenmode source is defined for a Cartesian x/y/z slice of an oblique waveguide which generates a unidirectional propagating mode. Telling MPB that the mode's wavevector is not orthogonal to the slice is not enough; we would also like to be able to specify its eig_parity
somehow just as we would if the waveguide is oriented along the x axis and we could specify either EVEN_Y
or ODD_Y
.
It looks like #675 addresses the oblique-waveguide source motivation of this issue.
However, we might as well leave this open. There are occasionally circumstances where you want a finite-volume source instead of a point source, and it would be nice to support a spherical source volume etcetera with subpixel averaging. Implementing subpixel averaging of the edges is something that requires a low-level C++ implementation, where it is straightforward as I commented in #635, and cannot easily be done in user-level Python code.
But it doesn't seem like a high-priority feature.
Currently, the shape of a
Source
can only be a rectangular prism defined by itssize
property. Although the amplitude function property (amp_func
) does enable arbitrary shapes, this is cumbersome to set up for simple geometries. It would be useful if the source shape could also be defined by aGeometricObject
(e.g.,Sphere
,Cylinder
,Prism
, etc.).