NanoComp / meep

free finite-difference time-domain (FDTD) software for electromagnetic simulations
GNU General Public License v2.0
1.16k stars 596 forks source link

include exp(ikx) phase in DFT fields for BFAST simulations #2729

Open stevengj opened 7 months ago

stevengj commented 7 months ago

@Dan2357 in #2609 added a new feature to do fixed-angle broadband simulations by the BFAST algorithm. To make this convenient to use, however, more features of Meep need to become "aware" of the BFAST feature when it is enabled.

In particular, for BFAST simulations the computed fields are not the physical (E,H) fields, but rather are the physical fields scaled by an exp(-ikx) phase factor, where k is frequency dependent (the BFAST "kbar" factor multiplied by ω). When the user computes a DFT field, it would be good if Meep provided an option to "unscale" the resulting fields back to the physical fields.

Also, in the mode coefficient calculations etcetera, they need to become aware of the BFAST k when setting the boundary conditions, and they should scale the mode fields by exp(-ikx).