SootLib
Loading...
Searching...
No Matches
nucleationModel_PAH.cc
Go to the documentation of this file.
2#include "sootDefs.h"
3#include "sootModel.h"
4
5using namespace std;
6using namespace soot;
7
9
11
12 DIMER.mDimer = 0;
13 DIMER.nDimer = 0;
14 DIMER.nDotD = 0;
15
17}
18
46
48
49 double nDotD = 0.0; // dimer self collision (formation) rate: #/m3*s
50 double mDimer = 0.0; // reset dimer mass (kg/part)
51 double nDimer = 0.0; // reset dimer number density
52 double cMin = state.cMin; // min number of carbon atoms in a soot particle
53 double hMin = 0.0;
54
55 //------------ compute the dimer self collision rate nDotD and mass mDimer (kg/particle)
56
57 static double preFac = 4.0*sqrt(M_PI*kb*state.T)* // compare to coag->getKfm; here no eps_c and FM_multiplier, and simp with m1=m2
58 pow(6./(M_PI*rhoSoot), twothird);
59
60 //----- loop over PAH species
61
62 for (int sp=0; sp<(int)pahSp::size; sp++) {
63
64 double Ni = state.rhoGas * state.yPah[sp] / pahSpMW[sp] * Na; // #/m3 for given pah species
65 double ndoti = pahSpGamma[sp]*preFac*pow(pahSpMW[sp]/Na, 1.0/6.0)*Ni*Ni; // dn_pahi/dt
66
67 nDotD += 0.5*ndoti; // dn_Dimer/dt
68 mDimer += ndoti * pahSpNC[sp]*gasSpMW[(int)gasSp::C]/Na; // normalized by nDotD below
69 cMin += ndoti * 2.0*pahSpNC[sp]; // normalized below; *2: two dimers make one nucleated soot particle
70 hMin += ndoti * 2.0*pahSpNH[sp]; // normalized below; *2: two dimers make one nucleated soot particle
71
72 nucleationPahRxnRates[sp] = -ndoti*pahSpMW[sp]/Na; // PAH gas sources; kg/m3*s;
73 }
74
75 if (nDotD > 0) {
76 mDimer /= 2.0*nDotD; // normalize
77 cMin /= 2.0*nDotD; // normalize
78 hMin /= 2.0*nDotD; // normalize
79 }
80 state.cMin = cMin; // cMin is reset here; some mechanisms have this as an input
81
82 nucleationRxnRatios[(int)gasSp::C] = 1.0;
83 nucleationRxnRatios[(int)gasSp::H2] = hMin/2.0/cMin;
84
85 //----------- compute the dimer concentration nDimer as solution to quadratic
86 //----------- NOTE: this must be consistent with sootModel_XXXX::setSourceTerms func for condensation
87
88 double beta_DD = preFac*pow(mDimer, 1.0/6.0); // dimer self-collision rate coefficient
89
90 double I_beta_DS = 0.0; // sum of dimer-soot collision rates
91 if (SM->psdMechType == psdMech::LOGN ||
94 I_beta_DS = SM->pahSootCollisionRatePerDimer(mDimer);
95 else
96 for (int i = 0; i < state.absc.size(); i++) // loop over soot "particles" (abscissas)
97 I_beta_DS += abs(state.wts[i]) * SM->coag->getCoagulationSootRate(state, mDimer, state.absc[i]);
98
99 //------ solve quadratic for D: beta_DD*(D^2) + I_beta_DS*(D) - nDotD = 0
100 // See Numerical Recipes 3rd ed. Sec 5.6 page 227:
101 // ax^2 + bx + c = 0; q=-0.5*(b+sgn(b)*sqrt(b*b-4*a*c)); x1=q/a; x2=c/q; Choose x2 as the + root
102
103 if (nDotD > 0 && mDimer > 0) // nDimer initialized to 0 above
104 nDimer = 2.0*nDotD/(I_beta_DS + sqrt(I_beta_DS*I_beta_DS + 4.*beta_DD*nDotD)); // #/m3
105
106 //----------- populate DIMER structure with updated values
107
108 DIMER.mDimer = mDimer;
109 DIMER.nDimer = nDimer;
110 DIMER.nDotD = nDotD;
111
112 //----------- return nucleation rate Jnuc (=) #/m3*s, (#nucleated particles/m3*s)
113
114 return 0.5*beta_DD*nDimer*nDimer;
115}
virtual double getCoagulationSootRate(const state &state, double m1, double m2) const =0
double getNucleationSootRate(state &state) override
std::vector< double > nucleationPahRxnRates
mole ratios for PAH gas species rate coupling
dimerStruct DIMER
used for PAH nucleation only
nucleationMech mechType
identity of the type of nucleation (child)
sootModel * SM
back pointer to soot model
std::vector< double > nucleationRxnRatios
mole ratios for gas species rate coupling
coagulationModel * coag
pointer to coagulation mechanism
Definition: sootModel.h:33
psdMech psdMechType
one of MONO, LOGN, QMOM, MOMIC, SECT, etc.
Definition: sootModel.h:37
virtual double pahSootCollisionRatePerDimer(const double mDimer) const
Definition: sootModel.h:52
std::vector< double > wts
moment weights
Definition: state.h:34
double rhoGas
gas density (kg/m3)
Definition: state.h:25
std::vector< double > yPah
gas PAH species mass fractions
Definition: state.h:29
double T
gas temperature (K)
Definition: state.h:23
double cMin
soot min num carbon atoms (dynamic for PAH nucleation)
Definition: state.h:36
std::vector< double > absc
moment abscissas
Definition: state.h:33
Definition: sootDefs.h:11
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 std::vector< double > pahSpMW
Definition: sootDefs.h:93
const std::vector< int > pahSpNC
Definition: sootDefs.h:102
const double twothird
Definition: sootDefs.h:25
const double Na
Avogadro's constant: #/kmol.
Definition: sootDefs.h:15
const std::vector< int > pahSpNH
Definition: sootDefs.h:110
const std::vector< double > gasSpMW
(kg/kmol); make sure the order corresponds to the gasSp enum
Definition: sootDefs.h:74