Hello, MEEP developers and users, I am a greenhorn in MEEP software. I currently have a problem in creating oblique incident plane-waves in periodic structures. Although I have read some of the discussions in the mailing list, I still have some problems. The following is the code I used as a simple test. The structure is 2D in XY plane, period in x direction and PML layers are placed at Y boundaries. I tried to define an oblique plane-wave source. However, the simulation result shows there is some sort of odd oscillation in my unit lattice, seems to be interference pattern. There must be some problems with my codes. Could you please help me?
(define-param sx 5) (define-param dpml 3) (define-param sy (+ 2 (* 2 dpml))) (define-param lamda 3) (define-param theta (/ (* pi 45)) 180) (define-param kdir (vector3 (sin theta) (cos theta))) (define-param k (vector3-scale (/ (* 2 pi) lamda) (unit-vector3 kdir))) (define ((pw-amp k x0) x)) (exp (* 0+1i (vector3-dot k (vector3+ x x0)))) (set! default-material air) (set! geometry-lattice (make lattice (size sx sy no-size))) (set-param! resolution 100) (set-param! k-point (vector3 (/ 1 sx))) (set! ensure-periodicity true) (set! pml-layers (list (make pml (thickness dpml) (direction Y)))) (set! eps-average? true) (set! source (list (make souce (src (make continuous-src (wavelength lamda) (width 20))) (component Hz) (center 0 -1) (size sx 0) (amp-func (pw-amp k (vector3 0 -1)))) ) ) (use-output-directory) (run-until 100 (at-beginning output-epsilon) (at-end output-efield-x) (at-end output-efield-y) (at-end output-efield-z) ) Hope to have your answers soon. Thanks very much! Best regards, Peng Wang Lab for Optical Nanotechnology, University of Utah _______________________________________________ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss