hi meep users1-) i want to simulate a plane wave with angle incident on a 
priodic structure. i have got this code from the forum. for theta between 0 and 
pi/2 it works like a charm but for theta = pi/2 there are distortions in the 
plane wave field pattern, why?
(define-param theta (/ pi 2))(define sx 10)(define Ly 3)(define-param freq 
1)(set! resolution 
50);--------------------------------------------------(define pml-thick (/ 
freq));pml-thick is equal to lambda(define Lx (+ sx (* 2 pml-thick)))
(set! geometry-lattice (make lattice (size Lx Ly no-size)))
(define ky (* freq (sin theta)))(define (my-amp-func p) (exp (* 0+2i pi ky 
(vector3-y p))))(set! k-point (vector3 0 ky 0))
(set! force-complex-fields? true)(set! sources (list    (make source            
(src (make continuous-src (frequency freq)))                    (component Ez)  
                (center (+ (/ Lx -2) pml-thick) 0)                      (size 0 
Ly)                     (amp-func my-amp-func)          )       ))
(set! pml-layers (list (make pml (thickness pml-thick) (direction X))))
(run-until 50   (at-beginning output-epsilon)   (at-end (output-png Ez " -Zc 
bluered")))
2-) i want to run simulations with plane waves with ky between 0 and 5*k0 to be 
incident on a photonic crystal slab.

                  |photonic                   |crystal|                   |slab 
   |                  |    .     |                  |    .     |plane wave  |   
  .    |    /              |  O   O|     /               |O   O  |  /           
     |  O   O|       ----> X direction/                 |O   O  |               
   |    .     |           |    .     |            |    .     |
for ky < k0 we would have plane waves with different incident angles for ky = 
k0 the incident angle would be pi/2, meaning that the plane wave would scatter 
parallel to the slab interface (Y direction)for ky > k0, the plane wave is 
parallel to slab (like the case of ky = k0) but its amplitude decays in X 
direction  (ky = y component of wave-vector and k0 is wave number of vacuum = 
2*pi*freq/c) 
a) for the case of ky > k0, i can see the decaying of the fields but there are 
distortions similar to the case of theta=pi/2
b) i want to calculate the transfer function of the PhC slab for various values 
of ky. since i am using a plane wave with a constant frequnecy, can i use 
"add-flux" the same way we use it with Gaussian sources?
(i have not included the code for slab here for simplicity and besides the main 
problem is distortions)
(define-param ky 0.707);ky = 0.707 * k0 which sould excite a plane wave with 
theta=pi/4(define sx 10)(define Ly 3)(define-param freq 1)(set! resolution 
50);--------------------------------------------------(define pml-thick (/ 
freq));pml-thick is equal to lambda(define Lx (+ sx (* 2 pml-thick)))
(set! geometry-lattice (make lattice (size Lx Ly no-size)))
(define ky (* freq ky))(define (my-amp-func p) (exp (* 0+2i pi ky (vector3-y 
p))))(set! k-point (vector3 0 ky 0))
(set! force-complex-fields? true)(set! sources (list    (make source            
(src (make continuous-src (frequency freq)))                    (component Ez)  
                (center (+ (/ Lx -2) pml-thick) 0)                      (size 0 
Ly)                     (amp-func my-amp-func)          )       ))
(set! pml-layers (list (make pml (thickness pml-thick) (direction X))))
(run-until 50   (at-beginning output-epsilon)   (at-end (output-png Ez " -Zc 
bluered")))



      
_______________________________________________
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to