John Weiner
2018-10-08 08:27:43 UTC
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
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