SootLib
Loading...
Searching...
No Matches
sootModel.h
Go to the documentation of this file.
1#pragma once
2
3#include "sootDefs.h"
4#include "state.h"
5
10
11#include <vector>
12
13namespace soot {
14
21
22class sootModel {
23
25
26public:
27
28 size_t nsoot;
29
34
36
38
39 //----------- for the SECT model interface
40
41 std::vector<double> mBins;
43
45
46 virtual void setSourceTerms(state &state) = 0;
47
48 void checkSpec();
49
50 //----------- for the LOGN model interface
51
52 virtual double pahSootCollisionRatePerDimer(const double mDimer) const {return 0;}
53
54 //----------- for the SECT model interface
55
56 virtual double get_M0_sectional(const state &state) {
57 throw std::runtime_error("ERROR: sootModel::get_M0_sectional should not be called, but child sootModel_SECT::get_M0_sectional is fine");
58 return 0;
59 }
60 virtual double get_M1_sectional(const state &state) {
61 throw std::runtime_error("ERROR: sootModel::get_M1_sectional should not be called, but child sootModel_SECT::get_M1_sectional is fine");
62 return 0;
63 }
64
66
67 sootModel(size_t nsoot_,
68 nucleationModel *nucl_,
69 growthModel *grow_,
70 oxidationModel *oxid_,
71 coagulationModel *coag_);
72
73 sootModel(size_t nsoot_,
74 nucleationMech Nmech,
75 growthMech Gmech,
76 oxidationMech Omech,
77 coagulationMech Cmech);
78
79 virtual ~sootModel() {
81 delete(nucl);
82 delete(grow);
83 delete(oxid);
84 delete(coag);
85 }
86 }
87
88};
89} // namespace soot
std::vector< double > mBins
mass in sections for the sectional model
Definition: sootModel.h:41
void checkSpec()
Definition: sootModel.cc:144
coagulationModel * coag
pointer to coagulation mechanism
Definition: sootModel.h:33
virtual double get_M0_sectional(const state &state)
Definition: sootModel.h:56
psdMech psdMechType
one of MONO, LOGN, QMOM, MOMIC, SECT, etc.
Definition: sootModel.h:37
sourceTerms sources
struct containing soot, gas, and pah source terms vectors
Definition: sootModel.h:42
nucleationModel * nucl
pointer to nucleation mechanism
Definition: sootModel.h:30
virtual ~sootModel()
Definition: sootModel.h:79
virtual double get_M1_sectional(const state &state)
Definition: sootModel.h:60
virtual double pahSootCollisionRatePerDimer(const double mDimer) const
Definition: sootModel.h:52
bool mechsNewedHere
flag to delete "new" objects
Definition: sootModel.h:35
growthModel * grow
pointer to growth mechanism
Definition: sootModel.h:31
size_t nsoot
# of soot variables: moments or sections
Definition: sootModel.h:28
virtual void setSourceTerms(state &state)=0
oxidationModel * oxid
pointer to oxidation mechanism
Definition: sootModel.h:32
Definition: sootDefs.h:11
oxidationMech
Definition: sootDefs.h:33
coagulationMech
Definition: sootDefs.h:34
growthMech
Definition: sootDefs.h:32
nucleationMech
Definition: sootDefs.h:31
psdMech
Definition: sootDefs.h:35