Cantera  2.0
rotor.h
Go to the documentation of this file.
1 #ifndef CT_ROTOR
2 #define CT_ROTOR
3 
4 /**
5  * @file rotor.h
6  * Header file for class Rotor.
7  */
8 
9 /**
10  * @defgroup spectroscopy Spectroscopic Models
11  *
12  * These classes are used to simulate the absorption and emission spectra of
13  * molecules.
14  */
15 
16 #include "cantera/base/ct_defs.h"
17 
18 /**
19  * Namespace for spectroscopic functions and classes.
20  */
21 namespace Cantera
22 {
23 
24 /**
25  * Class Rotor represents a non-rigid quantum-mechanical rotor.
26  * @ingroup spectroscopy
27  */
28 class Rotor
29 {
30 public:
31 
32  /// Default Constructor.
33  Rotor() {}
34 
35  /// Destructor.
36  virtual ~Rotor() {}
37 
38  /// Full Constructor.
39  Rotor(doublereal Bv, doublereal dipoleMoment = 0.0,
40  doublereal Dv = 0.0, doublereal Hv = 0.0);
41 
42  doublereal energy_w(int J);
43 
44  int degeneracy(int J);
45 
46  doublereal partitionFunction(doublereal T, int cutoff=-1);
47 
48  doublereal frequency(int J_lower, int J_upper);
49 
50  doublereal relPopulation(int J, doublereal T);
51 
52  doublereal population(int J, doublereal T) {
53  return relPopulation(J,T)/partitionFunction(T);
54  }
55  doublereal intensity(int J_lower, int J_upper, doublereal T);
56 
57 protected:
58 
59  doublereal m_Bv;
60  doublereal m_Dv;
61  doublereal m_Hv;
62  doublereal m_dipole;
63 };
64 
65 /** convert from Hz to wavenmbers */
66 inline doublereal hz_to_wnum(doublereal freq)
67 {
68  return freq/(100.0*Cantera::lightSpeed);
69 }
70 
71 /** Convert from wavenumbers to Joules. */
72 inline doublereal wnum_to_J(doublereal w)
73 {
74  return Cantera::Planck * w * 100.0 * Cantera::lightSpeed;
75 }
76 
77 inline doublereal J_to_wnum(doublereal e)
78 {
79  return e /(Cantera::Planck * 100.0 * Cantera::lightSpeed);
80 }
81 
82 inline doublereal wnum_to_eV(doublereal w)
83 {
84  return Cantera::Planck * w * 100.0 * Cantera::lightSpeed / Cantera::ElectronCharge;
85 }
86 
87 inline doublereal eV_to_wnum(doublereal e)
88 {
89  return e * Cantera::ElectronCharge / (Cantera::Planck * 100.0 * Cantera::lightSpeed);
90 }
91 }
92 
93 #endif
94 
95