6 #include <boost/math/special_functions/erf.hpp>
7 using boost::math::erf;
15 LorentzianProfile::LorentzianProfile(doublereal gamma)
18 m_hwhm2 = m_hwhm*m_hwhm;
31 return (1.0/
Cantera::Pi) *m_hwhm/(deltaFreq*deltaFreq + m_hwhm2);
43 return (1.0/
Pi) * atan(deltaFreq/m_hwhm) + 0.5;
46 doublereal LorentzianProfile::width()
54 m_sigma2 = m_sigma*m_sigma;
63 exp(-deltaFreq*deltaFreq/(2.0*m_sigma2));
68 return 0.5*(1.0 + erf(deltaFreq/(m_sigma*
SqrtTwo)));
71 doublereal GaussianProfile::width()
73 return 2.0*m_sigma*sqrt(log(4.0));
85 m_sigma2 = m_sigma*m_sigma;
88 m_gamma = gamma/m_sigsqrt2;
95 std::cout <<
F(1.0) << std::endl;
97 std::cout <<
F(1.0) << std::endl;
99 std::cout <<
F(10.0) << std::endl;
121 double c3 = log(
Pi*m_eps/2.0);
122 double tau = sqrt(-log(y) - c3);
123 double b = (tau + x)/y;
126 const double c0 = 2.0/(
Pi*exp(0.0));
128 const double c2 = 2.0/
SqrtPi;
138 f2 = fabs(y*y -
Pi*
Pi/(t*t));
141 if (f1/(f2*f3) < 0.5*m_eps) {
146 int N = int(0.5 + b/h);
149 for (
int i = 0; i < N; i++) {
150 S += (1.0 + exp(-4.0*x*y*u))*exp(-pow(y*u-x,2))/(u*u+1.0);
156 C = 2.0*exp(y*y - x*x)*cos(2*x*y)/(1.0 + exp(2*
Pi/h));
170 const double ff = 1.0/(m_sigsqrt2*
SqrtPi);
171 return ff*
F(deltaFreq/m_sigsqrt2);
Voigt(doublereal sigma, doublereal gamma)
Constructor.
virtual doublereal profile(doublereal deltaFreq)
Voigt profile.
doublereal F(doublereal x)
This method evaluates the function The algorithm used to cmpute this function is described in the re...
virtual doublereal cumulative(doublereal deltaFreq)
The cumulative profile, given by .
This file contains definitions of terms that are used in internal routines and are unlikely to need m...
virtual doublereal profile(doublereal deltaFreq)
The line shape profile as a function of distance from line center .
virtual doublereal cumulative(doublereal deltaFreq)
The cumulative profile, defined as .
Header file for class LineBroadener.
const doublereal SqrtPi
sqrt(Pi)
GaussianProfile(doublereal sigma)
Constructor.
const doublereal SqrtTwo
sqrt(2)
virtual doublereal profile(doublereal deltaFreq)
The Lorentzian profile for collision-broadened lines.