summaryrefslogtreecommitdiff
path: root/meep/wg.ctl
blob: 6f51f3691d0c37c18c67c65c9482111e83552666 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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"))
	)