[Kinetics] Add Plog::rates() for informational purposes
This commit is contained in:
parent
4151c10884
commit
d3d303c4e9
2 changed files with 20 additions and 0 deletions
|
|
@ -409,6 +409,10 @@ public:
|
|||
//! has a negative pre-exponential factor.
|
||||
void validate(const std::string& equation);
|
||||
|
||||
//! Return the pressures and Arrhenius expressions which comprise this
|
||||
//! reaction.
|
||||
std::vector<std::pair<double, Arrhenius> > rates() const;
|
||||
|
||||
protected:
|
||||
//! log(p) to (index range) in the rates_ vector
|
||||
std::map<double, std::pair<size_t, size_t> > pressures_;
|
||||
|
|
|
|||
|
|
@ -228,6 +228,22 @@ void Plog::validate(const std::string& equation)
|
|||
}
|
||||
}
|
||||
|
||||
std::vector<std::pair<double, Arrhenius> > Plog::rates() const
|
||||
{
|
||||
std::vector<std::pair<double, Arrhenius> > R;
|
||||
for (std::map<double, std::pair<size_t, size_t> >::const_iterator iter = ++pressures_.begin();
|
||||
iter != pressures_.end();
|
||||
++iter) {
|
||||
for (size_t i = iter->second.first;
|
||||
i < iter->second.second;
|
||||
i++) {
|
||||
R.push_back(std::make_pair(std::exp(iter->first), rates_[i]));
|
||||
}
|
||||
}
|
||||
R.pop_back(); // remove the last rate (introduced for P > P_max)
|
||||
return R;
|
||||
}
|
||||
|
||||
ChebyshevRate::ChebyshevRate(const ReactionData& rdata)
|
||||
: nP_(rdata.chebDegreeP)
|
||||
, nT_(rdata.chebDegreeT)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue