Dear MEEP users,
I’m trying to simulate the transmission and reflection spectra of 7 nanoshells 
array. But the reflection’s result is wrong. Here my program.
Thank you in advance!
Zhou Xin 
;璁扮殑鏀筫psinf
(reset-meep)
(set! resolution 200)
;(set! k-point (vector3 0 0 0))
;(set! pml-layers (list (make pml (direction Z) (thickness 0.2))))
(set! pml-layers (list (make pml (direction X) (thickness 0.1))))
;(set! pml-layers (list (make pml (direction Y) (thickness 0.1))))  

(define-param pi 3.14159265358979323846) 
(define-param c 2.99792458e8) 
(define-param aa 200e-9); aa is the lattice constant    
(define-param pi2cqaa (/ (* 2 pi c) aa));
(define-param a 1); a is the lattice constant     
(define-param epsrod 1)

;; prl,95,137404, 2005  Au , gold.
(define-param epsinf 1)
(define-param wp 1.37e16)
(define-param tau 4.08e13)
(define-param wpw (/ wp pi2cqaa))
(define-param tauw (/ tau pi2cqaa))


(define-param x (* 6 a)) 
(define-param y (* 1 a)) 
;(define-param z (* 1.5 a)) 
(define-param sx x); 
(define-param sy y); 
;(define-param sz r); 
(define-param pczx 0)
(set! geometry-lattice (make lattice (size x y no-size)))

(define-param fcen 0.64); the center frequency of gauss pulse
;(define-param fcen 0.485);
;(define-param fcen 0.788);
(define-param df 1.2);
(define-param nfreq 200)
(define-param tube? true)
(if tube?
(set! geometry
     (append
;;;;;;;;;;;;;;;;;;;;;;;;;;
     (list (make cylinder (center 0 0) (radius 0.3) (height infinity)
                     (material (make dielectric (epsilon epsinf)
                        (polarizations (make polarizability
      (omega 1e-20) (gamma tauw) (delta-epsilon (* (/ wpw 1e-20) (/ wpw 1e-20)))
                        ))
                     ))
            ))

         (list (make cylinder (center 0 0) (radius 0.275) (height infinity)
                     (material (make dielectric (epsilon 1)
                      ))
            ))

;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;; 
     (list (make cylinder (center 0.6 0) (radius 0.2) (height infinity)
                     (material (make dielectric (epsilon epsinf)
                        (polarizations (make polarizability
        (omega 1e-20) (gamma tauw) (delta-epsilon (* (/ wpw 1e-20) (/ wpw 
1e-20)))
                        ))
                     ))
            ))

         (list (make cylinder (center 0.6 0) (radius 0.175) (height infinity)
                     (material (make dielectric (epsilon 1)
                      ))
            ))
;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;; 
     (list (make cylinder (center 1.2 0) (radius 0.15) (height infinity)
                     (material (make dielectric (epsilon epsinf)
                        (polarizations (make polarizability
        (omega 1e-20) (gamma tauw) (delta-epsilon (* (/ wpw 1e-20) (/ wpw 
1e-20)))
                        ))
                     ))
            ))

         (list (make cylinder (center 1.2 0) (radius 0.125) (height infinity)
                     (material (make dielectric (epsilon 1)
                      ))
            ))
(list (make cylinder (center 1.8 0) (radius 0.1) (height infinity)
                     (material (make dielectric (epsilon epsinf)
                        (polarizations (make polarizability
        (omega 1e-20) (gamma tauw) (delta-epsilon (* (/ wpw 1e-20) (/ wpw 
1e-20)))
                        ))
                     ))
            ))

         (list (make cylinder (center 1.8 0) (radius 0.075) (height infinity)
                     (material (make dielectric (epsilon 1)
                      ))
            ))
;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;; 
(list (make cylinder (center -0.6 0) (radius 0.2) (height infinity)
                     (material (make dielectric (epsilon epsinf)
                        (polarizations (make polarizability
        (omega 1e-20) (gamma tauw) (delta-epsilon (* (/ wpw 1e-20) (/ wpw 
1e-20)))
                        ))
                     ))
            ))

         (list (make cylinder (center -0.6 0) (radius 0.175) (height infinity)
                     (material (make dielectric (epsilon 1)
                      ))
            ))
;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;; 
     (list (make cylinder (center -1.2 0) (radius 0.15) (height infinity)
                     (material (make dielectric (epsilon epsinf)
                        (polarizations (make polarizability
        (omega 1e-20) (gamma tauw) (delta-epsilon (* (/ wpw 1e-20) (/ wpw 
1e-20)))
                        ))
                     ))
            ))

         (list (make cylinder (center -1.2 0) (radius 0.125) (height infinity)
                     (material (make dielectric (epsilon 1)
                      ))
            ))
(list (make cylinder (center -1.8 0) (radius 0.1) (height infinity)
                     (material (make dielectric (epsilon epsinf)
                        (polarizations (make polarizability
        (omega 1e-20) (gamma tauw) (delta-epsilon (* (/ wpw 1e-20) (/ wpw 
1e-20)))
                        ))
                     ))
            ))

         (list (make cylinder (center -1.8 0) (radius 0.075) (height infinity)
                     (material (make dielectric (epsilon 1)
                      ))
            ))

;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;          
;          (geometric-object-duplicates (vector3 1 0 0) 0 0
;               (make cylinder (center 0 0 0) (radius 0.2) (height infinity)
;                      (material (make dielectric (epsilon 1.00)
;                      ))
;          )      )
;;;;;;;;;;;;;;;;;;;;;;;;;;


;;;;;;;;;;;;;;;;;;;;;;;;;;
      )))
                                                                               
(set! sources (list
                    (make source
                   (src (make gaussian-src (frequency fcen) (fwidth df)))     
;; tran-model
                   ;(src (make continuous-src (frequency fcen)))            ;; 
field-model 
                    (component Ey)
                   (center -2.7 0)
                    (size 0 sy)
                  )
))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; tran-model
;(define-param centerZ (-0.25 0))
(define trans1 ; transmitted flux
    (add-flux fcen df nfreq
        (make flux-region (center 2.7 0) (size 0 y))
    ))     
;;;;;;;;;;
;;;;;;;;;;
 (define refl ; 
    (add-flux fcen df nfreq
         (make flux-region (center -2.6 0) (size 0 sy))
    )) 
;;;;;;;;;;;;;;;;;;;;;;;;
(if (not tube?) (load-minus-flux "refl-flux"))
(run-sources+ (stop-when-fields-decayed 100 Ey (vector3 0 0.3) 1e-3)
           (at-beginning output-epsilon)
 )
(if tube? (save-flux "refl-flux" refl))

;(print "trans1=" trans1 "\n")
(display-fluxes trans1 refl) ; print out the flux spectrum
;;;;;;;;;;;;;;;;;;;;


;; field-model
;(run-until 60
;    (at-beginning output-epsilon)
;    (at-end output-hfield-x)
;    (at-end output-hfield-y)
;    (at-end output-hfield-z)
;    (at-end output-efield-z)
;    (at-end output-efield-x)
;    (at-end output-efield-y)
;    (at-end output-hpwr)
;     (at-end output-dpwr))
_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to