Cantera  2.1.2
Go to the documentation of this file.
1 /**
2  * @file LineBroadener.h
3  * Header file for class LineBroadener
4  * @ingroup spectroscopy
5  */
6
7 #include "cantera/base/ct_defs.h"
9 #include "cantera/base/global.h"
10
11 namespace Cantera
12 {
13
14 /**
15  * Base class for classes implementing line shapes of
16  * various types.
17  * @ingroup spectroscopy
18  * @deprecated incomplete / abandoned
19  */
21 {
22
23 public:
24
25  /// Default constructor
28  }
29
30  /// Destructor
31  virtual ~LineBroadener() {}
32
33  /**
34  * The line shape profile
35  * \f[
36  * P(\Delta\nu)
37  *\f]
38  * as a function of distance from line
39  * center \f$\Delta\nu \f$.
40  * This function must have total area = 1.0.
41  * Note that this method must be overloaded in each
42  * derived class. If the base class method is called,
43  * an exception will be thrown.
44  */
45  virtual doublereal profile(doublereal deltaFreq) {
47  "base class method called!");
48  }
49
50  doublereal operator()(doublereal deltaFreq) {
51  return profile(deltaFreq);
52  }
53
54  /**
55  * The cumulative profile, defined as
56  * \f[
57  * C(\Delta \nu) = \int_{-\infty}^{\Delta \nu} P(x) dx
58  * \f]
59  */
60  virtual doublereal cumulative(doublereal deltaFreq) {
62  "base class method called!");
63  }
64
65  virtual doublereal width() {
66  return 0.0;
67  }
68 };
69
70 /**
71  * The line shape for pure collisional broadening. The Lorentzian line
72  * shape is
73  * \f[
74  * L(\Delta\nu) = \frac{1}{\pi}\frac{\gamma}{\Delta\nu^2 + \gamma^2}
75  * \f]
76  * where \f$\gamma = {\mbox{FWHM}/2} \f$.
77  */
79 {
80 public:
81  LorentzianProfile(doublereal FWHM);
82  virtual doublereal profile(doublereal deltaFreq);
83  virtual doublereal cumulative(doublereal deltaFreq);
84  virtual double width();
85
86 protected:
87  doublereal m_hwhm;
88  doublereal m_hwhm2;
89 };
90
91 /**
92  * A Gaussian line profile. This profile results when Doppler
93  * broadening is dominant.
94  */
96 {
97 public:
98
99  /**
100  * Constructor.
101  */
102  GaussianProfile(doublereal sigma);
103  virtual doublereal profile(doublereal deltaFreq);
104  virtual doublereal cumulative(doublereal deltaFreq);
105  virtual doublereal width();
106
107  doublereal standardDev() {
108  return m_sigma;
109  }
110
111 protected:
112  doublereal m_sigma;
113  doublereal m_sigma2;
114  doublereal m_width;
115 };
116
117
118 /**
119  * A Voigt profile is the convolution of a Lorentzian and a
120  * Gaussian profile. This profile results when Doppler
121  * broadening and collisional broadening both are important.
122  */
123 class Voigt : public LineBroadener
124 {
125 public:
126
127  /**
128  * Constructor.
129  */
130  Voigt(doublereal sigma, doublereal gamma);
131  virtual doublereal profile(doublereal deltaFreq);
132  //virtual doublereal cumulative(doublereal deltaFreq)
133  //virtual doublereal width()
134
135  void testv();
136
137 protected:
138
139  doublereal F(doublereal x);
140
141  doublereal m_sigma;
142  doublereal m_gamma_lor;
143  doublereal m_sigma2;
144  doublereal m_width;
145  doublereal m_gamma;
146  doublereal m_sigsqrt2;
147  doublereal m_a;
148  doublereal m_eps;
149 };
150
151 }
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...
void warn_deprecated(const std::string &method, const std::string &extra)
Print a warning indicating that method is deprecated.
Definition: global.cpp:76
This file contains definitions for utility functions and text for modules, inputfiles, logs, textlogs, HTML_logs (see Input File Handling, Diagnostic Output, Writing messages to the screen and Writing HTML Logfiles).
A Gaussian line profile.
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 .
Base class for exceptions thrown by Cantera classes.
Definition: ctexceptions.h:68
virtual doublereal cumulative(doublereal deltaFreq)
The cumulative profile, defined as .
Default constructor.
virtual doublereal profile(doublereal deltaFreq)
The line shape profile as a function of distance from line center .