Dear meep users:
         I have simulated a transmission spectrum of a metal grating. I only 
use a cell.  The period boundary condication is used in X, Y direction and PML 
is used in Z direction. However the result is not correct. The content of 
output file is only #.#. 
          I think the error of my control file is the parameters of 
polarizability. Because the result is right, if I change the parameters of 
polarizability into some other number.  
          The following is my control file. Could anyone help me?
  Thank you very much!
   
  (reset-meep)
(set! eps-averaging? false)
(set! resolution 40)
(set! k-point (vector3 0 0 0))
(set! pml-layers (list (make pml (direction Z) (thickness 1))))
  (define-param aa 750e-9) 
(define-param bc (/ 280e-9 aa))
(define-param h (/ 320e-9 aa)) 
  (define-param epsinf 12.9965)
(define-param wp (* 9.8528 1.519253928d15))
(define-param tau (* 0.240 1.519253928d15))
  (define-param x 1) 
(define-param y 1) 
(define-param z 7) 
(define-param sx x); 
(define-param sy y); 
(define-param sz h); 
(define-param pczx 0)
(set! geometry-lattice (make lattice (size x y z)))
  (define-param fcen (/ aa 600e-9)); the center frequency of gauss pulse   
0.9375
(define-param df (/ aa 800e-9));
(define-param nfreq 50)
  (set! geometry
     (append
         (list (make block (center 0 0 pczx) (size sx sy sz)
                     (material (make dielectric (epsilon epsinf)
                        (polarizations (make polarizability
                             (omega 1e-20) (gamma tau) (delta-epsilon (* (/ wp 
1e-20) (/ wp 1e-20)))
                        ))
                     ))
            ))
         (list (make block (center 0 0 pczx) (size bc bc sz)
                     (material (make dielectric (epsilon 1)
                     ))
            ))
      ))
                                                                               
(set! sources (list
      (make source
      (src (make gaussian-src (frequency fcen) (fwidth df)))
      (component Ey)
      (center 0 0 (+ (/ z -2) (* 1.1 1)))
      (size sx sy 0)
                  )
))
  
(define-param centerZ2 (* 1.0 1)) 
(define-param x2 1)
(define-param y2 1)
  (define trans2 ; transmitted flux
    (add-flux fcen df nfreq
         (make flux-region (center 0 0 centerZ2) (size x2 y2 0))
    ))
      
(run-sources+ (stop-when-fields-decayed 100 Ey (vector3 0 0 centerZ2) 1e-4)
    (at-beginning output-epsilon)
 )
  (print "trans2=" trans2 "\n")
(display-fluxes trans2) ; print out the flux spectrum
   

       
---------------------------------
抢注雅虎免费邮箱3.5G容量,20M附件! 
_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to