Dear Prof. Johnson and Fellow MEEP Users,
I am a new user of meep and have been checking the program utilizing an
oscillating electric point dipole in vacuum. A problem I have encountered
is that the electric field calculated in meep will not converge to the
exact solution. It "bounces" around as the resolution is increased. Below
is the code used to perform the calculations:
-----------------------------------------------------------------------------------------------
(define Start_Time (current-time))
(define freq 1.00)
(define-param length_x 1)
(define-param length_y 1)
(define-param length_z 1)
(define-param x 0)
(define-param y 0)
(define-param z 0)
(define-param Res 10)
(define-param pml_thcknss 0.25)
(define hz_dipole 0)
(set! force-complex-fields? true)
(set! geometry-lattice (make lattice (size length_x length_y length_z)))
(set! geometry (list
(make block (center 0 0 0) (size infinity infinity infinity)
(material (make dielectric (epsilon 1.0))))))
(set! sources (list
(make source
(src (make continuous-src (frequency freq)))
(component Ez)
(center 0 0 hz_dipole))))
(set! pml-profile (lambda (u) (* u u u)))
(set! pml-layers (list (make pml (thickness pml_thcknss))))
(set! resolution Res)
(init-fields) ;Initializes geometry and fields for the frequency domain
solver
(meep-fields-solve-cw fields)
(print "Ex at (x y z)" "," (get-field-point Ex (vector3 x y z))"\n")
(print "Ey at (x y z)" "," (get-field-point Ey (vector3 x y z))"\n")
(print "Ez at (x y z)" "," (get-field-point Ez (vector3 x y z))"\n")
(print "Hx at (x y z)" "," (get-field-point Hx (vector3 x y z))"\n")
(print "Hy at (x y z)" "," (get-field-point Hy (vector3 x y z))"\n")
(print "Hz at (x y z)" "," (get-field-point Hz (vector3 x y z))"\n\n")
(print "Start_time:" Start_Time "\n")
(print "End_time:" (current-time)"\n")
(print "Time_Elapsed:" (- (current-time) Start_Time)"\n")
(exit)
-----------------------------------------------------------------------------------------------
Typical parameters used when running the code were a pml layer thickness of
0.15, and the electric and magnetic fields calculated along the z-axis at z
= 0.125, and z = 0.25
Have I written something wrong in the code that would cause the
non-convergence?
Thank you for your help.
Joseph
_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss