Aaron Danner <aaron...@...> writes: > > Dear Friends, > > Below is a ctl file where a medium of gradient index is defined functionally and a cw point source is defined > in it. At first the simulation proceeds normally with waves expanding outwards from the dipole. > Suddenly in the simulation waves appear at a totally different area in grid and the source is no longer > emitting either. I have attached a snopshot showing the moment of abrupt change in output. (After this, > the source disappears and the new blip just stays where it is with no change.) I tried a few different > frequencies/resolutions and still got this behavior. For the life of me I can't understand what is > happening. I am using the newest version of meep. What could be causing this? There are no error > messages. Here is the ctl file: > > ; Definitions > (define (r p) > (sqrt (+ (* (vector3-y p) (vector3-y p)) (* (vector3-x p) (vector3-x p)) ) ) > ) > > (define (gradientN x) > (+ 1 (* 0.9935325177161686 x) (* 0.01822651230520182 (expt x 2)) > (* 5.525561315082001 (expt x 3)) (* -6.669270664249898 (expt x 4)) > (* 1.9636753604505492 (expt x 5)) ) > ) > (define (eps r) > (if (> r 40.60058497) > (expt (/ (gradientN (log (/ r 40.60058497))) (/ r 40.60058497)) 2) > 1) > ) > > ; Definition of the medium > (define (f p) > (make medium > (epsilon (eps (r p))) > ) > ) > > ;Layout of the simulation > (set! geometry-lattice (make lattice (size 600 600 no-size))) > (set! default-material (make dielectric (epsilon 10))) > (set! geometry (list > (make sphere (radius 300) (center 0 0) > (material (make material-function > (material-func f) > )) > ) > )) > > ;Source for the simulation > (set! sources (list > (make source > (src (make continuous-src (frequency 0.05))) > (component Ez) > (center 0 20) > (size 0 0) > ) > )) > > ;External boundary conditions > ;(set! pml-layers (list (make pml (thickness 50)))) > > ;Grid resolution > (set! resolution 0.5) > > ;Run parameters > (run-until 400 > (at-beginning output-epsilon) > (at-every 5 output-efield-z) > ) > > > > _______________________________________________ > meep-discuss mailing list > meep-disc...@... > http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
Matt, Thanks for replying. I found the problem. You were right that there was a field instability (divergent), but the problem was that I couldn't find the cause as the potential is well behaved with n positive and finite and within a small range and smoothly varying. Actually, it looks like the cause is having indices of refraction below 1 coming into contact with a perfect electric conductor or a material with a large positive index (I am not sure if a gradient index is required to reproduce the problem or not). I just multiplied all the indices by a large constant and everything worked. But I thought it would be important for me to report this. I also found that the problem occurs with very simple potentials. For example, if you set the index as a function of radius n(r) = 1 - 0.01*r and put a PEC at a radius of 50 (making n = 0.5 at the outer boundary), then a dipole emitting a short gaussian pulse near the center of the grid seems to always cause diverging fields. If you just multiply n by a constant so that n > 1 everywhere except at the PEC then everything is okay. Now I am curious why having 0 < n < 1 can cause divergent fields. Aaron _______________________________________________ meep-discuss mailing list [email protected] http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

