Dear Steven and meep users,

I write a ctl according to some codes that Steven have given on this list, but 
I can't change the position of the waist of a gaussian beam. 

****************************************************************************************************************
(define-param sy 52) ; size of cell in y direction
(define-param sx 52) ; padding between last hole and PML edge
(define-param dpml 1) ; PML thickness
 
(set! geometry-lattice (make lattice (size sx sy no-size)))
(set! pml-layers (list (make pml (thickness dpml))))
(set-param! resolution 10)

 
(use-output-directory)
 
(define ( (my-amp sigma k x0) x)
 (exp (- (* 0+2i pi (vector3-dot k (vector3+ x x0) ))
      (/ (vector3-dot (vector3+ x x0) (vector3+ x x0)) (* 2 sigma sigma)))))
 
(define-param fcen 0.58) ; pulse center frequency
(define-param df 0.02) ; turn-on bandwidth 
(define-param kdir (vector3 1 0)) ; direction of k (length is irrelevant)
(define k (vector3-scale  fcen (unit-vector3 kdir))) ; k with correct length
 
(set! sources (list
    (make source
        (src (make continuous-src (frequency fcen) (fwidth df)))
        (component Hz)
        (center  0 0) ;
        (size 0 10)
        (amp-func (my-amp 1 k (vector3 -15 0 0))))))
  
(run-until 100
 (at-beginning output-epsilon)
 (at-every 0.6 (output-png Hz "-Zc gray")))

**************************************************************************************************************

I expect that I can get a gaussian beam with its waist at x=15, but this is not 
true. Could you lend me a hand? Thank you very much.

yours,
Mario

PS: The width of waist seems larger than what I have specified, i.e. 1 unit. 
What's wrong?


 
____________________________________________________________________________________
Finding fabulous fares is fun.  
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel 
bargains.
http://farechase.yahoo.com/promo-generic-14795097
_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to