On Tue, 27 Mar 2007, matt wrote:
My simple meep example is coming up with an incorrect result.
I found some posts on the list regarding similar problems (incorrect
reflection coefficient calculation), where the recommendation was to
move the flux planes away from the source, by at least a wavelength.
This did not solve the problem for me.
In my example, I have a 2D simulation, with periodicity in X, and PML in
Y. The scatterer is a dielectric slab with epsilon 9. The source is a
plane wave source at the upper PML interface (the angle of incidence is
30 degrees).
code:
http://www.pastebin.us/19072
This code is using a continuous-src, which is not appropriate. You need
to use a gaussian-src for a flux-spectrum calculation. More generally,
you need to use some current source that goes to zero as t -> infinity.
Think about how Meep computes a flux spectrum, as described in the manual
(see e.g. the introduction section). It computes the Fourier transform of
the fields in the flux plane, and then computes the flux of the
Fourier-transformed fields. This doesn't make (much) sense for a
continuous-src, because the fields are not integrable---their Fourier
transform will not converge as you run for longer and longer, because the
source doesn't stop. So, you end up chopping off the fields at some point
arbitrarily. But this "windowing" does different things to the
normalization and computation runs, because the spectra are different in
the two cases. In contrast, if you use a Gaussian source, then the fields
are L2-integrable and everything is well-defined and convergent if you run
for long enough to let the fields decay away.
Steven
_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss