SootLib
Loading...
Searching...
No Matches
sootDefs.h
Go to the documentation of this file.
1#pragma once
2
3#include <map>
4#include <vector>
5#include <cmath>
6#include <iostream>
7#include <algorithm>
8#include <memory>
9#include <string>
10
11namespace soot {
12
14
15const double Na = 6.02214076E26;
16const double kb = 1.380649E-23;
17const double Rg = Na*kb;
18
19const double eps_c = 2.2;
20const double Df = 1.8;
21const double rhoSoot = 1850;
22const double bCoag = 0.8536;
23
24const double onethird = 1.0/3.0;
25const double twothird = 2.0/3.0;
26const double root2 = sqrt(2.0);
27const double mmin = 2E-26;
28
30
31enum class nucleationMech { NONE, LL, LIN, LINA1, PAH, size };
32enum class growthMech { NONE, LL, LIN, HACA, size };
35enum class psdMech { NONE, MONO, LOGN, QMOM, MOMIC, SECT, size };
36
38
39enum class gasSp{ O2, O, H2, H, OH, H2O, CO, C2H2, C6H6, C, size };
40
41const std::map<std::string, gasSp> gasSpMapSE{{"O2", gasSp::O2},
42 {"O" , gasSp::O},
43 {"H2", gasSp::H2},
44 {"H", gasSp::H},
45 {"OH", gasSp::OH},
46 {"H2O", gasSp::H2O},
47 {"CO", gasSp::CO},
48 {"C2H2",gasSp::C2H2},
49 {"C6H6",gasSp::C6H6},
50 {"C", gasSp::C}};
51
52const std::map<gasSp, std::string> gasSpMapES{{gasSp::O2, "O2"},
53 {gasSp::O, "O" },
54 {gasSp::H2, "H2"},
55 {gasSp::H, "H"},
56 {gasSp::OH, "OH"},
57 {gasSp::H2O, "H2O"},
58 {gasSp::CO, "CO"},
59 {gasSp::C2H2,"C2H2"},
60 {gasSp::C6H6,"C6H6"},
61 {gasSp::C, "C"}};
62
63const std::map<int, std::string> gasSpMapIS{{0, "O2"}, //< map Int to String
64 {1, "O" },
65 {2, "H2"},
66 {3, "H"},
67 {4, "OH"},
68 {5, "H2O"},
69 {6, "CO"},
70 {7,"C2H2"},
71 {8,"C6H6"},
72 {9, "C"}};
73
74const std::vector<double> gasSpMW{
75 31.998, // O2 ///< same as in cantera Elements.cpp
76 15.999, // O
77 2.016, // H2
78 1.008, // H
79 17.007, // OH
80 18.015, // H2O
81 28.010, // CO
82 26.038, // C2H2
83 78.114, // C6H6
84 12.011 // C
85};
86
88// See Blanquart & Pitsch (2009) "A joint volume-surface-hydrogen
89// multi-variate model for soot formation"
90
92
93const std::vector<double> pahSpMW = {
94 128.174, // C10H8
95 152.196, // C12H8
96 154.212, // C12H10
97 178.234, // C14H10
98 202.256, // C16H10
99 226.278 // C18H10
100};
101
102const std::vector<int> pahSpNC = {
103 10, // C10H8
104 12, // C12H8
105 12, // C12H10
106 14, // C14H10
107 16, // C16H10
108 18 // C18H10
109};
110const std::vector<int> pahSpNH = {
111 8, // C10H8
112 8, // C12H8
113 10, // C12H10
114 10, // C14H10
115 10, // C16H10
116 10 // C18H10
117};
118
119const std::vector<double> pahSpGamma = {
120 0.00133, // C10H8, ///< gamma_i = CN*mi^4; CN = 1.5E-11 (fit); gamma_C10H8 = 0.004/3
121 0.00267, // C12H8, ///< gamma_C12H8 = 0.008/3 (See Blanquart and Pitsch in Bockhorn 2009
122 0.0085, // C12H10,
123 0.0150, // C14H10,
124 0.0250, // C16H10,
125 0.0390 // C18H10,
126};
127
129
130//----------------------
131
133 double mDimer = 0;
134 double nDimer = 0;
135 double nDotD = 0;
136};
137
138//----------------------
139
141 std::vector<double> sootSources;
142 std::vector<double> gasSources;
143 std::vector<double> pahSources;
144
145 sourceTerms(size_t nsoot) : sootSources(std::vector<double>(nsoot, 0.0)),
146 gasSources( std::vector<double>((size_t)gasSp::size, 0.0)),
147 pahSources( std::vector<double>((size_t)pahSp::size, 0.0)) {}
148};
149
150} // namespace soot
Definition: sootDefs.h:11
oxidationMech
Definition: sootDefs.h:33
const double kb
Boltzmann constant = Rg/Na: J/#*K.
Definition: sootDefs.h:16
const std::vector< double > pahSpGamma
Definition: sootDefs.h:119
const double rhoSoot
soot particle density
Definition: sootDefs.h:21
const double mmin
mass of a carbon atom (kg)
Definition: sootDefs.h:27
const double root2
Definition: sootDefs.h:26
const double onethird
Definition: sootDefs.h:24
const double Df
soot fractal dimension
Definition: sootDefs.h:20
const std::map< int, std::string > gasSpMapIS
Definition: sootDefs.h:63
coagulationMech
Definition: sootDefs.h:34
const std::vector< double > pahSpMW
Definition: sootDefs.h:93
growthMech
Definition: sootDefs.h:32
nucleationMech
Definition: sootDefs.h:31
const std::map< gasSp, std::string > gasSpMapES
map Enumeration to String
Definition: sootDefs.h:52
const std::vector< int > pahSpNC
Definition: sootDefs.h:102
const double eps_c
coagulation constant/van der Waals enhancement factor: Harris and Kennedy CST 59:443-454 (1988) https...
Definition: sootDefs.h:19
gasSp
Definition: sootDefs.h:39
const double bCoag
coagulation constant, bounded 1/sqrt(2) < bCoag < 1
Definition: sootDefs.h:22
const double twothird
Definition: sootDefs.h:25
const std::map< std::string, gasSp > gasSpMapSE
map String to Enumeration
Definition: sootDefs.h:41
const double Na
Avogadro's constant: #/kmol.
Definition: sootDefs.h:15
const double Rg
Universal gas constant: J/kmol*K.
Definition: sootDefs.h:17
pahSp
Definition: sootDefs.h:91
const std::vector< int > pahSpNH
Definition: sootDefs.h:110
psdMech
Definition: sootDefs.h:35
const std::vector< double > gasSpMW
(kg/kmol); make sure the order corresponds to the gasSp enum
Definition: sootDefs.h:74
std::vector< double > pahSources
kg/m3*s
Definition: sootDefs.h:143
std::vector< double > gasSources
kg/m3*s
Definition: sootDefs.h:142
std::vector< double > sootSources
kg^r/m3*s (moments), or #/m3*s (sections)
Definition: sootDefs.h:141
sourceTerms(size_t nsoot)
Definition: sootDefs.h:145