Hello all,
I am attempting to use Meep to model the transmissivity of a thin
metal (Au in fact) film in a thin bandwidth. As such I have defined a
simple 1D simulation with a Gaussian pulse source with a small
bandwidth, and defined the metal through the frequency independent
conductivity term (using eps = -10 + 1j from Appl. Opt. 37(22) 1998
pp. 5271-5283). However, I seem to be running into instability
problems with the fields quickly blowing up even for massive
resolutions ( 1000). I have read in numerous posts on this lists of
similar behaviour and wondered if anyone had a working solution for
real metals in a narrow bandwidth (or broad bandwidth for that matter)?
As an associated issue I noticed something odd (to me at least) after
an h5dump of the epsilon data. The following is a snippet from the
area around the metal:
(4982): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2.2,
(5000): -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
-10,
(5012): -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
-10,
(5024): -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
-10,
(5036): -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
-10,
(5048): -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
-10,
(5060): -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
-10,
(5072): -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
-10,
(5084): -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
-10,
(5096): -10, -10, -10, -10, 2.2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1,
I was wondering why, even with eps-averaging? set to off (and meep
built with simple averaging to off: line 236 of
anisotropic_averaging.cpp set to 0) I am still getting some sort of
averaging. Also it seems to be averaging up to abs(eps) rather than
the negative value?
If anyone can shed any light on any of this I would be grateful. My
ctl file is pasted below for reference. Thanks very much.
Ian
(set! eps-averaging? false)
(define-param sz 100) ; size of cell in z direction
(define-param fcen 1.49) ; centre frequency
(define-param w 10) ; pulse width (1/e points?)
(define-param df (/ 1 w)) ; frequency width
(define-param dpml 1.0) ; pml layer thickness
(define-param res 100)
(define dx (/ 1 res))
;(define-param hmetmult 1) ; cell multiplier
(define-param hmetal 0.01) ; width of metal, d2 in doc
(define-param hglass 4.0) ; width of glass, d1 in doc
(define-param er1 -10.0) ; real part of metal refractive index
(define-param er2 1.0) ; imaginary part of metal refractive index
(define-param metal? true)
(define-param glass? false)
;define custom stop function
(define (stop-when-energy-decayed dT box decay-level)
(if (null? fields) (init-fields))
(let ((T0 (meep-time)))
(lambda ()
(begin
(if (= (meep-time) (+ T0 dT))
false ; don't stop yet
(let ((cur-energy 0))
(set! T0 (meep-time))
(set! cur-energy (field-energy-in-box box))
(print field energy at t= (meep-time): cur-energy
\n)
(= cur-energy decay-level)))
(define (print-field-energy)
(print field-energy: (field-energy-in-box (volume (center 0 0 0)
(size 0 0 sz))) \n))
(set-param! dimensions 1)
(set! geometry-lattice (make lattice (size no-size no-size sz)))
(set! pml-layers (list (make pml (thickness dpml
(set-param! resolution res)
(set! geometry
(if metal?
(if glass?
(list
(make block
(center 0 0 (- (/ hglass 2)))
(size infinity infinity hglass)
(material (make medium (index 1.5
(make block
(center 0 0 (/ hmetal 2))
(size infinity infinity hmetal)
(material (make medium (epsilon er1) (D-conductivity (/ (* 2 pi
fcen er2) er1))
(list
(make block
(center 0 0 (/ hmetal 2))
(size infinity infinity hmetal)
(material (make medium (epsilon er1) (D-conductivity (/ (* 2 pi
fcen er2) er1)))
(list
(make block
(center 0 0 0)
(size infinity infinity infinity)
(material air)
(set! sources
(list
(make source
(src (make gaussian-src (frequency fcen) (width w)))
(component Ex)
(center 0 0 (+ (- (/ sz 2))