Dear Meep users, A big happy new year to everyone!
I am trying to do a very simple simulation in meep but unfortunately not
getting the results expected!
I am looking at the reflection coefficient at the interface of two
different dielectric regions. according to theory the reflected
intensity should be a {(n1-n2)/(n1+n2)}^2 fraction of the incident
intensity. So in the case of constant refractive index, the reflection
coefficient should be a constant number.
I have tried both 1D and 2D simulation. in which there is an interface
of epsilon1=1 and epsilon2=12 for a gaussian beam including the
frequency spectrum of (0.5 , 1).
Both simulations give me the same result which does not look right to
me!
I am expecting a straight line around {(1-sqrt(12))/(1
+sqrt(12))}^2=0.3047.
I have attached the diagram plotted in matlab which is showing the
monitor normalized by source.
I have also tried changing the place of the source and monitor and the
distance between the monitor and source, but I have not seen that much
of a difference!
I am not sure if there is something wrong with my code or not!
I do appreciate if you can help me!
Regards,
Asa
The codes for 2D simulation and 1D simulation are as below respectively!
************************************************************************
TWO DIMENSION
; 10.12.09
; Studying the reflection back from the n1 and n2 interface at normal
incidence
; R=[ (n1-n2)/(n1+n2) ]^2
(reset-meep)
(set! default-material (make dielectric (epsilon 1)))
(set! k-point (vector3 0 0 0))
(set! ensure-periodicity true)
(define-param no-geom? false) ; if true, no geometry
; unit cell
(define sx 6)
(define sy 6)
(define sz 10)
(define dpml 1)
(define sZ (+ sz (* 2 dpml)))
(set! geometry-lattice (make lattice (size sx sy sZ)))
(set! geometry
(if no-geom?
'()
(list
(make block
(center 0 0 (/ sZ -4))
(size sx sy (/ sZ 2))
(material (make dielectric (epsilon 12)))
)
)
)
)
; Set the resolution
(set! resolution 10)
; Set the pml layer
(set! pml-layers (list (make pml (thickness dpml) (direction Z) )))
; The source
(define-param fcen 0.75) ; pulse center
frequency
(define-param df 0.5 ) ; pulse width (in frequency)
(define-param nfreq 1000)
(set! sources (list
(make source
;(src (make continuous-src (frequency fcen)))
(src (make gaussian-src (frequency fcen) (fwidth df)))
(component Ex)
(size sx sy 0) ; Not specifying the size would give us a point
source
(center 0 0 4.5); 4.5= sz-0.5
;(amplitude 10)
)))
; refl flux
(define refl ; reflected flux
(add-flux fcen df nfreq
(make flux-region
(center 0 0 2.5) (size sx sy 0) ))); 2.5= sz/2
;For actual run. it loads the negated normalized spectrum
(if (not no-geom?) (load-minus-flux "refl-flux" refl))
; Run
(run-sources
(at-beginning output-epsilon)
(to-appended "e" (at-every 0.5 output-efield))
(to-appended "h" (at-every 0.5 output-hfield))
(at-end output-efield)
)
;For normalization run, it saves the negated spectrum
(if no-geom? (save-flux "refl-flux" refl))
(display-fluxes refl)
(output-sfield)
**********************************************************************
ONE DIMENSION
; 05/01/10
; Studying the reflection back from the n1 and n2 interface at normal
incidence
; the simulation is run in 1D
; R=[ (n1-n2)/(n1+n2) ]^2
; sz=10; Zsource=4.5; Zmonitor=2.5
; sz=20; Zsource=9.5; Zmonitor=4.5
(define-param sz 10) ; size of cell in z direction
(define-param fcen 0.75) ; center frequency of source
(define-param df 0.5) ; frequency width of source
(define-param nfreq 1000)
(define-param dpml 1.0) ; PML layer thickness
(define sZ (+ sz (* 2 dpml)) )
(define-param no-geom? false) ; if true, no geometry
(set-param! dimensions 1)
(set! geometry-lattice (make lattice (size no-size no-size sZ)))
(set! geometry
(if no-geom?
'()
(list
(make block
(center 0 0 (/ sZ -4))
(size infinity infinity (/ sZ 2))
(material (make dielectric (epsilon 12)))
)
)
)
)
(set! pml-layers (list (make pml (thickness dpml))))
(set-param! resolution 10)
(set! sources (list
(make source
(src (make gaussian-src (frequency fcen) (fwidth df)))
(component Ex)
(center 0 0 4.5)
;(amplitude amp)
)))
; refl flux
(define refl ; reflected flux
(add-flux fcen df nfreq
(make flux-region
(center 0 0 2.5) )))
;For actual run. it loads the negated normalized spectrum
(if (not no-geom?) (load-minus-flux "refl-flux" refl))
; Run
(run-sources
(at-beginning output-epsilon)
(to-appended "e" (at-every 0.5 output-efield))
(to-appended "h" (at-every 0.5 output-hfield))
(at-end output-efield)
)
;For normalization run, it saves the negated spectrum
(if no-geom? (save-flux "refl-flux" refl))
(display-fluxes refl)
(output-sfield)
<<attachment: refl-t00.tif>>
_______________________________________________ meep-discuss mailing list [email protected] http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

