Dear Steven.
I have written the following control lines that shows propagation of
Gaussian light through a 3d slab.
But there is a problem during its run :

ERROR: Wrong type argument in position 2: 0

I do not know any way to remove it.
Please help me.
Sincerely you.

Mehdi Kamali

;Hoval Mahboob
(define-param wg-l 10)
(define freq 0.2933)
(define df freq)
(define susept2 3e-4)
(define amp 1000)
(define eff-n 3.4)
(define-param dpml 1.0)
(define padx 3)
(define padzy 2)
(define x (+ wg-l (* 2 padx) (* 2 dpml)))
(define y (+ 20 (* 2 padzy) (* 2 dpml)))
(define z (+ 20 (* 2 padzy) (* 2 dpml)))
(define mat (make dielectric (epsilon (* eff-n eff-n)) (chi2 susept2)))
(set! geometry-lattice (make lattice (center 0 0 0) (size x y z)))
(set! geometry (make block (center 0 0 0) (size 20 20 wg-l) (material mat)))
(set! pml-layers (list (make pml (thickness dpml))))
(set-param! resolution 20)
(set! sources (list
               (make source
                 (src (make gaussian-src (frequency freq) (fwidth df)))
                 (component Ex)
                 (center (- (* -0.5 wg-l) (/ padx 3)) 0 0)
                 (amplitude amp))))
(define trans
  (add-flux (* 1.5 freq) (* 1.4 freq) 500
            (make flux-region (center (+ (* 0.5 wg-l) 1) 0 0) (size 0 20 20)
(direction X))))

(run-until 200
        (to-appended "ex" (at-every 0.6 output-efield-x)))
(display-fluxes trans)

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

Reply via email to