Hi Steven and meep users:
    I follow one past message to generate the Gaussian beam in a cylindrical 
coordinate:
http://www.mail-archive.com/meep-discuss@ab-initio.mit.edu/msg02317.html
and I found out the results are different from that from Cartesian coordinate.

For example, I'd like the beam to propagate along z direction so I specify the 
size of the source in r direction. But I found out whatever I change the size, 
it still looks like a point source. In addition, there is a small source above 
that point source. I think the distance between these two sources is the size I 
specify. 

However,this doesn't happen in the Cartesian coordinate. The size of source is 
consistent to the input. 

I wonder if anyone happens to have this experience and work it out.
The script is attached below.
Thank you very much

Adrian

%% Code begins 

(define NTp 300)         ; total time period

(define lam  0.98) ; unit: um
(define freq (/ 1 lam)) ; normalized frequency in meep
(define mTp lam)         ; 1 time period in meep



;%%% basic structure parameter %%%
(define lr   6)   ; normalized r-length in meep
(define lz   18)   ; normalized z-length in meep
(define dpml 1.5) ; normalized PML thickness in meep
(define dl   50)   ; resolution in meep




(define waist 1) ; gaussian beam waist





;%%% total region setting %%%
(set! dimensions CYLINDRICAL)
(set! m 1)
(set! geometry-lattice (make lattice (size lr 0 lz)))



;%%% source setting %%%
(define ((ampgauss sigma_d k) r)
  (exp (- (* 0+2i pi (vector3-dot k r)) (/ (vector3-dot r r) (* 2 sigma_d 
sigma_d))))
)

(set! sources
  (list
    (make source
      (src (make continuous-src (frequency freq) (width (* 4 mTp)))) 
      (component Er)
      (center 0 0 (+ (* -0.5 lz) (* 0.9 dpml)))
      (size 1.3 0 0)
      (amp-func (ampgauss waist (vector3 0 0 0)))
    )
  )
)



;%%% PML setting %%%
(set! pml-layers  (list (make pml (thickness dpml))))



;%%% RUN meep %%%
(set! output-single-precision? true)
(set! resolution dl)
(run-until (* NTp mTp)
  (at-end (synchronized-magnetic output-efield-r output-efield-z 
output-hfield-p))
  (at-end output-png Er "-Zc dkbluered")
)

%%%%%%%%%%%

 



      
_______________________________________________
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