File: faraday-rotation.ctl

package info (click to toggle)
meep-openmpi 1.25.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 64,556 kB
  • sloc: cpp: 32,214; python: 27,958; lisp: 1,225; makefile: 505; sh: 249; ansic: 131; javascript: 5
file content (40 lines) | stat: -rw-r--r-- 1,117 bytes parent folder | download | duplicates (8)
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
;; From the Meep tutorial: plotting Faraday rotation of a linearly polarized plane wave

;; Parameters for a gyrotropic Lorentzian medium
(define-param epsn 1.5)    ; background permittivity
(define-param f0 1.0)      ; natural frequency
(define-param g0 1e-6)     ; damping rate
(define-param sn 0.1)      ; sigma parameter
(define-param b0 0.15)     ; magnitude of bias vector

(set! default-material
      (make dielectric
	(epsilon epsn)
	(E-susceptibilities
	 (make gyrotropic-lorentzian-susceptibility
	   (frequency f0)
	   (sigma sn)
	   (gamma g0)
	   (bias (vector3 0 0 b0))))))

;; Set up and run the Meep simulation:
(define-param tmax 100)
(define-param L 20.0)
(define-param fsrc 0.8)
(define-param src-z -8.5)
(set-param! resolution 50)

(set! geometry-lattice (make lattice (size 0 0 L)))

(set! pml-layers (list (make pml (thickness 1.0) (direction Z))))

(set! sources (list
	       (make source
		 (src (make continuous-src (frequency fsrc)))
		 (component Ex)
		 (center (vector3 0 0 src-z)))))

(run-until tmax
	   (to-appended "efields"
			(at-end output-efield-x)
			(at-end output-efield-y)))