[Kinetics] Refactored GasKinetics to more easily support derived classes
This commit is contained in:
parent
57a9a3f458
commit
229ef825f0
3 changed files with 12 additions and 28 deletions
|
|
@ -322,12 +322,8 @@ public:
|
|||
virtual void finalize();
|
||||
virtual bool ready() const;
|
||||
|
||||
virtual void update_T();
|
||||
virtual void update_C();
|
||||
|
||||
void updateROP();
|
||||
|
||||
|
||||
const std::vector<grouplist_t>& reactantGroups(size_t i) {
|
||||
return m_rgroups[i];
|
||||
}
|
||||
|
|
@ -335,14 +331,15 @@ public:
|
|||
return m_pgroups[i];
|
||||
}
|
||||
|
||||
|
||||
void _update_rates_T();
|
||||
//! Update temperature-dependent portions of reaction rates and falloff
|
||||
//! functions.
|
||||
virtual void update_rates_T();
|
||||
|
||||
//! Update properties that depend on concentrations.
|
||||
//! Currently the enhanced collision partner concentrations are updated
|
||||
//! here, as well as the pressure-dependent portion of P-log and Chebyshev
|
||||
//! reactions.
|
||||
void _update_rates_C();
|
||||
virtual void update_rates_C();
|
||||
|
||||
//@}
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ void GRI_30_Kinetics::gri30_updateROP()
|
|||
{
|
||||
|
||||
gri30_update_rates_T();
|
||||
_update_rates_C();
|
||||
update_rates_C();
|
||||
|
||||
if (m_ROP_ok) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -144,19 +144,7 @@ Kinetics* GasKinetics::duplMyselfAsKinetics(const std::vector<thermo_t*> & tpVec
|
|||
return gK;
|
||||
}
|
||||
//====================================================================================================================
|
||||
/**
|
||||
* Update temperature-dependent portions of reaction rates and
|
||||
* falloff functions.
|
||||
*/
|
||||
void GasKinetics::update_T()
|
||||
{
|
||||
}
|
||||
//====================================================================================================================
|
||||
void GasKinetics::
|
||||
update_C() {}
|
||||
//====================================================================================================================
|
||||
void GasKinetics::
|
||||
_update_rates_T()
|
||||
void GasKinetics::update_rates_T()
|
||||
{
|
||||
doublereal T = thermo().temperature();
|
||||
m_logStandConc = log(thermo().standardConcentration());
|
||||
|
|
@ -187,8 +175,7 @@ _update_rates_T()
|
|||
|
||||
//====================================================================================================================
|
||||
|
||||
void GasKinetics::
|
||||
_update_rates_C()
|
||||
void GasKinetics::update_rates_C()
|
||||
{
|
||||
thermo().getActivityConcentrations(&m_conc[0]);
|
||||
doublereal ctot = thermo().molarDensity();
|
||||
|
|
@ -247,7 +234,7 @@ void GasKinetics::updateKc()
|
|||
*/
|
||||
void GasKinetics::getEquilibriumConstants(doublereal* kc)
|
||||
{
|
||||
_update_rates_T();
|
||||
update_rates_T();
|
||||
thermo().getStandardChemPotentials(&m_grt[0]);
|
||||
fill(m_rkcn.begin(), m_rkcn.end(), 0.0);
|
||||
|
||||
|
|
@ -501,8 +488,8 @@ void GasKinetics::processFalloffReactions()
|
|||
//====================================================================================================================
|
||||
void GasKinetics::updateROP()
|
||||
{
|
||||
_update_rates_C();
|
||||
_update_rates_T();
|
||||
update_rates_C();
|
||||
update_rates_T();
|
||||
|
||||
if (m_ROP_ok) {
|
||||
return;
|
||||
|
|
@ -558,8 +545,8 @@ void GasKinetics::updateROP()
|
|||
void GasKinetics::
|
||||
getFwdRateConstants(doublereal* kfwd)
|
||||
{
|
||||
_update_rates_C();
|
||||
_update_rates_T();
|
||||
update_rates_C();
|
||||
update_rates_T();
|
||||
|
||||
// copy rate coefficients into ropf
|
||||
copy(m_rfn.begin(), m_rfn.end(), m_ropf.begin());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue