flaport / fdtd

A 3D electromagnetic FDTD simulator written in Python with optional GPU support
https://fdtd.readthedocs.io
MIT License
454 stars 116 forks source link

How do I define a custom electromagnetic field profile as source, like the Import Source in the Lumerical FDTD? #52

Closed 694856790 closed 2 years ago

694856790 commented 2 years ago

In sources.py file, I tried to change the profile to a custom electric field distribution as you defined PlaneSource, but the polarization direction seems to have an impact on the results? Please advise if I am doing this correctly, thank you!