[Meep-discuss] Question on nonlinearities

2020-10-31 Thread Alfredo Daniel Sánchez
Hello everybody!

I'm trying to perform simulations in order to obtain the nonlinear response
of a given geometry. Currently, I'm "stretching muscles" by using the
*mie.py* example code given in the documentation. Over this code I'm adding
some lines in order to obtain the nonlinear response. Previously, I
incorporated the third-order susceptibility [image: \chi^{(3)}]  such
as *mp.Medium(index=n_sphere,
chi3=10**-3). *Then, I added the corresponding fluxes regions as is
commented in the example *3rd-harm-1d.py* also given in the documentation.
However, I need several things to improve my code.
1) I want to model a metal nanoparticle, namely, of gold or silver
material. I do not know if by importing the gold material such as *from *
meep.materials* import *Au_JC_visible as Au, the third-order susceptibility
is either regarded.
2) How to include a complex chi3, that is, measurements of [image:
\chi^{(3)}] are often to be reported as a complex quantity at certain
wavelength.
3) How can I compute an effective third-order susceptibility in the medium
plus metal nanoparticle.

I hope somebody could help me.

Best regards,

Alfredo.
___
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 waveguide dispersion

2020-10-24 Thread Alfredo Daniel Sánchez
Hello everybody!

I am trying to find the dispersion function [image: D],  typically measured
in ps/nm-km, of a simple SOI-waveguide. Silicon
waveguide is typically ranged in a few hundreds of nanometers. I am using
the k_find class from MPB, and then I perform derivative twice in order to
obtain [image: \beta_2] and then [image: D]. I am not sure if this is the
correct way to do it. Please advise me.

Best wishes,

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

Re: [Meep-discuss] Question on TE and TM modes

2020-10-19 Thread Alfredo Daniel Sánchez
Thanks vare much for answering

El lun., 19 de oct. de 2020 16:11, Steven G. Johnson 
escribió:

> If you just want the guided modes, I would tend to use MPB for this.   It
> will give you the modal profile and the dispersion relation ω(β) (from
> which you can compute the effective index and anything else)
>
> On Oct 19, 2020, at 11:44 AM, Alfredo Daniel Sánchez <
> alfredo.daniel.sanc...@gmail.com> wrote:
>
> Dear friends and colleges,
>
> I'm trying to write a code to simulate the TE and TM modes in a kind
> waveguide SOI. The structure of this waveguide is similar to that shown in
> https://meep.readthedocs.io/en/latest/Python_Tutorials/Custom_Source/,
> where we have several materials with different refractive index.
> Typical computing is based in the effective refractive index of this
> waveguide, the modal profile, the modes in general and if it is possible,
> the dispersion relation.
> I do not know if this problem is either a 2D or 3D one. Does anyone help
> me?
>
> Thank you very much to all.
>
> Alfredo Sanchez.
> ___
> 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 mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Re: [Meep-discuss] Question on TE and TM modes

2020-10-19 Thread Steven G. Johnson
If you just want the guided modes, I would tend to use MPB for this.   It will 
give you the modal profile and the dispersion relation ω(β) (from which you can 
compute the effective index and anything else)

> On Oct 19, 2020, at 11:44 AM, Alfredo Daniel Sánchez 
>  wrote:
> 
> Dear friends and colleges,
> 
> I'm trying to write a code to simulate the TE and TM modes in a kind 
> waveguide SOI. The structure of this waveguide is similar to that shown in 
> https://meep.readthedocs.io/en/latest/Python_Tutorials/Custom_Source/ 
> , 
> where we have several materials with different refractive index. Typical 
> computing is based in the effective refractive index of this waveguide, the 
> modal profile, the modes in general and if it is possible, the dispersion 
> relation.
> I do not know if this problem is either a 2D or 3D one. Does anyone help me?
> 
> Thank you very much to all.
> 
> Alfredo Sanchez.
> ___
> 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] Question on TE and TM modes

2020-10-19 Thread Alfredo Daniel Sánchez
Dear friends and colleges,

I'm trying to write a code to simulate the TE and TM modes in a kind
waveguide SOI. The structure of this waveguide is similar to that shown in
https://meep.readthedocs.io/en/latest/Python_Tutorials/Custom_Source/,
where we have several materials with different refractive index.
Typical computing is based in the effective refractive index of this
waveguide, the modal profile, the modes in general and if it is possible,
the dispersion relation.
I do not know if this problem is either a 2D or 3D one. Does anyone help me?

Thank you very much to all.

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

Re: [Meep-discuss] question about dispersive complex epsilon for gain

2020-07-25 Thread Alexander Cerjan
as best i can tell, you've set the dimension of your structure to 3, but
the size in the x and y directions to be a single pixel. This is, depending
on what you're trying to do, a somewhat odd situation, because you have no
absorbing boundary condition in the x-y plane, only for waves which are
propagating in the + or - z direction. As such, there will always be
"infinite-Q" modes in your system, which correspond to waves propagating
below the light line in the x-y plane. Even if the slab is the same
dielectric as the surrounding vacuum, the pml in the z-direction won't
absorb waves travelling entirely in the x or y directions. So, these states
will see the gain, and grow exponentially, as there is nothing to absorb
them. So yes, if I understand what you've set up correctly, any gain > 0
will yield divergent behavior.

how to fix this? depends on what you want to do. If you're not trying to
simulate a 3D system, you should change the dimensionality of your system.
If you are trying to simulate a 3D system, which has bound modes below the
light line, then you're always going to see lasing for any gain > 0,
because that is what is physically expected.

On Sat, Jul 25, 2020 at 11:40 PM 裴延波  wrote:

>
> Dear Cerjan, thank you for your kind help.
> Now let me summarize my tests. Firstly, I decreased sigma to 1e-100.
> However the electric field still grows fast to infinity. My test results
> show that sigma=1e-120 made the calculation converge. But why sigma is
> required so small. It does not make sense.
> Secondly, the interface reflections were removed. In my structure under
> calculation, uniform gain medium was sandwiched between air and the light
> was propagating along z direction. The reflections from the gain medium-air
> interfaces provided optical feedback for this Fabry-Perot like lasing. For
> test, the instantaneous dielectric constant of the gain medium was set the
> same as the air. But the field did not converge in this case also.
> Thirdly, gamma was set to positive and sigma was set to negative. In this
> case, the electric field converged finally. And I check the results, and
> found the spectrum was likely correct. I wonder if those are the correct
> parameters in using complex epsilon to calculate the lasing.
> That's all for my tests. After those tests, I am confused with modelling
> gain medium by complex dielectric function. Can you give me any clue to
> solve this problem?
>
> Bests,
> Pei
>
>
>
> At 2020-07-26 04:47:29, "Alexander Cerjan"  wrote:
> - 隐藏引用文字 -
>
> This is likely the physically expected behavior. If your gain is coupling
> to a mode of your system whose loss rate is less than that of the rate of
> stimulated emission, your system will begin to lase, i.e. the field will
> begin to grow exponentially. In real, physical systems, this is then
> compensated by gain saturation, which prohibits the fields from growing
> exponentially forever. However, as the Lorentzian susceptibility model does
> not contain this physics, nothing prohibits the fields from continuing
> their exponential growth.
>
> On Sat, Jul 25, 2020 at 2:02 PM 裴延波  wrote:
>
>> I am trying to use dispersive complex epsilon to describe gain in my
>> calculation. The parameters for the epsilon is defined as follows.
>> freq_32 = 2# emission frequency  (units of 2\pi c/a)
>> gamma_32 = 0.306# FWHM emission linewidth in sec^-1 (units of 2\pi
>> c/a)
>> sigma_32 = 1e-4
>> susceptibilities = [mp.LorentzianSusceptibility(frequency=freq_32,
>> gamma=-gamma_32, sigma=sigma_32)]
>> geometry = [mp.Block(center=mp.Vector3(z=0),
>>  size=mp.Vector3(mp.inf,mp.inf,dcell),
>>
>> material=mp.Medium(epsilon=2.25,E_susceptibilities=susceptibilities))]
>>
>> Here gamma is negative indicating the material has gain, just as that in
>> the tutorial. However, when running the field increase to infinity even
>> though sigma is very very small. I try to set gamma positive and sigma
>> negative. In this case there is a result which looks normal. I don't  know
>> why and what is the problem in my code. Can anyone explain this. Thanks in
>> advance.
>>
>> The following is my full python code.
>>
>> import meep as mp
>> import math
>> resolution = 100
>> dimensions = 3
>> ns = 1.0
>> nlead = ns
>> dlead = 2.0
>> npad = ns
>> dpad = 2.0
>> dpml = 2.0
>> Ncell = 20
>> dcell = 96
>> sz = dcell + dlead + dpad + 2*dpml
>> cell_size = mp.Vector3(0,0,sz)
>> pml_layers = [mp.PML(dpml)]
>> freq_32 = 2# emission frequency  (units of 2\pi c/a)
>> gamma_32 = 0.306# FWHM emission linewidth in sec^-1 (units of 2\pi
>> c/a)
>> df1 = gamma_32/2/math.pi
>> sigma_32 = 1e-4  # dipole coupling strength (hbar = 1)
>> default_material = mp.Medium(index=ns)
>> sources = [mp.Source(mp.GaussianSource(freq_32, fwidth=df1),
>> component=mp.Ex, center=mp.Vector3(-dcell/2-dpad/2))]
>>
>> sim = mp.Simulation(cell_size=cell_size,
>> sources=sources,
>> 

Re: [Meep-discuss] question about dispersive complex epsilon for gain

2020-07-25 Thread 裴延波


Dear Cerjan, thank you for your kind help.
Now let me summarize my tests. Firstly, I decreased sigma to 1e-100. However 
the electric field still grows fast to infinity. My test results show that 
sigma=1e-120 made the calculation converge. But why sigma is required so small. 
It does not make sense. 
Secondly, the interface reflections were removed. In my structure under 
calculation, uniform gain medium was sandwiched between air and the light was 
propagating along z direction. The reflections from the gain medium-air 
interfaces provided optical feedback for this Fabry-Perot like lasing. For 
test, the instantaneous dielectric constant of the gain medium was set the same 
as the air. But the field did not converge in this case also. 
Thirdly, gamma was set to positive and sigma was set to negative. In this case, 
the electric field converged finally. And I check the results, and found the 
spectrum was likely correct. I wonder if those are the correct parameters in 
using complex epsilon to calculate the lasing.  
That's all for my tests. After those tests, I am confused with modelling gain 
medium by complex dielectric function. Can you give me any clue to solve this 
problem?


Bests,
Pei







At 2020-07-26 04:47:29, "Alexander Cerjan"  wrote:

- 隐藏引用文字 -
This is likely the physically expected behavior. If your gain is coupling to a 
mode of your system whose loss rate is less than that of the rate of stimulated 
emission, your system will begin to lase, i.e. the field will begin to grow 
exponentially. In real, physical systems, this is then compensated by gain 
saturation, which prohibits the fields from growing exponentially forever. 
However, as the Lorentzian susceptibility model does not contain this physics, 
nothing prohibits the fields from continuing their exponential growth.


On Sat, Jul 25, 2020 at 2:02 PM 裴延波  wrote:

I am trying to use dispersive complex epsilon to describe gain in my 
calculation. The parameters for the epsilon is defined as follows.
freq_32 = 2# emission frequency  (units of 2\pi c/a)
gamma_32 = 0.306# FWHM emission linewidth in sec^-1 (units of 2\pi c/a)
sigma_32 = 1e-4

susceptibilities = [mp.LorentzianSusceptibility(frequency=freq_32, 
gamma=-gamma_32, sigma=sigma_32)]
geometry = [mp.Block(center=mp.Vector3(z=0),
 size=mp.Vector3(mp.inf,mp.inf,dcell),
 
material=mp.Medium(epsilon=2.25,E_susceptibilities=susceptibilities))]


Here gamma is negative indicating the material has gain, just as that in the 
tutorial. However, when running the field increase to infinity even though 
sigma is very very small. I try to set gamma positive and sigma negative. In 
this case there is a result which looks normal. I don't  know why and what is 
the problem in my code. Can anyone explain this. Thanks in advance. 
 
The following is my full python code. 


import meep as mp
import math
resolution = 100
dimensions = 3
ns = 1.0
nlead = ns
dlead = 2.0
npad = ns
dpad = 2.0
dpml = 2.0
Ncell = 20
dcell = 96
sz = dcell + dlead + dpad + 2*dpml
cell_size = mp.Vector3(0,0,sz)
pml_layers = [mp.PML(dpml)]
freq_32 = 2# emission frequency  (units of 2\pi c/a)
gamma_32 = 0.306# FWHM emission linewidth in sec^-1 (units of 2\pi c/a)
df1 = gamma_32/2/math.pi
sigma_32 = 1e-4  # dipole coupling strength (hbar = 1)
default_material = mp.Medium(index=ns)
sources = [mp.Source(mp.GaussianSource(freq_32, fwidth=df1), component=mp.Ex, 
center=mp.Vector3(-dcell/2-dpad/2))]
  
sim = mp.Simulation(cell_size=cell_size,
sources=sources,
resolution=resolution,
boundary_layers=pml_layers,
dimensions = dimensions,
default_material=default_material)
 
nfreq = 50 #number of frequencies at which to compute flux
pt = mp.Vector3(0,0,dcell/2+dpad/2)
flux_detection_point = mp.FluxRegion(center=pt)
incidence = sim.add_flux(freq_32,df1,nfreq,flux_detection_point)
sim.run(until_after_sources=mp.stop_when_fields_decayed(50,mp.Ex,pt,1e-3))
incident_flux = mp.get_fluxes(incidence)
sim.reset_meep() 
susceptibilities = [mp.LorentzianSusceptibility(frequency=freq_32, 
gamma=-gamma_32, sigma=sigma_32)]
geometry = [mp.Block(center=mp.Vector3(z=0),
 size=mp.Vector3(mp.inf,mp.inf,dcell),
 
material=mp.Medium(epsilon=2.25,E_susceptibilities=susceptibilities))]
geometry.append(mp.Block(center=mp.Vector3(z=-sz/2+(dpml+dlead)/2),
 size=mp.Vector3(mp.inf,mp.inf,dpml+dlead),
 material=mp.Medium(index=nlead)))
geometry.append(mp.Block(center=mp.Vector3(z=sz/2-(dpml+dpad)/2),
 size=mp.Vector3(mp.inf,mp.inf,dpml+dpad),
 material=mp.Medium(index=npad))) 
sim = mp.Simulation(cell_size=cell_size,
sources=sources,
resolution=resolution,
boundary_layers=pml_layers,
 

Re: [Meep-discuss] question about dispersive complex epsilon for gain

2020-07-25 Thread 裴延波
Thank you for your kind help. 
Actually, I have tried the strength parameter sigma as small as 1e-20. But the 
field rises to infinity rapidly. sigma can be used to tune the gain, can't it?





--
发自我的网易邮箱平板适配版



在 2020-07-26 04:47:29,"Alexander Cerjan"  写道:

This is likely the physically expected behavior. If your gain is coupling to a 
mode of your system whose loss rate is less than that of the rate of stimulated 
emission, your system will begin to lase, i.e. the field will begin to grow 
exponentially. In real, physical systems, this is then compensated by gain 
saturation, which prohibits the fields from growing exponentially forever. 
However, as the Lorentzian susceptibility model does not contain this physics, 
nothing prohibits the fields from continuing their exponential growth.


On Sat, Jul 25, 2020 at 2:02 PM 裴延波  wrote:

I am trying to use dispersive complex epsilon to describe gain in my 
calculation. The parameters for the epsilon is defined as follows.
freq_32 = 2# emission frequency  (units of 2\pi c/a)
gamma_32 = 0.306# FWHM emission linewidth in sec^-1 (units of 2\pi c/a)
sigma_32 = 1e-4

susceptibilities = [mp.LorentzianSusceptibility(frequency=freq_32, 
gamma=-gamma_32, sigma=sigma_32)]
geometry = [mp.Block(center=mp.Vector3(z=0),
 size=mp.Vector3(mp.inf,mp.inf,dcell),
 
material=mp.Medium(epsilon=2.25,E_susceptibilities=susceptibilities))]


Here gamma is negative indicating the material has gain, just as that in the 
tutorial. However, when running the field increase to infinity even though 
sigma is very very small. I try to set gamma positive and sigma negative. In 
this case there is a result which looks normal. I don't  know why and what is 
the problem in my code. Can anyone explain this. Thanks in advance. 
 
The following is my full python code. 


import meep as mp
import math
resolution = 100
dimensions = 3
ns = 1.0
nlead = ns
dlead = 2.0
npad = ns
dpad = 2.0
dpml = 2.0
Ncell = 20
dcell = 96
sz = dcell + dlead + dpad + 2*dpml
cell_size = mp.Vector3(0,0,sz)
pml_layers = [mp.PML(dpml)]
freq_32 = 2# emission frequency  (units of 2\pi c/a)
gamma_32 = 0.306# FWHM emission linewidth in sec^-1 (units of 2\pi c/a)
df1 = gamma_32/2/math.pi
sigma_32 = 1e-4  # dipole coupling strength (hbar = 1)
default_material = mp.Medium(index=ns)
sources = [mp.Source(mp.GaussianSource(freq_32, fwidth=df1), component=mp.Ex, 
center=mp.Vector3(-dcell/2-dpad/2))]
  
sim = mp.Simulation(cell_size=cell_size,
sources=sources,
resolution=resolution,
boundary_layers=pml_layers,
dimensions = dimensions,
default_material=default_material)
 
nfreq = 50 #number of frequencies at which to compute flux
pt = mp.Vector3(0,0,dcell/2+dpad/2)
flux_detection_point = mp.FluxRegion(center=pt)
incidence = sim.add_flux(freq_32,df1,nfreq,flux_detection_point)
sim.run(until_after_sources=mp.stop_when_fields_decayed(50,mp.Ex,pt,1e-3))
incident_flux = mp.get_fluxes(incidence)
sim.reset_meep() 
susceptibilities = [mp.LorentzianSusceptibility(frequency=freq_32, 
gamma=-gamma_32, sigma=sigma_32)]
geometry = [mp.Block(center=mp.Vector3(z=0),
 size=mp.Vector3(mp.inf,mp.inf,dcell),
 
material=mp.Medium(epsilon=2.25,E_susceptibilities=susceptibilities))]
geometry.append(mp.Block(center=mp.Vector3(z=-sz/2+(dpml+dlead)/2),
 size=mp.Vector3(mp.inf,mp.inf,dpml+dlead),
 material=mp.Medium(index=nlead)))
geometry.append(mp.Block(center=mp.Vector3(z=sz/2-(dpml+dpad)/2),
 size=mp.Vector3(mp.inf,mp.inf,dpml+dpad),
 material=mp.Medium(index=npad))) 
sim = mp.Simulation(cell_size=cell_size,
sources=sources,
resolution=resolution,
boundary_layers=pml_layers,
geometry=geometry,
dimensions = dimensions,
default_material=default_material)
 
transmission = sim.add_flux(freq_32,df1,nfreq,flux_detection_point)
sim.run(until_after_sources=mp.stop_when_fields_decayed(50,mp.Ex,pt,1e-3))
transmitted_flux = mp.get_fluxes(transmission)
flux_freqs = mp.get_flux_freqs(transmission)
data1 = open("lasing.dat",'w')
for ii in range(0,nfreq):
 data1.write("%f   %f   %f%f\n" 
%(flux_freqs[ii],incident_flux[ii],transmitted_flux[ii],transmitted_flux[ii]/incident_flux[ii]))
data1.close()






 

___
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] question about dispersive complex epsilon for gain

2020-07-25 Thread Alexander Cerjan
This is likely the physically expected behavior. If your gain is coupling
to a mode of your system whose loss rate is less than that of the rate of
stimulated emission, your system will begin to lase, i.e. the field will
begin to grow exponentially. In real, physical systems, this is then
compensated by gain saturation, which prohibits the fields from growing
exponentially forever. However, as the Lorentzian susceptibility model does
not contain this physics, nothing prohibits the fields from continuing
their exponential growth.

On Sat, Jul 25, 2020 at 2:02 PM 裴延波  wrote:

> I am trying to use dispersive complex epsilon to describe gain in my
> calculation. The parameters for the epsilon is defined as follows.
> freq_32 = 2# emission frequency  (units of 2\pi c/a)
> gamma_32 = 0.306# FWHM emission linewidth in sec^-1 (units of 2\pi c/a)
> sigma_32 = 1e-4
> susceptibilities = [mp.LorentzianSusceptibility(frequency=freq_32,
> gamma=-gamma_32, sigma=sigma_32)]
> geometry = [mp.Block(center=mp.Vector3(z=0),
>  size=mp.Vector3(mp.inf,mp.inf,dcell),
>
> material=mp.Medium(epsilon=2.25,E_susceptibilities=susceptibilities))]
>
> Here gamma is negative indicating the material has gain, just as that in
> the tutorial. However, when running the field increase to infinity even
> though sigma is very very small. I try to set gamma positive and sigma
> negative. In this case there is a result which looks normal. I don't  know
> why and what is the problem in my code. Can anyone explain this. Thanks in
> advance.
>
> The following is my full python code.
>
> import meep as mp
> import math
> resolution = 100
> dimensions = 3
> ns = 1.0
> nlead = ns
> dlead = 2.0
> npad = ns
> dpad = 2.0
> dpml = 2.0
> Ncell = 20
> dcell = 96
> sz = dcell + dlead + dpad + 2*dpml
> cell_size = mp.Vector3(0,0,sz)
> pml_layers = [mp.PML(dpml)]
> freq_32 = 2# emission frequency  (units of 2\pi c/a)
> gamma_32 = 0.306# FWHM emission linewidth in sec^-1 (units of 2\pi c/a)
> df1 = gamma_32/2/math.pi
> sigma_32 = 1e-4  # dipole coupling strength (hbar = 1)
> default_material = mp.Medium(index=ns)
> sources = [mp.Source(mp.GaussianSource(freq_32, fwidth=df1),
> component=mp.Ex, center=mp.Vector3(-dcell/2-dpad/2))]
>
> sim = mp.Simulation(cell_size=cell_size,
> sources=sources,
> resolution=resolution,
> boundary_layers=pml_layers,
> dimensions = dimensions,
> default_material=default_material)
>
> nfreq = 50 #number of frequencies at which to compute flux
> pt = mp.Vector3(0,0,dcell/2+dpad/2)
> flux_detection_point = mp.FluxRegion(center=pt)
> incidence = sim.add_flux(freq_32,df1,nfreq,flux_detection_point)
> sim.run(until_after_sources=mp.stop_when_fields_decayed(50,mp.Ex,pt,1e-3))
> incident_flux = mp.get_fluxes(incidence)
> sim.reset_meep()
> susceptibilities = [mp.LorentzianSusceptibility(frequency=freq_32,
> gamma=-gamma_32, sigma=sigma_32)]
> geometry = [mp.Block(center=mp.Vector3(z=0),
>  size=mp.Vector3(mp.inf,mp.inf,dcell),
>
> material=mp.Medium(epsilon=2.25,E_susceptibilities=susceptibilities))]
> geometry.append(mp.Block(center=mp.Vector3(z=-sz/2+(dpml+dlead)/2),
>  size=mp.Vector3(mp.inf,mp.inf,dpml+dlead),
>  material=mp.Medium(index=nlead)))
> geometry.append(mp.Block(center=mp.Vector3(z=sz/2-(dpml+dpad)/2),
>  size=mp.Vector3(mp.inf,mp.inf,dpml+dpad),
>  material=mp.Medium(index=npad)))
> sim = mp.Simulation(cell_size=cell_size,
> sources=sources,
> resolution=resolution,
> boundary_layers=pml_layers,
> geometry=geometry,
> dimensions = dimensions,
> default_material=default_material)
>
> transmission = sim.add_flux(freq_32,df1,nfreq,flux_detection_point)
> sim.run(until_after_sources=mp.stop_when_fields_decayed(50,mp.Ex,pt,1e-3))
> transmitted_flux = mp.get_fluxes(transmission)
> flux_freqs = mp.get_flux_freqs(transmission)
> data1 = open("lasing.dat",'w')
> for ii in range(0,nfreq):
>  data1.write("%f   %f   %f%f\n"
> %(flux_freqs[ii],incident_flux[ii],transmitted_flux[ii],transmitted_flux[ii]/incident_flux[ii]))
> data1.close()
>
>
>
>
> ___
> 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] question about dispersive complex epsilon for gain

2020-07-25 Thread 裴延波
I am trying to use dispersive complex epsilon to describe gain in my 
calculation. The parameters for the epsilon is defined as follows.
freq_32 = 2# emission frequency  (units of 2\pi c/a)
gamma_32 = 0.306# FWHM emission linewidth in sec^-1 (units of 2\pi c/a)
sigma_32 = 1e-4

susceptibilities = [mp.LorentzianSusceptibility(frequency=freq_32, 
gamma=-gamma_32, sigma=sigma_32)]
geometry = [mp.Block(center=mp.Vector3(z=0),
 size=mp.Vector3(mp.inf,mp.inf,dcell),
 
material=mp.Medium(epsilon=2.25,E_susceptibilities=susceptibilities))]


Here gamma is negative indicating the material has gain, just as that in the 
tutorial. However, when running the field increase to infinity even though 
sigma is very very small. I try to set gamma positive and sigma negative. In 
this case there is a result which looks normal. I don't  know why and what is 
the problem in my code. Can anyone explain this. Thanks in advance. 
 
The following is my full python code. 


import meep as mp
import math
resolution = 100
dimensions = 3
ns = 1.0
nlead = ns
dlead = 2.0
npad = ns
dpad = 2.0
dpml = 2.0
Ncell = 20
dcell = 96
sz = dcell + dlead + dpad + 2*dpml
cell_size = mp.Vector3(0,0,sz)
pml_layers = [mp.PML(dpml)]
freq_32 = 2# emission frequency  (units of 2\pi c/a)
gamma_32 = 0.306# FWHM emission linewidth in sec^-1 (units of 2\pi c/a)
df1 = gamma_32/2/math.pi
sigma_32 = 1e-4  # dipole coupling strength (hbar = 1)
default_material = mp.Medium(index=ns)
sources = [mp.Source(mp.GaussianSource(freq_32, fwidth=df1), component=mp.Ex, 
center=mp.Vector3(-dcell/2-dpad/2))]
  
sim = mp.Simulation(cell_size=cell_size,
sources=sources,
resolution=resolution,
boundary_layers=pml_layers,
dimensions = dimensions,
default_material=default_material)
 
nfreq = 50 #number of frequencies at which to compute flux
pt = mp.Vector3(0,0,dcell/2+dpad/2)
flux_detection_point = mp.FluxRegion(center=pt)
incidence = sim.add_flux(freq_32,df1,nfreq,flux_detection_point)
sim.run(until_after_sources=mp.stop_when_fields_decayed(50,mp.Ex,pt,1e-3))
incident_flux = mp.get_fluxes(incidence)
sim.reset_meep() 
susceptibilities = [mp.LorentzianSusceptibility(frequency=freq_32, 
gamma=-gamma_32, sigma=sigma_32)]
geometry = [mp.Block(center=mp.Vector3(z=0),
 size=mp.Vector3(mp.inf,mp.inf,dcell),
 
material=mp.Medium(epsilon=2.25,E_susceptibilities=susceptibilities))]
geometry.append(mp.Block(center=mp.Vector3(z=-sz/2+(dpml+dlead)/2),
 size=mp.Vector3(mp.inf,mp.inf,dpml+dlead),
 material=mp.Medium(index=nlead)))
geometry.append(mp.Block(center=mp.Vector3(z=sz/2-(dpml+dpad)/2),
 size=mp.Vector3(mp.inf,mp.inf,dpml+dpad),
 material=mp.Medium(index=npad))) 
sim = mp.Simulation(cell_size=cell_size,
sources=sources,
resolution=resolution,
boundary_layers=pml_layers,
geometry=geometry,
dimensions = dimensions,
default_material=default_material)
 
transmission = sim.add_flux(freq_32,df1,nfreq,flux_detection_point)
sim.run(until_after_sources=mp.stop_when_fields_decayed(50,mp.Ex,pt,1e-3))
transmitted_flux = mp.get_fluxes(transmission)
flux_freqs = mp.get_flux_freqs(transmission)
data1 = open("lasing.dat",'w')
for ii in range(0,nfreq):
 data1.write("%f   %f   %f%f\n" 
%(flux_freqs[ii],incident_flux[ii],transmitted_flux[ii],transmitted_flux[ii]/incident_flux[ii]))
data1.close()

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

[Meep-discuss] Question about properly modeling absorption

2020-07-02 Thread Ball, John (NIH/NEI) [E]
Hello, I'm modeling light propagation/scattering in biological cells. I've been 
using MEEP for a while and feel like I have an OK handle on the pieces I've 
been using. I am using the c++ libraries with my own code (the libraries I'm 
using aren't current, if that turns out to be important).

However, I'd like to consider the effects of absorption in these cells and 
their organelles. I think I understand that the way to do this is to specify 
conductivity values in addition to epsilon. However, in my field we're much 
more accustomed to thinking about the absorption of photons by 
materials/tissues rather than considering this from the view of the EM field.

So, I believe I need to attack this from the perspective of taking observed 
transmission spectra, maybe even absorption cross-sections, etc. and 
translating this into a meaningful conductivity parameter (sigma, right?). I 
apologize for bringing a theoretical question instead of a programming question 
to the mailing list, but I am struggling to understand how to proceed and hope 
that someone could help clarify things for me, or at least point me in the 
right direction to study and learn it on my own. I appreciate any help that can 
be provided.
___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Re: [Meep-discuss] Question about how to set background refractive index

2020-06-19 Thread Steven G. Johnson
You can use the default_material parameter of the Simulation object, for 
example.

> On Jun 19, 2020, at 2:29 PM, Siwei Zeng  wrote:
> 
> Hi,
> 
> I am a new player in Meep. Recently I try to simulate the transmission of 
> silicon nitride directional coupler. The waveguide core material I use is 
> silicon nitride. The waveguide cladding material is silicon dioxide. I have 
> checked the directional coupler 
> example(https://meep.readthedocs.io/en/latest/Python_Tutorials/GDSII_Import/#s-parameters-of-a-directional-coupler
>  
> ).
>  I think the background refractive index is air(n=1) in that example. I am 
> wondering if it is possible to set the background refractive index as the 
> refractive index of silicon dioxide. Thanks in advance.
> 
> Regards,
> Siwei
> ___
> 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] Question about how to set background refractive index

2020-06-19 Thread Siwei Zeng
Hi,

I am a new player in Meep. Recently I try to simulate the transmission of
silicon nitride directional coupler. The waveguide core material I use is
silicon nitride. The waveguide cladding material is silicon dioxide. I have
checked the directional coupler example(
https://meep.readthedocs.io/en/latest/Python_Tutorials/GDSII_Import/#s-parameters-of-a-directional-coupler).
I think the background refractive index is air(n=1) in that example. I am
wondering if it is possible to set the background refractive index as the
refractive index of silicon dioxide. Thanks in advance.

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

[Meep-discuss] Question of material type in MPB

2020-05-16 Thread 王启祥
Hello all,

I'm currently using MPB for PBG calculation. I want to know whether there is a 
way to import material with epsilon as a function of frequency? I think that 
will improve the accuracy of the location of PBG. Thank you!

Best regards,

Qixiang

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

[Meep-discuss] question about 'transform'

2019-09-05 Thread 裴延波
Dear Meep users and developers

I have a question concerning the interface of Medium transform(M [ Matrix class 
]). In my present work, I need to model the anisotropic dielectric constant of 
liquid crystals. Now, I calculate epsilon_diag=(a,b,c) and 
epsilon_offdiag=(u,v,w) for the particular orientational angle of liquid 
crystal director.Happily, I find there is a function  'transform', which seems 
that it can rotate the principal axis of dielectric constant of liquid crystal 
by the orientational angle of liquid crystal director.  However I am not sure 
and there is no detailed explaination to tell me how to use it. Could anyone 
help me?
Thanks in advance.






Yanbo Pei










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

[Meep-discuss] Question about permittivity and permeability

2016-09-16 Thread Heligman, Daniel M.
Hi,


I have a simple question. Is the a conversion between SI and meep units for 
permittivity and permeability or are they the same in meep units?


Best,

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

[Meep-discuss] Question about ffmpeg movies

2014-05-18 Thread jayv
Hi All,

I typically use h5topng on output field arrays and then use ffmpeg to 
generate movies.  What I would like to do is to offer the eps file as an 
alpha overlay on the movies in a way that the channel could be turned on or 
off while playing the movie.

In other words, if I make the ffmpeg movie with an alpha channel, is there a 
way to turn the channel off in some movie player?  I use totem or mplayer on 
linux but I haven't found a way to select overlay on/off, though there is a 
subtitle on/off option.  

Also, the h5topng meep tutorial shows how to add the eps file as an alpha 
overlay in each png, but I don't know if that translates into an alpha 
channel in ffmpeg.  The eps overlay is a really neat feature and it would be 
nice to always have it as an option in a movie.

Thanks in advance.


___
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 nonlinear calculation

2013-11-08 Thread nwuwl

Dear Steven and meep users

Recently I tried to use meep to do calculation on nonlinear. But I’m confused 
on the calculation of refractive index change caused by nonlinear. This note   
(http://ab-initio.mit.edu/wiki/index.php/Units_and_nonlinearity_in_Meep) gives 
some details about my question, but I didn’t understand. What I got from this 
note is follow.  Firstly  I set the chi3 in the ctl file ,so I can calculate 
the n2. In order to obtain the change of refractive index, I also need get  the 
power going through the structure by using the meep-fields-flux-in-box 
function. My first question is which function should I use. What I tried is 
(flux-in-box dir box). Moreover ,my structure is a two-dimensional Photonic 
crystal(X direction is transmission direction, Y is transverse direction), and 
the direction of the function (flux-in-box dir box) is perpendicular to the 
box. Does it mean the direction dir is Z ? So I hope you can give me an example 
of calculating the nonlinear effect on refractive index, a ctl file is better 
if it is convenient.Thank you very much.

   Yours

Lin Wang

 










___
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 nonlinear calculation

2013-11-03 Thread nwuwl

Dear Steven and meep users

Recently I tried to use meep to do calculation on nonlinear. But I’m confused 
on the calculation of refractive index change caused by nonlinear. This note   
(http://ab-initio.mit.edu/wiki/index.php/Units_and_nonlinearity_in_Meep) gives 
some details about my question, but I didn’t understand. What I got from this 
note is follow.  Firstly  I set the chi3 in the ctl file ,so I can calculate 
the n2. In order to obtain the change of refractive index, I also need get  the 
power going through the structure by using the meep-fields-flux-in-box 
function. My first question is which function should I use. What I tried is 
(flux-in-box dir box). Moreover ,my structure is a two-dimensional Photonic 
crystal(X direction is transmission direction, Y is transverse direction), and 
the direction of the function (flux-in-box dir box) is perpendicular to the 
box. Does it mean the direction dir is Z ? So I hope you can give me an example 
of calculating the nonlinear effect on refractive index, a ctl file is better 
if it is convenient.Thank you very much.

   Yours

Lin Wang

 







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

Re: [Meep-discuss] Question about units in meep

2013-07-29 Thread Chuanren Wu
Hello Rui,

the only thing happens here is scaling the 4 Maxwell equations under the
condition that c0 = 1.
The solutions are not unique, you can choose the scaling method, which
is more suitable for your problem. (for example, you can let the
permittivity as the value in the real world, or keep the length in meter
or mm, or if you want to calculate a real current value, you can also
keep the current in SI unit).


regards


On 07/29/2013 01:33 AM, Rui La wrote:
 Hi meep users,
 
 I am new to meep and have some questions about units and sizes in the
 code of meep.
 
 I want to measure the transmission of a silicon plane with the wave of
 1000nm. The relationship between frequency and wavelength is
 wavelength=1/f. So I guess if I assume the 1 in my code equal to 150
 nm, the relative wavelength of the source should be 1000/150 = 6.67, so
 the f should be 1/6.67 = 0.15. Is my calculation correct? What if I set
 the 1 in my code as 300 nm, that means I need to change my frequency
 to 1/3.33=0.3. So will the two simulations have same result since I used
 the different frequency but simulate the same model? 
 
 Thanks,
 
 Rui
 
 
 ___
 meep-discuss mailing list
 meep-discuss@ab-initio.mit.edu
 http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
 




signature.asc
Description: OpenPGP digital signature
___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Re: [Meep-discuss] Question about units in meep

2013-07-29 Thread Gurso Akguc
You get same result if you also scale geometry (slab thickness maybe)

Gursoy akguc


Sent from my iPad

On Jul 29, 2013, at 2:33 AM, Rui La larui...@gmail.com wrote:

 Hi meep users,
 
 I am new to meep and have some questions about units and sizes in the code of 
 meep.
 
 I want to measure the transmission of a silicon plane with the wave of 
 1000nm. The relationship between frequency and wavelength is wavelength=1/f. 
 So I guess if I assume the 1 in my code equal to 150 nm, the relative 
 wavelength of the source should be 1000/150 = 6.67, so the f should be 1/6.67 
 = 0.15. Is my calculation correct? What if I set the 1 in my code as 300 
 nm, that means I need to change my frequency to 1/3.33=0.3. So will the two 
 simulations have same result since I used the different frequency but 
 simulate the same model? 
 
 Thanks,
 
 Rui
 ___
 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] Question

2013-06-06 Thread Eric Smoll
Responding to my own question: The code below (posted on a forum somewhere)
works on MEEP version 1.1.1.

(reset-meep)
(set! dimensions 2)
(set! force-complex-fields? true)
(set! geometry-lattice (make lattice (size 12 12 no-size) )) ;
computational domain
(set! sources (list (make source (src (make continuous-src (frequency
1.0))) (center 0.0 0.0) (component Ez) ))) ; line current source along
z-direction located at the center of the computational domain
(set! pml-layers (list (make pml (thickness 2.0) ))) ; PML layers in all
direction
(set! resolution 40.0)
(init-fields)
(meep-fields-solve-cw fields 0.0001 1 10)
(use-output-directory)
(output-efield-x) ; x-comp of E-field
(output-efield-y) ; y-comp of E-field
(output-efield-z) ; z-comp of E-field
(output-hfield-x) ; x-comp of H-field
(output-hfield-y) ; y-comp of H-field
(output-hfield-z) ; z-comp of H-field

Is this a bug? It will not work on my version of MEEP 1.2.1.
meep-fields-solve-cw is quite useful.  Can this tool be repaired?

On Thu, Jun 6, 2013 at 6:27 PM, Eric Smoll ericsm...@gmail.com wrote:

 Does the meep-fields-solve-cw function simply not work?

 I have tried inserting it into tutorial examples (using init-fields and
 force-complex-fields, with and without arguments after fields) with no
 success.  Is there a working example anywhere?

 -Eric



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

Re: [Meep-discuss] Question

2013-06-06 Thread Wu
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Hello Eric,

In Meep 1.2 you have to patch the norm2() function in CG method to let the 
solve-cw work.

Chuanren




Eric Smoll ericsm...@gmail.com schrieb:

Responding to my own question: The code below (posted on a forum
somewhere)
works on MEEP version 1.1.1.

(reset-meep)
(set! dimensions 2)
(set! force-complex-fields? true)
(set! geometry-lattice (make lattice (size 12 12 no-size) )) ;
computational domain
(set! sources (list (make source (src (make continuous-src (frequency
1.0))) (center 0.0 0.0) (component Ez) ))) ; line current source along
z-direction located at the center of the computational domain
(set! pml-layers (list (make pml (thickness 2.0) ))) ; PML layers in
all
direction
(set! resolution 40.0)
(init-fields)
(meep-fields-solve-cw fields 0.0001 1 10)
(use-output-directory)
(output-efield-x) ; x-comp of E-field
(output-efield-y) ; y-comp of E-field
(output-efield-z) ; z-comp of E-field
(output-hfield-x) ; x-comp of H-field
(output-hfield-y) ; y-comp of H-field
(output-hfield-z) ; z-comp of H-field

Is this a bug? It will not work on my version of MEEP 1.2.1.
meep-fields-solve-cw is quite useful.  Can this tool be repaired?

On Thu, Jun 6, 2013 at 6:27 PM, Eric Smoll ericsm...@gmail.com wrote:

 Does the meep-fields-solve-cw function simply not work?

 I have tried inserting it into tutorial examples (using init-fields
and
 force-complex-fields, with and without arguments after fields) with
no
 success.  Is there a working example anywhere?

 -Eric



ericsmoll2...@u.northwestern.edu




___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
-BEGIN PGP SIGNATURE-
Version: APG v1.0.8

iQJGBAEBCAAwBQJRsW8UKRxDaHVhbnJlbiBXdSAoNCC6KSA8d3VjaHVhbnJlbkBn
bWFpbC5jb20+AAoJEPts43KzMQgHgBIP/2/Yo816PHeXP8wzb4HhX2ohLmKiMQ39
ADsyRu0TA9yohh6FNPcP28nVGhxVS7RTG8p28YhsUwTmrcquJTXXoyBrLqS/KI21
GgYXAQP2peUsbLhUkbAhYDldsLXNMJ/YxtXWo9eMyyZ5N5v8WHnnjUO3OcuDLOC6
DPREXfEJyi8VDB1m5hgoF7eZc/gySxHhq3q7M+qH/Cu9qL/xZAXG6s+e1AKzDJKm
mb4taApRDDrGuqypH8QLO/HD+K3KW3y4ue9vXQx74QtqJjRRPBLfJG5GtzRaENd+
02K13yMrzpQHNEmLdzDTiaXYBH0Oh+Wz5CCfIw//z+sZszf2SvgBLS9oSgoXyhpy
CmSAESPt4P6rmxKSaRo/FrrVEhBnM/xYUhb3tW7WLsEAw0uSRCQyco3Yififc84E
lxf0FgxOmLGCIAHbhU7RyvD+OP4395eFighJgtJLo/DTK0zY0gD3Olynnu9TxwWJ
82rf2oK0lTOUW5iSzKZSxIB3IdfEgM9eMxnzpSS4WURX9YSbE4DOvzGkKF5aYzZB
ns/M8pBtMSnbHCXhJFs0wl8P+31chWlxiSHxiEf61uerjvk1NQ/i574JM/FdJzZE
PbD1NBD4OZSXLAROmeDnYy3PqaRZbfarR8c6J8T/fbuMbtmH7ULdMIS3ci+VZtU7
uUZIFb21zEIW
=e0MF
-END PGP SIGNATURE-


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


Re: [Meep-discuss] Question about the use of get-field-point in MEEP

2012-07-04 Thread Steven G. Johnson
Probably the easiest workaround is to use the field-integration code, which 
works fine in MPI (unlike get-field-pt).  Integrating over a volume of size 0 
is equivalent to just evaluating the function at a point (since zero-size 
dimensions in the integration volume are just interpolated, not integrated).

In fact, you could define a drop-in-replacement for get-field-pt as follows:

(define (my-get-field-pt c pt)
(integrate-field-function (list c) (lambda (p f) f) (volume 
(center pt

The only caveat is that c must be a component (Ez, Hx, etcetera), and not a 
derived-component (Sx, EnergyDensity, etcetera); if you want the latter, you 
must compute them manually from the field components.

You could also output the fields at a point to an HDF5 file (using in-volume 
with a size of 0).

(The whole get-field-pt code in Meep is basically a legacy of the early 
implementation; I should probably rip it out and replace it with something that 
calls the equivalent of the integration code automatically.)

On Jul 4, 2012, at 4:21 PM, Eric CASSAN wrote:

 Dear Steven,
thanks one more time for the MEEP software.
 
 I would like using the get-field-point tool in the MPI version of MEEP.
 
 I then obtain the following message:
 CHECK failure on line 583 of ../../../mpb-ctl/fields.c: get-*-point not yet 
 implemented for MPI!
 [0] MPI Abort by user Aborting program !
 [0] Aborting program!
 p0_22008:  p4_error: : 1
 p0_22008: (24562.839989) net_send: could not write to fd=4, errno = 32
 
 Is there any solution to circumvent the fact that get-field-point seems not 
 to be implemented in MPI-MEEP?
 My study indeed needs simulation in 3D and I heavily use get-field-point, 
 which slows down a lot the program.
 
 Thank you for any help!
 
 With best regards,
 Eric Cassan
 
 
 
 ===
 Eric CASSAN
 http://silicon-photonics.ief.u-psud.fr/
 Institut d'Electronique Fondamentale (UMR CNRS 8622)
 Bâtiment 220 de l'U.F.R. Sciences
 Université PARIS-SUD (PSud)
 91405, Orsay, France
 Phone : + 33 1 69 15 78 52
 ===
 

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

[Meep-discuss] Question: How to get the Cerenkov frequencies for photonic crystal lattice

2012-05-10 Thread Brahmanand Jogai
I used Ardavan Oskooi sample input file to form a moving current source 
to generate Cerenkov radiation in photonic crystal lattice.  The problem 
is I am really struggling with Scheme syntax.  I am trying to get the 
frequencies of the emitted Hz radiation.  So I am trying to use the 
harminv step-function to find the frequencies.  So far nothing is coming 
out.  However, when I combine to png files, I can see the Hz radiation 
propagating.


Is this the way to get the frequencies of the emitted radiation or is 
there a better way?


Any help will be appreciated.

Brahmanand Jogai

-
(define-param v 0.7) ;; point charge velocity
(define-param endt (/ sx v))

(set! symmetries (list (make mirror-sym (direction Y) (phase 1


(run-until endt
  (lambda ()
 (change-sources! (list (make source
  (src (make continuous-src
 (frequency 1.e-10)))
  (component Ex)
  (center (+ (* -0.5 sx) dpml
 (* v (meep-time
  (at-beginning output-epsilon)
	  (during-sources (harminv Hz (vector3 0 (- (* 0.5 sy) dpml 0.5)) 
0.4 1))

  (at-every 1 (output-png Hz -vZc dkbluered -M 1)))

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


Re: [Meep-discuss] Question about running MEEP in Ubuntu

2012-04-29 Thread Nat Wilson
PENG WANG peng.wang@... writes:

 
 Hello, Dear MEEP developers and users:
 
 I am a new user of MEEP software. I currently installed MEEP in Ubuntu,
which is suggested by Professor Steve
 as the best way to install MEEP.
 
 But when I call meep from Matlab by:
 
 unix('meep test.ctl  test.out')
 
 The output file gives me an error below:
 
 meep: /usr/local/MATLAB/R2011a/sys/os/glnxa64/libgfortran.so.3:
version `GFORTRAN_1.4' not
 found (required by /usr/lib/liblapack.so.3gf)
 
 Could you please help me solve this problem? Expecting your kind
considerations and answers!
 
 Thanks very much!
 Best Regards,
 
 Peng Wang
 11/10/2011
 
 ___
 meep-discuss mailing list
 meep-discuss@...
 http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
 
 End of meep-discuss Digest, Vol 69, Issue 7
 ***
 



I know the original poster has probably solved the problem or moved on, but I
wanted to write this as a potentially helpful reference for others.

I ran into a very similar problem under different circumstances. I am calling
code written in Python/Numpy by shelling out with MATLAB's ``system`` command.
The solution that I found is described here:

http://www.mathworks.ca/matlabcentral/newsreader/view_thread/162466

To summarize, MATLAB tries to force code called from within it to use libraries
it provides. Unfortunately, these are often fairly old, and can be incompatible
with precompiled external code. Some people seem to be removing the packaged
libraries and linking them to the correct versions elsewhere, but a less
invasive approach is to modify the file

.matlab7rc.sh (in MATLAB's bin/ directory)

so that ``LDPATH_PREFIX`` points to the right directory. This is described by
user luquesky luque, and worked for me. In my case (64-bit Linux), I changed

LDPATH_PREFIX=''

to

LDPATH_PREFIX='/usr/lib/x86_64-linux-gnu'

and saved the modified shell script to my home directory. Apparently, you can
also just save it to the project directory you're working from to avoid
user-wide changes. I think the path may not be the same for different
distributions, but you could try

find / 2/dev/null | grep libgfortran.so.3

to verify.

Nat





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


[Meep-discuss] Question about how to use the source

2012-04-06 Thread 张百珂


Hello, steven
I'm now using MEEP,and I have some problems don't know how to do it. I 
hope you can help me !
First, how to  define my own source in meep ,I want to use the source 
to send my own data ,rather than the data generated by suorce itself. I want ro 
know how to load the data and send them using the source?
Second,can I  receive the singal in some  point ,for example, can I 
receive the signal in the position of (0,0).
 Thank you!
   B.K.Zhang
  ___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

[Meep-discuss] Question about units in the Material Dispersion page on the MEEP ab-initio website

2012-03-06 Thread Eric Smoll
Hello all,

I have searched the archives and read through all the material on the
website but am still unsatisfied with my understanding of units on the
Material Dispersion
page.

http://ab-initio.mit.edu/wiki/index.php/Meep_Tutorial/Material_dispersion

I know from the archives that omega and gamma are to be specified in units
of 2*pi*c/a.  But I find the two equations given for the relative
dielectric constant to be extremely confusing and inconsistent.

What are the units of the numbers given in the first E-polarizations
entry?
(omega 1.1)(gamma 1e-5)(sigma 0.5)
2*pi*c/a, 2*pi*c/a, and a unitless fraction, correct?
How is that consistent with the equation
epsilon(f) = 2.25 + ( (1.1^2)*0.5 ) / ( (1.1^2) - (f^2) - i*f*(1e-5)/(2*pi)
)

I would greatly appreciate anyone who can help me clarify this.

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

[Meep-discuss] question about field unit and chi3 for calculating optical bistability.

2011-11-20 Thread taimaz fathollahi khalkhali



Dear meep users and Dr. Steven Johnson,

  



I would like to see optical bistability in 1-D photonic crystal. therefore  I 
have 

used a paper in this field, 
http://www.sciencedirect.com/science/article/pii/S0030401802016899.

I defined a 1-D photonic crystal which consist of alternative layer of 
materials with high and 

low dielectric constant. a Kerr medium is sandwiched symmetrically between two 
same PCs.

then I have defined single-frequency source with trigonometric shape.

I have chosen chi3 = (4/3)*3e-8*n^2 for nonlinear material but I really get 
confused about

how to choose the amplitude of  my source to see optical bistability. when I am 
choosing amplitude
of my source 1MW I see a noisy output intensity.  I have seen previous answer 
of steven

for similar question: 
http://www.mail-archive.com/meep-discuss@ab-initio.mit.edu/msg00402.html

but I still have a few question about what steven have said,

  

1-is the method steven said work for trigonometric source?

  

2- which meep flux function should use for measuring the power?

  

3-for instance if we use (flux-in-box...) or (electric-energy-in-box) , we 
must calculate it

   in hole photonic crystal volume or in a limited plane just after the source 
or at the end of photonic

   crystal?

  

  

I am very thankful if you could help me in this field. I desperately need to 
answer these questions.

  

regards,

taimaz,



  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

 

  

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

[Meep-discuss] Question about Banddiagram Tutorial

2011-11-14 Thread little Gu

Dear Meep developers and users,

I am reading the online tutorial of banddiagram and seeing that the frequency 
is normailized to a number without unit.

Supposing the unit length corresponds to 100nm, what's the actual freq of 0.5?

Does it mean f=0.5*c/100 and the angular freq=2*pi*0.5*c/100 with unit of Hz?

Thank you

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

[Meep-discuss] Question about running MEEP in Ubuntu

2011-11-10 Thread PENG WANG
Hello, Dear MEEP developers and users:

I am a new user of MEEP software. I currently installed MEEP in Ubuntu, 
which is suggested by Professor Steve as the best way to install MEEP.

But when I call meep from Matlab by:

unix('meep test.ctl  test.out')

The output file gives me an error below:

meep: /usr/local/MATLAB/R2011a/sys/os/glnxa64/libgfortran.so.3: 
version `GFORTRAN_1.4' not found (required by /usr/lib/liblapack.so.3gf)

Could you please help me solve this problem? Expecting your kind 
considerations and answers!


Thanks very much!
Best Regards,


Peng Wang
11/10/2011





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

End of meep-discuss Digest, Vol 69, Issue 7
***

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


Re: [Meep-discuss] Question about running MEEP in Ubuntu

2011-11-10 Thread Alexandr Sadovnikov

Dear Peng, 
have you tried to start meep not from matlab environment but from ubuntu's 
shell which you prefer to use? 
And have you installed meep from debian's repository or compiled it by 
yourself? 

BR,
Alexandr.

11 ноября 2011, 06:56 от PENG WANG peng.w...@utah.edu:
 Hello, Dear MEEP developers and users:
 
 I am a new user of MEEP software. I currently installed MEEP in Ubuntu, 
 which is suggested by Professor Steve as the best way to install MEEP.
 
 But when I call meep from Matlab by:
 
 unix('meep test.ctl  test.out')
 
 The output file gives me an error below:
 
 meep: /usr/local/MATLAB/R2011a/sys/os/glnxa64/libgfortran.so.3: 
 version `GFORTRAN_1.4' not found (required by /usr/lib/liblapack.so.3gf)
 
 Could you please help me solve this problem? Expecting your kind 
 considerations and answers!
 
 Thanks very much!
 Best Regards,
 
 Peng Wang
 11/10/2011
 
 ___
 meep-discuss mailing list
 meep-discuss@ab-initio.mit.edu
 http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
 
 End of meep-discuss Digest, Vol 69, Issue 7
 ***
 
 ___
 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] Question about defining oblique incident plane-wave in periodic strctures

2011-11-06 Thread PENG WANG
Hello, MEEP developers and users,

I am a greenhorn in MEEP software. I currently have a problem in creating 
oblique incident plane-waves in periodic structures. Although I have read some 
of the discussions in the mailing list, I still have some problems. The 
following is the code I used as a simple test. The structure is 2D in XY plane, 
period in x direction and PML layers are placed at Y boundaries. I tried to 
define an oblique plane-wave source. However, the simulation result shows there 
is some sort of odd oscillation in my unit lattice, seems to be interference 
pattern. There must be some problems with my codes. Could you please help me?


(define-param sx 5)
(define-param dpml 3)
(define-param sy (+ 2 (* 2 dpml)))
(define-param lamda 3)

(define-param theta (/ (* pi 45)) 180)
(define-param kdir (vector3 (sin theta) (cos theta)))
(define-param k (vector3-scale (/ (* 2 pi) lamda) (unit-vector3 kdir)))
(define ((pw-amp k x0) x)) (exp (* 0+1i (vector3-dot k (vector3+ x x0

(set! default-material air)

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

(set-param! resolution 100)
(set-param! k-point (vector3 (/ 1 sx)))
(set! ensure-periodicity true)

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

(set! eps-average? true)

(set! source
(list
(make souce (src (make continuous-src (wavelength lamda) (width 
20)))
(component Hz) (center 0 -1) (size sx 0)
(amp-func (pw-amp k (vector3 0 -1
)
)

(use-output-directory)

(run-until 100
(at-beginning output-epsilon)
(at-end output-efield-x)
(at-end output-efield-y)
(at-end output-efield-z)
)




Hope to have your answers soon.
Thanks very much!

Best regards,


Peng Wang
Lab for Optical Nanotechnology,
University of Utah
___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


[Meep-discuss] Question about suitable source for calculating optical bistability in nonlinear PCs

2011-10-30 Thread taimaz fathollahi khalkhali


Dear meep users and Dr. Steven Johnson,

I'd like to know what kind of source we should use for calculating optical 
bistability in nonlinear photonic crystals.
is it possible to use predefined source in meep like gaussian-src or not? and 
if the answer is yes, how?

according to my information we should use single frequency source with 
an amplitude of the triangular function for calculating O.B. a source like:
A(n) Eo exp( 0+i w  n dt)
which A(n) is a trigonometric function.
if we want to use this kind of source we have to use custom-src in meep, but 
there is a 
big question. in meep w(frequency) specified in units of (2 *pi* c/a). 
therefore when we 
speak about frequency it is usually a number between 0 until 1 in unit of   (2 
*pi* c/a),
for instance we say there is a band gap between w=0.2 (2pic/a) and w=0.4 
(2pic/a) frequencies.
according to this comments if we use a source like this :  A(n) Eo exp( 0+i w  
n dt) , instead of w,
we should put frequency in unit of (2 pi c /a) or we must multiply light 
velocity and pi number
and then put it in above source? 

The answer to this question is very important to me, I appreciate if someone 
gives me some information.

regards,

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

[Meep-discuss] Question about calculating optical bistability.

2011-09-10 Thread Shervin Sharif
Dear meep user and Dr. Steven Johnson,

All examples about transmission spectrum in meep tutorial explain how to 
calculate
transmission in a frequency range. In other word the horizontal axis represents 
a range
 of frequencies and the vertical axis represents transmission.during this 
calculation we use 

command like: flux-region , add flux ,which accumulate the appropriate 
Fourier-transformed 

fields in order to compute a flux spectrum.
I am trying to calculate optical bistability with meep software and I know that 
for plotting OB
a source should be used that at different times have different incident 
intensity.
Now my big problem is that I don't know how to plot transmission for a range of 
different 

intensity.  In other words, I would like to have a graph where  the horizontal 
axis represents a rangeof
incident intensity and the vertical axis represents transmission. but I do not 
know  how and what 

commands shouldI use in this software.Any help would be very useful for me in 
this case, andIthankin advanceforit.

regards,
shervin,
shervinsha...@ymail.com___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

[Meep-discuss] Question about Gaussian source in meep software

2011-07-25 Thread taimaz fathollahi khalkhali

 
Dear meep users and Dr. Steven Johnson,

I have two questions regarding the source in meep software,

1- What is the conception of turning on and especially turning off the source?

turning on the source , specifies the moment that the Gaussian pulse fully 
formed and
turning off the source ,After a specified time due to the this term: exp( 
(t − t0)2 / 2w2),pulse tend towards zero.
   Am i right to expression these concept?


2- exp( − iωt − (t − t0)2 / 2w2)

 in above Mathematical relationship,  w ,represents the pulse width in time 
domain?
 and f or (ω = 2 *pi * f ) represent the pulse frequency in time domain ?
 and at the end, It would be very helpful If Dr. Steven Johnson or the users of 
meep 
 State that is there any way of viewing the pulses of effluent in the 
environment or not?

Sincerely,
Thanks,

Taimaz Fathollahi
taim...@hotmail.com
http://www.facebook.com/tomy.fathollahi
  ___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Re: [Meep-discuss] Question about a Silica in Multilayered nanoshell

2011-06-27 Thread philip
jack swagger jswagger65@... writes:

 
 
 Dear MEEP users,
   I am trying to model  the Multilayered nanoshell, which 
 contains 
a metal core, a dielectric silica and the outer metal shell. At 1st, i divide 
this complex structure into several parts and calculate its extinction 
efficiency. I know from the litrature that if you enclose a silica sphere 
inside 
a metal shell (single layer nanoshell) then the extinction peaks would be red 
shifted. But when i tried to enclose a metal inside a silica shell then i 
also obtained a red shifted peak. Can somebody tell me the role of the silica 
in 
this structure. I mean why the extinction peak is always red shifted. I have 
attached a figure with the email, which shows the extinction efficiency of a 
single silver sphere and a gold sphere and then enclosing them in a dielectric 
silica due to which the extinction peaks red shifted. However, incase of 
enclosing the silica inside a metal, we get a larger red shift. But my question 
is, why incase of enclosing a metal inside a silica we get a red shift?
  
 Thanks.
  
 BR,
 Jack 
 
 
 
 ___
 meep-discuss mailing list
 meep-discuss@...
 http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Hi Jack,

Would you mind sharing the code with us?

I think the best way to start analyzing how different materials affect the 
extinction would be to calculate it analytically e.g. with the dipole 
approximation (cf. Linear optical properties of gold nanoshells Averitt et. 
al. JOSA B 1999)


cheers,
Phil


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

[Meep-discuss] Question about triangular lattice first brillouin zone

2011-06-27 Thread taimaz fathollahi khalkhali

Dear meep  mpb users 


In MPB user tutorial , when it;s described  calculation of Photonic  band 
structure of triangular lattice,
we see such statement about k-point of irreducible Brillouin zone of a 
triangular lattice.



(set! k-points (list (vector3 0 0 0)  ; Gamma
 (vector3 0 0.5 0); M
 (vector3 (/ -3) (/ 3) 0) ; K
 (vector3 0 0 0))); Gamma
(set! k-points (interpolate 4 k-points))

as far as I know the Brillouin zone of a triangular lattice is look like 
a honeycomb the coordinate of its center and edges  is characterized by points 
like
Gamma=[0 0]  , K=2pi/a*[2/3   0] ,  M=2pi/a*[1/2   1/(sqrt(3)*2)] 
I would like to know, is there any one who can show me [-1/3 1/3] point on 
Brillouin zone?
I am get completely confused by the point which have shown in MPB user tutorial.

regards,

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

[Meep-discuss] Question about a Silica in Multilayered nanoshell

2011-06-25 Thread jack swagger

Dear MEEP users,
  I am trying to model  the Multilayered nanoshell, which contains 
a metal core, a dielectric silica and the outer metal shell. At 1st, i divide 
this complex structure into several parts and calculate its extinction 
efficiency. I know from the litrature that if you enclose a silica sphere 
inside a metal shell (single layer nanoshell) then the extinction peaks would 
be red shifted. But when i tried to enclose a metal inside a silica shell then 
i also obtained a red shifted peak. Can somebody tell me the role of the silica 
in this structure. I mean why the extinction peak is always red shifted. I have 
attached a figure with the email, which shows the extinction efficiency of a 
single silver sphere and a gold sphere and then enclosing them in a dielectric 
silica due to which the extinction peaks red shifted. However, incase of 
enclosing the silica inside a metal, we get a larger red shift. But my question 
is, why incase of enclosing a metal inside a silica we get a red shift?
 
Thanks.
 
BR,
Jack  attachment: nanoshell.png___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

[Meep-discuss] question about meep-mpi

2011-01-24 Thread yimin sun
Hi,

During past several days, I found something more about that bizarre problem
with meep-mpi. If meep-mpi is used without mpirun, that is, meep-mpi a.ctl,
then it can run successfully. However, if mpirun is involved, i.e., mpirun
-np 4 meep-mpi a.ctl, then the same problem (.ctl file cannot be understood)
will appear again.

When 'meep-mpi --version' command is run, the following information shows:
Use MPI version 1.2, 1 processes
Using libctl 3.1 and Guile 1.6.4

I am wondering whether this is still the problem of incorrect installation.
Could anybody give me some suggestions? What should I do to solve this
problem?

By the way, a vasp software package is also installed on our sever, and
'mpirun -np 4 vasp_pal' can run successfully.

Thanks in advance.

-- 
Regards,

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

Re: [Meep-discuss] Question about (run-k-point s...) and nonlinear material.

2010-11-02 Thread Alexandr Sadovnikov
Thank you, Prof. Steven.
I've got some ideas about this problem: I see a small down movement of the 
branch of 
the dispersion diagram in the Kerr-nonlinear periodic structure. At this moment 
with 
(run-k-points...) method I just see this movement when the ampliude of the 
signal is not big 
enough. And when I started to simulate the structure without periodical 
boundary condition
I started to observe gap solitons, as you write in your letter. 
Now I tried to understand where is the scope of applicability of my simulation. 
Of course it is very important question as well.

Thank you,  
Alexandr.

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


[Meep-discuss] Question about (run-k-points...) and nonlinear material.

2010-11-01 Thread Alexandr Sadovnikov
 Dear Prof. Steven and dear meep users. 
 I do appreciate if you can help me with understanding 
 such a easy thing in meep::
 Can I use (run-k-points...) statement in my ctl-file 
 {e.g. (run-k-points 300 (interpolate k-interp (list (vector3 kmin) (vector3
 kmax)}
 if my dielectric is nonlinear? i.e.
 (material (make dielectric (index n1) (chi3 xx3) ))
 Or it isn't correct at all? 
 Thank you a lot! 
 
 Sadovnikov Alexandr
 Postgraduate student
 Saratov State University, Russia


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


Re: [Meep-discuss] Question about (run-k-points...) and nonlinear material.

2010-11-01 Thread Steven G. Johnson

On Nov 1, 2010, at 11:32 AM, Alexandr Sadovnikov wrote:

Dear Prof. Steven and dear meep users.
I do appreciate if you can help me with understanding
such a easy thing in meep::
Can I use (run-k-points...) statement in my ctl-file
{e.g. (run-k-points 300 (interpolate k-interp (list (vector3 kmin)  
(vector3 kmax)}

if my dielectric is nonlinear? i.e.
(material (make dielectric (index n1) (chi3 xx3) ))
Or it isn't correct at all?



You can use it, but it may not make any sense.  run-k-points works by  
exciting the fields with some pulse source (specified by you), waiting  
until the source is turned off, and analyzing the decaying/oscillating  
fields with harminv.   However, in a medium with significant  
nonlinearities, the frequency and other characteristics of the modes  
can change with time, so this procedure may or may not make sense.


In a nonlinear situation, you have to be very careful in deciding  
exactly what you want to compute.


--SGJ

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


Re: [Meep-discuss] Question about (run-k-point s...) and nonlinear material.

2010-11-01 Thread Alexandr Sadovnikov
Thank you, Prof. Steven! 
I just tried to compute band gap diagram for 2d periodical structure, with 
nonlinear
layers and then I want to compare this result with the results from the 
nonlinear Shroedinger equations. 
So I want to see how the cut-off frequencies changes with the amplitude gets 
larger.
BTW this method (run-k-points) works when the nonlinear additive to the 
refraction index is 
not big enough of course! 
Thank you for your opinion, Prof. Steven. I'll try to study this problem more 
closely, 
because some strange things start to occur with some amplitude value, I want 
to say that if the amplitude gets the value 3.5 (some definite value) I see at 
the 
dispersion diagram 2 branches instead of one (I tried to publish image on
http://imagepaste.nullnetwork.net/viewimage.php?id=1428)

Alexandr


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


Re: [Meep-discuss] Question about (run-k-points...) and nonlinear material.

2010-11-01 Thread Steven G. Johnson

On Nov 1, 2010, at 12:15 PM, Alexandr Sadovnikov wrote:
I just tried to compute band gap diagram for 2d periodical  
structure, with nonlinear
layers and then I want to compare this result with the results from  
the nonlinear Shroedinger equations.


This is a complicated question because it depends on the excitation.   
Depending on the excitation, with a big enough amplitude you may even  
create gap solitons (which are solutions at frequencies in the gap  
which propagate in the crystal because the nonlinearity allows the  
field to create its own waveguide or cavity defect).



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


[Meep-discuss] Question about magnetostatic waves

2010-08-03 Thread Alexandr Sadovnikov
 Hello, dear Prof. Steven and Meep Users.
 I would like to ask you about application and use of
 meep to the computation of magnet systems such as 
 ferromagnetic films in which the magnetostatic waves can 
 propagate. So I'm going to do this computation (of magnetostatic
 wave propagation) using meep and ctl(scheem, aka libctl) interface.
 The problem is that in this computation one have to use
 the relative permeability tensor (aka mu) and 
 the components of this tensor depend on the frequency. 
 I suppose, that one have to rewrite some part of meep code 
 and recompile to do this. Maybe this problem can be solved
 if we only change (in our imagination) that eps - mu 
 and will compute in this way. But I don't know unfortunately
 how can one use in computation  the tensor of relative permittivity 
 or permeability which components depend on frequency. That is the trouble for 
me. 
 
 Thank you in advance for any possibly help.
 Alexandr. 
 Postgraduated student. Saratov State University. Russia.
 leos...@mail.ru
 

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


[Meep-discuss] Question about nonlinear feedback parameter

2010-04-26 Thread Jianhong Zhou

Dear Prof. Steven and Meep users:

I hope to repeat the work (),but I am not sure of the nonlinear
feedback parameter:
(1) |E.E|^2 VS |E.E^*|^2 : Since the field values stored in meep are
real, is there any difference between them?
(2) A single linear simulation is enough to determine its vavlue for
different configurations of the studied system. Does that mean that
after the simulaton reachs stable state, I can get the field value to
calculate the parameter at any time?

Thank you for your attention.
 
-- 
 Flower is beautiful!


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


Re: [Meep-discuss] question about a compound s tatement

2010-04-19 Thread Alexandr Sadovnikov
Dear Feng, 
try to output field components not only at the end of computation time
but e.g. for discrete time : try to use command at-every.
BR, 
Alexandr.

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


Re: [Meep-discuss] Question about time-average power and loop

2009-11-16 Thread Steven G. Johnson


On Nov 16, 2009, at 1:50 AM, 蒙自明 wrote:


Dear Steven and all:
 I am a new user of Meep. What I want to ask is about:
 How can I determine the time-average input power and record the  
time-average output power at some position?
According to the part Units and Nonlinearity in Meep on the  
website, the input power is approximately proportional to the square  
of current amplitude(J^2). Is that a time-average correlation?


This is exactly true for a linear system.  If you multiply J by 2, the  
resulting fields multiply by 2, by linearity.


Further, in the nonlinear situation recording time-average power  
seems problematic. Has this been fixed?


Why is this problematic?

The key thing in a nonlinear system is to define precisely what you  
want to do.  The optical bistability results are usually for CW  
(constant amplitude) incident fields.  If you have a CW field (or a  
field whose amplitude is changing very slowly, like a narrowband  
gaussian), computing average power is no problem: you just output the  
flux every timestep for one period, for example.  There are lots of  
other ways to do it as well, e.g. for a narrowband Gaussian you can  
ask Meep to compute the Fourier-transformed flux at the center  
frequency, and work backwards from that to get the Gaussian amplitude  
and any other characteristic you want.


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

[Meep-discuss] Question about time-average power and loop

2009-11-15 Thread 蒙自明
Dear Steven and all:
 I am a new user of Meep. What I want to ask is about:
 How can I determine the time-average input power and record the 
time-average output power at some position?
According to the part Units and Nonlinearity in Meep on the website, the 
input power is approximately proportional to the square of current 
amplitude(J^2). Is that a time-average correlation? Further, in the nonlinear 
situation recording time-average power seems problematic. Has this been fixed?
 Actually the ultimate purpose is to repeat the optical bistable results 
published in Appl.Phys.Lett, 83,2739(2003) by M.F.Yanik. If anyone can tell me 
how to write the loop to record the output power vs the input power data, your 
great help is highly appreciated. 
 Thanks very much.
Ziming 


 



 



 



 



 



 



 

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

Re: [Meep-discuss] Question about setting the current source

2009-09-22 Thread Roy Zhang

Hi Steven,

Thanks a lot for helping me find out a big mistake I made - that is, I was 
confused by the defination of current in MEEP, which is totally different 
from that in driving circuit.


So here comes another question. I notice that in other FDTD softwares such 
as XFDTD and SEMCAD, source is always defined using driving circuit, 
sometimes a voltage source, sometimes a current source. Is there a relation 
or a method to convert between these two ways of defination? I mean the ways 
in MEEP and other softwares. I've read some books and articles about EM 
emission but failed to find what I want to know.


Best regards,
Roy

Steven G. Johnson stevenj@gmail.com 
wrote in message news:8afde0f6-d69c-4e60-89b9-62458b04a...@fftw.org...
The current in Meep is added directly as a specified free current J in 
Maxwell's equations (see Maxwell's equations in the Meep intro).  Meep 
does not simulate the driving force behind this free current, nor does 
the current have to be placed in a conductor.  Specifying a current  means 
that somehow you are shaking a charge at that point (by whatever  means, 
Meep doesn't care) and you want to know the resulting fields.


Also, if you are thinking in terms of lumped circuit models,  resistances, 
voltages, capacitances, and so on, then possibly Meep is  the wrong tool. 
Lumped-circuit models are generally only valid in the  quasi-static limit 
where the wavelength is much larger than your  circuit elements, and if 
you are in this limit you don't want to be  solving the full Maxwell 
equations (which are not only overkill, but  are also very expensive if 
your wavelength is very large because your  computational cell must 
normally be much larger than the wavelength),  you want to be solving the 
equations of electrostatics and  magnetostatics (Poisson's equation etc.).


Steven

On Sep 15, 2009, at 9:40 AM, Roy Zhang wrote:
I'm trying to set a current source and find there's no parameter to 
describe the resistance(50 ohm, normally) in the feeding point,  which is 
frequently used in EM emission system. That's quite  strange. Can you 
tell me why? Your earliest reply will be greatly  appretiated. 




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


Re: [Meep-discuss] Question about setting the current source

2009-09-22 Thread Roy Zhang
(I don't see my reply posted, so I'm posting it again. I'm sorry if this 
mail is duplicated.)


Hi Steven,

Thanks a lot for helping me find out a big mistake I made - that is, I was
confused by the defination of current in MEEP, which is totally different
from that in driving circuit.

So here comes another question. I notice that in other FDTD softwares such
as XFDTD and SEMCAD, source is always defined using driving circuit,
sometimes a voltage source, sometimes a current source. Is there a relation
or a method to convert between these two ways of defination? I mean the ways
in MEEP and other softwares. I've read some books and articles about EM
emission but failed to find what I want to know.

Best regards,
Roy

Steven G. Johnson stevenj@gmail.com 
wrote in message news:8afde0f6-d69c-4e60-89b9-62458b04a...@fftw.org...
The current in Meep is added directly as a specified free current J in 
Maxwell's equations (see Maxwell's equations in the Meep intro).  Meep 
does not simulate the driving force behind this free current, nor does 
the current have to be placed in a conductor.  Specifying a current  means 
that somehow you are shaking a charge at that point (by whatever  means, 
Meep doesn't care) and you want to know the resulting fields.


Also, if you are thinking in terms of lumped circuit models,  resistances, 
voltages, capacitances, and so on, then possibly Meep is  the wrong tool. 
Lumped-circuit models are generally only valid in the  quasi-static limit 
where the wavelength is much larger than your  circuit elements, and if 
you are in this limit you don't want to be  solving the full Maxwell 
equations (which are not only overkill, but  are also very expensive if 
your wavelength is very large because your  computational cell must 
normally be much larger than the wavelength),  you want to be solving the 
equations of electrostatics and  magnetostatics (Poisson's equation etc.).


Steven

On Sep 15, 2009, at 9:40 AM, Roy Zhang wrote:
I'm trying to set a current source and find there's no parameter to 
describe the resistance(50 ohm, normally) in the feeding point,  which is 
frequently used in EM emission system. That's quite  strange. Can you 
tell me why? Your earliest reply will be greatly  appretiated. 




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


Re: [Meep-discuss] Question about setting the current source

2009-09-16 Thread Steven G. Johnson
The current in Meep is added directly as a specified free current J in  
Maxwell's equations (see Maxwell's equations in the Meep intro).  Meep  
does not simulate the driving force behind this free current, nor does  
the current have to be placed in a conductor.  Specifying a current  
means that somehow you are shaking a charge at that point (by whatever  
means, Meep doesn't care) and you want to know the resulting fields.


Also, if you are thinking in terms of lumped circuit models,  
resistances, voltages, capacitances, and so on, then possibly Meep is  
the wrong tool.  Lumped-circuit models are generally only valid in the  
quasi-static limit where the wavelength is much larger than your  
circuit elements, and if you are in this limit you don't want to be  
solving the full Maxwell equations (which are not only overkill, but  
are also very expensive if your wavelength is very large because your  
computational cell must normally be much larger than the wavelength),  
you want to be solving the equations of electrostatics and  
magnetostatics (Poisson's equation etc.).


Steven

On Sep 15, 2009, at 9:40 AM, Roy Zhang wrote:
I'm trying to set a current source and find there's no parameter to  
describe the resistance(50 ohm, normally) in the feeding point,  
which is frequently used in EM emission system. That's quite  
strange. Can you tell me why? Your earliest reply will be greatly  
appretiated.


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


[Meep-discuss] Question about setting the current source

2009-09-15 Thread Roy Zhang

Hello everyone,
 I'm trying to set a current source and find there's no parameter to 
describe the resistance(50 ohm, normally) in the feeding point, which is 
frequently used in EM emission system. That's quite strange. Can you tell me 
why? Your earliest reply will be greatly appretiated.


Best regard, Roy 




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


[Meep-discuss] question about flux-in-box

2009-03-29 Thread yinon kares
hello anyone

I didn't understand from the reference how
to get a numerical value of the flux in area which I define
where to write this command?
I should see at the output numerical value?
___
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 using meep-mpi

2009-02-24 Thread Yan Liu
Dear meep users and Dr. Johnson,
Our group is trying to do some calculation by meep-mpi with a computing
space of 300*300*300. The resolution is setting to 1.
We installed OpenMPI which is very easy to to use. But the calculation is
about 900s/step when we use 8 processors. We need 1500 steps to finish our
simulation, which means that we wait it for 10 days. I wonder if this
phenomenon is normal or there is still something we need to do in order to
speed up the calculation?

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

Re: [Meep-discuss] question: timestep in Meep

2009-01-31 Thread Paweł Smoliński
 
 according to your reply, here are a few calculations:
 
 a=1 micrometer =1*10^-6 meter
 
 resolution =1000
 
 courant=.5
 
 hence
 
 dt=2000 a/c in meep units.
 
 or
 
 dt=2000*10^-6/(3*10^8)
 
 =6.66*10^-11 seconds
 
 is it correct?
 
Please look how Meep units are defined:
http://ab-initio.mit.edu/wiki/index.php/Meep_Introduction#Units_in_Meep
Time unit in SI is: t = a / c = 1e-6 / 3e8 = 3.3e-15 s (3.3 fs)
If your resolution r=2000, dt = t/r = 3.3e-15/2e3 = 1.6e-18 s
And now if you know dielectric constant value in the material you can,
you can calculate speed and length of your wave in this material and
then you can simply how many wavelengths will pass the point at the
single timestamp.
-- 
Regards,
Pawel Smolinski
Faculty of the Fundamental Problems of Technology
Wroclaw University of Technology, Poland

___
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

Re: [Meep-discuss] question: timestep in Meep

2009-01-30 Thread Paweł Smoliński
 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?

Hi,
timestep (dt) is set when you are define your structure and it depends
on two parameters: structure resolution r and Courant parameter (dt =
r/Courant, Courant is equal to 0.5 by default); dt is given in Meep
Units off course (c=1, time = length_unit / c = length_unit).
You can control the Courant value by meep-structure-Courant-get/set
functions.
If you want know how many wavelength will pass at a particular point in
N timesteps, it is clean physics - if you know dielectric constant at
given point, you can calculate speed light in this point and then
formula speed_light_in_material * N * timestep / wavelength will give
you the answer ;)
-- 
Regards,
Pawel Smolinski
Faculty of the Fundamental Problems of Technology
Wroclaw University of Technology, Poland


___
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 strange output in the cylindrical center axis (r=0)

2009-01-14 Thread Lingyun Wang

Dear Steven and Meep users,
I am writing a ctl code to model a cone optical fiber tip with center 
aperture (diameter 100nm) and ring gratings on the side wall of the Au 
coating layer. So this is a perfect cylindrical symmetrical geometry. 
The source wavelength is 405 nm with circular polarization. The output 
shows there is light comes out from the side gratings. The grating gap 
is 50 nm width. But nothing from the center aperture around (r=0), even 
the center aperture size is bigger (100nm). THERE SHOULD BE SOMETHING 
COMING OUT FROM THE CENTER.  For example if the lattice size is 50x50 
(50 nm characteristic length, resolution is 10), the output hdf5 matrix 
size will be 501x500, instead of 500x500. So is this extra 1 unit coming 
from r=0? Angular momentum m is 3 or 4. But if I put m=1, the 
calculation will be unstable (number will be inf).

How do I ignore the r=0?
Quote from meep reference:

|m| [|number|]
   For |CYLINDRICAL| simulations, specifies that the angular ?
   dependence of the fields is of the form /e/^/i//m/? (default is
   |m=0|). If the simulation cell includes the origin /r/ = 0, then |m|
   must be an integer. 

If I want to get more accurate data from the center axis (r=0), how do I 
setup it?


Attached is my ctl file and the outputs plot of eps structure and 
denergy output.  Side one angle is 15 degree. The light source locates 
at the right side of the page. Tip center locates at the top center of 
the page. So don't be confused.

Due to the size limitation, I posted these plots at link below.

http://picasaweb.google.com/btld123/MeepOutput#

Thank you!


Codes:

;Date Jan 09, 2009
;3D simulation of the smaller tip.
;System memory has been upgraded to 6GB, and running 64 bit linux.
;The memory will be upgraded to 8GB.
;Make a smaller model of the laser Tip to reduce calculation time and 
memory requirement.

;Top to bottom size is 1.5um.
;Change coordinate to be Cylindrical instead of Cartisian
;Collect data at certain point in time domain to do a spectral analysis
;FFT will be running by Matlab.
;Geomery detail see note page 88.
;The setup in program TipGratingsV1.ctl is a little bit off for the cone 
angle.
;The cone angle in this case is 15 degree, which is smaller than the 
actual angle

;setup by the cone dimensions.
;The TipGratingsV2.ctl fixed this problem. It also fixed the wrong 
caluclation that is based

;on outer cone. It should use the inner cone to do the calculation.

(reset-meep)
(define-param UnitL 50); characteristic unit length equals to 50 nm
(define-param WaveL 405);free space wavelength of the incident lightwave 
in nm.

(define PI 3.1415928);define constant pi
(define fcen (/ UnitL WaveL));free space radian frequency as defined in Meep

(define-param S_r 50);r lattice dimension
;(define-param S_p (* 2 pi));phi lattice dimension
(define-param S_z 50);z lattice dimension

(define C_L 8.5026);cone length in z direction
(define C1_R1 32.7322);inner cone upper radius in r direction
(define C1_R2 1);inner cone lower radius in r direction. B/c in meep, 
the r=0 axis
;is the axis of symmetry. r=0 should not be included in the calculation. 
Otherwise
;there will be a blank stripe in the center, which doesnot reflect the 
real situation.
;So for a 100 nm aperture (diameter), the setup in script should be 2 
for radius given
;the 50nm characteristic length. KEY POINTS: Why there is not field 
output at the center

;aperture?


(define C_t_up 2); metal coating thickness at upper opening
(define C_t_down 2); metal coating thickness at lower bottom

(define-param C2_R1 (+ C1_R1 C_t_up));outter cone upper radius in r 
direction
(define-param C2_R2 (+ C1_R2 C_t_down));outter cone lower radius in r 
direction


(define-param P_t 10);define the PML thickness

(define C_C (- (/ (- S_z C_L) 2) P_t));cone center point in z axis
(define-param Src_Cr (/ C1_R1 2));center of the source in r axis
(define-param Src_Cz (- (/ S_z 2) P_t));center of the source in z axis
(define-param Src_Size (- C1_R1 2));size of the source in r direction

(set! default-material air)
(set! dimensions CYLINDRICAL)
(set-param! resolution 10); 10 pixels per unit
(set-param! m 4); m factor for angular momentum
(set-param! Courant 0.25)
(set! geometry-lattice (make lattice (size S_r no-size S_z)))

; The geometry of this structure is a bit tricky to specify. First the 
outer cone needs to be
; drawn as a solid of Au. Then the outer most ring needs to be done 
first. The outer most ring
; is drawn first by an air cylinder with the same radius as the ring 
outer edged. Then another
; cylinder with the same location and height but with the radius of the 
ring inner edge is drawn
; as a solid of gold. The same goes with the other rings until it 
reaches the bottom aperture openning.

; The last step is drawing the inner cone filled with the Silicon dioxide.

; First the paramters that specify the cylinder locations are defined here.
; See note book drawing on page 91. The matlab program for 

[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

[Meep-discuss] Question about storing and initialization

2008-12-08 Thread Yu Liu
Hi,

I want to simulation the respond of a waveguide to different pulses.
However, It takes time for the waveguide reach a stable status.
So I want to store the status and load it every time for different pulses.
It will save a lot of time.

I checked the source code. It seems the fields can be initialized by
specifying a function which returns the value of the fields at every grid
points.
Does it means what I need to do is storing the fields of the stable status
to a hdf5 file and loading it by the function? Can the fields value be
exactly restored in this way?

Thank you!

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

[Meep-discuss] Question about in-volume

2008-08-25 Thread Zhu, Lei
Dear Dr.Steven and meep users,
 
I have a question of the command in-volume.
 
I am trying to take out the data using in-volume.
And I use a 2d-TM planewave as source.
 

(set! resolution 10)
(in-volume (volume (center 0 1 0) (size 2 0 0))  output-efield-z))
..
 
I got 22 Ez.along x-axis from -1 to 1.
Why the number of Ez is not 23, but 22?
Why is not Ez at points (-1,0), (-0.9,0), (-0.8,0),(-0.7,0), (-0.6,0), 
(-0.5,0),(-0.4,0), (-0.3,0), (-0.2,0),(-0.1,0), (0,0), (1,0) plus two 
extra pixels on each boundary?  
Thanks in advance.
 
 
Lei 

 

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

Re: [Meep-discuss] Question

2008-07-12 Thread Steven G. Johnson

On Jun 25, 2008, at 10:24 AM, mehdi miri wrote:

 Hi there
 Does the MPI (Parallel Processing) features work with Scheme  
 Scripting? (*.ctl files?)

Yes. 

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


Re: [Meep-discuss] Question on PML

2008-07-02 Thread Alexander Sprafke
Hi Andreas, thanks for your quick response,

 I would not think that you can make things worse by putting a small  
 pml
 but I think a pml with less than 5 cells also makes no sense.

ok, I understand that such a small pml layer does not make much sense.
I didn't mean to make it that small, maybe I shortly describe my  
problem:
For a start I'd like to calculate scattering and absorption of a  
spherical gold nano particle (diameter 100nm, placed in center of  
computational cell, surrounded by flux-planes) and compare it to the  
analytical Mie solution.
I use a resolution of 2 nm, my source (plane wave propagting along z,  
Ex polarized) works in the visible/nir region, i.e. 400...1000nm, so I  
think I should use pml thicknesses of 500nm (approx. 0.5-1  
wavelengths) in the Z and Y direction.
Since the particle itself represents a dipole source, I don't expect  
much radiation in the X direction, thats why I think I can reduce the  
pml thickness in that direction or even omit them.
All in all my computational cell is now 2000nm(Z)*1600nm(Y)*1000nm(X).
Using periodic boundary conditions and a x-cell size of 1000nm means  
that the next particle is 1000nm away, at that distance and  
polarization, coupling of nano particles is very weak (the opposite is  
true for the y direction).
My question is if putting a pml layer of 100 or 200nm in that  
direction would give me unwanted reflections into my cell (and inside  
placed flux-planes) because it is smaller than the recommended 0.5  
wavelengths or would help in ensuring that coupling of the particle  
with its neighbours is minimized.

The reason I do all this is downsizing the computaional cell.

Regards
Alex
Other comments on how I plan to validate Mie spectra using meep are  
also very welcome.


 Hallo Alex,

 usually a pml is designed to give a fixed reflectivity in case it is
 continuous space. When you now make the pml to thin, it will come to
 numerical reflections at the interface from the space to the pml and
 inside the pml. Because of the finite spatial sampling the discretised
 pml is not matched perfectly anymore where a continuous one would  
 still be.
 I would not think that you can make things worse by putting a small  
 pml
 but I think a pml with less than 5 cells also makes no sense.

 Andreas

 Alexander Sprafke schrieb:
 Dear meep community, dear Steven,

 the meep reference says about pml layers The thinner it is, the more
 numerical reflections become a problem.
 Lets say I have a pml layer which is too thin. Do these reflections  
 come
 from propagating waves going through the pml layer and being  
 reflected
 at the end of the computational cell, going through the pml layer  
 again
 and entering the region of interest. Or is it the too-thin-pml  
 layer itself?
 The reason I ask is the following: I'd like to downsize my  
 computational
 cell. I have a simple structure from which I know that there is  
 almost
 no scattering (- almost no coupling in case of periodic boundary
 condition) into one certain direction, so I think it is reasonable to
 omit the pml layer in that direction which would make the  
 computational
 cell significantely smaller. I was wondering if I should still put a
 thin pml layer at that direction to get from almost no
 scattering/coupling to even less scattering/coupling. I'm not sure
 whether this would help or worsen the computation.

 Thanks for an answer in advance.
 Alex

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


Re: [Meep-discuss] Question on PML

2008-07-02 Thread matt




Alex,

My experience with plasmonic problems is that 2nm isn't fine enough of a 
resolution.  I only got nice results with 0.5nm (I had to use a 
cluster).  I was working with a Drude model for silver, not gold, but I 
imagine that you will have similar results.

I don't think you can shave off much from your PML thickness, especially 
at with wavelengths as long as 1000nm.  Unfortunately, I think the only 
answer to your question about whether 100nm is too thin in the one 
direction is to also try 200nm, 400nm, and so on, and see how your 
results converge.  That's probably not reasonable for such a large 
problem, but I don't think there's any way around it.

If your results differ from the Mie solution, I would also check your 
assumption about the periodicity being long enough by simply running the 
same problem without the periodicity and with PML in all three 
directions.

A side note:  One thing which would be really nice for problems like 
this is a Total-field Scattered-field approach to allow plane waves with 
PML in all directions.  I tried the solution proposed by Andreas Unger 
previous on the list but found some problems with it.  First, I couldn't 
make it work with broadband sources.  Second, you can't initialize the 
field everywhere with an analytic planewave, so you have to let the 
sources propogate and settle (that is very costly for plasmonic problems 
like yours with huge computation domains).  Also bothersome is that the 
scattered fields and total fields aren't actually stored separately, so 
you don't have access to the scattered field inside the total field 
region.  Finally, having so many sources all around the computation 
domain make the simulation very slow.

Best,
Matt




On Wed, 2 Jul 2008, Alexander Sprafke wrote:

 Hi Andreas, thanks for your quick response,

 I would not think that you can make things worse by putting a small
 pml
 but I think a pml with less than 5 cells also makes no sense.

 ok, I understand that such a small pml layer does not make much sense.
 I didn't mean to make it that small, maybe I shortly describe my
 problem:
 For a start I'd like to calculate scattering and absorption of a
 spherical gold nano particle (diameter 100nm, placed in center of
 computational cell, surrounded by flux-planes) and compare it to the
 analytical Mie solution.
 I use a resolution of 2 nm, my source (plane wave propagting along z,
 Ex polarized) works in the visible/nir region, i.e. 400...1000nm, so I
 think I should use pml thicknesses of 500nm (approx. 0.5-1
 wavelengths) in the Z and Y direction.
 Since the particle itself represents a dipole source, I don't expect
 much radiation in the X direction, thats why I think I can reduce the
 pml thickness in that direction or even omit them.
 All in all my computational cell is now 2000nm(Z)*1600nm(Y)*1000nm(X).
 Using periodic boundary conditions and a x-cell size of 1000nm means
 that the next particle is 1000nm away, at that distance and
 polarization, coupling of nano particles is very weak (the opposite is
 true for the y direction).
 My question is if putting a pml layer of 100 or 200nm in that
 direction would give me unwanted reflections into my cell (and inside
 placed flux-planes) because it is smaller than the recommended 0.5
 wavelengths or would help in ensuring that coupling of the particle
 with its neighbours is minimized.

 The reason I do all this is downsizing the computaional cell.

 Regards
 Alex
 Other comments on how I plan to validate Mie spectra using meep are
 also very welcome.


 Hallo Alex,

 usually a pml is designed to give a fixed reflectivity in case it is
 continuous space. When you now make the pml to thin, it will come to
 numerical reflections at the interface from the space to the pml and
 inside the pml. Because of the finite spatial sampling the discretised
 pml is not matched perfectly anymore where a continuous one would
 still be.
 I would not think that you can make things worse by putting a small
 pml
 but I think a pml with less than 5 cells also makes no sense.

 Andreas

 Alexander Sprafke schrieb:
 Dear meep community, dear Steven,

 the meep reference says about pml layers The thinner it is, the more
 numerical reflections become a problem.
 Lets say I have a pml layer which is too thin. Do these reflections
 come
 from propagating waves going through the pml layer and being
 reflected
 at the end of the computational cell, going through the pml layer
 again
 and entering the region of interest. Or is it the too-thin-pml
 layer itself?
 The reason I ask is the following: I'd like to downsize my
 computational
 cell. I have a simple structure from which I know that there is
 almost
 no scattering (- almost no coupling in case of periodic boundary
 condition) into one certain direction, so I think it is reasonable to
 omit the pml layer in that direction which would make the
 computational
 cell significantely smaller. I was wondering if I should still put a
 thin pml 

Re: [Meep-discuss] Question on PML

2008-07-02 Thread Ardavan F. Oskooi
Alexander Sprafke wrote:
 Lets say I have a pml layer which is too thin. Do these reflections 
 come from propagating waves going through the pml layer and being 
 reflected at the end of the computational cell, going through the pml 
 layer again and entering the region of interest. Or is it the 
 too-thin-pml layer itself?
There are two sources of reflection from the PML: 1) the non absorbed 
component of the wave entering, reflecting at the hard wall boundary, 
and returning back through the PML and into the computational cell 
(which you have already described), what I will call the 'round-trip' 
reflection and 2) the 'transition' reflection occurring at the interface 
of the non-PML  PML regions. The round-trip reflection can be made 
arbitrarily small (in uniform media) by making the PML absorption large, 
however this is not the case in the current release of meep (version 
0.10.1) which implements a split field PML so you will have to make sure 
that either the PML is sufficiently long or to increase the PML strength 
parameter (for those interested, see the structure_chunk::use_pml 
function in structure.cpp of the source files). You will need to do 
these tests to make sure that PML reflections are sufficiently small so 
as not to affect your computations. The transition reflection, on the 
other hand, is a consequence of the discretization of space (a PML is 
perfectly reflectionless in the exact wave equation) and is determined 
by the degree of smoothness of the PML conductivity absorber (we have an 
upcoming paper on this) which is typically a quadratic polynomial. In 
your case of PML overlapping uniform media, you should be more way of 
the 'round-trip' reflection.

We will be releasing meep 0.20 very shortly which has a much improved 
uniaxial PML (uPML) implementation with the ability to fix the round 
trip reflection along with user-defined PML conductivity.

Ardavan

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


Re: [Meep-discuss] Question on PML

2008-07-02 Thread Andreas Erbe
Alex, 

I did recently play with a similar problem, only at wavelengths in the 
mid-infrared (3-5 µm), making the whole problem even worse. I can say that I do 
get numerical reflections from PMLs even if they are 1 µm or so (I did not try 
much bigger). Though in my case, that seem to be due to what Ardavan calls 
'transition' reflections. Also, I have to admit I was looking for a result with 
rather high accuracy. 

One more comment on

 Since the particle itself represents a dipole source, I don't expect  
 much radiation in the X direction, thats why I think I can reduce the  

I would be careful with that. A particle or 100 nm at a wavelength of 400 nm is 
quite off the dipole source (again, it depends on what level of approximation 
you like to think in ...). Maybe you want to look at the analytical Mie 
solution first to see how well it works. 

Have fun, 

Andreas. 


-
Andreas Erbe
Interface Spectroscopy Group
Department of Interface Chemistry and Surface Engineering
Max Planck Institute for Iron Research GmbH
PO Box 140444
40074 Düsseldorf
Germany

Tel: +49(0)/211/6792-890

---
Max-Planck-Institut für Eisenforschung GmbH
Max-Planck-Straße 1
D-40237 Düsseldorf
 
Handelsregister B 2533 
Amtsgericht Düsseldorf
 
Geschäftsführung
Prof. Dr. Jörg Neugebauer
Prof. Dr. Anke R. Pyzalla
Prof. Dr. Dierk Raabe
Prof. Dr. Martin Stratmann
Dipl.-Kfm. Herbert Wilk
 
Ust.-Id.-Nr.: DE 11 93 58 514 
Steuernummer: 105 5891 1000
-


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


[Meep-discuss] Question

2008-06-25 Thread mehdi miri
Hi there
Does the MPI (Parallel Processing) features work with Scheme Scripting?
(*.ctl files?)
___
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 h5tovtk

2008-06-19 Thread David Domenech
Dear Alex,

You can decide which dataset extract with the command 'h5tovtk' using the
modifier -d followed by the name of the dataset.
By default extracts the first dataset that in your case is 'ex' (look at the
man page)

To extract 'Ey' dataset for instance:

 h5tovtk -t 150 -o test.vtk -d ey test-e.h5

Best,

J.D.Domenech



Alex wrote :

 Dear Steven and meep community,
 I created a hdf5-file with all E-field components using
 ...
 (to-appended e (at-every 0.5 output-efield))
 ...

 this seems to work, since h5ls gives:

 h5ls test-e.h5
 ex   Dataset {50, 50, 50, 200/Inf}
 ey   Dataset {50, 50, 50, 200/Inf}
 ez   Dataset {50, 50, 50, 200/Inf}

 Now I want to convert this hdf5-file into the vtk format, a vector vtk
 file for mayavi (to get a vector plot with arrows), using

 h5tovtk -t 150 -o test.vtk test-e.h5

 .

 .

 What am I doing wrong?
 Thank you very much for your help in advance!

 Regards
 Alex
___
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 h5tovtk

2008-06-18 Thread Alexander Sprafke
Dear Steven and meep community,

I created a hdf5-file with all E-field components using

...
(to-appended e (at-every 0.5 output-efield))
...

this seems to work, since h5ls gives:

h5ls test-e.h5
ex   Dataset {50, 50, 50, 200/Inf}
ey   Dataset {50, 50, 50, 200/Inf}
ez   Dataset {50, 50, 50, 200/Inf}

Now I want to convert this hdf5-file into the vtk format, a vector vtk  
file for mayavi (to get a vector plot with arrows), using

h5tovtk -t 150 -o test.vtk test-e.h5

But the produced vtk-file just contains the Ex component:
In Mayavi I can only choose to visualize ex, also the header of  
test.vtk is:

# vtk DataFile Version 2.0
Generated by h5tovtk.
BINARY
DATASET STRUCTURED_POINTS
DIMENSIONS 50 50 50
ORIGIN 0 0 0
SPACING 1 1 1
POINT_DATA 125000
SCALARS ex float 1--- shouldn't this be different if it was a  
vector vtk?
LOOKUP_TABLE default

What am I doing wrong?
Thank you very much for your help in advance!

Regards
Alex


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


Re: [Meep-discuss] Question on output data size

2008-06-15 Thread Steven G. Johnson
On Jun 15, 2008, at 6:40 AM, Juntao Xi wrote:
 Hi, Steven and Meepers,

 As the following setting

 -Resolution 100
 -in volume (size 1  1.2 ) output-efield-y
 The output datasets is 102*122.

 Why is not it 100*120?

Meep adds a couple of extra pixels at the ends to implement the  
boundary conditions.

Steven


___
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 controling the continuous-source

2008-03-26 Thread adrian
 Hi, meep users and Steven:
   I try to figure how the cw-source turns on and off.
 I use the parameters as below:
   (define-param run_time 17 )
   (src (make continuous-src (frequency fcen) (end-time (* run_time (/ 1 
fcen))) (width (* 0.7 lam)) (cutoff (* 0.003 lam) )
   I recorded the variation of amplitude with time and found the it was 
reaching to steady state in 7th period but started to decay 
  after 14th period. It's wired. Since I expected it would start to decay after 
17th period (since I assigned the end-time is 17th period)
  Is there anything wrong with my codes or  I misunderstood the definition for 
end-time..etc..

  Thank you in advance
 
  Cheers
Adrian
  




  
__
付費才容量無上限?Yahoo!奇摩電子信箱2.0免費給你,信件永遠不必刪! http://tw.mg0.mail.yahoo.com/dc/landing___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Re: [Meep-discuss] question on local density of states

2007-10-18 Thread Steven G. Johnson
On Thu, 18 Oct 2007, Gao Jie wrote:
 I am interested in calculating local density of states in 2D photonic
 crystal structure with/without defect cavities. Theoretically it requires
 calculation of the green's functions G(r,w). I am wondering whether it can
 be done in MEEP?

Yes.  The Green's function is just the response to a time-harmonic point 
dipole source.  Actually, in time domain you can do better than that, 
because you can fourier-transform the response to a dipole pulse and get 
the LDOS over a wide bandwidth of frequencies at once.

Steven

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


Re: [Meep-discuss] Question about random procedure call in Meep

2007-09-06 Thread Roy Yang
Hi all,

It has worked now, thanks to the discussion with Zheng. I need to call
functions recognized by Guile, such as seed-random-state to set!
*random-state* in meep.

Best,

Roy

On 9/5/07, Zheng LI [EMAIL PROTECTED] wrote:

 hi, Roy

 i'm not familiar with your random procedure. however, if you use a
 function in a specific module, you should declare it first e.g.
 (use-modules (ice-9 debug))

 Yours
 Zheng
 在 2007-09-05三的 20:25 -0400,Roy Yang写道:
  Hi dear all meep users,
 
  I have a question about calling the procedure (random module) in .ctl
  file. I have expected different *random-state* for a number of runs of
  my .ctl file, so I try to add the below line
 
  (set! *random-state* (make-random-state #t)) ; to change the
 random-state
 
  into my control file. But everytime I run meep it seems cannot tell
  what i am doing, reporting
  ERROR: Unbound variable: make-random-state
 
  Could someone give me a hint about what is going on there?
 
  Roy
 
  ___
  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 mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

[Meep-discuss] Question about random procedure call in Meep

2007-09-05 Thread Roy Yang
Hi dear all meep users,

I have a question about calling the procedure (random module) in .ctl
file. I have expected different *random-state* for a number of runs of
my .ctl file, so I try to add the below line

(set! *random-state* (make-random-state #t)) ; to change the random-state

into my control file. But everytime I run meep it seems cannot tell
what i am doing, reporting
ERROR: Unbound variable: make-random-state

Could someone give me a hint about what is going on there?

Roy

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


[Meep-discuss] Question about using map to establish symmetry triangular

2007-06-28 Thread adrian
Hi, everyone:
 I referred to archives below and successfully established one triangular:
   
On Tue, 14 Nov 2006, Pascual Munoz Munoz wrote:
 I've been looking to the 'loop' howto on the wiki, but I cannot manage
 how to make a loop that makes a list of objects in different positions
 and with different widths, depending on the loop variable.

 I've tried several things, the one making more sense to me (but not
 working) is (not changing the width of the slices):
 (set! geometry
(list
(make block (center 0 0) (size W L)
(material (make dielectric (index nde
(do ((x (* -1 Gp) (+ x 1))) (( x Gp))
(make block (center 0 (* x 0.12)) (size W 0.12)
(material (make dielectric (index
 1.0 ) ) )

A do loop does not return a list of objects, which is what you want to 
do here.

To create a list, the easiest thing is to use map.  For example,

(set! geometry
   (cons
(make block (center 0 0) (size W L)
  (material (make dielectric (index nde
(map
 (lambda (x)
   (make block (center 0 (* x 0.12)) (size W 0.12)
 (material (make dielectric (index 1.0)
 (arith-sequence (- Gp) 1 (round (+ (* 2 Gp) 1))

Of course, this does not change the width of the slices (they are all W), 
but neither does your example.  You can easily substitute some arbitrary 
function of x here.



(Note that (cons a B) prepends an element a to the list B.)

%%%5



  However, when I tried to add one (make) in the body of map, the ahead one 
wouldn't be produced.
  e.g.
   set! geometry
(cons
 (make block (center 0 0) (size W L)
   (material (make dielectric (index nde
 (map
  (lambda (x)
(make block (center 0 (* x 0.12)) (size W 0.12)
  (material (make dielectric (index 1.0
   (make block (center 0 (* x 0.12)) (size W 0.12)
   (material (make dielectric (index 1.0)
   

(arith-sequence (- Gp) 1 (round (+ (* 2 Gp) 1))
 
the first block wouldn't show up  in the  result but only the last block.
  can anyone give me any hint to improve this and tell me how to use map to 
establish more than two objects, which shapes are arbitrary?

 Thank you so much

Adrian


   
想及時通知通訊錄裡的所有親朋好友好消息,就來
 Yahoo!奇摩電子信箱發簡訊,一次搞定!http://tw.mobile.yahoo.com/texts/mail.php___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

[Meep-discuss] Question about using map to set up object with any shapes

2007-06-27 Thread adrian
Hi everyone:
   I refer to one of archives as below to build up the
object:

On Tue, 14 Nov 2006, Pascual Munoz Munoz wrote:
 I've been looking to the 'loop' howto on the wiki,
but I cannot manage
 how to make a loop that makes a list of objects in
different positions
 and with different widths, depending on the loop
variable.

 I've tried several things, the one making more sense
to me (but not
 working) is (not changing the width of the slices):
 (set! geometry
(list
(make block (center 0 0) (size W L)
(material (make dielectric
(index nde
(do ((x (* -1 Gp) (+ x 1))) (( x
Gp))
(make block (center 0 (* x
0.12)) (size W 0.12)
(material (make
dielectric (index
 1.0 ) ) )

A do loop does not return a list of objects, which
is what you want to 
do here.

   To create a list, the easiest thing is to use
map.  For example,

(set! geometry
   (cons
(make block (center 0 0) (size W L)
  (material (make dielectric (index
nde
(map
 (lambda (x)
   (make block (center 0 (* x 0.12)) (size W
0.12)
 (material (make
dielectric (index 1.0)
 (arith-sequence (- Gp) 1 (round (+ (* 2 Gp)
1))

Of course, this does not change the width of the
slices (they are all W), 
but neither does your example.  You can easily
substitute some arbitrary 
function of x here.

(Note that (cons a B) prepends an element a to the
list B.)


   It works pretty well. But I found out within map,
it can only make one object. If I want to make another
object,i.e. different epsilon and shape but related to
x, the previous one won't be executed but only the
later. 
  e.g.:
   ( map
(lambda (x)
  (make block )
  (make cylinder)
 ...
   the block won't be produced.
   can anyone give me any hint to build up more than
two objects with any shape using map?
   Thank you very much!

Adrian

   



  

想及時通知通訊錄裡的所有親朋好友好消息,就來 Yahoo!奇摩電子信箱發簡訊!
http://tw.mobile.yahoo.com/texts/mail.php

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

Re: [Meep-discuss] Question about the effect of PML on wavegudie

2007-06-21 Thread Steven G. Johnson
On Wed, 13 Jun 2007, adrian wrote:
I have one question about PML. I ran one case with 2-D waveguide 
 structure consisting of three layers. I know the correct description for 
 PML is just to set the thickness of PML and meep will automatically put 
 it inside the computation cell. However, the result was not expected. 
 The light just disappeared after short distance even I set long 
 waveguide length.  However, if I add the thickness of PML in cell size, 
 the result showed light would propagate for long distance.

I think you have a misunderstanding here.

When you specify PML, Meep puts it *inside* the computational cell.  It 
does *not* add the thickness of the PML to the size of the computational 
cell.

In your case, you have a waveguide propagating along the x direction, with 
a computational cell size of 2 in the y direction.  If you then set the 
PML thickess to 1, it means that the PML completely covers the y direction 
- the whole computational cell is filled with absorbing material, and 
hence your waveguide mode decays rapidly.  (In your actual file, you set 
the PML thickness to 3, which is thicker than the computational cell...I 
don't even remember what Meep does in this case, but again the 
computational cell will be filled with absorbing material.)

You need to make the computational cell big enough so that the PML layers 
do not overlap your waveguide mode everywhere and cause it to decay where 
you don't want it to.  One way to do this is to just add twice the PML 
thickness to your cell size, which is what you did in your second try.

Steven

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


[Meep-discuss] Question about the effect of PML on wavegudie

2007-06-13 Thread adrian
Hi, everyone:
I have one question about PML. I ran one case 
with 2-D waveguide structure consisting of three
layers. I know the correct description for PML  
is just to set the thickness of PML and meep will
automatically put it inside the computation cell.
However, the result was not expected. The light just
disappeared after short distance even I set long
waveguide length. 
However, if I add the thickness of PML in 
cell size, the result showed light would propagate for

long distance. 
I am wondering if PML will produce so huge
difference that it affects the capability of
waveguide. And whether the second result is wrong? It
can propagate because of wrong PML position?

   The ctl file is below.
Thank you in advance

Adrian

The ctl file is below:
 


(define-param unit 1e-8) ; 
(define lam 620e-9) ;
(define lamu (/ lam unit))  ; 
(define fcen (/ unit lam));
(define dpml 3)   ;
(define gamma_ag 1.406e+14)
(define c 3e+8)
(define gama (/ (* unit gamma_ag) c 2 pi))
(define rlamda_ag 137.6e-9)
(define wp (/ unit rlamda_ag))  
;
source center frequency
(define e_ag_inf 5.4264)


(define-param wx 600 ) ; width in x 
(define-param wy 2) ; width in y 
(define-param pady 25 ) ; pad in y

(define-param sx (+ wx dpml dpml)) 
(define-param sy (+ wy pady pady dpml dpml)) 
; the two lines above are not like example but allowed
;light propagate for a long distance.
; If I dropped off dpml from parethesis, light just
;propagated for a short distance 


(set! eps-averaging? false)
(set! geometry-lattice (make lattice (size sx sy
no-size)))

(define Ag
  (make dielectric (epsilon e_ag_inf)
(polarizations 
 (make polarizability
   (omega 1e-20) (gamma gama)
(delta-epsilon (* wp wp 1e+20 1e+20)))
 )))
(define clad (make dielectric (epsilon 2.89)))
(define core (make dielectric (epsilon 6)))
(set! geometry
   (list
  (make block (material clad) (center 0 (/ (+ 
pady wy) 2)) (size wx pady infinity))
  (make block (material Ag) (center 0 0)  
(size wx wy infinity))
  (make block (material clad) (center 0 (/ (+ 
pady wy) -2)) (size wx pady infinity))
  ))

(set! sources (list
   (make source
 (src (make continuous-src  
(frequency
fcen))) (component Hz) (center (+ (/ sx -2) 2) 0 
) 
(size  (* 1.2 wy) 0 
(set! pml-layers (list (make pml (thickness 
dpml
(set! resolution 10)
(run-until 1500
   (at-beginning output-epsilon)
   (at-end output-hfield-z 
output-efield-x
output-efield-y output-sfield-y output-sfield-x))


  

想及時通知通訊錄裡的所有親朋好友好消息,就來 Yahoo!奇摩電子信箱發簡訊!
http://tw.mobile.yahoo.com/texts/mail.php

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

RE: [Meep-discuss] question on decaying current source

2007-03-11 Thread #YIP CHAN HOE#
Dear MEEP users,

I am trying to figure out the decaying function of gaussian-src or 
continuous-src, and hope to hear your advice.

The default source end-time[] is infinity (never turn off) according to MEEP 
reference.

And, the default cutoff[] is 3.0 and it is the number of widths the current 
decays for before we cut it off and set it to zero.

Question

(1) The question is how do the current decays when the source never turn off ?

(2) I am guessing it is probably due to PML, but where in the geometry do MEEP 
consider the current to be decaying ?

Thank you very much for helping me.

-Chan Hoe-


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

Re: [Meep-discuss] Question on MEEP error

2006-11-06 Thread Zheng LI
If you are familiar with Emacs, its Scheme-mode may help you debug the
codes by writing the following codes in your .emacs file:

(setq scheme-program-name meep)
(setq scheme-mit-dialect nil)

Best,
Zheng Li

On Sun, 2006-11-05 at 23:13 -0500, Ashifi wrote:
 Thanks for the tip, Matt. I based my code on that thread and a host of
 suggestions in the mailing list archives. I'm trying to come up with a
 list of newbie guidelines for MEEP simulations, but they have to work
 for me first. Let me play around with the script a bit, and If I don't
 get good results I will post a detailed email with the guidelines I
 picked up.
 
 For debugging, is there a list of errors and possible causes somewhere
 that I could access? How about turning on line numbers in unbound
 variable errors?
 
 Ashifi
 
 On 11/4/06, matt [EMAIL PROTECTED] wrote:
 
 
  That error usually means you've incorrectly specified the resolution
  with respect to the rest of the problem.
 
  There is a thread on this topic which should help clarify:
  http://ab-initio.mit.edu/pipermail/meep-discuss/2006-September/000340.html
 
  Instead of trying to figure out where you went wrong, I just tried
  changing
 
  (define-param resolution-ppw 20) to
  (define-param resolution-ppw .002),
 
  which seems to fix your problem.  Of course, it's more logical to go
  through your script and find where you're incorrectly
  dividing/multiplying by a base unit and fix that.  Then you'll be able
  to specify resolution in ppw sensibly.
 
  Kind Regards,
  Matt
 
 
 
  On Sat, 4 Nov 2006, Ashifi wrote:
 
   When does MEEP throw this error:
  
    BEGIN OUTPUT ---
  
   [EMAIL PROTECTED]:~/meep-dir meep pcb-polished-fixed.ctl
   ---
   Initializing structure...
   Working in 2D dimensions.
   block, center = (-2.35,10,0)
size (4.85,0.018,1e+20)
axes (1,0,0), (0,1,0), (0,0,1)
dielectric constant epsilon = -1e+10
   block, center = (2.35,10,0)
size (4.85,0.018,1e+20)
axes (1,0,0), (0,1,0), (0,0,1)
dielectric constant epsilon = -1e+10
   block, center = (-2.35,10.374,0)
size (4.85,0.018,1e+20)
axes (1,0,0), (0,1,0), (0,0,1)
dielectric constant epsilon = -1e+10
   block, center = (2.35,10.374,0)
size (9.7,0.018,1e+20)
axes (1,0,0), (0,1,0), (0,0,1)
dielectric constant epsilon = -1e+10
   meep: Cannot split 0 grid points into 1 parts
  
   [EMAIL PROTECTED]:~/meep-dir
  
    END OUTPUT ---
  
   You can find the pcb-polished-fixed.ctl file attached or at this web
   location:
  
   http://pastebin.us/7674
  
   I'm basically trying to find the transmission spectrum of a slab of
   epoxy sandwiched between two perforated copper sheets. The aim is to
   duplicate the results in a paper by A. P. Hibbins and J. R. Sambles
   titled Squeezing Millimeter Waves into Microns, specifically Figure 3.
  
   Thanks.
  
   Ashifi.
  
 
 
 ___
 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] Question on MEEP error

2006-11-06 Thread Zheng LI
I am sorry. I suggests it only because I am learning it now. 

On the other hand, a missing ')' also invokes this kind of error
message.

Good luck,
Zheng Li

On Mon, 2006-11-06 at 11:13 -0500, Ashifi wrote:
 Don't mean to start a VI vs Emacs war here, but is there anything like
 this for VI? My debugging arsenal is limited to VI Scheme syntax
 highlighting, VI parenthesis matching and find  replace.
 
 Does this error mean a parenthesis mismatch [an extra ')']?
 
 ERROR: In procedure list:
 ERROR: end of file in pcb-polished-fixed.ctl
 
 
 Just want to make sure I have the facts right in my little error writeup.
 
 Ashifi.
 
 Zheng LI wrote:
  If you are familiar with Emacs, its Scheme-mode may help you debug the
  codes by writing the following codes in your .emacs file:
  
  (setq scheme-program-name meep)
  (setq scheme-mit-dialect nil)
  
  Best,
  Zheng Li
 
 ___
 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] question

2006-09-04 Thread 오성근

Hi
I have three questions.I get the result in dielectric structure. But I do not get the same result in metal-dielectricstructure compare to the text book. My questions areFirst, how to get the 2Dmetal-dielectric w-k diagram.
Second, 3Ddielectric-metal-dielectric slab structure w-k diagram.Third, U-shape Transmission spectrum. (negative index material)I think thatFirstcase is verysimpleproblembut very important.My result (w-k diagram)is a little same compared to the text book, but do not exactly match.

My idea is First 2Dmetal-dielectric w-k diagram,x-direction-size=1*a(lattice constant) , boundary condtion :blochy-direction-size=10*a(lattice constant), boundary conditoin : PMLupper half side(y0) region: metal, wp=
1.0e16, gamma=0.0therefore delta-epsilon=1.0e40lower half side(y0) region: dielectric epsilon: ed=1.0(air)Source: Gaussian pulse, component: Hz.In this case, wsp must content to be this value wsp=wp/(1+ed)^0.5=1/(1+1)^0.5=
0.707. But at w-k diagram wsp is about 0.9.When I simulate in bulk metal, wp is exactly 1. I think that meep do not supported in metal-dielectric case. Or I do not know how to make the ctl file.Second, 3Ddielectric-metal-dielectric slab structure w-k diagram.
x-direction-size=1, boundary condition: blochy-direction-size=1, boundary condition: blochz-direction-size=5, boundary condition: PMLThinkness 0.3 metalis implemented at the center. backgroundepsilon=1.0
 (air)I think that if First problem is solved, Secon problem is sloved, too. But if First problem is not solved, Second problem is not solved, either.Third, U-shape Transmission spectrum. (negative index material, metamaterials)
SCIENCE vol 36 19 November 2004 Magnetic response of metamaterials at 100 Terahrtz. Figure 3. C, D, G, H. When I simulate the structure, do not appear the resonance peak. lattice constant a=100nmx-direction-size: 7*a=700nm, boundary condition: PML, size: 
0.5y-direction-size: 7*a=700nm, boundary condtion: PML, size: 0.5z-direction-size: 4*a=400nm, boundary condition: PML, size: 0.5wp=2pi2.175*1.65e15, gamma=2pi6.5*1.65e12delta-epsilon=(wp/wn/omega)^2=(0.725
/1e-20)^2=5.25625e39gamma=0.002167. Thanks. 

First.

(set! geometry-lattice (make lattice (size 1 10 no-size)))(set! eps-averaging? false)(set! geometry (list (make block (center 0 2.5) (size 1 5)(material (make dielectric (epsilon 1.0(make block (center 0 -
2.5) (size 1 5)  (material (make dielectric (epsilon 1.0) (polarizations (make polarizability (omega 1.0e-20) (gamma 0.0) (delta-epsilon 1.0e+40
(set-param! resolution 50)(set! pml-layers (list (make pml (direction Y) (thickness 0.5(define-param k-interp 15)(define-param fcen 0.5) (define-param df 1.0) (set! sources  (list  (make source 
 (src (make gaussian-src (frequency fcen) (fwidth df) )) (component Hz) (center 0 0
(run-k-points 300 (interpolate k-interp (list (vector3 0 0 0) (vector3 0.5 0 0)) ))
Second
(set! geometry-lattice (make lattice (size 1 1 5)))(set! eps-averaging? false)(set! geometry (list (make block (center 0 0 0) (size 1 1 5) (material (make dielectric (epsilon 1.0 
(make block (center 0 0 0) (size 1 1 0.3) (material (make dielectric (epsilon 1.0) (polarizations (make polarizability (omega 1.0e-20) (gamma 0.0) (delta-epsilon 1.0e+40 
(set! pml-layers (list (make pml (direction Z) (thickness 0.5(set-param! resolution 50)(define-param k-interp 15)(define-param fcen 0.5) (define-param df 1.0) 
(set! sources  (list (make source (src (make gaussian-src (frequency fcen) (fwidth df))) (component Hx) (center 0 0 0) )))
(run-k-points 300 (interpolate k-interp (list (vector3 0 0 0) (vector3 0.5 0 0
Third
(set! geometry-lattice (make lattice (size 7 7 4)))(set! eps-averaging? false)(define-param a_value 100e-9)
(define wn (/ (* 2 pi 2.99792458e8) a_value))(define-param e0 1)(define-param g1 (* 2 pi 6.5 1.65e12))(define-param wp (* 2 pi 2.175 1.65e15))
(define material1(make dielectric (epsilon e0)(polarizations(make polarizability(omega 1e-20) (gamma (/ g1 wn)) (delta-epsilon (/ (* wp wp) (* wn wn 1e-20 1e-20)))
(set! geometry (list (make block (center -0.975 -1.15 0) (size 1.25 0.9 0.2) (material material1))(make block (center 0.975 -1.15 0) (size 1.25 0.9 0.2) (material material1)) (make block (center -
1.15 0 0) (size 0.9 1.4 0.2) (material material1))(make block (center 1.15 0 0) (size 0.9 1.4 0.2) (material material1))(make block (center 0 1.15 0) (size 3.2 0.9 0.2) (material material1))
(make block (center 0 0 0.125) (size 7 7 0.05)(material (make dielectric (epsilon 3.8
))
(set! pml-layers (list (make pml (thickness 0.5(set-param! resolution 20)(define-param fcen 0.5) (define-param df 0.9) (define-param nfreq 500) ; number of frequencies at which to compute flux

(set! sources (list (make source (src (make gaussian-src (frequency fcen) (fwidth df))) (component Ey) (center 0 0 -0.7) (size 6 6 0
(define trans ; transmitted flux(add-flux fcen df nfreq (make flux-region (center 0 0 0.7) (size 6 6 0) (direction Z

[Meep-discuss] question

2006-08-18 Thread 오성근


Dear Steven, 1. It seems that Meep does not support slab 
structure with drude type metal. I got the result about 3D photonic 
crystal (slab structure with the air hole) dispersion curve. 
But, when I simulate the slab structure 
(metal slab), the result is wrong. Could you give me some suggestion to 
solve the problem?
 Thank you very much!! 
3D metal slab case (.ctl file) (set! geometry-lattice 
(make lattice (size 1 1 10))) (set! geometry (list (make 
block (center 0 0 0) (size 1 1 10)(material 
(make dielectric (epsilon 1.0  (make block 
(center 0 0 0) (size 1 1 0.5) (material (make dielectric 
(epsilon 1.0)  (polarizations (make polarizability (omega 
1.0e-20) (gamma 0.01) (delta-epsilon 1.0e+40 ) ))) (set! pml-layers 
(list (make pml (direction Z) (thickness 1 (set-param! resolution 40) 
(define-param k-interp 15) (define-param fcen 0.5) (define-param df 
1.0) (set! sources (list (make source (src (make 
gaussian-src (frequency fcen) (fwidth df)))   
(component Hy) (center 0 0 0 (run-k-points 300 
(interpolate k-interp (list (vector3 0 0 0) (vector3 0.5 0 0) ))) 








  
	
  
		
		  
		
		  
		
		
		   
		
  

  

  

	  
		  
			

  
  
  

	  
		
		 
		 
  보고싶은 영화의 개봉일이 궁금할 땐
		   
		
	  
	  
		 
	  
		편리한 씨즐 개봉박두 알림 서비스
	  
	

			  
			
			

  
  
  
  
	  
		
		  
		  [해피투게더]함께가요, 희망으로!
		  
		 
	  
	  
		 
	  
		은혜와 함께 떠나는 섬마을 희망여행
	  
	

			  
		  
		
	
  
			  
			
		

	  
  

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