Re: [Meep-discuss] Unstability of a long non-dispersive simulation
Hi, I am not sure exactly what is wrong here. However, if I were to venture a guess, I would think it has something to do with the size of your PMLs. I would try something like (1.5*lambda) or larger and see if the results are reproduced. Good luck! On Thu, Apr 12, 2012 at 12:00 PM, Filip Dominec filip.domi...@gmail.comwrote: Dear Meep users, today I am writing because I observed an unexpected behaviour of my simple simulation: A dielectric resonator of spherical shape is defined in center of the volume, through which a broadband gaussian pulse is sent in the Z direction. The X, Y faces of the volume are defined to be periodic, the Z faces are equipped with PML (thickness = lambda/10). The transmitted and reflected waves at the Z faces are recorded and finally processed by custom FFT. Although for first part of the simulation everything works as expected, the electric field starts to oscillate in a exponentially growing _transverse_ mode after a longer run. This limits the spectral resolution of FFT and ove From MEEP mailing list, I learned that FDTD simulation may become unstablerall simulation accuracy. I prepared a specialized page with illustrative images: http://fzu.cz/~dominecf/misc/meep/instab_long_run/ The oscillations seem to depend on the number of simulation steps, so with coarser grid and greater time step the simulation starts to oscillate at a later time. Changing Courant factor from 0.5 to 0.01 resulted in much longer simulation only, but oscillations surprisingly occured at the same time. So it is perhaps a numerical, not electrodynamical problem. From MEEP mailing list, I learned that FDTD simulation may become unstable 1) for non-dispersive real negative epsilon [1], or 2) for any non-dispersive complex epsilon, where (f * Re(eps) 0) [2], or 3) for dispersive epsilon with resonance frequency too high [3]. However, I am using real epsilon=94. I would be very thankful if somebody pointed me out where such oscillations may come from! Filip Dominec [1] http://www.mail-archive.com/meep-discuss@ab-initio.mit.edu/msg02450.html [2] http://www.mail-archive.com/meep-discuss@ab-initio.mit.edu/msg02455.html [3] http://ab-initio.mit.edu/wiki/index.php/Conductivity_in_Meep#Numerical_stability ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss -- Abdullah Al Rashid Graduate Student Theory of Nanophotonics and Photonic Materials Department of Physics University of Toronto Mailing Address: 60 St. George St Toronto, ON M5S 1A7 Canada Telephone: +1-416-978-5207 E-mail: abdullah.alras...@utoronto.ca ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
Re: [Meep-discuss] Unstability of a long non-dispersive simulation
Hello, When you have almost no fields and propagate for a very long time I would not think that it is surprising that numerical errors accumulate. (What you're seeing is the interaction between periodic images of your sphere, amplified by numerical errors.) Why would you want to simulate for long after the fields have decayed? If it is about the spectral resolution, you can pad the time signal with zeroes before making the FFT. Make sure that your time signal is smoothly switched to zero at its beginning and end to avoid artifacts. Another option is to use a CW source and wait for the steady-state solution, giving you the single-frequency response. Good luck, Georg On Thu, Apr 12, 2012 at 6:00 PM, Filip Dominec filip.domi...@gmail.comwrote: Dear Meep users, today I am writing because I observed an unexpected behaviour of my simple simulation: A dielectric resonator of spherical shape is defined in center of the volume, through which a broadband gaussian pulse is sent in the Z direction. The X, Y faces of the volume are defined to be periodic, the Z faces are equipped with PML (thickness = lambda/10). The transmitted and reflected waves at the Z faces are recorded and finally processed by custom FFT. Although for first part of the simulation everything works as expected, the electric field starts to oscillate in a exponentially growing _transverse_ mode after a longer run. This limits the spectral resolution of FFT and overall simulation accuracy. I prepared a specialized page with illustrative images: http://fzu.cz/~dominecf/misc/meep/instab_long_run/ The oscillations seem to depend on the number of simulation steps, so with coarser grid and greater time step the simulation starts to oscillate at a later time. Changing Courant factor from 0.5 to 0.01 resulted in much longer simulation only, but oscillations surprisingly occured at the same time. So it is perhaps a numerical, not electrodynamical problem. From MEEP mailing list, I learned that FDTD simulation may become unstable 1) for non-dispersive real negative epsilon [1], or 2) for any non-dispersive complex epsilon, where (f * Re(eps) 0) [2], or 3) for dispersive epsilon with resonance frequency too high [3]. However, I am using real epsilon=94. I would be very thankful if somebody pointed me out where such oscillations may come from! Filip Dominec [1] http://www.mail-archive.com/meep-discuss@ab-initio.mit.edu/msg02450.html [2] http://www.mail-archive.com/meep-discuss@ab-initio.mit.edu/msg02455.html [3] http://ab-initio.mit.edu/wiki/index.php/Conductivity_in_Meep#Numerical_stability ___ 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
[Meep-discuss] Cylindrical symmetry, symmetry mirror in C++ code
Dear teacher Steven and Meep Users, I am working in cylindrical coordinates. I need to place a mirror at any another ponit different than the origin (by default). Whe I use: const symmetry S = mirror(R, grid_vol); the mirror symmetry is placed at R = 0 by default. How could I do to place the mirror in R=5 for example? #include meep.hpp #include iostream using namespace meep; double PuntaObject(const vec p) { if ((p.z() = 0 p.z() = 10) (p.r() = 0 p.r() = 10)) { return 1.0; //1.0 } return 1.1; } int main(int argc, char **argv) { meep::initialize mpi(argc, argv); double resolution = 10; const double pml_thickness = 1.0; const double z = 10 + pml_thickness; const double r = 10 + pml_thickness; grid_volume grid_vol = volcyl(r, z, resolution); const symmetry S = mirror(R, grid_vol); structure strct(grid_vol, PuntaObject, pml(pml_thickness), S); // structure Thanks -- Roger Leonardo Garay AvendaƱo ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss