Cantera
2.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
src
converters
Species.h
Go to the documentation of this file.
1
/**
2
* @file Species.h
3
*/
4
// Copyright 2001 California Institute of Technology
5
6
#ifndef CKR_SPECIES_H
7
#define CKR_SPECIES_H
8
9
#include "
ckr_defs.h
"
10
#include "
Constituent.h
"
11
#include <map>
12
#include <vector>
13
14
namespace
ckr
15
{
16
17
/**
18
* Holds species data read in from entries in the THERMO section of
19
* a chemkin or nasa9 fortran formatted input file.
20
*/
21
class
Species
22
{
23
public
:
24
25
/// Construct an empty Species object
26
Species
();
27
28
//! Copy constructor
29
Species
(
const
Species
& s);
30
31
/// Destructor
32
~Species
();
33
34
/// Assignment operator
35
Species
&
operator=
(
const
Species
& s);
36
37
/// Test for equality based on name only.
38
bool
operator==
(
const
Species
& s)
const
;
39
40
bool
operator!=(
const
Species
& s)
const
;
41
42
/// Used to sort lists of species by index number.
43
bool
operator<
(
const
Species
& s)
const
;
44
45
//! Type of thermodynamic representation
46
/*!
47
* 0 This is a 2 region NASA polynomial representation
48
*
49
* 1 This is a multiple temperature region NASA9 polynomial
50
* representation.
51
*/
52
int
thermoFormatType
;
53
54
//! Species Name
55
std::string
name
;
56
std::string
id
;
//!< ID tag from 'date' field in input
57
std::string
phase
;
//!< Phase string. Usually "G", "L", or "S".
58
double
tlow
;
//!< Min temperature for thermo data fit
59
double
tmid
;
//!< Mid temperature for thermo data fit
60
double
thigh
;
//!< Max temperature for thermo data fit
61
62
/// list of Constituent objects defining elemental composition
63
std::vector<Constituent>
elements
;
64
65
/// map from element symbols to atom numbers
66
mutable
std::map<std::string, double>
comp
;
67
68
/// polynomial coefficients for the lower temperature range
69
vector_fp
lowCoeffs
;
70
71
/// polynomial coefficients for the upper temperature range
72
vector_fp
highCoeffs
;
73
74
//! Number of temperature regions
75
int
nTempRegions
;
76
77
std::vector<vector_fp*> region_coeffs;
78
vector_fp minTemps;
79
vector_fp maxTemps;
80
81
/// flag set by the validation routines
82
int
valid
;
83
84
/// position in the list of species in the input file
85
int
index
;
86
87
std::string m_commentsRef;
88
89
private
:
90
//! Delete private data
91
void
delR
();
92
};
93
94
//! Shorthand for a list of Species
95
typedef
std::vector<Species>
speciesList
;
96
97
//! A map from species names to Species objects
98
typedef
std::map<std::string, Species>
speciesTable
;
99
}
100
101
#endif
102
103
104
105
106
Generated by
1.8.2