NanoComp / meep

free finite-difference time-domain (FDTD) software for electromagnetic simulations
GNU General Public License v2.0
1.21k stars 618 forks source link

Modified Lorentz Material Dispersion #1201

Open jphaupt opened 4 years ago

jphaupt commented 4 years ago

Hi all,

While I am aware that Meep has the functionality to model dielectric dispersion quite neatly using a Lorentzian susceptibility profile, it would be useful (certainly for my own research) if I could instead use the "modified Lorentz model," which is similar, as described in this paper (equation 3): https://www.osapublishing.org/ol/abstract.cfm?uri=ol-37-1-112

I imagine this may be reasonably easy to implement, as it seems to amount to just adding one extra parameter to the LorentzianSusceptibility function.

Cheers, jph

smartalecH commented 4 years ago

Luckily, all of the storage for that extra numerator term seems to be already built into the lorentzian_susceptibility class and its corresponding data structure. It's just not used: https://github.com/NanoComp/meep/blob/df5552d9e1021012ab938b3bfdbf1cbe270f1204/src/susceptibility.cpp#L196

So you would "just" have to modify the update equation to include this term:

https://github.com/NanoComp/meep/blob/df5552d9e1021012ab938b3bfdbf1cbe270f1204/src/susceptibility.cpp#L200-L262

Plus you would have to modify the interface (swig and python) to include the changes.

stevengj commented 4 years ago

(void)W_prev; // unused;

This is actually NULL (because it is not stored) unless you override the susceptibility::needs_W_prev() method to return true (which is easy, of course). This is the electric (or magnetic) field from the previous timestep, which we don't want to store unless we actually need it.

hauehaue commented 4 years ago

Thanks   a lot !

------------------ 原始邮件 ------------------ 发件人: "NanoComp/meep" <notifications@github.com>; 发送时间: 2020年8月13日(星期四) 凌晨1:04 收件人: "NanoComp/meep"<meep@noreply.github.com>; 抄送: "hae"<hauehaue@qq.com>;"Comment"<comment@noreply.github.com>; 主题: Re: [NanoComp/meep] Modified Lorentz Material Dispersion (#1201)

(void)W_prev; // unused;

This is actually NULL (because it is not stored) unless you override the susceptibility::needs_W_prev() method to return true (which is easy, of course). This is the electric (or magnetic) field from the previous timestep, which we don't want to store unless we actually need it.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.