diff --git a/Cantera/src/equil/vcs_rxnadj.cpp b/Cantera/src/equil/vcs_rxnadj.cpp index ce769ea6c..df8afdace 100644 --- a/Cantera/src/equil/vcs_rxnadj.cpp +++ b/Cantera/src/equil/vcs_rxnadj.cpp @@ -456,7 +456,7 @@ double VCS_SOLVE::vcs_line_search(int irxn, double dx_orig) molSum += molNumBase[k]; } - double deltaG1 = deltaG_Recalc_Rxn(irxn, molNum, ac, VCS_DATA_PTR(feTrial)); + double deltaG1 = deltaG_Recalc_Rxn(irxn, molNum, ac, VCS_DATA_PTR(m_feSpecies_new)); /* * If deltaG hasn't switched signs when going the full distance @@ -493,7 +493,7 @@ double VCS_SOLVE::vcs_line_search(int irxn, double dx_orig) for (k = 0; k < m_numComponents; k++) { molNum[k] = molNumBase[k] + sc_irxn[k] * dx; } - double deltaG = deltaG_Recalc_Rxn(irxn, molNum, ac, VCS_DATA_PTR(feTrial)); + double deltaG = deltaG_Recalc_Rxn(irxn, molNum, ac, VCS_DATA_PTR(m_feSpecies_new)); /* * If deltaG hasn't switched signs when going the full distance * then we are heading in the appropriate direction, and diff --git a/Cantera/src/equil/vcs_solve.cpp b/Cantera/src/equil/vcs_solve.cpp index afd6f09c2..508bcc923 100644 --- a/Cantera/src/equil/vcs_solve.cpp +++ b/Cantera/src/equil/vcs_solve.cpp @@ -111,7 +111,7 @@ namespace VCSnonideal { m_gibbsSpecies.resize(nspecies0, 0.0); m_SSfeSpecies.resize(nspecies0, 0.0); - feTrial.resize(nspecies0, 0.0); + m_feSpecies_new.resize(nspecies0, 0.0); soln.resize(nspecies0, 0.0); SpeciesUnknownType.resize(nspecies0, VCS_SPECIES_TYPE_MOLNUM); diff --git a/Cantera/src/equil/vcs_solve.h b/Cantera/src/equil/vcs_solve.h index 41e60329b..8553639d7 100644 --- a/Cantera/src/equil/vcs_solve.h +++ b/Cantera/src/equil/vcs_solve.h @@ -440,13 +440,14 @@ public: */ std::vector m_feSpecies_old; - //! Dimensionless trial free energy for all the species in the mechanism - //! at the current T, P, and mole numbers. + //! Dimensionless new free energy for all the species in the mechanism + //! at the new tentatite T, P, and mole numbers. /*! * The first NC entries are for components. The following * NR entries are for the current non-component species in the mechanism. + * Length = number of species */ - std::vector feTrial; + std::vector m_feSpecies_new; //! Setting for the initial estimate /*! diff --git a/Cantera/src/equil/vcs_solve_TP.cpp b/Cantera/src/equil/vcs_solve_TP.cpp index 33e062fe3..379dbad5c 100644 --- a/Cantera/src/equil/vcs_solve_TP.cpp +++ b/Cantera/src/equil/vcs_solve_TP.cpp @@ -443,7 +443,7 @@ namespace VCSnonideal { } vcs_dcopy(VCS_DATA_PTR(m_feSpecies_old), VCS_DATA_PTR(m_gibbsSpecies), m_numSpeciesRdc); - vcs_dcopy(VCS_DATA_PTR(feTrial), VCS_DATA_PTR(m_gibbsSpecies), m_numSpeciesRdc); + vcs_dcopy(VCS_DATA_PTR(m_feSpecies_new), VCS_DATA_PTR(m_gibbsSpecies), m_numSpeciesRdc); vcs_dcopy(VCS_DATA_PTR(ActCoeff0), VCS_DATA_PTR(ActCoeff), m_numSpeciesRdc); vcs_dcopy(VCS_DATA_PTR(dgl), VCS_DATA_PTR(dg), m_numRxnRdc); @@ -4677,7 +4677,7 @@ namespace VCSnonideal { SWAP(m_gibbsSpecies[k1], m_gibbsSpecies[k2], t1); SWAP(ds[k1], ds[k2], t1); SWAP(m_feSpecies_old[k1], m_feSpecies_old[k2], t1); - SWAP(feTrial[k1], feTrial[k2], t1); + SWAP(m_feSpecies_new[k1], m_feSpecies_new[k2], t1); SWAP(SSPhase[k1], SSPhase[k2], j); SWAP(PhaseID[k1], PhaseID[k2], j); SWAP(ind[k1], ind[k2], j);