Hi,

I am running the flux example from the webpage. The only change that I make
is defining a cone somewhere (in 2D).

If the orientation of the cone is (1 1 0) the simulation runs fine. If the
orientation is (1 0 0) the output of the simulation (EPS is fine) is all NA.





(define-param sx 16) ; size of cell in X direction
(define-param sy 32) ; size of cell in Y direction

(set! geometry-lattice (make lattice (size sx sy no-size)))

(define-param pad 4) ; padding distance between waveguide and cell edge

(define-param w 1) ; width of waveguide

(define wvg-ycen (* -0.5 (- sy w (* 2 pad)))) ; y center of horiz. wvg
(define wvg-xcen (* 0.5 (- sx w (* 2 pad)))) ; x center of vert. wvg

;------------------------------------------------------------------------------





 (set! geometry (list
 (make block  (center (* -0.5 pad) wvg-ycen) (size (- sx pad) w infinity)
(material (make dielectric (epsilon 12))))
 (make block (center wvg-xcen (* 0.5 pad)) (size w (- sy pad) infinity)
(material (make dielectric (epsilon 12))))
 (make cone  (center 0 0 )  (radius 1 )  (height 1)  (axis 10 0 0)
 (material (make dielectric (epsilon 12))))
 ))

 ;End of structure
;-----------------------------------------
;---------------------------------------------------------------------------




(define-param fcen 0.15) ; pulse center frequency

(define-param df 1)    ; pulse width (in frequency)

(set! sources (list
               (make source
                 (src (make gaussian-src (frequency fcen) (fwidth df)))
                 (component Ez)
                 (center (+ 1 (* -0.5 sx)) wvg-ycen)
                 (size 0 w))))

(set! pml-layers (list (make pml (thickness 1.0))))
(set-param! resolution 10)

(define-param nfreq 100) ; number of frequencies at which to compute flux

(define trans ; transmitted flux

      (add-flux fcen df nfreq
                    (make flux-region
                     (center wvg-xcen (- (/ sy 2) 1.5)) (size (* w 2) 0))))
(define refl ; reflected flux

      (add-flux fcen df nfreq
                 (make flux-region
                   (center (+ (* -0.5 sx) 1.5) wvg-ycen) (size 0 (* w 2)))))















(run-sources+ 60 (at-beginning output-epsilon) (at-every 10
output-efield-z))


;(save-flux "refl-flux" refl)


;(run-sources+
 ;(stop-when-fields-decayed 50 Ez
                           ;(if no-bend?
                               ;(vector3 (- (/ sx 2) 1.5) wvg-ycen)
                               ;(vector3 wvg-xcen (- (/ sy 2) 1.5)))
                           ;1e-3))

(display-fluxes trans refl)



--
ehsan shah hosseini, PhD
photonic microsystems group, rLe, MIT;  26-344
cell:      +1 404.290.9198
office:   +1 617.253.3074
_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to