------

below is a 2d calculation. it's simply a metal slab, a point source and a pml around the entire domain.

if the metal slab is 'metal', there is no problem.

if the metal slab is a dispersive material ('al_mat' below) then only if the source is Ez is the simulation stable. otherwise the energy in the domain grows without bounds.

if i change it so the x-direction is periodic, i have no problem. therefore, there seems to be a possible stability problem w/ dispersive materials running into a pml.

a different *.ctl file in 3d is unstable regardless of the source as long as the slab is dispersive.

thanks for any help/suggestions.

(both meep 0.20.3 and 0.9 tried)

------


(print "starting control file...\n")
(set-param! eps-averaging? false)

(define-param print-epsilon? false)  ;print eps.h5 file?

(define-param pml_h    0.5)
(define-param res    100)   ; resolution

(define-param fcen 1.82) ; center = 550nm
(define-param df 0.33)  ; center = 550nm, width=100nm
(define-param nfreq 201) ;number of frequency sample points

(define x_tot (* 0.76 2))
(define y_tot 0.76)

(set! geometry-lattice (make lattice (size (+ pml_h pml_h x_tot) (+ pml_h pml_h y_tot) no-size)))

(set! resolution res)

(print "defining materials...\n")
(define al_mat  (make dielectric (epsilon 1)
(polarizations (make polarizability (omega 1.0e-5) (gamma 0.722) (delta-epsilon 1.38E+12)))))


(print "defining geometries...\n")
(set! geometry  (list
        (make block (center 0 -0.12 0)
;        (material al_mat) (size (+ pml_h pml_h x_tot) 0.12 infinity))))
         (material metal) (size (+ pml_h pml_h x_tot) 0.12 infinity))))

(print "defining pml...\n")
(set! pml-layers (list (make pml (thickness pml_h))))

(print "defining source...\n")
(set! sources (list
(make source (src (make gaussian-src (frequency fcen) (fwidth df))) (component Ez) (center 0 -0.02 0)) ; (make source (src (make gaussian-src (frequency fcen) (fwidth df))) (component Ey) (center 0 -0.02 0)) ; (make source (src (make gaussian-src (frequency fcen) (fwidth df))) (component Ex) (center 0 -0.02 0))
))

    ; do the simulation
(define tim 5)  ;time to sample energy in domain
(print "time to sample energy: " tim "\n")
(define tot_energy 0)
(define max_energy -1)
(define ratio 1)
(if print-epsilon? (output-epsilon))
(run-sources+ 60
    (at-every tim (lambda ()
(set! tot_energy (meep-fields-field-energy-in-box fields (volume (center 0 0 0) (size x_tot y_tot)) ))
        (set! max_energy (max max_energy tot_energy))
        (set! ratio (/ tot_energy max_energy))
(print "energy decay (t=" (meep-time) "s, " (meep-fields-t- get fields) " timestep) = " tot_energy " / " max_energy " = " ratio "\n"))
    )
)
(print "done with control file\n")


_______________________________________________
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to