Content deleted Content added
→History: full name |
m v2.05b - Bot T20 CW#61 - Fix errors for CW project (Reference before punctuation) |
||
(45 intermediate revisions by 23 users not shown) | |||
Line 1:
The '''Faddeeva function''' or '''Kramp function''' is a scaled [[complex number|complex]] complementary [[error function]],
:<math>w(z):=e^{-z^2}\operatorname{erfc}(-iz) = \operatorname{erfcx}(-iz)
=e^{-z^2}\left(1+\frac{2i}{\sqrt{\pi}}\int_0^z e^{t^2}\text{d}t\right).</math>
It is related to the [[Fresnel integral]], to [[Dawson's integral]], and to the [[Voigt function]].
The function arises in various physical problems,
* problems involving small-amplitude waves propagating through [[Maxwell–Boltzmann distribution|Maxwellian]] [[Plasma (physics)|plasmas]], and in particular appears in the plasma's [[permittivity]] from which [[dispersion relation]]s are derived, hence it is sometimes referred to as the '''plasma dispersion function
* the infrared [[permittivity]] functions of amorphous oxides have resonances (due to [[phonon]]s) that are sometimes too complicated to fit using simple harmonic oscillators. The
* the Faddeeva function is also used in the analysis of electromagnetic waves of the type used in AM radio.{{citation needed|date=July 2016}} Groundwaves are
* the Faddeeva function also describes the changes of the [[neutron cross section]]s of materials as temperature is varied.<ref>{{cite web|url=https://docs.openmc.org/en/v0.12.0/methods/cross_sections.html?highlight=faddeeva#windowed-multipole-representation |title=OpenMC Windowed Multipole |date=2020-06-01 |accessdate=2020-12-20}}</ref>
== Properties ==
Line 22 ⟶ 25:
:<math>w(-z)=2e^{-z^2} - w(z)</math>
and
:<math>w(-z)=w\left(z^*\right)^*</math>
where * denotes complex conjugate.
=== Relation to the complementary error function ===
The Faddeeva function evaluated on imaginary arguments equals the scaled complementary error function (<math>\mathrm{erfcx}</math>):
:<math>w(iz)=\mathrm{erfcx}(z)=e^{z^2}\mathrm{erfc}(z)</math>,
where erfc is the [[complementary error function]]. For large real ''x'':
:<math>\mathrm{erfcx}(x)\approx \frac{1}{\sqrt{\pi} x}</math>
=== Derivative ===
In some applications, it is necessary to know not only the original values of the Faddeeva function, but also its derivative (e.g. in [[Non-linear least squares|Non-linear least squares regression]] in [[spectroscopy]]). Its derivative is given by:<ref>{{cite report
| first = Slava
| last = Avetisov
| year = 1995
| title = A Least-Squares Fitting Technique for Spectral Analysis of Direct and Frequency-Modulation Lineshapes
| url = https://lup.lub.lu.se/search/ws/files/5695063/2297010.pdf
| publisher = Department of Physics, Lund University
}}</ref><ref>{{cite web
|url = https://dlmf.nist.gov/7.10
|title = Faddeeva (or Faddeyeva) function - 7.10 Derivatives
|date = 2010
|website = Digital Library of Mathematical Functions
|publisher = National Institute of Standards and Technology
|access-date = June 23, 2022
}}</ref>
:<math>\frac{dw\left(z\right)}{dz} = \frac{2i}{\sqrt{\pi}} - 2\cdot z\cdot w\left(z\right)</math>
This expression can also be broken down further in terms of changes in the real and imaginary part of the Faddeeva function <math>\Re\left(w\left(z\right)\right) = \Re_{w}</math> and <math>\Im\left(w\left(z\right)\right) = \Im_{w}</math>. Basically, this requires knowledge about the real and imaginary part of the product <math>z\cdot w\left(z\right)</math>. Making use of the above definition <math>z = x + iy</math>, the derivative can therefore be split into [[partial derivative]]s with respect to <math>x</math> and <math>y</math> as follows:
:<math>\frac{d\Re_{w}}{dx} = 2\cdot\left(y\cdot\Im_{w} - x\cdot\Re_{w}\right) = \frac{d\Im_{w}}{dy}</math>{{spaces|6|type}}and{{spaces|6|type}}<math>\frac{d\Re_{w}}{dy} = -2\cdot\left(\frac{1}{\sqrt{\pi}} - x\cdot\Im_{w} - y\cdot\Re_{w}\right) = -\frac{d\Im_{w}}{dx}</math>
:<math>\frac{d\Im_{w}}{dx} = 2\cdot\left(\frac{1}{\sqrt{\pi}} - x\cdot\Im_{w} - y\cdot\Re_{w}\right) = -\frac{d\Re_{w}}{dy}</math>{{spaces|6|type}}and{{spaces|6|type}}<math>\frac{d\Im_{w}}{dy} = 2\cdot\left(y\cdot\Im_{w} - x\cdot\Re_{w}\right) = \frac{d\Re_{w}}{dx}</math>
A practical example for the use of these partial derivatives can be found [[Voigt profile#Derivative_profile|here]].
== Integral representation ==
The Faddeeva function occurs as
:<math>w(z)=\frac{i}{\pi}\int_{-\infty}^{\infty} \frac{e^{- t^2}}{z - t}
meaning that it is a convolution of a Gaussian with a simple pole.
==History==
The function was tabulated by [[Vera Faddeeva]] and
Early implementations used methods by [[Walter Gautschi]] (
==Implementations==
Two software implementations, which are free for non-commercial use only,<ref>{{
A [[free and open source]] C or C++ implementation derived from a combination of Algorithm 680 and Algorithm 916 (using different algorithms for different ''z'') is also available under the [[MIT License]],<ref name=Faddeeva_w>[http://ab-initio.mit.edu/Faddeeva Faddeeva Package], free/open-source C++ implementation, accessed 13 October 2012.</ref>
This implementation is also available as a [[Plug-in (computing)|plug-in]] for Matlab,<ref name=Faddeeva_w/> [[GNU Octave]],<ref name=Faddeeva_w/> and in [[Python (programming language)|Python]] via [[Scipy]] as <code>scipy.special.wofz</code> (which was originally the TOMS 680 code, but was replaced due to copyright concerns<ref>{{
For fast but still accurate calculation of plasma dispersion function <math>Z(z)</math>, the J-pole Pade approximation is found to be useful,<ref>{{Cite journal |last=Xie |first=Hua-sheng |date=November 2019 |title=BO: A unified tool for plasma waves and instabilities analysis |url=http://dx.doi.org/10.1016/j.cpc.2019.06.014 |journal=Computer Physics Communications |volume=244 |pages=343–371 |doi=10.1016/j.cpc.2019.06.014 |issn=0010-4655|arxiv=1901.06902 }}</ref> i.e.,
:<math>Z(z)=\sum_{j=1}^{J}\frac{b_j}{z-c_j}.</math>
For J=8, one can use
b1= -0.017340112270401 - 0.046306439626294i;
b2= -0.739917811220052 + 0.839518284620274i;
b3= 5.840632105105495 + 0.953602751322040i;
b4= -5.583374181615043 -11.208550459628098i;
c1= 2.237687725134293 - 1.625941024120362i;
c2= 1.465234091939142 - 1.789620299603315i;
c3= 0.839253966367922 - 1.891995211531426i;
c4= 0.273936218055381 - 1.941787037576095i;
b(5:8)=(b(1:4))*;
c(5:8)=-(c(1:4))*,
where * denotes complex conjugate. The above approximation is valid for the upper plane. For <math>z</math> weakly close to the real axis, i.e., <math>Im(z)</math> not far from the real axis of the lower plane, the above approximation is also valid. For accurate calculation of
<math>Im(z)<0</math>, one can use
:<math>Z(z)=[Z(z^*)]^*+2i\sqrt{\pi}\exp[-z^2].</math>
A coding of the above J-pole approach and comparison with an accurate plasma dispersion function can be found.<ref>{{Citation |last=XIE |first=Hua-sheng |title=hsxie/gpdf |date=2024-04-14 |url=https://github.com/hsxie/gpdf |access-date=2024-04-15}}</ref> Comphensive coefficients to rapid computation of the plasma dispersion function with rational and multi-pole approximation are also available.<ref>{{Cite journal |last=Xie |first=Huasheng |date=2024-07-01 |title=Rapid computation of the plasma dispersion function: Rational and multi-pole approximation, and improved accuracy |url=https://pubs.aip.org/adv/article/14/7/075007/3300717/Rapid-computation-of-the-plasma-dispersion |journal=AIP Advances |language=en |volume=14 |issue=7 |doi=10.1063/5.0216433 |issn=2158-3226|arxiv=2404.18719 }}</ref>
==See also==
* {{annotated link|List of mathematical functions}}
▲A [[free and open source]] C or C++ implementation derived from a combination of Algorithm 680 and Algorithm 916 (using different algorithms for different ''z'') is also available under the [[MIT License]],<ref name=Faddeeva_w>[http://ab-initio.mit.edu/Faddeeva Faddeeva Package], free/open-source C++ implementation, accessed 13 October 2012.</ref> , and is maintained as a library package ''libcerf''.<ref>{{Cite web | url=https://jugit.fz-juelich.de:mlz/libcerf | title=Libcerf [MLZ Scientific Computing Group]}}</ref>
▲This implementation is also available as a [[Plug-in (computing)|plug-in]] for Matlab,<ref name=Faddeeva_w/> [[GNU Octave]],<ref name=Faddeeva_w/> and in [[Python (programming language)|Python]] via [[Scipy]] as <code>scipy.special.wofz</code> (which was originally the TOMS 680 code, but was replaced due to copyright concerns<ref>{{Cite web | url=https://github.com/scipy/scipy/issues/2260 | title=SciPy's complex erf code is not free/open-source? (Trac #1741) · Issue #2260 · scipy/scipy}}</ref>).
==References==
{{
[[Category:Gaussian function]]
|