diff options
Diffstat (limited to 'meep/wg.ctl')
-rw-r--r-- | meep/wg.ctl | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/meep/wg.ctl b/meep/wg.ctl new file mode 100644 index 0000000..6f51f36 --- /dev/null +++ b/meep/wg.ctl @@ -0,0 +1,45 @@ +(set! geometry-lattice (make lattice (size 26 26 no-size))) + +(define-param r 10) ; inner radius of ring +(define-param w 1) ; width of waveguide +(define-param sh (- 0 r) ) ; shift from center + +(define-param fcen 0.15) ; pulse center frequency +(define-param df 0.1) ; pulse width (in frequency) + +(set! symmetries (list (make mirror-sym (direction Y)))) + +(set! geometry (list + (make cylinder (center 0 0) (height infinity) + (radius r) (material (make dielectric (index 3.4)))) +; (make block (center 0 (+ sh 0 (/ w -2))) (size infinity 1 infinity) +; (material (make dielectric (epsilon 12)))) + )) + +(set! sources (list +; (make source +; (src (make gaussian-src (frequency fcen) (fwidth df))) +; (component Ez) +; (center (+ r -1) 0)) + (make source + (src (make continuous-src (frequency fcen))) + (component Ez) + (center (+ r -1) 0)) + )) + +(set! pml-layers (list (make pml (thickness 1.0)))) + +(set! resolution 10) + +(use-output-directory) + +;(run-sources+ 300 +; (at-beginning output-epsilon) +; (after-sources (harminv Ez (vector3 (+ sh 2)) fcen df)) +; ) + +(run-until 2600 + (at-beginning output-epsilon) + (at-every (/ 10 fcen) (output-png Ez "-S3 -Zc bluered -a yarg -A ./wg-out/eps-000000.00.h5")) + ) + |