Hi Samyo,

In this <https://github.com/NanoComp/meep/issues/971> github issue, I
define a spatial gaussian amp_func for an eigenmode source to simulate the
beamwaist of a laser. It's not a *waveguide* mode, but it's the same
concept.

You can also try posting an issue on github with your script and the
corresponding error message. If it is a bug that you've found, it's nice to
have a MWE that can be used to resolve the issue.

Thanks,
Alec

On Mon, Dec 9, 2019 at 9:24 AM Samyobrata Mukherjee <samyobr...@gmail.com>
wrote:

> Hi,
>
> I am currently using Meep to simulate modes in 1D planar uniaxial
> waveguides. The MPB eigensolver does not meet my needs since I often work
> with improper modes and that is why I want to use amp_func to define my
> source.
>
> I have used a function that gives a gaussian beam source in amp_func in
> order to test the feature and it works as expected. However, when I try to
> insert the currents calculated from the waveguide eigenmode following the
> process in Chapter 4 of Taflove's 2013 book, the pymeep kernel simply
> crashes even when I run sim.plot2D() even before sim.run().
>
> I import the calculated eigenmode current and save it in a file in Matlab.
> I read that file in python and then define a function using that data which
> meets the requirements of amp_func as given in the documentation, i.e., *a
> Python function of a single argument, that takes a Vector3 giving a
> position and returns a complex current amplitude for that point.*
>
> So I don't quite understand why the kernel crashes. I was wondering if
> anyone has experience with using amp_func to insert eigenmodes into
> waveguides in meep and could give me a few pointers, or could point me
> towards code that achieves it.
>
> *Tl;dr* - I would be grateful if you could point me to any
> discussion/code on using amp_func to define sources to input waveguide
> eigenmodes in meep.
>
> Regards,
> Samyo
>
> _______________________________________________
> meep-discuss mailing list
> meep-discuss@ab-initio.mit.edu
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
_______________________________________________
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to