Good morning Meep user.

I just have a problem with simulation of photonic crystal/photonic wire. I make 
the periodic structure with some holes with same distance each other but 
different radius. I put line source in the right edge of computational cell and 
measure the decay at the left edge. I am confused because the calculation did 
not show the expected covergence (1e-3), so the simulation could not stop. This 
is my code

; Some parameters to describe the geometry:                                     
(define-param eps 11.9) ; dielectric constant of waveguide                      
  
(define-param w 1.43) ; width of waveguide                                      
 
(define-param r 0.26) ; radius of holes                                         
(define-param d 1.214) ; defect spacing (ordinary spacing = 1)                  
  
(define-param N 5) ; number of holes on periodic mirror 
(define-param Ni 4) ; number of holes on inside cavity
(define-param No 3) ; number of holes on outside defect                  

; The cell dimensions                                                           
(define-param sy 6) ; size of cell in y direction (perpendicular to wvg.)       
(define-param pad 2) ; padding between last hole and PML edge                   
(define-param dpml 1) ; PML thickness   

(define sx (+ (* 2 (+ pad dpml N Ni No)) d -1)) ; size of cell in x direction
(set! geometry-lattice (make lattice (size sx sy no-size)))

(set! geometry
      (append ; combine lists of objects:                                       
       (list (make block (center 0 0) (size infinity w infinity)
                   (material (make dielectric (epsilon eps)))))
       (geometric-object-duplicates (vector3 1 0) 0 (- N 1)
        (make cylinder (center (+ (/ d 2) Ni) 0) (radius r) (height infinity)
              (material air)))
       (geometric-object-duplicates (vector3 -1 0) 0 (- N 1)
        (make cylinder (center (- (/ d -2) Ni) 0) (radius r) (height infinity)
              (material air)))
       (geometric-objects-duplicates (vector3 (* d -1) 0 0) 0 1
            (list
                 (make cylinder (center  (/ d 2)  0) (radius 0.187) (height 
infinity)   
         (material air))))
       (geometric-objects-duplicates (vector3 (* (+ d 2) -1)  0 0) 0 1
             (list
                 (make cylinder (center  (+ (/ d 2) 1)  0) (radius 0.237) 
(height infinity)   
         (material air))))
       (geometric-objects-duplicates (vector3 (* (+ d 4) -1) 0 0) 0 1
                 (list
                 (make cylinder (center  (+ (/ d 2) 2)  0) (radius 0.257) 
(height infinity)   
         (material air))))
       (geometric-objects-duplicates (vector3 (* (+ d 6) -1) 0 0) 0 1
             (list
                 (make cylinder (center  (+ (/ d 2) 3)  0) (radius 0.242) 
(height infinity)   
         (material air))))
       (geometric-objects-duplicates (vector3 (* (+ d (* 2 N) (* 2 Ni)) -1) 0 
0) 0 1
                 (list
                 (make cylinder (center  (+ (/ d 2) N Ni)  0) (radius 0.264) 
(height infinity)   
         (material air))))
        (geometric-objects-duplicates (vector3 (* (+ d (* 2 N) (* 2 Ni) 2) -1) 
0 0) 0 1
             (list
                 (make cylinder (center  (+ (/ d 2) N Ni 1)  0)  (radius 0.237) 
(height infinity)   
         (material air))))
        (geometric-objects-duplicates (vector3 (* (+ d (* 2 N) (* 2 Ni) 4) -1) 
0 0) 0 1
             (list
                 (make cylinder (center  (+ (/ d 2) N Ni 2)  0)  (radius 0.187) 
(height infinity)   
         (material air))))))

(set! pml-layers (list (make pml (thickness dpml))))
(set-param! resolution 20)
(define-param fcen 0.5) ; pulse center frequency
(define-param df 0.5)  ; pulse width (in frequency)
(define-param nfreq 50) ; number of frequencies at which to compute flux

(set! sources (list
               (make source
                 (src (make gaussian-src (frequency fcen) (fwidth df)))
                 (component Ey)
                 (center  (+ (/ d 2) N Ni 2 1.187)  0)
                 (size 0 w))))

(set! symmetries (list (make mirror-sym (direction Y))))
(define trans ; transmitted flux                                          
        (add-flux fcen df nfreq
                  (make flux-region
                    (center  (+ (/ d 2) N Ni 2 0.187)  0) (size 0 (* w 2)))))
(define trans2 ; transmitted flux                                          
        (add-flux fcen df nfreq
                  (make flux-region
                    (center 0 0) (size 0 (* w 2)))))
(define trans3 ; transmitted flux                                          
        (add-flux fcen df nfreq
                  (make flux-region
                    (center  (* (+ (/ d 2) N Ni 2 0.187) -1)  0) (size 0 (* w 
2)))))

(run-until 500
              (at-beginning output-epsilon)
               (during-sources
                (to-appended "hz" (at-every 0.4 output-hfield-z))))


(display-fluxes trans trans2 trans3) ; print out the flux spectrum




I wonder what is going on Please give me your suggestion.


with regard

Andika Asyuda

       
---------------------------------
  Dapatkan alamat Email baru Anda!  
Dapatkan nama yang selalu Anda inginkan sebelum diambil orang lain!
_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to