Hi,

I know that the issue of incident propagation setup has been discussed
numerous times; I read several of the threads, but would appreciate a
validation of what I'm doing.

I need to simulate in 2D the response of a geometrical setup to normally
incident beams with TE and TM.

Based on the tutorial, here's what I do (I omitted the irrelevant parts):

;############# CELL DIMENSIONS #############
(define sx 100)  ; size of cell in X direction w/o PML

(define sy 300)  ; size of cell in Y direction w/o PML

;############# PML #############
(define dpml 1)  ; thickness of PML layers
(set! pml-layers (list (make pml (direction ALL) (thickness dpml))))

;############# LATTICE #############
(define sxpml (+ sx (* 2 dpml)))
(define sypml (+ sy (* 2 dpml)))
(set! geometry-lattice
        (make lattice (size sxpml sypml no-size)))

(define-param rsltn 10)         ; resolution

;############# SOURCES #############
(define-param lambdacen 60)
(define-param FWHM 40)
(define dlambda (/ FWHM (sqrt (* 8 (log 2)))))
(define-param pol Ez)  ; polarization=TE, Ey for TM

(set! sources
       (list
         (make source
           (src (make gaussian-src (wavelength lambdacen) (width dlambda)))
           (component pol)
           (size 0 sy infinity) ; source's size is the whole cell
           (center -30 0 0))))

;############# RUNNING PARAMETERS #############
(set! symmetries
        (cond
          ((equal? pol Ey)
           (list (make mirror-sym (direction Y) (phase -1.0))
                 (make mirror-sym (direction Z) (phase 1.0))
           )
          )
          ((equal? pol Ez)
           (list
              (make mirror-sym (direction Y) (phase 1.0))
              (make mirror-sym (direction Z) (phase -1.0))
           )
          )
         )
)

(set! resolution rsltn)

(run-sources+
 (stop-when-fields-decayed
   50                                     ; dt
   pol                                    ; component
   (vector3 40 0 0)                       ; point
   1e-3)                                  ; decay-by
 (at-beginning output-epsilon)
)

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

Reply via email to