SootLib
Loading...
Searching...
No Matches
soot::sootModel_QMOM Class Reference

Detailed Description

Quadrature Method of Moments (QMOM) model

Definition at line 15 of file sootModel_QMOM.h.

#include <sootModel_QMOM.h>

Public Member Functions

virtual void setSourceTerms (state &state)
 
 sootModel_QMOM (size_t nsoot_, nucleationModel *nucl_, growthModel *grow_, oxidationModel *oxid_, coagulationModel *coag_)
 
 sootModel_QMOM (size_t nsoot_, nucleationMech Nmech, growthMech Gmech, oxidationMech Omech, coagulationMech Cmech)
 
virtual ~sootModel_QMOM ()
 
- Public Member Functions inherited from soot::sootModel
virtual void setSourceTerms (state &state)=0
 
void checkSpec ()
 
virtual double pahSootCollisionRatePerDimer (const double mDimer) const
 
virtual double get_M0_sectional (const state &state)
 
virtual double get_M1_sectional (const state &state)
 
 sootModel (size_t nsoot_, nucleationModel *nucl_, growthModel *grow_, oxidationModel *oxid_, coagulationModel *coag_)
 
 sootModel (size_t nsoot_, nucleationMech Nmech, growthMech Gmech, oxidationMech Omech, coagulationMech Cmech)
 
virtual ~sootModel ()
 

Static Private Member Functions

static void wheeler (const std::vector< double > &m, size_t N, std::vector< double > &w, std::vector< double > &x)
 
static void getWtsAbs (const std::vector< double > &M, std::vector< double > &weights, std::vector< double > &abscissas)
 
static double Mr (double r, const std::vector< double > &wts, const std::vector< double > &absc)
 

Additional Inherited Members

- Public Attributes inherited from soot::sootModel
size_t nsoot
 # of soot variables: moments or sections More...
 
nucleationModelnucl
 pointer to nucleation mechanism More...
 
growthModelgrow
 pointer to growth mechanism More...
 
oxidationModeloxid
 pointer to oxidation mechanism More...
 
coagulationModelcoag
 pointer to coagulation mechanism More...
 
bool mechsNewedHere
 flag to delete "new" objects More...
 
psdMech psdMechType
 one of MONO, LOGN, QMOM, MOMIC, SECT, etc. More...
 
std::vector< double > mBins
 mass in sections for the sectional model More...
 
sourceTerms sources
 struct containing soot, gas, and pah source terms vectors More...
 

Constructor & Destructor Documentation

◆ sootModel_QMOM() [1/2]

sootModel_QMOM::sootModel_QMOM ( size_t  nsoot_,
nucleationModel nucl_,
growthModel grow_,
oxidationModel oxid_,
coagulationModel coag_ 
)

Constructor taking pointers to chemistry models as input. User creates these pointers nominally by "new-ing" them.

Parameters
nsoot_input: number of soot moments (even number)
nucl_input: pointer to nucleation model.
grow_input: pointer to growth model.
oxid_input: pointer to oxidation model.
coag_input: pointer to coagulation model.

Definition at line 25 of file sootModel_QMOM.cc.

◆ sootModel_QMOM() [2/2]

sootModel_QMOM::sootModel_QMOM ( size_t  nsoot_,
nucleationMech  Nmech,
growthMech  Gmech,
oxidationMech  Omech,
coagulationMech  Cmech 
)

Constructor taking enumerations names as input. Chemistry pointers are created (new-ed) here based on those enumerations.

Parameters
nsoot_input: number of soot moments (even number)
Nmechinput: one of enum class nucleationMech in sootDefs.h
Gmechinput: one of enum class growthMech in sootDefs.h
Omechinput: one of enum class oxidationMech in sootDefs.h
Cmechinput: one of enum class coagulationMech in sootDefs.h

Definition at line 56 of file sootModel_QMOM.cc.

◆ ~sootModel_QMOM()

virtual soot::sootModel_QMOM::~sootModel_QMOM ( )
inlinevirtual

Definition at line 47 of file sootModel_QMOM.h.

Member Function Documentation

◆ setSourceTerms()

void sootModel_QMOM::setSourceTerms ( state state)
virtual

Primary user interface.

Parameters
stateinput: gas and soot state, set by user.

sets sources.sootSources vector sets sources.gasSources vector sets sources.pahSources vector

Implements soot::sootModel.

Definition at line 85 of file sootModel_QMOM.cc.

◆ wheeler()

void sootModel_QMOM::wheeler ( const std::vector< double > &  m,
size_t  N,
std::vector< double > &  w,
std::vector< double > &  x 
)
staticprivate

Wheeler algorithm for computing weights and abscissas from moments.

From Marchisio and Fox (2013) Computational Models for Polydisperse and Multiphase Systems. LApack's dstev function to compute eigenvalues and eigenvectors of symmetrical tridiagonal matrix.

Parameters
minput: vector of moments (size = 2N)
Ninput: number of quadrature nodes (abscissas)
woutput: weights
xoutput: abscissas

Definition at line 276 of file sootModel_QMOM.cc.

◆ getWtsAbs()

void sootModel_QMOM::getWtsAbs ( const std::vector< double > &  M,
std::vector< double > &  weights,
std::vector< double > &  abscissas 
)
staticprivate

Calculates weights and abscissas from moments using wheeler algorithm.

Parameters
Minput: vector of moments
weightsoutput: weights
abscissasoutput: abscissas

NOTE: wts and absc variables DO NOT change size during downselection; instead, the extra values are set to zero. This is more convenient than resizing when wts and absc are used to reconstitute moment source terms.

Definition at line 208 of file sootModel_QMOM.cc.

◆ Mr()

double sootModel_QMOM::Mr ( double  r,
const std::vector< double > &  wts,
const std::vector< double > &  absc 
)
staticprivate

calculates fractional moments from weights and abscissas.

Parameters
rinput: fractional moment to compute; corresponds to exponent
wtsinput: weights
abscinput: abscissas
Returns
Mr

Definition at line 332 of file sootModel_QMOM.cc.


The documentation for this class was generated from the following files: