Fix 'unused variable' warnings

This commit is contained in:
Ray Speth 2014-02-21 19:08:33 +00:00
parent 2ead29097c
commit 6f8da1a27e
4 changed files with 6 additions and 56 deletions

View file

@ -586,7 +586,7 @@ doublereal MultiPhase::equilibrate(int XY, doublereal err,
doublereal h0;
int n;
doublereal hnow, herr = 1.0;
doublereal snow, serr = 1.0, s0;
doublereal snow, s0;
doublereal Tlow = -1.0, Thigh = -1.0;
doublereal Hlow = Undef, Hhigh = Undef, tnew;
doublereal dta=0.0, dtmax, cpb;
@ -717,7 +717,6 @@ doublereal MultiPhase::equilibrate(int XY, doublereal err,
Thigh = m_temp;
}
}
serr = fabs((s0 - snow)/s0);
dt = (s0 - snow)*m_temp/cp();
dtmax = 0.5*fabs(Thigh - Tlow);
dtmax = (dtmax > 500.0 ? 500.0 : dtmax);

View file

@ -84,9 +84,9 @@ int VCS_SOLVE::vcs_solve_TP(int print_lvl, int printDetails, int maxit)
size_t iphaseDelete; /* integer that determines which phase is being deleted */
std::vector<size_t> phasePopPhaseIDs(0);
size_t doPhaseDeleteIph = npos;
size_t doPhaseDeleteKspec = npos;
#ifdef DEBUG_MODE
size_t doPhaseDeleteKspec = npos;
char ANOTE[128];
/*
* Set the debug print lvl to the same as the print lvl.
@ -419,10 +419,10 @@ L_MAINLOOP_ALL_SPECIES:
"phase creation delta was used instead\n");
}
}
doPhaseDeleteKspec = npos;
#endif
lec = false;
doPhaseDeleteIph = npos;
doPhaseDeleteKspec = npos;
/*
* Zero out the net change in moles of multispecies phases
*/
@ -868,9 +868,9 @@ L_MAINLOOP_ALL_SPECIES:
*/
m_molNumSpecies_new[kspec] = 0.0;
doPhaseDeleteIph = iph;
doPhaseDeleteKspec = kspec;
#ifdef DEBUG_MODE
doPhaseDeleteKspec = kspec;
if (m_debug_print_lvl >= 2) {
if (m_speciesStatus[kspec] >= 0) {
plogf(" --- SS species changed to zeroedss: ");

View file

@ -331,7 +331,7 @@ void MargulesVPSSTP::getPartialMolarEntropies(doublereal* sbar) const
void MargulesVPSSTP::getPartialMolarVolumes(doublereal* vbar) const
{
size_t iA, iB, delAK, delBK;
size_t iA, iB;
double XA, XB, g0 , g1;
double T = temperature();
@ -340,10 +340,6 @@ void MargulesVPSSTP::getPartialMolarVolumes(doublereal* vbar) const
*/
getStandardVolumes(vbar);
for (size_t iK = 0; iK < m_kk; iK++) {
delAK = 0;
delBK = 0;
}
for (size_t i = 0; i < numBinaryInteractions_; i++) {
iA = m_pSpecies_A_ij[i];
iB = m_pSpecies_B_ij[i];

View file

@ -1371,9 +1371,6 @@ int RedlichKwongMFTP::NicholsSolve(double TKelvin, double pres, doublereal a, do
Vroot[0] = 0.0;
Vroot[1] = 0.0;
Vroot[2] = 0.0;
int nTurningPoints;
bool lotsOfNumError = false;
doublereal Vturn[2];
if (TKelvin <= 0.0) {
throw CanteraError("RedlichKwongMFTP::NicholsSolve()", "neg temperature");
}
@ -1421,46 +1418,11 @@ int RedlichKwongMFTP::NicholsSolve(double TKelvin, double pres, doublereal a, do
}
}
int nSolnValues;
nTurningPoints = 2;
#ifdef PRINTPV
double V[100];
int n = 0;
for (int i = 0; i < 90; i++) {
V[n++] = 0.030 + 0.005 * i;
}
double p1, presCalc;
for (int i = 0; i < n; i++) {
p1 = dpdVCalc(TKelvin, V[i], presCalc);
printf(" %13.5g %13.5g %13.5g \n", V[i], presCalc , p1);
}
#endif
double h2 = 4. * an * an * delta2 * delta2 * delta2;
if (delta2 == 0.0) {
nTurningPoints = 1;
Vturn[0] = xN;
Vturn[1] = xN;
} else if (delta2 < 0.0) {
nTurningPoints = 0;
Vturn[0] = xN;
Vturn[1] = xN;
} else {
if (delta2 > 0.0) {
delta = sqrt(delta2);
Vturn[0] = xN - delta;
Vturn[1] = xN + delta;
#ifdef PRINTPV
double presCalc;
double p1 = dpdVCalc(TKelvin, Vturn[0], presCalc);
double p2 = dpdVCalc(TKelvin, Vturn[1], presCalc);
printf("p1 = %g p2 = %g \n", p1, p2);
p1 = dpdVCalc(TKelvin, 0.9*Vturn[0], presCalc);
printf("0.9 p1 = %g \n", p1);
#endif
}
doublereal h = 2.0 * an * delta * delta2;
@ -1520,9 +1482,6 @@ int RedlichKwongMFTP::NicholsSolve(double TKelvin, double pres, doublereal a, do
Vroot[2] = 0.0;
tmp = an * Vroot[0] * Vroot[0] * Vroot[0] + bn * Vroot[0] * Vroot[0] + cn * Vroot[0] + dn;
if (fabs(tmp) > 1.0E-4) {
lotsOfNumError = true;
}
} else if (desc < 0.0) {
doublereal tmp = - yN/h;
@ -1545,7 +1504,6 @@ int RedlichKwongMFTP::NicholsSolve(double TKelvin, double pres, doublereal a, do
for (int i = 0; i < 3; i++) {
tmp = an * Vroot[i] * Vroot[i] * Vroot[i] + bn * Vroot[i] * Vroot[i] + cn * Vroot[i] + dn;
if (fabs(tmp) > 1.0E-4) {
lotsOfNumError = true;
for (int j = 0; j < 3; j++) {
if (j != i) {
if (fabs(Vroot[i] - Vroot[j]) < 1.0E-4 * (fabs(Vroot[i]) + fabs(Vroot[j]))) {
@ -1584,9 +1542,6 @@ int RedlichKwongMFTP::NicholsSolve(double TKelvin, double pres, doublereal a, do
}
for (int i = 0; i < 2; i++) {
tmp = an * Vroot[i] * Vroot[i] * Vroot[i] + bn * Vroot[i] * Vroot[i] + cn * Vroot[i] + dn;
if (fabs(tmp) > 1.0E-4) {
lotsOfNumError = true;
}
}
}