On Fri, 25 May 2007, Ruslan A Sepkhanov wrote: > 1. Setting up a k-point in meep is still not completely clear to me. As far > as I see if one needs periodic boundary conditions say in Y direction one > should type (since k vector is k=2*pi /sy(0,1) and k in meep must be set up > in units 2*pi): > > (set-param k-point (vector3 0 (/ 1 sy)) > ) > > where sy -- y-size of a computational cell.Although I have figured out that > for instance > > (set-param k-point (vector3 0 sy)) > ) > > works in the same way
No, the above two commands are completely different. The first says that the phase change from one boundary to the next is 2*pi, and the second says that the phase change from one boundary to the next is 2*pi*sy^2. Of course, if sy is an integer, then these have the same effect, since any integer multiple of 2*pi is equivalent. For the same reason, however, you might as well just set k = 0. > Also here in the meep-discuss archive I saw > suggestion that to put periodic boundary conditions on all the boundaries > one should write: > > (set-param k-point (vector3 0 0) > ). Yes, setting the phase difference to 0 is the same as setting it to 2*pi. > 2.a) I tried to calculate a transmission/reflection spectra for normal > incidence on a dielectric slab (please see the control file below). If I > move reflection flux plane closer to the slab, but still far enough from it > -- about 10 wavelengths I get positive reflection flux: > flux1:, 0.3, 0.00402280824472127, 0.0175279447668702 > flux1:, 0.302020202020202, 0.0039794157233877, 0.0204477622409809 > flux1:, 0.304040404040404, 0.00377341358133434, 0.0264463440220973 > flux1:, 0.306060606060606, 0.00441600176959974, 0.0376819698408472 > flux1:, 0.308080808080808, 0.00578687487558648, 0.0574699129341807 > Moving reflection flux plane close to the left boundary (where the wave > comes from) solves this problem, but what was wrong is unclear. Looking at your computational cell, you have a cell size of 50 in the x direction, and in the center (x=0) you have a block of size 7 (from x = -3.5 to +3.5). You are putting your reflection plane at x=20-25+2 = -3. So, your "reflection" flux is actually measured *inside* the object that is doing the scattering, which is why you are getting nonsense. I expect that you just need to be more careful about your coordinate system. Cordially, Steven G. Johnson _______________________________________________ meep-discuss mailing list [email protected] http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

