GRINS-0.8.0
hitran.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // GRINS - General Reacting Incompressible Navier-Stokes
5 //
6 // Copyright (C) 2014-2017 Paul T. Bauman, Roy H. Stogner
7 // Copyright (C) 2010-2013 The PECOS Development Team
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the Version 2.1 GNU Lesser General
11 // Public License as published by the Free Software Foundation.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
21 // Boston, MA 02110-1301 USA
22 //
23 //-----------------------------------------------------------------------el-
24 
25 #ifndef GRINS_HITRAN_H
26 #define GRINS_HITRAN_H
27 
28 
29 // C++
30 #include <vector>
31 #include <string>
32 
33 // libMesh
34 #include "libmesh/libmesh.h"
35 
36 namespace GRINS
37 {
38 
40 
58  class HITRAN
59  {
60  public:
62 
69  HITRAN(const std::string & data_file, const std::string & partition_function_file,
70  libMesh::Real T_min, libMesh::Real T_max, libMesh::Real T_step);
71 
73  unsigned int isotopologue(unsigned int index);
74 
76  libMesh::Real nu0(unsigned int index);
77 
79  libMesh::Real sw(unsigned int index);
80 
82  libMesh::Real gamma_air(unsigned int index);
83 
85  libMesh::Real gamma_self(unsigned int index);
86 
88  libMesh::Real elower(unsigned int index);
89 
91  libMesh::Real n_air(unsigned int index);
92 
94  libMesh::Real delta_air(unsigned int index);
95 
98  libMesh::Real partition_function(libMesh::Real T, unsigned int iso);
99 
101  unsigned int get_data_size();
102 
104  libMesh::Real partition_function_derivative(libMesh::Real T, unsigned int iso);
105 
106  protected:
107  libMesh::Real _Tmin, _Tmax, _Tstep;
108 
111 
113  int _q_size;
114 
116  libMesh::Real _T0;
117 
120  std::vector<libMesh::Real> _qT0;
121 
122  // Vectors of data values
123  std::vector<unsigned int> _isotop;
124  std::vector<libMesh::Real> _nu;
125  std::vector<libMesh::Real> _sw;
126  std::vector<libMesh::Real> _gamma_air;
127  std::vector<libMesh::Real> _gamma_self;
128  std::vector<libMesh::Real> _elower;
129  std::vector<libMesh::Real> _n;
130  std::vector<libMesh::Real> _delta_air;
131 
133  std::vector<std::vector<libMesh::Real>> _qT;
134 
136  int T_index(libMesh::Real T);
137 
139  libMesh::Real get_partition_function_value(libMesh::Real T, unsigned int iso);
140 
142  libMesh::Real interpolate_values( int index_r, libMesh::Real T_star, const std::vector<libMesh::Real> & y) const;
143 
145  HITRAN();
146  };
147 
148 }
149 
150 #endif // GRINS_HITRAN_H
libMesh::Real interpolate_values(int index_r, libMesh::Real T_star, const std::vector< libMesh::Real > &y) const
Linear interpolation helper function.
Definition: hitran.C:271
std::vector< libMesh::Real > _nu
Definition: hitran.h:124
libMesh::Real elower(unsigned int index)
Lower state energy of transition [ ].
Definition: hitran.C:216
unsigned int get_data_size()
Return the data size.
Definition: hitran.C:153
libMesh::Real partition_function(libMesh::Real T, unsigned int iso)
Definition: hitran.C:234
int _data_size
Size of spectroscopic data.
Definition: hitran.h:110
libMesh::Real _Tstep
Definition: hitran.h:107
libMesh::Real nu0(unsigned int index)
Linecenter wavenumber [ ].
Definition: hitran.C:192
std::vector< libMesh::Real > _sw
Definition: hitran.h:125
libMesh::Real _Tmax
Definition: hitran.h:107
unsigned int isotopologue(unsigned int index)
Isotopologue ID.
Definition: hitran.C:186
GRINS namespace.
std::vector< libMesh::Real > _gamma_air
Definition: hitran.h:126
std::vector< libMesh::Real > _gamma_self
Definition: hitran.h:127
libMesh::Real partition_function_derivative(libMesh::Real T, unsigned int iso)
Finite difference derivative for partition function.
Definition: hitran.C:158
std::vector< libMesh::Real > _n
Definition: hitran.h:129
libMesh::Real delta_air(unsigned int index)
Air pressure-induced line shift [ ].
Definition: hitran.C:228
libMesh::Real get_partition_function_value(libMesh::Real T, unsigned int iso)
Search through the partition function data to get value for given temperature.
Definition: hitran.C:246
libMesh::Real n_air(unsigned int index)
Temperature coefficient [].
Definition: hitran.C:222
HITRAN interface object.
Definition: hitran.h:58
HITRAN()
User should not call empty constructor.
libMesh::Real _T0
Reference temperature (296K)
Definition: hitran.h:116
libMesh::Real gamma_self(unsigned int index)
Self-broadening half-wdith [ ].
Definition: hitran.C:210
std::vector< libMesh::Real > _delta_air
Definition: hitran.h:130
std::vector< unsigned int > _isotop
Definition: hitran.h:123
int _q_size
Size of partition function data.
Definition: hitran.h:113
std::vector< std::vector< libMesh::Real > > _qT
Vector for partition function values for all isotopologues.
Definition: hitran.h:133
int T_index(libMesh::Real T)
Find the index into _T corresponding to the given temperature.
Definition: hitran.C:264
libMesh::Real _Tmin
Definition: hitran.h:107
libMesh::Real sw(unsigned int index)
Linestrength [ ].
Definition: hitran.C:198
std::vector< libMesh::Real > _elower
Definition: hitran.h:128
libMesh::Real gamma_air(unsigned int index)
Air-broadening half-width [ ].
Definition: hitran.C:204
std::vector< libMesh::Real > _qT0
Definition: hitran.h:120

Generated on Tue Dec 19 2017 12:47:28 for GRINS-0.8.0 by  doxygen 1.8.9.1