[Meep-discuss] query on add-flux function

2009-03-06 Thread Ajayram S K S M
 Dear Steven,

 I am working at a single frequency in optical range. i am interested
in getting the reflectivity and transmitivity for a geometry. for this
i am using the add-flux function as explained in the meep-tutorial.

(define refl ;reflected flux
(add-flux 1.53233 df nfreq
 (make flux-region
(center (- -1.136 hc) -0.805 0) (size 0 0.05
(define trans ;transmitted flux
(add-flux 1.53233 df nfreq
 (make flux-region
(center (- -1.136 hc) 0.805 0) (size 0 0.05

this gives reflected spectrum at frequencies specified by the 'nfreq'.
since i am working at single frequency, can i give df=0 and nfreq=1?
this gives output only at the frequency 1.53323. can i accept this
value to be correct?


if i am to change the df= 2 and nfreq=10; then i get the following output:

flux1:, 0.53233, -0.009760152348413, -2.77467380731901e-4
flux1:, 0.7545522, -0.0282921647987324, -6.22401047402754e-4
flux1:, 0.9767744, 0.0307616314391254, -5.80801342515952e-4
flux1:, 1.198997, -0.342825072839894, 0.0185655167756471
flux1:, 1.421219, -1.56261527963199, -0.0529434687230871
flux1:, 1.643441, -0.375459332301051, 0.103835929891208
flux1:, 1.865663, -0.321363960668525, -0.0270822765490963
flux1:, 2.087886, -0.0769738566986278, -0.0154287635671085
flux1:, 2.310108, 4.46446856076942e-4, -0.00169755116977234
flux1:, 2.53233, -0.0257220634760312, 0.00667896692508168

but i am working at single frequency. i expect the the spectrum to
show amplitude only near my operating frequency.
kindly explain.

Thank you for your time.

regards
Ajay

-- 
Ajay Ram S K S M
MSc(Physics)
Sri Sathya Sai University
Prasanthi Nilayam
India.

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


[Meep-discuss] question: timestep in Meep

2009-01-30 Thread Ajayram S K S M
Hello!


I am trying to simulate em fields in the vicinity of nanoparticles.

parameters:
a = 1 micron

How do we find the size of the timestep in seconds?
How do we know how many wavelengths will pass at a particular point in two
timesteps?

Here the last part of the program:
(set! geometry-lattice (make lattice (size .3 .3 no-size)))

(set! sources (list
   (make source
 (src (make continuous-src (frequency 2.1777)))
 (direction X)
 (component Hz)
 (center -.125 0)
 (size 0 .3 0
(set! pml-layers (list (make pml (thickness 0.025)(direction X
(set! resolution 1000)
(run-until 5
   (at-beginning output-epsilon))

(run-until 2
   (at-every .05 output-efield-x)
   (at-every .05 output-efield-y))

regards
Ajay
-- 
Ajay Ram S K S M
MSc(Physics)
Sri Sathya Sai University
Prasanthi Nilayam
India.
___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

[Meep-discuss] question : field computations

2008-12-15 Thread Ajayram S K S M
Hello!

I am trying to calculate field energy in air before the field passes through
a medium and after it passes through. The medium has a refractive index of
2.1609.

I have used two cases: with periodic boundary conditions (using k-point) and
without it.
Also I have put metal nano cylinder and this leads us to a total of four
cases as given below.

nc- nano cylinder
kp -k-point
One -  field -energy after the medium
two - field - energy before the medium

the field energy computations were done at the last time step (after third
time step in this case)

1. *no nc and yes kp*  : One-3.34630186473115e-5two-3.5681340908767e-5
2. *yes nc and no kp*  : One-6.37494514942021e-8two-3.80564486417271e-5
3. *yes nc and yes kp* : One-1.75693509082845e-6two-6.01227187135615e-5
4. *no nc and no kp*: One-3.05763975245008e-5two-2.52388151348767e-5


Question:

How are the results getting affected by k-pojnt condition?
Especially if we compare 'yes nc' case then there is a difference of 3
orders of magnitude!! My question is that is my k-point condition correct in
the program?

---

CTL FILE:

(set! geometry-lattice (make lattice (size .5 .09 no-size)))

(set! geometry (list
(make block (center 0 0) (size .3 .09 0.4)
   (material(make dielectric (epsilon 2.1609))
  ;(make cylinder (center 0 0) (radius .035) (height .110)
  ;(material(make dielectric (epsilon 2.16091)
   ; (polarizations
  ;(make polarizability
;(omega 1e-30) (gamma .1561792)
;(delta-epsilon 41.9731539e+60

(set! k-point (vector3 1 1 0))
(set! sources (list
   (make source
 (src (make continuous-src (frequency 2.1777)))
 (direction X)
 (component Hz)
 (center -.2 0)
 (size 0 .09 0
(set! pml-layers (list (make pml (thickness 0.025)(direction X
(set! resolution 1000)
(run-until 2
   (at-beginning output-epsilon))

(run-until 1
   (at-every .5 output-efield-x)
   (at-every .5 output-efield-y))
(print One (field-energy-in-box (volume (center 0.15 0) (size 0.01 0.01
0))) 
two (field-energy-in-box (volume (center -0.15 0) (size 0.01 0.01 0


Thanks!

regards
-- 
Ajay Ram S K S M
MSc(Physics)
Sri Sathya Sai University
Prasanthi Nilayam
India.
___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

[Meep-discuss] question on effect of pml layer on the phase of the EM wave

2008-12-10 Thread Ajayram S K S M
*Hello!!

**I am trying to simulate the propogation of a plane wave in a glass of
refractive index 1.47.

But, the png image showed distortion of the plane wave with a bulge at the
center.

When I remove the pml layer in Y direction, I am able to get the plane wave
in the glass. But, by removing the pml we increase the errors in our
simulation. any solution to this problem? Why is the phase of the wave
getting affected due to the pml boundary? *
*

CTL CODE:
*
(set! geometry-lattice (make lattice (size .8 .8 no-size)))

(set! geometry (list
(make block (center 0 0) (size .8 .8 .8)
   (material(make dielectric (epsilon 2.1609))

(set! sources (list
   (make source
 (src (make continuous-src (frequency 2.1777)))
 (direction X)
 (component Hz)
 (center -0.3 0)
 (size 0 .8 0
(set! pml-layers (list (make pml (thickness 0.1)))
(set! resolution 500)
(run-until 10
   (at-beginning output-epsilon)

(run-until 10
   (at-every .5 output-efield-x)
   (at-every .5 output-efield-y))
;(at-every .5 output-dpwr))

*
Thanks for your time

regards
Ajay
*
-- 
Ajay Ram S K S M
MSc(Physics)
Sri Sathya Sai University
Prasanthi Nilayam
India.
___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss