On Sun, 11 Feb 2007, matt wrote:
Is it possible to have an oblique plane wave with periodic boundaries?
The only way I can think to do this is to use a total/scattered field
approach.  Another post recommends a solution, but leaves out all
detail:

Yes, it's no problem to have an oblique plane wave with Bloch periodic boundaries, and this has nothing to do with the total/scattered field approach.

Say you have a computational cell that is periodic in the x direction with period L, and you want an incident plane wave from air at a frequency omega and an angle theta with the y axis. Then the component of the wavevector in the x direction is

        k = omega * sin(theta)

(since c=1 in Meep).  So, you just

        (set! k-point (vector3 k 0 0))

and then create a current source with width L in the x direction with an amplitude function
        (define (my-amp-func p) (exp (* 2 pi k (vector3-x p))))
and a frequency omega.

(Note that we explicitly multiplied by 2*pi, since the frequency omega in Meep leaves out the 2*pi factor, as does the k-point.

Voila, you have a planewave source at the given angle.

Now, if you want to put in a pulse source to cover a range of frequencies at once, then you should realize that this correspons to a range of angles theta = arcsin(k / omega). There's nothing you can do about this, but on the bright side if you want a range of angles and frequencies, you just need to a sequence of pulse simulations with a sequence of different k's in order to cover many frequencies and many angles, which you can disentangle with post-processing.

A total-field/scattered-field-type of approach is only needed for the case of absorbing boundaries.

As a side question, how would alter the code in the reply to acheive a
plane wave at a different angle (e.g., 21 degrees of incidence,
instead of 45?)

Just change the kdir variable.

Steven

_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to