Changed a variable name
This commit is contained in:
parent
b9533bcf34
commit
1f8618f090
6 changed files with 20 additions and 18 deletions
|
|
@ -106,7 +106,7 @@ void VCS_SOLVE::vcs_nondim_TP(void) {
|
|||
m_gibbsSpecies[i] *= tf;
|
||||
dg[i] *= tf;
|
||||
dgl[i] *= tf;
|
||||
fel[i] *= tf;
|
||||
m_feSpecies_old[i] *= tf;
|
||||
}
|
||||
|
||||
Faraday_dim = vcs_nondim_Farad(m_VCS_UnitsFormat, T);
|
||||
|
|
@ -146,7 +146,7 @@ void VCS_SOLVE::vcs_redim_TP(void)
|
|||
m_gibbsSpecies[i] *= tf;
|
||||
dg[i] *= tf;
|
||||
dgl[i] *= tf;
|
||||
fel[i] *= tf;
|
||||
m_feSpecies_old[i] *= tf;
|
||||
}
|
||||
Faraday_dim *= tf;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -285,7 +285,7 @@ int VCS_SOLVE::vcs_prep(void) {
|
|||
* Initialize various arrays in the data to zero
|
||||
*/
|
||||
vcs_dzero(VCS_DATA_PTR(m_gibbsSpecies), m_numSpeciesTot);
|
||||
vcs_vdzero(fel, m_numSpeciesTot);
|
||||
vcs_vdzero(m_feSpecies_old, m_numSpeciesTot);
|
||||
vcs_vdzero(wt, m_numSpeciesTot);
|
||||
vcs_dzero(&(DnPhase[0][0]), m_numSpeciesTot*NPhase);
|
||||
vcs_izero(&(PhaseParticipation[0][0]), m_numSpeciesTot*NPhase);
|
||||
|
|
|
|||
|
|
@ -418,7 +418,8 @@ double VCS_SOLVE::vcs_line_search(int irxn, double dx_orig)
|
|||
/*
|
||||
* Calculate the deltaG value at the dx = 0.0 point
|
||||
*/
|
||||
double deltaGOrig = deltaG_Recalc_Rxn(irxn, molNumBase, acBase, VCS_DATA_PTR(fel));
|
||||
double deltaGOrig = deltaG_Recalc_Rxn(irxn, molNumBase, acBase,
|
||||
VCS_DATA_PTR(m_feSpecies_old));
|
||||
double forig = fabs(deltaGOrig) + 1.0E-15;
|
||||
if (deltaGOrig > 0.0) {
|
||||
if (dx_orig > 0.0) {
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ namespace VCSnonideal {
|
|||
m_deltaGRxn_tmp.resize(nspecies0, 0.0);
|
||||
ds.resize(nspecies0, 0.0);
|
||||
|
||||
fel.resize(nspecies0, 0.0);
|
||||
m_feSpecies_old.resize(nspecies0, 0.0);
|
||||
ga.resize(nelements, 0.0);
|
||||
gai.resize(nelements, 0.0);
|
||||
|
||||
|
|
|
|||
|
|
@ -433,11 +433,12 @@ public:
|
|||
*/
|
||||
std::vector<double> m_gibbsSpecies;
|
||||
|
||||
//! Old free energy vector from the previous iteration
|
||||
//! Free energy vector from the start of the current iteration
|
||||
/*!
|
||||
* fe[] is copied into fel[]
|
||||
* The free energies are saved at the start of the current iteration.
|
||||
* Length = number of species
|
||||
*/
|
||||
std::vector<double> fel;
|
||||
std::vector<double> m_feSpecies_old;
|
||||
|
||||
//! Dimensionless trial free energy for all the species in the mechanism
|
||||
//! at the current T, P, and mole numbers.
|
||||
|
|
|
|||
|
|
@ -442,7 +442,7 @@ namespace VCSnonideal {
|
|||
}
|
||||
}
|
||||
|
||||
vcs_dcopy(VCS_DATA_PTR(fel), VCS_DATA_PTR(m_gibbsSpecies), m_numSpeciesRdc);
|
||||
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(ActCoeff0), VCS_DATA_PTR(ActCoeff), m_numSpeciesRdc);
|
||||
vcs_dcopy(VCS_DATA_PTR(dgl), VCS_DATA_PTR(dg), m_numRxnRdc);
|
||||
|
|
@ -903,7 +903,7 @@ namespace VCSnonideal {
|
|||
* which have yet to be processed in the main loop
|
||||
*/
|
||||
for (ll = kspec+1; ll < m_numSpeciesRdc; ++ll) {
|
||||
fel[ll] = m_gibbsSpecies[ll];
|
||||
m_feSpecies_old[ll] = m_gibbsSpecies[ll];
|
||||
}
|
||||
for (ll = irxn+1; ll < m_numRxnRdc; ++ll) {
|
||||
dgl[ll] = dg[ll];
|
||||
|
|
@ -1117,7 +1117,7 @@ namespace VCSnonideal {
|
|||
/* *************************************************************** */
|
||||
if (printDetails) {
|
||||
plogf(" --- Total Old Dimensionless Gibbs Free Energy = %20.13E\n",
|
||||
vcs_Total_Gibbs(VCS_DATA_PTR(soln), VCS_DATA_PTR(fel),
|
||||
vcs_Total_Gibbs(VCS_DATA_PTR(soln), VCS_DATA_PTR(m_feSpecies_old),
|
||||
VCS_DATA_PTR(TPhMoles)));
|
||||
plogf(" --- Total tentative Dimensionless Gibbs Free Energy = %20.13E",
|
||||
vcs_Total_Gibbs(VCS_DATA_PTR(wt), VCS_DATA_PTR(m_gibbsSpecies),
|
||||
|
|
@ -1181,14 +1181,14 @@ namespace VCSnonideal {
|
|||
for (i = 0; i < m_numComponents; ++i) {
|
||||
plogf(" --- %-12.12s", SpName[i].c_str()); plogf(" ");
|
||||
plogf("%14.6E%14.6E%14.6E%14.6E\n", soln[i],
|
||||
wt[i], fel[i], m_gibbsSpecies[i]);
|
||||
wt[i], m_feSpecies_old[i], m_gibbsSpecies[i]);
|
||||
}
|
||||
for (i = m_numComponents; i < m_numSpeciesRdc; ++i) {
|
||||
l1 = i - m_numComponents;
|
||||
plogf(" --- %-12.12s", SpName[i].c_str());
|
||||
plogf(" %2d %14.6E%14.6E%14.6E%14.6E%14.6E%14.6E\n",
|
||||
spStatus[l1], soln[i],
|
||||
wt[i], fel[i], m_gibbsSpecies[i],
|
||||
wt[i], m_feSpecies_old[i], m_gibbsSpecies[i],
|
||||
dgl[l1], dg[l1]);
|
||||
}
|
||||
for (kspec = m_numSpeciesRdc; kspec < m_numSpeciesTot; ++kspec) {
|
||||
|
|
@ -1196,7 +1196,7 @@ namespace VCSnonideal {
|
|||
plogf(" --- %-12.12s", SpName[kspec].c_str());
|
||||
plogf(" %2d %14.6E%14.6E%14.6E%14.6E%14.6E%14.6E\n",
|
||||
spStatus[l1], soln[kspec],
|
||||
wt[kspec], fel[kspec], m_gibbsSpecies[kspec],
|
||||
wt[kspec], m_feSpecies_old[kspec], m_gibbsSpecies[kspec],
|
||||
dgl[l1], dg[l1]);
|
||||
}
|
||||
plogf(" ---"); print_space(56);
|
||||
|
|
@ -1213,7 +1213,7 @@ namespace VCSnonideal {
|
|||
}
|
||||
plogf(" "); vcs_print_line("-", 103);
|
||||
plogf(" --- Total Old Dimensionless Gibbs Free Energy = %20.13E\n",
|
||||
vcs_Total_Gibbs(VCS_DATA_PTR(soln), VCS_DATA_PTR(fel),
|
||||
vcs_Total_Gibbs(VCS_DATA_PTR(soln), VCS_DATA_PTR(m_feSpecies_old),
|
||||
VCS_DATA_PTR(TPhMoles)));
|
||||
plogf(" --- Total New Dimensionless Gibbs Free Energy = %20.13E",
|
||||
vcs_Total_Gibbs(VCS_DATA_PTR(wt), VCS_DATA_PTR(m_gibbsSpecies),
|
||||
|
|
@ -1244,7 +1244,7 @@ namespace VCSnonideal {
|
|||
vcs_dcopy(VCS_DATA_PTR(TPhMoles), VCS_DATA_PTR(TPhMoles1), NPhase);
|
||||
vcs_dcopy(VCS_DATA_PTR(soln), VCS_DATA_PTR(wt), m_numSpeciesRdc);
|
||||
vcs_dcopy(VCS_DATA_PTR(dgl), VCS_DATA_PTR(dg), m_numRxnRdc);
|
||||
vcs_dcopy(VCS_DATA_PTR(fel), VCS_DATA_PTR(m_gibbsSpecies), m_numSpeciesRdc);
|
||||
vcs_dcopy(VCS_DATA_PTR(m_feSpecies_old), VCS_DATA_PTR(m_gibbsSpecies), m_numSpeciesRdc);
|
||||
|
||||
vcs_updateVP(0);
|
||||
/*
|
||||
|
|
@ -2261,7 +2261,7 @@ namespace VCSnonideal {
|
|||
dg[irxn] = 0.0;
|
||||
dgl[irxn] = 0.0;
|
||||
m_gibbsSpecies[kspec] = 0.0;
|
||||
fel[kspec] = 0.0;
|
||||
m_feSpecies_old[kspec] = 0.0;
|
||||
wt[kspec] = 0.0;
|
||||
/*
|
||||
* Rearrange the data if the current species isn't the last active
|
||||
|
|
@ -4676,7 +4676,7 @@ namespace VCSnonideal {
|
|||
SWAP(m_spSize[k1], m_spSize[k2], t1);
|
||||
SWAP(m_gibbsSpecies[k1], m_gibbsSpecies[k2], t1);
|
||||
SWAP(ds[k1], ds[k2], t1);
|
||||
SWAP(fel[k1], fel[k2], t1);
|
||||
SWAP(m_feSpecies_old[k1], m_feSpecies_old[k2], t1);
|
||||
SWAP(feTrial[k1], feTrial[k2], t1);
|
||||
SWAP(SSPhase[k1], SSPhase[k2], j);
|
||||
SWAP(PhaseID[k1], PhaseID[k2], j);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue