Hi,
The ctl file I wrote is below:
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
;define block parameters
(define-param n 3.5)
(define-param eps (* n n)) ;dielectric constant of waveguide
(define-param x 5)
(define-param y 5)
(define-param z 3) ;block
;(define-param z 0.5) ;slab
;The thickness of PML
(define-param dpml 1)
;The cell dimensions
(define-param sx (+ x (* 2 dpml)))
(define-param sy (+ y (* 2 dpml)))
(define-param sz (+ 3 (* 2 dpml)))
(define-param res 10) ;resolution
;The pulse
(define-param fcen 0.55)
(define-param df 0.7)
(define-param nfreq 35)
(define-param fz (- (* 0.5 sz) dpml 0.5))
;Now the computation cell is:
(set! geometry-lattice (make lattice (size sx sy sz)))
;Geometry
(set! geometry
(list
(make block
(center 0 0 0)
(size x y z)
(material (make dielectric (epsilon eps))))))
;Point source
(set! sources
(list
(make source
(src (make gaussian-src (frequency fcen) (fwidth df)))
(component Hz)
(center 0 0 sourcez))))
(set! pml-layers (list (make pml (thickness dpml))))
(set-param! resolution res)
;To compute the flux spectrum
(define trans ; transmitted flux
(add-flux fcen df nfreq
(make flux-region
(center 0 0 fz)
(size x y ))))
(use-output-directory)
(run-sources+ (stop-when-fields-decayed
25 ;dT
Hz ;component
(vector3 0 0 fz) ;pT
1e-2 ;decay-by
)
(at-beginning output-epsilon))
(display-fluxes trans) ;Print out the flux spectrum
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
The transmitted flux is either computed when the dielectric material fills the computation cell or when the dielectric slab is in the computation cell.
However, I found that the field was oscillated when it was small. Then, the computation process spent lots of time.
In my opinion, the computation cell acts as a cavity due to a small reflection of PML.
What can I do now?
Many thanks!
Jun
_______________________________________________ meep-discuss mailing list [email protected] http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

