On 26/05/07, Steven G. Johnson <[EMAIL PROTECTED]> wrote:

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.


thanks; now it is clear.



> 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.


thanks. It was my silly fault.
But still why doubling a computation cell size gives wrong result?
Calculation for normalization gives:
flux1:, 0.463636363636365, -1.33762565303789e-5, 7.30537093813366
flux1:, 0.465656565656567, -1.04174160758403e-5, 5.69393757727249
flux1:, 0.467676767676769, -8.04762812441776e-6, 4.40217668780029
flux1:, 0.469696969696971, -6.16678702255086e-6, 3.37603357549007
flux1:, 0.471717171717173, -4.6874201948125e-6, 2.56821159544383
flux1:, 0.473737373737375, -3.53421557269768e-6, 1.93793813892932
flux1:, 0.475757575757577 , -2.64323731509612e-6, 1.45055584258929.

There is a control file below:

(define-param sx 104)
(define-param sy 48)
(set! geometry-lattice (make lattice (size sx sy no-size)))

;PARAMETERS
(define-param norm false)

(define-param eps 14) ; dielectric
(define-param L 7)

(define-param pmlthick 2)

(if (not norm)
(set! geometry
   (list
       (make block (center 0 0) (size L sy infinity)  ; making a dielectric
block where holes will be drilled
                 (material (make dielectric (epsilon eps))))
   )
)
)
(set! pml-layers (list (make pml (thickness pmlthick) (direction X))))
(set-param! k-point (vector3 0 (/ 1 sy)) )

(set! resolution 10)

(define-param fcen 0.4) ; pulse center frequency
(define-param df 0.2)    ; pulse width (in frequency)

(set! sources (list
              (make source
                (src (make gaussian-src (frequency fcen) (fwidth df)))
                (component Hz)
                (center (+ pmlthick (* -0.5 sx)) 0)
                (size 0 sy)
)))

(define-param nfreq 100) ; number of frequencies at which to compute flux
(define trans ; transmitted flux
     (add-flux fcen df nfreq
                (make flux-region
                    (center (- (* 0.5 sx) (+ 1 pmlthick)) 0) (size 0 sy))))
(define refl ; reflected flux
     (add-flux fcen df nfreq
                (make flux-region
                   (center (+ 1 (+ (* -0.5 sx) pmlthick)) 0) (size 0 sy))))

(if (not norm) (load-minus-flux "refl-flux" refl))

(run-sources+
  (stop-when-fields-decayed 50 Hz
                          (vector3 (- (* 0.5 sx) (+ 1 pmlthick)) (-
(* 0.5sy) 2))
                          1e-3) (at-beginning output-epsilon) )

(if norm (save-flux "refl-flux" refl))

(display-fluxes trans refl)

Sincerely,
Ruslan
_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to