From cfda120a20c6105478ed0ca2407a6169d7f84bb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ne=C4=8Dada?= Date: Fri, 8 Nov 2019 09:28:13 +0200 Subject: [PATCH] Fix sign in Drude-Lorentz model. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In our convention, where outgoing wave correspond to Hankel functions of FIRST kind, the time-harmonic waves carry (contrary to the more usual electrotechnical convention) the factor exp(-iωt) and lossy materials are represented by Im ε > 0, i.e. Im n > 0. Former-commit-id: 19108c43a31899c2f9196c1a0fc44c5ecae69b5a --- qpms/materials.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qpms/materials.c b/qpms/materials.c index 1f591c2..6b84949 100644 --- a/qpms/materials.c +++ b/qpms/materials.c @@ -158,7 +158,7 @@ complex double qpms_lorentzdrude_eps(complex double omega, const qpms_ldparams_t complex double eps = 0; for(size_t j = 0; j < p->n; ++j) { const qpms_ldparams_triple_t d = p->data[j]; - eps += d.f * SQ(p->omega_p) / (SQ(d.omega) - SQ(omega) + I*omega*d.gamma ); + eps += d.f * SQ(p->omega_p) / (SQ(d.omega) - SQ(omega) - I*omega*d.gamma ); } return eps; }