I did a little further investigation, hoping to find a work-around to this problem. Thinking that perhaps the phase of the source signal at change-source time affects the value of the scaler electric field, I adjusted the change source time and found a time that provided a low value of the scaler electric field after settling time. But since I always make my model runs at much higher resolution, I then stepped up resolution incrementally to watch the behavior of the steady state scaler electric field at the source. I found this:
change-source end of scaler electric field time run at end of run Res=30 9.99 11 0.27606954083462293+0.0i Res=40 9.99 11 -0.09092336656596217+0.0i Res=50 9.99 11 -1.6098960281703367+0.0i Res=60 9.99 11 190.53612671854748+0.0i Res=70 9.99 11 256.63342250755574+0.0i My model of current interest is a small resonant cavity excited by a magnetron at ~2.45 GHz with a noise bandwidth of about 30 MHz feeding a coil antenna. The antenna is modeled as point dipole, Hz excitation and I make my Meep runs at 500 resolution. As one can see from the trend in the above it is not practical to guess at the change-source time which will result in a low value of the scaler fields. Unfortunately, a static field existing in the cavity has an effect on the behavior of the fields created by the new antenna. How does one submit a bug report? Steve On Mon, 2017-07-10 at 22:24 -0700, Steve wrote: > Maybe I didn't make my point clearly. This is a problem with the 3D > modeling, I don't make any claims one way or another regarding the > behavior of the 2D model. > > I did run the modified code in both 2D and 3D, on two different > machines. The results were identical, machine to machine. They were > very different 2-D to 3-D model. The 2-D run results were much as you > described. > > The 3-D model results never even approach zero. The values of the > scaler electric field after nearly 2300 cycles are: > > field:, 995.9000244140625, -20.707737734274147+0.0i > field:, 998.2000122070312, -20.707742564817224+0.0i > > The magnitude of the scaler electric field of 20.7 after 2300 cycles > is > very little different from its value after cut-off. The following > data > was extracted to show the behavior of the field values around cut-off > which occurs at cycle 40. Different output intervals makes no > fundamental difference in the result. I'm inclined to think that this > is a bug in the meep code. > > field:, 13.800000190734863, 118.46786614619795+0.0i > field:, 16.100000381469727, -67.59604610145057+0.0i > field:, 18.399999618530273, -49.24438737994264+0.0i > field:, 20.700000762939453, 125.47630938094056+0.0i > field:, 23.0, -0.8539819960813517+0.0i > field:, 25.299999237060547, -97.49759773787325+0.0i > field:, 27.600000381469727, 88.55815749919773+0.0i > field:, 29.899999618530273, 70.22101722170089+0.0i > field:, 32.20000076293945, -104.51037341834984+0.0i > field:, 34.5, 21.813834934105188+0.0i > field:, 36.79999923706055, 118.47415684002891+0.0i > field:, 39.099998474121094, -67.59675801838053+0.0i > field:, 41.400001525878906, -20.43251327118803+0.0i > field:, 43.70000076293945, -20.819578010434448+0.0i > field:, 46.0, -20.735123917586336+0.0i > field:, 48.29999923706055, -20.68665239025745+0.0i > field:, 50.599998474121094, -20.729085985876495+0.0i > field:, 52.900001525878906, -20.712054936251683+0.0i > > > > > On Sat, 2017-07-08 at 10:31 -0700, Ardavan Oskooi wrote: > > > > Abruptly turning off the source will introduce high-frequency > > artifacts > > into the simulation as mentioned previously. High frequencies near > > the > > Nyquist frequency of the grid have slow group velocities and are > > poorly > > absorbed by PML. This is why the fields do not go to zero after > > the > > sources have turned off. Unfortunately, there is no workaround. > > > > Here's another way to see this. We make a slight modification to > > the > > previous script to print the value of the scalar electric field at > > the > > source location instead of outputting the field over the entire > > computational cell. You can then plot the intensity of the field as > > a > > function of time on a semilog plot. The field intensity drops by > > several > > orders of magnitude after the source has turned off and reaches a > > floor > > of ~1e-5 for the remainder of the simulation. Doubling the > > thickness > > of > > the PML or the resolution has practically no effect on the results. > > > > modified Scheme/libctl control script: > > > > (set-param! resolution 20) > > > > (set! geometry-lattice (make lattice (size 10 10 no-size))) > > > > (set! pml-layers (list (make pml (thickness 2)))) > > > > (set! symmetries (list (make mirror-sym (direction X)) > > (make mirror-sym (direction Y)))) > > > > (set! sources (list (make source (src (make continuous-src > > (frequency > > 1.0))) (component Ez) (center 0 0 0)))) > > > > (define src-on? true) > > > > (define print-field (lambda () (print "field:, " (meep-round-time) > > ", > > " > > (get-field-point Ez (vector3 0 0 0)) "\n"))) > > > > (run-until 1000 > > (lambda () > > (if (and (> (meep-round-time) 40) src-on?) > > (begin (change-sources! '()) (set! src-on? > > false)))) > > (at-every 2.3 print-field)) > > > > _______________________________________________ > > meep-discuss mailing list > > meep-discuss@ab-initio.mit.edu > > http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss _______________________________________________ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss