Discussion:
[Meep-discuss] Import materials.py
John Weiner
2018-10-08 08:27:43 UTC
Permalink
Dear meep users, developers and maintainers,

I am running parallel python meep to generate an LDOS spectrum (LDOS vs. wavelength) using the meep LDOS function. The simulation includes a dispersive material, Ag, characterised by a Drude-Lorentz fit of the frequency dependence of the dielectric constant or electric susceptibility. The fitting parameters and range of applicability are included in the materials library, materials.py. Here is a copy and paste of the entry for Ag:

# elemental metals from A.D. Rakic et al., Applied Optics, Vol. 37, No. 22, pp. 5271-83, 1998
# wavelength range: 0.2 - 12.4 um

metal_range = mp.FreqRange(min=um_scale/12.4, max=um_scale/0.2)

# silver (Ag)

Ag_plasma_frq = 9.01*eV_um_scale
Ag_f0 = 0.845
Ag_frq0 = 1e-10
Ag_gam0 = 0.048*eV_um_scale
Ag_sig0 = Ag_f0*Ag_plasma_frq**2/Ag_frq0**2
Ag_f1 = 0.065
Ag_frq1 = 0.816*eV_um_scale # 1.519 um
Ag_gam1 = 3.886*eV_um_scale
Ag_sig1 = Ag_f1*Ag_plasma_frq**2/Ag_frq1**2
Ag_f2 = 0.124
Ag_frq2 = 4.481*eV_um_scale # 0.273 um
Ag_gam2 = 0.452*eV_um_scale
Ag_sig2 = Ag_f2*Ag_plasma_frq**2/Ag_frq2**2
Ag_f3 = 0.011
Ag_frq3 = 8.185*eV_um_scale # 0.152 um
Ag_gam3 = 0.065*eV_um_scale
Ag_sig3 = Ag_f3*Ag_plasma_frq**2/Ag_frq3**2
Ag_f4 = 0.840
Ag_frq4 = 9.083*eV_um_scale # 0.137 um
Ag_gam4 = 0.916*eV_um_scale
Ag_sig4 = Ag_f4*Ag_plasma_frq**2/Ag_frq4**2

Ag_susc = [mp.DrudeSusceptibility(frequency=Ag_frq0, gamma=Ag_gam0, sigma=Ag_sig0),
mp.LorentzianSusceptibility(frequency=Ag_frq1, gamma=Ag_gam1, sigma=Ag_sig1),
mp.LorentzianSusceptibility(frequency=Ag_frq2, gamma=Ag_gam2, sigma=Ag_sig2),
mp.LorentzianSusceptibility(frequency=Ag_frq3, gamma=Ag_gam3, sigma=Ag_sig3),
mp.LorentzianSusceptibility(frequency=Ag_frq4, gamma=Ag_gam4, sigma=Ag_sig4)]

Ag = mp.Medium(epsilon=1.0, E_susceptibilities=Ag_susc, valid_freq_range=metal_range)

This is the entry that is imported into my simulation. The “metal_range” entry shows that the valid frequency range corresponds to a wavelength range from 200nm to 12.4um. However, when I run a series of simulations, starting at an input wavelength of 200nm (0.2um), I get the following runtime warning:

/Users/johnweiner/miniconda3/envs/pmp/lib/python3.6/site-packages/meep/simulation.py:586: RuntimeWarning: Note: your sources include frequencies outside the range of validity of the material models. This is fine as long as you eventually only look at outputs (fluxes, resonant modes, etc.) at valid frequencies.

But my source, a Gaussian pulsed source, is not out of the range passed to “valid_freq_range=metal_range” in the materials.py entry for Ag (last line of the materials.py entry). As my simulation advances to longer wavelengths, beyond 220nm, the RuntimeWarning disappears. I suspect that this might have something to do with the discrete Fourier transform of the time-dependent pulsed source, but I don’t know for sure.

I looked at the code in simulation.py, line 586, but my mastery of python and familiarity with simulation.py is not good enough to diagnose why this warning is being triggered.

Any comments or clarification would be most welcome.

Best regards,

John
Ardavan Oskooi
2018-10-08 15:57:30 UTC
Permalink
This is the entry that is imported into my simulation.  The
“metal_range” entry shows that the valid frequency range corresponds
to a wavelength range from 200nm to 12.4um.  However, when I run a
series of simulations, starting at an input wavelength of 200nm
Is it possible that you are using a Gaussian source where the center
frequency corresponds to a wavelength of 0.2 um and has a non-zero
frequency width? This would involve fields with wavelengths below 0.2 um
which would trigger the warning.
John Weiner
2018-10-08 16:13:05 UTC
Permalink
I have taken care to pass df=0 (zero frequency width) to the source, but it is true that that the Gaussian source is also passed a fcen (center frequency) = 1/wavelength where the wavelength is read from a bash script, and the wavelength does indeed start at wavelength = 200nm (0.2um). What is not clear to me is: with df=0, and metal_range set between 0.2 um and 12.4 um, I am still triggering this warning message. At some point I suppose there ia dft of the Gaussian source pulse, and this frequency transform may bring into play frequency components outside the range of metal_range. But: (1) is this the source of the warning message and (2) what are the implications/consequences of this warning (and why does it persist up to and including wavelength = 220nm?).

Best regards,

John
Is it possible that you are using a Gaussian source where the center frequency corresponds to a wavelength of 0.2 um and has a non-zero frequency width? This would involve fields with wavelengths below 0.2 um which would trigger the warning.
_______________________________________________
meep-discuss mailing list
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
Continue reading on narkive:
Loading...