Allow GasKinetics to more easily support derived classes
Partial cherry-pick of r2181 that doesn't change the interface for existing derived classes.
This commit is contained in:
parent
83cca43a3b
commit
2dfc551925
2 changed files with 15 additions and 9 deletions
|
|
@ -347,14 +347,20 @@ public:
|
|||
return m_pgroups[i];
|
||||
}
|
||||
|
||||
virtual void update_rates_T();
|
||||
virtual void update_rates_C();
|
||||
|
||||
void _update_rates_T();
|
||||
void _update_rates_T() {
|
||||
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();
|
||||
void _update_rates_C() {
|
||||
update_rates_C();
|
||||
}
|
||||
|
||||
//@}
|
||||
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ void GasKinetics::
|
|||
update_C() {}
|
||||
//====================================================================================================================
|
||||
void GasKinetics::
|
||||
_update_rates_T()
|
||||
update_rates_T()
|
||||
{
|
||||
doublereal T = thermo().temperature();
|
||||
m_logStandConc = log(thermo().standardConcentration());
|
||||
|
|
@ -188,7 +188,7 @@ _update_rates_T()
|
|||
//====================================================================================================================
|
||||
|
||||
void GasKinetics::
|
||||
_update_rates_C()
|
||||
update_rates_C()
|
||||
{
|
||||
thermo().getActivityConcentrations(&m_conc[0]);
|
||||
doublereal ctot = thermo().molarDensity();
|
||||
|
|
@ -247,7 +247,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 +501,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 +558,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