Dear Steven and all,

I made 3D simulations to calculate the gaussion source scattering by
cylinder array (normal incidence).
The flux (and field) will blow up. 
I posted these in a few emails several weeks ago using the subject "flux
error". 

I finally found that only when the cylinder extends into PML, the error will
occur. 

If cylinder is replaced by a square pillar or if the cylinder is taken out
of PML, there won't be such problem.

The code is attached.

Thanks,
Hua

*************************
; characteristic length 100 nm
(define-param N 1) ; N*N is the cylinder number
(define-param d 4) ; defect center spacing (ordinary spacing = 1)
(define-param L 15) ;length of the cylinder
(define-param r 1)
(define-param lam 5 )
(define-param pad 1 ) 
(define-param dpml (* 1.2 lam))
(define-param sx (* N d))
(define-param sy (* N d))
(define-param sz (* 2 L))
(define-param fce (/ 1 lam))
(define-param df .1)
(define-param nfreq 10)

(set! geometry-lattice (make lattice (size sx sy sz)))


(set! geometry (list
                (make cylinder (center 0 0 (/ sz 4)) (radius r) (height L) 
                      (material (make dielectric (epsilon 12 ))))))

(set! resolution 10)
(set! sources (list
               (make source
                 (src (make gaussian-src
                        (frequency fce) (fwidth df)))
                 (component Ey)
                 (center 0 0 (- (+ dpml pad) (/ sz 2)) ) (size sx sy 0))))

(set! pml-layers (list (make pml (direction Z) (thickness dpml))))
(set-param! k-point (vector3 0 0))
;(set! symmetries (list (make mirror-sym (direction Y) (phase -1))))
(define inc
        (add-flux fce df nfreq
                (make flux-region
                         (center 0 0 -1) (size sx sy 0))))

(save-flux "inc-flux" inc)
(run-sources+ 100 
        (at-beginning output-epsilon)
        (to-appended "Ey" (at-every 10 output-efield-y))) 
(display-fluxes inc)

 

_______________________________________________
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