Hi everyone,
I want to calculate flux spectra of a periodic 3D hole array. The
structure is symmetric in X and Y direction, but not in Z direction. My
sources and flux monitor are in z
direction. Closest I've got is:
(set! k-point (vector3 kx ky 0))
(set! ensure-periodicity true)
I know that this will set k vector in only one direction. I want it to
be periodic in X and Y directions separately.
Here is the complete code:
(reset-meep)
(set! Courant 0.25)
;Some parameters to describe the geometry:
(define-param eps 1) ; dielectric constant of waveguide
(define-param l 7.50) ; celllattice * no of holes
(define-param r 1.4)
(define-param h 2.2) ; radius of holes
(define-param N 1) ; number of holes in either axes
(define-param structure? true)
(define-param dpml 1) ; PML thickness
(set! k-point (vector3 0 0 0))
(set! ensure-periodicity true)
(set! output-single-precision? true)
(define sx (* N l)) ; size of computational cell in x direction
(define sy (* N l)) ; size of computational cell in y direction
(define sz h) ; size of computational cell in z direction
(set! geometry-lattice (make lattice (size (+ l (* 2 dpml)) (+ l (* 2
dpml)) (+ h (* 2 dpml)) )))
(set! geometry (if structure?
(append (list
(make block (center 0 0 0) (size l l h)(material
perfect-electric-conductor))
(make cylinder (center 0 0 0) (radius r) (height h)(material
air))))
(list (make block (center 0 0 0) (size l l h)(material
perfect-electric-conductor)))
))
(set! pml-layers (list (make pml (thickness dpml))))
(set-param! resolution 10)
(set! sources (list
(make source
(start-time 0) (end-time 5)
(src (make gaussian-src (frequency 0.17) (fwidth 0.15)))
(component Hy) (center 0 0 (* -0.5 h)))))
;(set! symmetries (list (make mirror-sym (direction Y)) (make
mirror-sym (direction X)) (make mirror-sym (direction Z))))
(define trans ; transmitted flux
(add-flux 0.17 0.15 100
(make flux-region
(center 0 0 (/ h 2)) (size l l))))
;(run-until 500
(run-sources+ (stop-when-fields-decayed 50 Hy
(vector3 0 0 (/ h 2.0))
1e-3)
(at-beginning output-epsilon)
(to-appended "hy" (at-every 0.5 output-efield-x)))
(display-fluxes trans) ; print out the flux spectrum
Thanking you,
Prashant Srivastava
_______________________________________________
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss