[Meep-discuss] (no subject)

2020-12-25 Thread Cícero Julião
Dear friends,

I'm trying to change the structure during the simulation. The code below is
one example. This code gives me a big error message. What is wrong with it?




res = 40  # pixels/um   (originalmente, 20)
eps = 9   # dielectric constant of the hole
r = 0.4   # radius of the cylinder
sy = 2# tamanho da célula na direção y
sx = 2# tamanho da célula na direção x

cell = mp.Vector3(sx,sy,0)

geom = [mp.Cylinder(radius=r,
  center=mp.Vector3(),
  material=mp.Medium(epsilon=eps))]

pml_layers = [mp.PML(1.0)]

src = [mp.Source(mp.GaussianSource(0.2, fwidth=0.15),
 component=mp.Ez,
 center=mp.Vector3(),
 size=mp.Vector3())]


def change_mat(sim):
t = sim.meep_time()
fn = t * 0.2
geom = [mp.Sphere(radius=r, center=mp.Vector3(fn))]
mp.set_materials_from_geometry(
sim.structure,
geom,
mp.Vector3(),
sim.eps_averaging,
sim.subpixel_tol,
sim.subpixel_maxeval,
sim.ensure_periodicity,
False,
sim.default_material,
None,
sim.extra_materials
)


sim = mp.Simulation(
cell_size=cell,
resolution=res
)

sim.run(mp.at_beginning(mp.output_epsilon),
mp.at_time(10, change_mat),
mp.at_end(mp.output_epsilon),
until=60)

-- 

Cícero Julião da Silva Junior

Instituto Federal de Alagoas - IFAL
Campus Murici
http://www.ifal.edu.br/
___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

[Meep-discuss] (no subject)

2020-03-23 Thread SERAFINI VALENTINA

Good morning
I am a beginner in Meep. Currently, I am trying modifying 
the simulation in Eigenmode source tutorial reported in 
meep documentation.

Here I report the code I am using

import meep as mp
import numpy as np
import matplotlib.pyplot as plt
w = 5   # width of waveguide
delta_n=0.01#delta di n della perturbazione
d = 0.8   # defect spacing (ordinary spacing = 1)
c=3*np.power(10,8)
l_unit=1e-6
N = 50# number of slab on either side of 
defect
sy =15 # size of cell in y direction 
(perpendicular to wvg.)

pad = 2   # padding between last hole and PML edge
dpml = 1.0  # PML thickness
n_c=1.3#n_cladding
index=1.5  #n_core
index2=index+delta_n  #defect material
V=0.46  #normalized frequency
k0=V/((w*l_unit)*np.sqrt(np.power(index,2)-np.power(n_c,2)))
f=k0*c/(2*np.pi)
lambda_used=(c/f)/l_unit
n_eff=1.303
kx =n_eff/lambda_used# initial guess for wavevector in 
x-direction of eigenmode

period_needed=lambda_used/(2*n_eff)
r=period_needed-d#dimension of defect
print(r)
fsrc=1/lambda_used
delta_wl=5
delta_f=abs(1/(lambda_used-delta_wl)-1/(lambda_used+delta_wl))
par=delta_f/fsrc
print(par)
time_to_wait=1000
bnum = 1# band number of eigenmode
tolerance=1e-1
nfreq=128
resolution = 10   # pixels/um
sx = 2*(pad+dpml)+N*(d+r)+d # size of cell in x direction
y_center=0
cell=mp.Vector3(sx,sy,0)
geometry = [mp.Block(mp.Vector3(mp.inf,w,mp.inf), 
center=mp.Vector3(), 
material=mp.Medium(index=index)),mp.Block(mp.Vector3(mp.inf,w,mp.inf), 
center=mp.Vector3(0,-w,0), 
material=mp.Medium(index=n_c)),mp.Block(mp.Vector3(mp.inf,w,mp.inf), 
center=mp.Vector3(0,w,0), material=mp.Medium(index=n_c))]

pml_layer=[mp.PML(1.0)]
src = [mp.EigenModeSource(src=mp.GaussianSource(fsrc, 
delta_f),

  center=mp.Vector3(-0.5*sx+dpml,y_center,0),
  size=mp.Vector3(y=3*w),
  direction=mp.AUTOMATIC,
  eig_kpoint=mp.Vector3(kx),
  eig_band=bnum,
  eig_match_freq=True)]
sim = mp.Simulation(cell_size=cell, geometry=geometry, 
boundary_layers=pml_layer, sources=src, 
resolution=resolution)


refl_fr=mp.FluxRegion(center=mp.Vector3(-0.5*sx+dpml+1,y_center,0),size=mp.Vector3(0,2*w,0))
refl=sim.add_flux(fsrc,delta_f,nfreq,refl_fr)
tran_fr=mp.FluxRegion(center=mp.Vector3(0.5*sx-dpml-1,y_center,0),size=mp.Vector3(0,2*w,0))
tran=sim.add_flux(fsrc,delta_f,nfreq,tran_fr)
%matplotlib inline
plt.figure(dpi=100)
sim.plot2D()
plt.show()
pt=mp.Vector3(0.5*sx+dpml-3,y_center)
sim.run(until_after_sources=mp.stop_when_fields_decayed(time_to_wait,mp.Ez,pt,tolerance))
flux_frequencies=mp.get_flux_freqs(tran)
reflection_for_normalization=sim.get_flux_data(refl)
to_be_plotted=mp.get_fluxes(refl)
transmission_plot_no_discontinuity=mp.get_fluxes(tran)
wl = []
Ts_no_d = []
Rs_no_d = []
for i in range(nfreq):
wl = np.append(wl, flux_frequencies[i])
Rs_no_d=np.append(Rs_no_d,to_be_plotted[i])
Ts_no_d = 
np.append(Ts_no_d,transmission_plot_no_discontinuity[i])


if mp.am_master():
plt.figure()
plt.plot(wl,Rs_no_d, label='riflectivity no 
discontinuity')
plt.plot(wl,Ts_no_d,label='transmittance no 
discontinuity')



plt.xlabel("wavelength (μm)")
plt.legend(loc="upper right")
plt.show()


My problem is related to this last step. In fact, The 
plotted result is different from a Gaussian pulse. Is it 
normal? Can you explain me where I am wrong?


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

Re: [Meep-discuss] (no subject)

2019-05-28 Thread Galaa Badrakh
Hi John

Please have a look at the attachment. I have two different duplications and
the defects are in the duplications. If I re-run I get the same defects at
the same positions. Is this the problem you are facing?  I have plotted
with pyplot and also with Mathematica, no difference at all. I have also
tried with "mp.at_beginning(mp.output_epsilon)" but changes.

G

On Wed, 29 May 2019 at 00:45, John Weiner  wrote:

> Hi Galaa,
>
> I’ve seen similar things, large isolated, unphysical excursions in
> otherwise perfectly reasonable results when plotting data from a meep
> output.  Are you using Matplotlib/pyplot for your plotting routines?  And
> do the excursions appear at exactly the same points and with the same
> amplitudes reproducibly or do they vary unpredictably?  I would be quite
> interested to know if anyone has a good explanation and a good fix.
>
> Best regards,
>
> John
>
> > On May 28, 2019, at 17:33, Galaa Badrakh  wrote:
> >
> > Hi All.
> >
> > I am new to MEEP and trying to use the "geometric_objects_duplicates"
> feature. After simulation complete, I extracted the dielectric spatial
> profile with "data=sim.get_array(center=mp.Vector3(),
> size=mp.Vector3(0.0,0.0,height), component=mp.Dielectric)" to double check
> my geometry but I see unexpected lines at some interfacing points, have a
> look at attached picture. Is this the artifact of subpixel smoothing? If
> so, how to avoid this artifact?
> >
> > Thanks in advance
> >
> > G
> > ___
> > 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

Re: [Meep-discuss] (no subject)

2019-05-28 Thread John Weiner
Hi Galaa,

I’ve seen similar things, large isolated, unphysical excursions in otherwise 
perfectly reasonable results when plotting data from a meep output.  Are you 
using Matplotlib/pyplot for your plotting routines?  And do the excursions 
appear at exactly the same points and with the same amplitudes reproducibly or 
do they vary unpredictably?  I would be quite interested to know if anyone has 
a good explanation and a good fix.

Best regards,

John

> On May 28, 2019, at 17:33, Galaa Badrakh  wrote:
> 
> Hi All. 
> 
> I am new to MEEP and trying to use the "geometric_objects_duplicates" 
> feature. After simulation complete, I extracted the dielectric spatial 
> profile with "data=sim.get_array(center=mp.Vector3(), 
> size=mp.Vector3(0.0,0.0,height), component=mp.Dielectric)" to double check my 
> geometry but I see unexpected lines at some interfacing points, have a look 
> at attached picture. Is this the artifact of subpixel smoothing? If so, how 
> to avoid this artifact? 
> 
> Thanks in advance
> 
> G
> ___
> 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] (no subject)

2019-05-28 Thread Galaa Badrakh
Hi All.

I am new to MEEP and trying to use the "geometric_objects_duplicates"
feature. After simulation complete, I extracted the dielectric spatial
profile with "data=sim.get_array(center=mp.Vector3(),
size=mp.Vector3(0.0,0.0,height), component=mp.Dielectric)" to double check
my geometry but I see unexpected lines at some interfacing points, have a
look at attached picture. Is this the artifact of subpixel smoothing? If
so, how to avoid this artifact?

Thanks in advance

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

[Meep-discuss] (no subject)

2018-08-29 Thread Gustavo
   Hi https://goo.gl/DSTCVJ 

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

[Meep-discuss] (no subject)

2018-04-23 Thread 盛建诚
Dear meep users,
I just don't know why there is not Si in the material library,it is a very
common material.And I found the refractive index in Medium is
frequency-independent ,does this mean that refractive index does not change
with wavelength?It does not make sense,and how can i define Si correctly in
meep.
Wish to get your help,thanks
Jiancheng
___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

[Meep-discuss] (no subject)

2018-03-16 Thread ??????
Dear Professor,
Good day.
I am a fresher to meep and don't it's operating mechanism very well,so some 
basic problems is always persecuting me.I just want to know how to calculate 
the transmission efficiency of a straight waveguide the MEEP Documentation 
mentions  at python tutorial .
Thanks
sjc___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

[Meep-discuss] (no subject)

2018-01-18 Thread Gustavo
Hey 



https://goo.gl/c8AcQg




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

[Meep-discuss] (no subject)

2017-07-08 Thread Prashant Srivastava

(set! k-point 1 1 0) will set bloch vectors as (1 0 0) (0 1 0) or (1 1 0)?

What is the difference between (set! k-point 0 0 0) and (set! k-point 1 
1 0) ?



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

[Meep-discuss] (no subject)

2014-08-12 Thread ISAAC MATERE
Hi meep users
Am working on ring resonators comprising of two straight parallel waveguides 
and a single ring, the input is in one of the straight waveguides , the 
coupling is taking place well but what is missing is how the drop port comes in.
any assistance is highly appreciated.
thanks in advance

 
Matere i
University of Eldoret
Msc student in Fibre Optics
Po Box 1125 - 30100
Eldoret 
Kenya
Tel no: +254 720 886 040___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

[Meep-discuss] (no subject)

2014-06-12 Thread #SHAMPY MANSHA#
Dear Steven and other Meep users,

I am doing a simulation in which I require to use a complex dielectric constant 
of the form(say for example):

epsilon = 1 + 0.01i

For my simulation the frequency isn't fixed, instead I have to use a gaussian 
source with some finite width.
And in the whole simulation I wish to use the same epsilon(epsilon = 1+0.01i).

Is there a way to do this kind of simulation?

Thanks,
Shampy Mansha
NTU,Singapore
___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Re: [Meep-discuss] (no subject)

2014-06-12 Thread Filip Dominec
Dear Shampy,
this topic has been discussed many times. Generally you can not force
a complex value of permittivity in FDTD. You can however define a
high-frequency oscillator that introduces losses.

More on this topic is at
http://ab-initio.mit.edu/wiki/index.php/Dielectric_materials_in_Meep
or search the mailing list.

I tried to make a list of some realistic material models at
http://fzu.cz/~dominecf/misc/eps/; the data used can be fed to MEEP.

Finally I would like to ask you to stick to the netiquette and write
your name as Shampy Mansha, not #SHAMPY MANSHA#. The capitals look
like shouting, and the hashmarks look like something as banging your
fist on the table before and after saying it...

Regards,
Filip Dominec


2014-06-12 18:01 GMT+02:00, #SHAMPY MANSHA# shampy...@e.ntu.edu.sg:
 Dear Steven and other Meep users,

 I am doing a simulation in which I require to use a complex dielectric
 constant of the form(say for example):

 epsilon = 1 + 0.01i

 For my simulation the frequency isn't fixed, instead I have to use a
 gaussian source with some finite width.
 And in the whole simulation I wish to use the same epsilon(epsilon =
 1+0.01i).

 Is there a way to do this kind of simulation?

 Thanks,
 Shampy Mansha
 NTU,Singapore


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


Re: [Meep-discuss] (no subject)

2014-04-24 Thread Steven G. Johnson

On Apr 18, 2014, at 10:12 AM, ISAAC MATERE matere.is...@yahoo.com wrote:

 hallo meep users
 can coupling  two
 straight waveguides and a microdisc be done in meep, 

Yes.

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

[Meep-discuss] (no subject)

2014-04-18 Thread ISAAC MATERE
hallo meep users

can coupling  two
straight waveguides and a microdisc be done in meep, if so kindly assist

matere i
University of Eldoret
Msc student in Fibre Optics
Po Box 1125 - 30100
Eldoret 
Kenya
Tel no: +254 720 886 040___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

[Meep-discuss] (no subject)

2014-01-06 Thread FARHAD KAZEMI
Dear all,

I would like to model the radiation transfer between two plates 
separated by nano-gap in which we have to bring near-field radiation 
effects into account using fluctuational electrodynamics. 
Does MEEP is capable of solve such problems? or we need to 
manipulate the source C++ codes to introduce near-field equations?
In fact, I am trying to reproduce the results of the following paper.

Mathieu Francoeur, M. Pinar Menguc, Role of fluctuational electrodynamics in 
near-field radiative heat transfer, Journal of Quantitative Spectroscopy  
Radiative Transfer 109 (2008) 280–293

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

Re: [Meep-discuss] (no subject)

2014-01-06 Thread Filip Dominec
Dear Farhad,
I am not an expert nor I have thoroughly read the referred article,
but I believe the non-radiative fields should be exactly modelled by
MEEP as long as they are a solution of the (source-free) Maxwell
equations. You may, for example, define a metallic capacitor and a
metallic inductor, connect them and you should obtain the realistic
oscillation frequency of this LC circuit.

You might, however, find out it would be necessary to newly implement
thermal emission and absorption. Maybe even some quantum phenomena
would involve - but, for instance, the Casimir forces have been
implemented in MEEP successfully so even this can be done.

The article touches a quite interesting topic, by the way.

Best wishes,
Filip Dominec

2014/1/6, FARHAD KAZEMI farhad...@yahoo.com:
 Dear all,

 I would like to model the radiation transfer between two plates
 separated by nano-gap in which we have to bring near-field radiation
 effects into account using fluctuational electrodynamics.
 Does MEEP is capable of solve such problems? or we need to
 manipulate the source C++ codes to introduce near-field equations?
 In fact, I am trying to reproduce the results of the following paper.

 Mathieu Francoeur, M. Pinar Menguc, Role of fluctuational electrodynamics in
 near-field radiative heat transfer, Journal of Quantitative Spectroscopy 
 Radiative Transfer 109 (2008) 280–293

 Thanksregards Farha

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


Re: [Meep-discuss] (no subject)

2014-01-06 Thread Filip Dominec
Dear Farhad,
from what I recall from tinkering the sources, you will probably want
to edit the polarizability.cpp. First of all, there already _is_ a
model that includes some random fluctuations; it might suit your
needs. If not, modifying the code that implements constitutive
relations is the best access point to add new physics, anyway.

Beware the MEEP code is optimized for speed, i. e. it is a bit hard to
read and many lines are found when one searches for 'yucky'...

I believe all other physics can be incorporated into the
aforementioned custom routine for polarisation update. Maybe the MEEP
authors can give more detailed info...
Filip


2014/1/6, FARHAD KAZEMI farhad...@yahoo.com:
 Dear Fillip,

 thank you so much for your answer. Actually, briefly , fluctuational
 electrodynamics indicates that, the electromagnetic wave generated by a
 surface with finite T0 of temperature is because of the fluctuation of
 charges or dipoles inside the material. It studied this phenomenon
 statistically. this kind of fluctuations caus two types of thermal radiation
 namely far-field and near-field radiation. far-field radiation is well-known
 case which can be predicted easily by some simple radiative heat transfer
 equations. However, for the case of near-field we need to apply such concept
 ( fluctuational electrodynamics) in our calculations in order to reveal the
 near-field radiative heat transfer enhancement occurred between two plates
 separated by a nano-distance gap. This phenomenon can be explained due to
 the existence of surface polaritons on the interface between surfaces of the
 plates. There is a paper describing the application of FDTD for such problem
 and
  I am trying to recalculate the same thing using MEEP and of course
 manipulate some parameters later.
 Specifically, can we manipulate the existence code of the MEEP to solve some
 other equations (in this case  fluctuational electrodynamics) parallely with
 Maxwell ewuations?
 Additionally, do you have any idea about how can I include the effects of
 temperature on the emission of the EM wave from a surface with a finite
 temperature?

 Thank you again. sorry if my message is long.

 Farhad



 On Monday, January 6, 2014 5:50 PM, Filip Dominec filip.domi...@gmail.com
 wrote:

 Dear Farhad,
 I am not an expert nor I have thoroughly read the referred
  article,
 but I believe the non-radiative fields should be exactly modelled by
 MEEP as long as they are a solution of the (source-free) Maxwell
 equations. You may, for example, define a metallic
  capacitor and a
 metallic inductor, connect them and you should obtain the realistic
 oscillation frequency of this LC circuit.

 You might, however, find out it would be necessary to newly implement
 thermal emission and absorption. Maybe even some quantum phenomena
 would involve - but, for instance, the Casimir forces have been
 implemented in MEEP successfully so even this can be done.

 The article touches a quite interesting topic, by the way.

 Best wishes,
 Filip Dominec


 2014/1/6, FARHAD KAZEMI farhad...@yahoo.com:

  Dear all,

 I would
  like to model the radiation transfer between two plates
 separated by nano-gap in which we have to bring near-field radiation
 effects into account using fluctuational electrodynamics.
 Does MEEP is capable of solve such problems? or we need to
 manipulate the source C++ codes to introduce near-field equations?
 In fact, I am trying to reproduce the results of the following paper.

 Mathieu Francoeur, M. Pinar Menguc, Role of fluctuational electrodynamics
 in
 near-field radiative heat transfer, Journal of Quantitative Spectroscopy 
 Radiative Transfer 109 (2008) 280–293

 Thanksregards Farha

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


[Meep-discuss] (no subject)

2013-08-06 Thread Onder Karakilinc
Hi meep user

Can I define two different polarized sources in the same structure?

Is it possible to launch two different polarized (TE and TM) sources in 2D
structure?

is it possible  to have both polarizations present at the same time in Meep?

I want to simulate 2D structure with these sources in Meep.

Best…

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

[Meep-discuss] (no subject)

2013-05-08 Thread pankaj kumar sahoo
Dear meep users and Prof. Steven Johnson

   In the section Using experimental Kerr coefficients of Units and
nonlinearity in Meep   it is mentioned to use μm as unit of distance and W
as units of power. Does it mean that we have to include a=1 μm (or, a=1e-6)
in the .ctl file. If so then what should we take the unit of power; watt or
microwatt.
Please help me in this regards.

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

[Meep-discuss] (no subject)

2013-05-07 Thread LErmeng
I'm a student, and my major is Geophysics. I have seen the examples , they are 
all about small things. Can I use the Meep to simulate the electromagnetic 
field of the earth ?



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

[Meep-discuss] (no subject)

2013-04-08 Thread a g
Hello, 

How can I define a short laser pulse with a very small solid angle (obviously) 
in MEEP? When I am using a gaussian source I get the source, that is shining in 
all directions and not in one direction. 



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


Re: [Meep-discuss] (no subject)

2013-04-08 Thread Filip Dominec
Hi,
this is purely a mathematical question related to diffraction.
Generally, if your source is ten times the wavelength, the output
radiation divergence may be estimated to be one tenth of radian. So
you have to make the source plane as big as possible.
Another approach giving a precise plane wave, is to use the Bloch
periodic boundaries.
Regards,
F.

2013/4/8, a g antigrip...@yandex.com:
 Hello,

 How can I define a short laser pulse with a very small solid angle
 (obviously) in MEEP? When I am using a gaussian source I get the source,
 that is shining in all directions and not in one direction.



 ___
 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] (no subject)

2012-08-13 Thread pankaj kumar sahoo
Dear meep users and Prof. Steven Johnson
   i am new to meep. i am trying to simulate the transmission spectrum
of a finite 3D pc slab containing holes in square arrangement in which
 third order nonlinearity is created by incidenting picosecond
ultrashort pulses from the top of the slab and normal to the surface
(defect region)
of the slab.i am referring to the paper Vol. 19, No. 3 / OPTICS
EXPRESS. But i am unable to see any change in the transmittance
whether i set the amplitude
zero or any nonzero value. My aim is to observe a shift in the
mode(peak transmittance) towards low frequency when pump light is
on.But i am getting
the peak at the same frequency although transmittance is changed. Also
i want to know how how to normlize the transmission flux when
pumplight is on.
Please help me in this regards.
My ctl file is as given below :

(define-param amp 500) ; amplitude of pump source
(define-param k 4.19e-2) ; Kerr susceptibility

(define-param ind1 1.59) ; index of layer
(define-param ind3 1) ; index of holes in layer (default=air)

(define-param r 0.25) ; radius of hole (default no hole)
(define-param Nx 33) ; number of holes in x-direction
(define-param Ny 21) ; number of holes in y-direction
(define-param d 1) ; distance between center of holes
(define-param dpml 1) ; PML thickness
(define-param pad 1) ; padding between last hole and PML edge
(define-param t 1.5)
(define v1 (vector3 d 0 0 )) ; Define basis vectors
(define v2 (vector3 0 d 0 ))
; structure
(define sx (+ (* d (- Nx 1)) (* 2 (+ pad dpml r
(define sy (+ (* d (- Ny 1)) (* 2 (+ pad dpml r
(define sz 10)

(set! geometry-lattice (make lattice (size sx sy sz)))
(set! geometry
  (append
  (list
 (make block (center 0 0 0) (size sx sy t) (material (make
dielectric (index ind1) (chi3 k)
 (geometric-objects-duplicates v2 -10 10
(geometric-object-duplicates v1 -16 16
(make cylinder (center 0 0 0)
   (radius r)
   (height t)
   (axis (vector3 0 0 1))
   (material (make dielectric (index ind3))) )))
(geometric-object-duplicates v2 -3 3 (make cylinder (center  0 0 0)
(radius r) (height t) (material (make dielectric (index ind1) (chi3
k)
(geometric-object-duplicates v2 -3 3 (make cylinder (center -1 0 0)
(radius r) (height t) (material (make dielectric (index ind1) (chi3
k)
(geometric-object-duplicates v2 -3 3 (make cylinder (center  1 0 0)
(radius r) (height t) (material (make dielectric (index ind1) (chi3
k)
(geometric-object-duplicates v2 -3 3 (make cylinder (center -2 0 0)
(radius r) (height t) (material (make dielectric (index ind1) (chi3
k)
(geometric-object-duplicates v2 -3 3 (make cylinder (center  2 0 0)
(radius r) (height t) (material (make dielectric (index ind1) (chi3
k)

(geometric-object-duplicates v2 -3 3 (make cylinder (center -1.2 0 0)
(radius 0.2) (height t) (material (make dielectric (index ind3))) ))
(geometric-object-duplicates v2 -3 3 (make cylinder (center  1.2 0 0)
(radius 0.2) (height t) (material (make dielectric (index ind3))) ))
(geometric-object-duplicates v2 -3 3 (make cylinder (center -2.1 0 0)
(radius 0.2) (height t) (material (make dielectric (index ind3))) ))
(geometric-object-duplicates v2 -3 3 (make cylinder (center  2.1 0 0)
(radius 0.2) (height t) (material (make dielectric (index ind3))) ))
))

(set! pml-layers (list (make pml (thickness dpml
(set! resolution 8)

(define-param fcen 0.4 ) ; pulse center frequency
(define-param df 0.2)  ; pulse width (in frequency)
(define-param nfreq 100) ; number frequencies at which to compute flux

(set! sources
 (append
  (list
 (make source
   (src (make gaussian-src (frequency 0.4) (width
1e-12)))
(component Ex) (center 0 0 (- (* 0.5 sz)
dpml)) (size 1 5 0) (amplitude amp))
 (make source
   (src (make gaussian-src (frequency fcen)
(fwidth df) (start-time 100)  ))
(component Ey) (center (+ (* -0.5 sx)
dpml) 0 0) (size 0 5 t) (amplitude 1))
  )
)
)
(define trans
(add-flux fcen df nfreq
  (make flux-region
(center (- (* 0.5 sx) dpml 0.5) 0 0) (size 0 10 (* 2 t)

(run-until 500
  (at-beginning output-epsilon))

(display-fluxes trans) ; print out the flux spectrum
___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

[Meep-discuss] (no subject)

2012-07-19 Thread elec...@yahoo.com
http://superdrive.com.br/wp-admin/likeit.php?attack213.jpeg___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

[Meep-discuss] (no subject)

2012-04-27 Thread Hassan Aghababaeian

http://dwelle.org/feeds/templates/headlinebox/tamro.html

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


[Meep-discuss] (no subject)

2012-04-04 Thread Gustavo Fernandes

http://winkelmanndesigns.com/ski/local/combined/mylove.php?Dr176.bmp
  ___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

[Meep-discuss] (no subject)

2012-04-03 Thread Lion Lion
Hi, 
I'm new to meep I have a question about simulation .My question is that how can 
I simulate Lorentz medium and what algorithm it uses for this simulation (ADE 
or Z-transform)?
thanks
___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


[Meep-discuss] (no subject)

2011-08-30 Thread gayathri sridharan
http://insuranceestimatesphiladelphia.com/wp-content/uploads/site.php?html119

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


[Meep-discuss] (no subject)

2011-08-04 Thread kassa baghdouche lazhar
Dear MEEP’s,
I am a new user of MEEP and MPB software’s, how to install these software’s.
For operating system, I used Linux ans Windows. ___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

[Meep-discuss] (no subject)

2011-04-21 Thread Umenyi Amarachukwu
http://ro0ts.ifrance.com/inside.html

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


[Meep-discuss] (no subject)

2011-02-03 Thread hodjat hajian
Hi,
This is Hodjat Hajian, a PhD candidate of Solid State Physics, The University 
of Tabriz, Tabriz, Iran. I have one question about the applications of the

 meep software. Please answer to my question. The question is as below:

1) Can we do the below calculations for the slab photonic crystals by the 
meep software?

- the band structure

-resonant modes

-wave-guide mode 

- non-linearity effects

Thanks a lot.
All the best,
H. Hajian
E-mail address: hh.solidst...@yahoo.com 



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

[Meep-discuss] (no subject)

2010-09-12 Thread mahdiyeh tajabady
Dear Meep users,



I am trying to simulate transmission or reflection flux of solar 
spectrum AM1.5 from a multilayer mirror. does anyone know how can I 
simulate solar spectrum?



Best

Mahdieh




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

Re: [Meep-discuss] (no subject)

2010-09-12 Thread Judson Ryckman
Can't you just make a normal transmission and reflection spectrum of your
structure, and then multiply by the shape of the desired input spectrum?

Good luck!


On Sun, Sep 12, 2010 at 9:28 AM, mahdiyeh tajabady mtajab...@yahoo.comwrote:

 Dear Meep users,

 I am trying to simulate transmission or reflection flux of solar spectrum
 AM1.5 from a multilayer mirror. does anyone know how can I simulate solar
 spectrum?

 Best
 Mahdieh


 ___
 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] (no subject)

2010-05-26 Thread X. Y. AO
Hello Prof. Johnson and MEEP users,

I tried to calculate the 
transmission/refection of a 2D photonic crystal slab by following the 
tutorial. However, the obtained spectra are not correct: T+R1 
(oscillation) as shown in the attached figure. My CTL file is enclosed 
below. In brief, the structure is consisting of 4-layer cylinders in 
air, with periodic boundary condition along the lateral direction and 
PML along the other direction. Could you please tell me what's wrong? I 
also wonder if there is reflection between the source plane and the 
structure. Thanks a lot.

Regards,
XY

==
(define-param
 sx 1) ; size of cell in X direction
(define-param sy 30) ; size of 
cell in Y direction

(define pi (* 4 (atan 1))) ; 3.14159...

(set!
 geometry-lattice (make lattice (size sx sy
 no-size)))

(define-param freespace? false) ; if true, have no 
structure

(set! geometry
  (if freespace?
  
(list
   (make block (center 0) (size infinity infinity 
infinity) (material air)))
  (list
   (make 
cylinder (center 0 -1.5) (radius r) (height infinity) (material Si))
  
 (make cylinder (center 0 -0.5) (radius r) (height infinity) (material 
Si))
   (make cylinder (center 0 0.5)  (radius r) (height 
infinity) (material Si))
   (make cylinder (center 0 1.5)  
(radius r) (height infinity)
 (material Si))
)))

(define-param kx 0.2)
(define-param 
fcen 0.63373) ; pulse center
 frequency
(define-param df 0.24)    ; pulse width (in 
frequency)

(define (my-amp-func p)
   (exp (* 0+2i pi kx 
(vector3-x p

(set! sources (list
   (make 
source
 (src (make gaussian-src (frequency fcen) 
(fwidth df)))
 (component Ez) (amp-func my-amp-func)

 (center 0 -10) (size sx 0


(set! pml-layers (list (make 
pml (thickness 4) (direction Y

(set! k-point (vector3 kx 0 
0))

(set-param! resolution
 50)

(define-param nfreq 1500) ; number of frequencies at which 
to compute flux
(define trans ; transmitted flux
  (add-flux 
fcen df nfreq
    (make flux-region (center 0 5) 
(size sx 0
(define refl ; reflected flux
  (add-flux fcen 
df nfreq
 (make flux-region    (center 0 -5) (size sx
 0


(if (not freespace?) (load-minus-flux refl-flux 
refl))
(run-sources+ 5000 (at-beginning output-epsilon))
(if 
freespace? (save-flux refl-flux refl))

(display-fluxes trans 
refl)


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

[Meep-discuss] (no subject)

2009-09-07 Thread sohrab safavi
hi i am simulating photonic crystal (PhC) slab lenses. the structure consists 
of a triangular lattice of cylindrical holes with radius r=0.4a in dielectric 
with permittivity e=12.96. in this PhC slab at frequency f=0.3, PhC exhibits 
negative effective index. These application of this type of PhC slabs as 
negative index lenses is investigated in lots of references.one diagram (that i 
intend to obtain) is the transfer function of the PhC slab lens vesus Kx 
(transverse component of wave vector (transverse with respect to lateral 
interface of slab )). i don't know how should i calculate such a diagram).
i have attached a sample diagram from paper (influence of surface termination 
to the point imaging by a photonic crystal slab with negative refraction, 
applied physics letters, volume 85, number 19, (2004))
figure caption : transfer functions of photonic crystal slab (as an imaging 
system) for different surface terminations (dx represents surface termination)
thanks and regardsSohrab



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

Re: [Meep-discuss] (no subject)

2009-07-14 Thread Steven G. Johnson

On Jul 8, 2009, at 10:45 PM, 刘荣鹃 wrote:

It donesn't work and shows 'ERROR: Unbound variable: mu-diag'

Is it the problem from the meep version 0.20.3 I used?


Yes, you need Meep 1.0 or later for this feature.


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

[Meep-discuss] (no subject)

2009-06-16 Thread SadovnikovAV

Hi, everybody. Hi, Shawkat.
Check if libiconv, libtool, gmp-devel packages are in your system.
It  was  the  similar  problem,  when  I recently try to
compileinstall libClt package.

With Respect,
Alexandr.

__
__
Steven G. Johnson:
 On Jun 11, 2009, at 12:55 PM, Nizamov Shawkat wrote:
 liu:
 Hi, everybody,

 The opetating system is Redhat Linux as4.0, on a cluster computers.
 while, guile 1.6.4 has been install in this system(after typing
 guile -version, I see it), libctl can not find guile files(perhaps
 no programming headers ).
 So I should install guile myself.
 But the guile-devel or guile-dev files are always rpm files. I am
 just common user under Redhat Linux as4.0, and do not have ROOT
 privilege to install rpm files(If I click the rpm, a bar appears
 demanding me the ROOT privilege to install it).

 You can extract the include headers from rpm file into some directory
 in your home. It doesn't require root privileges.
 Then, you can specify this directory during the build process (e.g. in
 configure script, as a predefined environment variable for compiler etc).
 This way you will use system guile libraries, but their headers will
 be under your home directory.


 It would be much better to ask the system administrator for your cluster
 to install the official guile-devel package for Redhat.

 To follow Nizamov's suggestion, you really have to know what you're
 doing.  Not only is it a bit tricky because Guile expects certain files
 to be in certain locations that were set when Guile was compiled, but
 also you have to be careful not to install a version of Guile
 incompatible with the version already installed on your system.

 Steven



Don't get me wrong - we were talking about linking to system Guile
libraries, not about installing another one under home directory.
Topic-starter does not have a root privileges on the system, therefore
he can not install the devel package (with headers files) to the place
where it should be. Of course, it is much better if his system
administrator would install this package. But there is a way to overcome
this without either 1) using root privileges or 2) compiling your own
library - install headers for system library under your home, point
compiler to them and link with the system library.


With respect,
Shawkat

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


[Meep-discuss] (no subject)

2009-02-02 Thread Sivan, Yonatan
Hi Meep users,

I am relatively new to meep. Could anyone show me how to employ the
perfect-electric-conductor/ perfect-magnetic-conductor/metal boundary
condition in meep? I could not find an example in the meep-examples and
everything I tried seems to have the wrong syntax.

Thanks, Yonatan. 


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


Re: [Meep-discuss] (no subject)

2009-02-02 Thread matt



Hi,

Have a look at this thread:
http://www.mail-archive.com/meep-discuss@ab-initio.mit.edu/msg00412.html

Best,
Matt



On Mon, 2 Feb 2009, Sivan, Yonatan wrote:

 Hi Meep users,

 I am relatively new to meep. Could anyone show me how to employ the
 perfect-electric-conductor/ perfect-magnetic-conductor/metal boundary
 condition in meep? I could not find an example in the meep-examples and
 everything I tried seems to have the wrong syntax.

 Thanks, Yonatan.


 ___
 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] (no subject)

2008-11-13 Thread SadovnikovAV
Hello!
I have a question about MPI on  intel-quad and intel-core2duo processors:
can we achieve more productivity  by use mpi-support (e.g. lam-mpi pack) with 
mpb program?

Thank you.
Sasha



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


[Meep-discuss] (no subject)

2008-11-01 Thread rand mouradi
Hello,
I'm having trouble whenever I run my program I'm getting this error ERROR: 
Unbound variable: D-conductivity
when I deleted everything related to D-conductivity in my program it was 
running fine.  Can you help me how to represent this term in Meep (I used the 
formula provided in meep references to calculate this term).
Here is the program and I appreciate your help:

(reset-meep)
;The dielectric parameters
(define-param seps 41.4)            ;skin permittivity,epsilon,at 900 MHz
(define-param feps 5.5)            ;fat permittivity,epsilon,at 900 MHz
(define-param meps 56.9)            ;muscle permittivity,epsilon,at 900 MHz
(define-param sseg 7.916796)        ;skin D-conductivity, segma, at 900 MHz  
(define-param fseg 3.493)          ;fat D-conductivity, segma, at 900 MHz
(define-param mseg 6.62092)        ;muscle D-conductivity, segma, at 900 MHz


;the cell dimentions
(define-param sw .002)  ; Skin thickness
(define-param fw .03)    ; fat thickness 
(define-param mw .03)    ; muscle thickness
(define-param dpml .1)  ; PML layer thickness
(define-param sx .2)    ; size of cell in x direction
(define-param sy .2)    ; size of cell in y direction

(set! geometry-lattice (make lattice (size sx sy no-size)))


(set! geometry
(append
  (list
      (make block(center 0 0.001)(size infinity sw infinity)
        (material(make dielectric (epsilon seps) (D-conductivity sseg 
      (make block (center 0 0.017) (size infinity fw infinity) 
        (material (make dielectric (epsilon feps) (D-conductivity fseg      
  
      (make block (center 0 0.047) (size infinity mw infinity) 
        (material (make dielectric (epsilon meps) (D-conductivity mseg)))

(set! sources (list
              (make source(src (make continuous-src
                        (wavelength .255)))
                (component Ez)
                (center 0 0.001) (size 0 0.002

(set! pml-layers (list (make pml (thickness dpml

(set! resolution 10)

(run-until 200
          (at-beginning output-epsilon)
          (at-end output-efield-z))
___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Re: [Meep-discuss] (no subject)

2008-01-13 Thread Manoj Rajagopalan
Try adding the -pthread and -lpthread options to your compilation 
command line

-- Manoj


Mani Chandra wrote:
 Hi!
 After resolving the eps() issue the pthread thing cropped up 
 again!...Initially I thought it was because I commented out some lines 
 but this time it's appearing even when I try to compile the full program...
 
 #include meep.hpp
 using namespace meep;
 double eps(const vec p);
 int main(int argc,char **argv)
 {
 initialize mpi(argc,argv);
 double resolution=20;
 volume v = vol2d(5,10,resolution);
 structure s(v,eps,pml(1.0));
 fields f(s);
 
 f.output_hdf5(Dielectric,v.surroundings());
 
 double freq = 0.3,fwidth=0.1;
 gaussian_src_time src(freq,fwidth);
 f.add_point_source(Ey,src,vec(1.1,2.3));
 while (f.time()  f.last_source_time())
 {
 f.step();
 }
 
 f.output_hdf5(Hz,v.surroundings());

 return 0;
 }
 
 double eps(const vec p)
 {
 if (p.x()  2  p.y()  3)
 return 12.0;
 return 1.0;
 }
 
 [EMAIL PROTECTED] /usr/home/mc/MEEP files]# g++ `pkg-config --cflags meep` 
 test1.cpp -o test1 `pkg-config --libs meep`
 /usr/local/lib/libhdf5.so: undefined reference to `pthread_equal'
 /usr/local/lib/libhdf5.so: undefined reference to `pthread_setcancelstate'
 
 Thanks for all the help:)
 Mani chandra
 Physics sophomore
 IIT Kanpur
 
 
 
 Save all your chat conversations. Find them online. 
 http://in.rd.yahoo.com/tagline_webmessenger_3/*http://in.messenger.yahoo.com/webmessengerpromo.php
  
 
 
 
 
 
 ___
 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


Re: [Meep-discuss] (no subject)

2008-01-13 Thread Mani Chandra
Hey Manoj!Thanks for that tip.It now works!..I thought I'd have to start installing again on a clean slate but I guess I can start working now.Though I still like to install everything into a directory and use it from there cause I still dont have harminv etc..Could you tell me why adding -pthread and -lpthread worked??ThanksMani chandra--- On Sun, 13/1/08, Manoj Rajagopalan [EMAIL PROTECTED] wrote:From: Manoj Rajagopalan [EMAIL PROTECTED]Subject: Re: [Meep-discuss] (no subject)To: meep-discuss@ab-initio.mit.eduDate: Sunday, 13 January, 2008, 8:21 PMTry adding the -pthread and -lpthread options to your compilation command line-- ManojMani Chandra wrote:
 Hi! After resolving the eps() issue the pthread thing cropped up  again!...Initially I thought it was because I commented out some lines  but this time it's appearing even when I try to compile the fullprogram...  #include meep.hpp using namespace meep; double eps(const vec p); int main(int argc,char **argv) { initialize mpi(argc,argv); double resolution=20; volume v = vol2d(5,10,resolution); structure s(v,eps,pml(1.0)); fields f(s);  f.output_hdf5(Dielectric,v.surroundings());  double freq = 0.3,fwidth=0.1; gaussian_src_time src(freq,fwidth); f.add_point_source(Ey,src,vec(1.1,2.3)); while (f.time()  f.last_source_time()) { f.step(); } 
 f.output_hdf5(Hz,v.surroundings()); return 0; }  double eps(const vec p) { if (p.x()  2  p.y()  3) return 12.0; return 1.0; }  [EMAIL PROTECTED] /usr/home/mc/MEEP files]# g++ `pkg-config --cflags meep`  test1.cpp -o test1 `pkg-config --libs meep` /usr/local/lib/libhdf5.so: undefined reference to `pthread_equal' /usr/local/lib/libhdf5.so: undefined reference to`pthread_setcancelstate'  Thanks for all the help:) Mani chandra Physics sophomore IIT Kanpur    Save all your chat conversations. Find them online. http://in.rd.yahoo.com/tagline_webmessenger_3/*http://in.messenger.yahoo.com/webmessengerpromo.php 
     ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss___meep-discuss mailing listmeep-discuss@ab-initio.mit.eduhttp://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


   5, 50, 500, 5000 - Store N number of mails in your inbox. Click here.

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

[Meep-discuss] (no subject)

2007-06-03 Thread liurj
Hello, 
  I met a problem during calcluating the transmission spectrum of 3D PC using me
ep.The band gap is about 10.9GHz ~16GHz. When I set fcen (the central frequency
) as 11GHz and 12GHz and set df as 0.1, I can obtain a covergent solution. But w
hen I increase fcen to 13GHz, 14GHz, and 15GHz, I can get convergent results any
 more, until i reduce df to 0.05. When I further increase df higher than 15GHz, 
I can't get convergent results even if I reduce df to 0.1. I have set two po
ints to monitor the convergent situation. When it is divergent, the temporal pul
se will keep increasing to a very large value.
  who can tell me the reason and explain it to me?
  who can tell me how to resolve this problem?
  And who tell me all the possible reason to result in divergence, because I alw
ays come across divergent situations when doing other calculations and always ha
ve no idea to solve it from where?

the ctl file:
; Some parameters to describe the geometry: 
;(set! eps-averaging? false)

   
(define-param eps 9) ; dielectric constant of rods   
(define-param a 1.1);lattice constant, in unit of cm 
(define-param a1 1); the normalized lattice constant
(define-param w (/ 0.32 a)) ;the width of a rod, in unit of cm, normalized by a 
   
(define-param h (/ 0.32 a) ) ;the height of a rod, in unit of cm, normalized by 
a
(define-param nlay 16) ; the layer number in z direction
(define-param nrod 1 ); the rod number in one layer 
   
 

; The cell dimensions   
   
(define-param padx 0) ; padding between last hole and PML edge
(define-param pady 0) ; padding between last hole and PML edge
(define-param padz 2) ; padding between last hole and PML edge   
(define-param dpml 2) ; PML thickness   

(define sx 1 ) ; size of cell in x direction
(define sy 1 ) 
(define sz (+  (* nlay h) (* (+ dpml padz)) ) )

;the cell size
(set! geometry-lattice (make lattice (size sx sy sz)))
;--- 
(set! geometry
  (append ; combine lists of objects:   

   (list
;---
   ;the first layer
(make block (center 0 (- (* 0.5 a1) (* 0.5 w)) (* -1.5 h))
(size infinity w h)
(material (make dielectric (epsilon eps)))
)
   ;the second layer
(make block (center (+ (* -0.5 a1) (* 0.5 w)) 0 (* -0.5 h))
(size w infinity h)
(material (make dielectric (epsilon eps)))
)
   ;the third layer
(make block (center 0 (* -0.5 w) (* 0.5 h))
(size infinity w h)
(material (make dielectric (epsilon eps)))
)
   ;the forth layer
(make block (center (* 0.5 w) 0 (* 1.5 h))
(size w infinity h)
(material (make dielectric (epsilon eps)))
)
;-
)
 
   )
 
)
(set! geometry
  (append
 ;duplicate the bulk crystal rods over supercell:
(geometric-objects-lattice-duplicates geometry sx sy (* 4 h))
 ;make defects in structure
 (list
;  (make block (material air)
;  (center 0 (* -0.5 w) (* 0.5 h)); in the third layer
;  (size infinity w h)
;  )
;-- add air layer in X direction
  (make block (material air)
  (center 0 0 (+ (/ (+ padz dpml) 2) (* h (/ nlay 2) ))); in
 the third layer
  (size sx sy (+ dpml padz) )
  )
  (make block (material air)
  (center 0 0 (- (/ (+ padz dpml) 2)  (* h (/ nlay -2)) ) );
 in the third layer
  (size sx sy (+ dpml padz)  )
  )
;;--
 )
  ) 
)

;--

(define-param fcen-GHz 15.5) ;
(define-param fcen (/ (* fcen-GHz a) 30)) ;normalized pulse center frequency
   
(define-param df 0.1); pulse width (in frequency)   
  
(set! sources (list
   (make source
 (src (make gaussian-src (frequency fcen) (fwidth df)))
 (component Ey)
 (center 0 0 (+ (/ sz -2) dpml 0.1))
 (size sx sy 0

;-
(set! k-point (vector3 0 0 0))
(set! ensure-periodicity true) ;apply periodic boundary condition
;--
(set! pml-layers (list (make pml (direction Z) (thickness dpml
(set-param! resolution 16)

(define-param nfreq 100) ; number of frequencies at which to compute flux   
  
(define trans1 ; 

[Meep-discuss] (no subject)

2007-04-19 Thread John Doe

Hello to all,

I want to simulate the transmission through a 3D PhC and I 'll use a source 
with a various directions (for example (111) direction). I try this guile code, 
but it doesn't works. 




...
;-
;angles for calculating direction-
;-

(define-param phi 45)   ;PHI: 0 phi  360 
(define-param theta 45) ;THETA: 0 theta  180


;-
;-Starting configuration for propagation and sourcefield--
;-

(define prop (vector3 0 0 1))   ;Starting propagation vector
(define field (vector3 0 1 0))  ;Starting components of the sourcefield


;-
;axis for the rotation of phi and theta---
;-

(define axisp (vector3 0.0 1.0 0.0));phi
(define axist (vector3 1.0 0.0 0.0));theta


;-
;--rotation of the startvectors---
;-

(define newprop (rotate-vector3 axisp (deg-rad phi) (rotate-vector3 axist 
(deg-rad theta) prop))) ;Propagation
(define newfield (rotate-vector3 axisp (deg-rad phi) (rotate-vector3 axist 
(deg-rad theta) field)))   ;Sourcefield



;-
;Setup  k-vector --
;-

(define p1 (vector3-x newprop))
(define p2 (vector3-y newprop))
(define p3 (vector3-z newprop))

(define-param kdir (vector3 p1 p2 p3 )) ;direction of k (lenght is irrelevant)
(define k (vector3-scale (* 2 pi 0.2)(unit-vector3 kdir))) ;k with the correct 
lenght


;--
; Sources -
;--

(define-param f_top (/ 0.9 (sqrt 2)))
(define-param f_bottom(/  0.3 (sqrt 2)))
(define w1 (* 2 pi f_bottom))
(define w2 (* 2 pi f_top))
(define f0 (/ (+ f_top f_bottom) 2))
(define sigma_f0 (- f_top f_bottom))
(define-param f_steps 1000)


(define e1 (vector3-x newfield))
(define e2 (vector3-y newfield))
(define e3 (vector3-z newfield))

(print e1: e1 \n)
(print e2: e2 \n)
(print e3: e3 \n)

; boardband source (sync * window)  [This boardband source function works 
correctly]

(define ((flat_src f1 f2 on_time) t1)
(begin ;(print t1 \n)
(let ((t (- t1 (/ on_time 2)))  (w1 (* 2 pi f1)) (w2 (* 2 pi f2)) )

(if (and (= t1 on_time) (= t1 0))
(*  0+1i (+ 0.42 (* 0+0.5i (cos (* 2 t1 pi (/ 1 on_time (* 0.08 
(cos (* 4 t1 pi 
(/ 1 on_time)   ; zauber funktion alias blackman
(if (= t 0) (* 0+0.5i (- w1 w2))
(/ (- (exp (* 
0+1i w1 t)) (exp (* 0+1i w2 t))) (* 2 t))
))
(+ 0 0))
)
)
)




;-
;-
;-


; sources for the e-field in Ex Ey Ez
(set! sources (list
   (make source
(src(make custom-src (end-time 200)
(src-func (flat_src f_bottom 
f_top 200)  )))
 (amplitude e1)
 (component Ex)
 (center 0 0 lzborder)
 (size xsize ysize 0)
 )))
 (set! sources (list
   (make source
(src(make custom-src (end-time 200)
(src-func (flat_src f_bottom 
f_top 200)  )))
 (amplitude e2)
 (component Ey)
 (center 0 0 lzborder)
 (size xsize ysize 0)
 )))
 (set! sources (list
   (make source
(src(make custom-src (end-time 200)
(src-func (flat_src f_bottom 
f_top 200)  )))
 (amplitude e3)
 (component Ez)
 (center 0 0 lzborder)
 (size xsize ysize 0)
 )))
 
 

.
I hope someone can help me, to solve the problem. 
Thanks in advance for your help.

Best regards 
John



-- 
Feel free - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt 

[Meep-discuss] (no subject)

2006-11-03 Thread Loic Le Guyader

Hi,

I still have problem with this. I want to wait a certain time for the 
pulse to arrive
somewhere, and then wait for the decay of the field. I try this 
(important part is the

definition of mystop):
(set! resolution 10)
(define-param sx 10)
(define-param sy 2)
(set! geometry-lattice (make lattice (size sx sy no-size)))

(set! pml-layers (list (make pml (direction X) (thickness 1.0

(define sourcepoint (vector3 (+ (/ sx -2) 1.0))) ; where sit the source
(define endpoint (vector3 (- (/ sx 2) 1.0))) ; where we want the pulse
   ; to arrive 
(define-param fcen 0.15)

(define-param df 1.0)
(define-param nfreq 200)
(set! sources (list (make source
(src (make gaussian-src (frequency fcen) (fwidth df)))
(component Ey)
 (center sourcepoint)
 (size 0 sy

; compute the time of arrival
(define tt (+ (- (vector3-x endpoint) (vector3-x sourcepoint)) ; time 
to travel

(/ 5 df)))   ; peak time

(define (mystop)
(let ((decayed (stop-when-fields-decayed 20 Ey endpoint 1e-3)))
 (if ( (meep-time) tt) decayed #f)))

(run-until (mystop)
  (to-appended ey (at-every 0.5 output-efield-y)))

but it doesn't work. I got some error, for some unknow reason to me. My level
of Scheme is very low. Any idea what I do wrong ?

Best regards.


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