Removed rogue tabs in the C++ source code

This commit is contained in:
Ray Speth 2012-02-27 18:15:02 +00:00
parent 8bce9d7332
commit 236756fbf0
49 changed files with 254 additions and 258 deletions

View file

@ -241,7 +241,7 @@ bool buildSolutionFromXML(XML_Node& root, std::string id, std::string nm,
* @ingroup inputfiles
*/
//const XML_Node *speciesXML_Node(std::string kname,
// const XML_Node *phaseSpeciesData);
// const XML_Node *phaseSpeciesData);
}

View file

@ -544,7 +544,7 @@ public:
*/
int solve_nonlinear_problem(int SolnType, doublereal* const y_comm, doublereal* const ydot_comm, doublereal CJ,
doublereal time_curr, GeneralMatrix& jac, int& num_newt_its,
int& num_linear_solves, int& num_backtracks, int loglevelInput);
int& num_linear_solves, int& num_backtracks, int loglevelInput);
private:
//! Set the column scales

View file

@ -628,7 +628,7 @@ public:
DebyeHuckel(const DebyeHuckel&);
//! Assignment operator
DebyeHuckel& operator=(const DebyeHuckel&);
DebyeHuckel& operator=(const DebyeHuckel&);
//! Full constructor for creating the phase.
/*!

View file

@ -117,7 +117,7 @@ public:
IdealMolalSoln(const IdealMolalSoln&);
//! Assignment operator
IdealMolalSoln& operator=(const IdealMolalSoln&);
IdealMolalSoln& operator=(const IdealMolalSoln&);
//! Constructor for phase initialization
/*!

View file

@ -219,7 +219,7 @@ public:
*
* @param b class to be copied.
*/
MolalityVPSSTP& operator=(const MolalityVPSSTP& b);
MolalityVPSSTP& operator=(const MolalityVPSSTP& b);
/// Destructor.
virtual ~MolalityVPSSTP();

View file

@ -184,7 +184,7 @@ public:
} else if (fabs(m_p0 - refPressure) > 0.1) {
std::string logmsg = " WARNING SimpleThermo: New Species, " + name +
", has a different reference pressure, "
+ fp2str(refPressure) + ", than existing reference pressure, " + fp2str(m_p0) + "\n";
+ fp2str(refPressure) + ", than existing reference pressure, " + fp2str(m_p0) + "\n";
writelog(logmsg);
logmsg = " This is now a fatal error\n";
writelog(logmsg);

View file

@ -221,7 +221,7 @@ protected:
std::string m_name;
std::string m_formula;
// virtual double Xm(int k) { return 1.0;}
//virtual double Xm(int k) { return 1.0;}
//virtual int Species() { return 1;}
virtual double ldens()=0;

View file

@ -362,9 +362,9 @@ protected:
* <viscosity>
* <compositionDependence model="logMoleFractions">
* <interaction speciesA="Li+" speciesB="K+">
* <!--
* interactions are from speciesA = LiCl(L)
* and speciesB = KCl(L).
* <!--
* interactions are from speciesA = LiCl(L)
* and speciesB = KCl(L).
* -->
* <Eij units="J/kmol"> -1.0e3 </Eij>
* <Sij units="J/kmol/K"> 80.0e-5 </Sij>

View file

@ -952,7 +952,7 @@ void mdp_realloc_dbl_2(double** *array_hdl, int ndim1, int ndim2,
* mdp_realloc_dbl_2:
*
* mdp_realloc_dbl_2(array_hdl, int ndim1, int ndim2,
* int ndim1Old, int ndim2Old, const double val)
* int ndim1Old, int ndim2Old, const double val)
*
* Reallocates a two dimensional array of doubles.
* This routine will then copy the pertinent information from

View file

@ -20,43 +20,42 @@ static int PrintInputFile = true; /* Used to turn on and off the
/*************** R O U T I N E S I N T H E F I L E *******************
*
* NAME TYPE CALLED_BY
* NAME TYPE CALLED_BY
*--------------------------------------------------------------------
* get_next_keyLine bool extern
* tok_to_int int extern
* str_to_int int extern, tok_to_int
* tok_to_double double extern
* str_to_double double extern,tok_to_double
* tok_to_boolean bool extern
* str_to_boolean bool extern,tok_to_boolean
* tok_to_string char * extern
* get_next_keyLine bool extern
* tok_to_int int extern
* str_to_int int extern, tok_to_int
* tok_to_double double extern
* str_to_double double extern,tok_to_double
* tok_to_boolean bool extern
* str_to_boolean bool extern,tok_to_boolean
* tok_to_string char * extern
*
*
* scan_for_int int extern
* scan_for_double double extern
* scan_for_string char * extern
* scan_for_boolean bool extern
* scan_for_line int extern
* read_line int scan_for_line,
* get_next_keyLine
* interpret_int static bool str_to_int + others
* interpret_boolean static bool str_to_boolean
* interpret_double static bool str_to_double
* strip int read_input_file,
* look_for,
* get_next_keyLine
* read_string static void scan_for_line
* stokenize int fillTokStruct
* outofbnds static bool all
* strmatch bool extern, toktokmatch
* strstrmatch bool extern
* strtokmatch bool extern
* toktokmatch bool extern, strtokmatch
* strstrmatch
* fillTokStruct void extern, strtokmatch
* strstrmatch,
* get_next_keyLine
* copyTokStruct void extern
* scan_for_int int extern
* scan_for_double double extern
* scan_for_string char * extern
* scan_for_boolean bool extern
* scan_for_line int extern
* read_line int scan_for_line,
* get_next_keyLine
* interpret_int static bool str_to_int + others
* interpret_boolean static bool str_to_boolean
* interpret_double static bool str_to_double
* strip int read_input_file,
* look_for,
* get_next_keyLine
* read_string static void scan_for_line
* stokenize int fillTokStruct
* outofbnds static bool all
* strmatch bool extern, toktokmatch
* strstrmatch bool extern
* strtokmatch bool extern
* toktokmatch bool extern, strtokmatch
* strstrmatch
* fillTokStruct void extern, strtokmatch
* strstrmatch,
* get_next_keyLine
* copyTokStruct void extern
*
******************************************************************************/
/*
@ -817,27 +816,25 @@ char* scan_for_string(FILE* ifp, const char* string, const int maxVal,
int scan_for_line(FILE* ifp, const char* str, char input[],
const char ch_term, const int print_flag)
/*
* Scan the input file (reading in strings according to
* 'read_string(ifp,)'
* specifications) until the character pattern in 'string' is matched.
* Returns all of the characters after the termination character in
* a null-character terminated string,
* Scan the input file (reading in strings according to * 'read_string(ifp,)'
* specifications) until the character pattern in 'string' is matched.
* Returns all of the characters after the termination character in
* a null-character terminated string,
*
* Parameter list:
* Parameter list:
*
* ifp == pointer to file "input"
* string == contains string pattern to be matched.
* input == buffer array to hold characters that are read in.
* ifp == pointer to file "input"
* string == contains string pattern to be matched.
* input == buffer array to hold characters that are read in.
* On output, it contains the return character string
* ch_term== Termination character. When scanning a line of input
* is read until either a newline, the 'ch' termination
* character is read, or the end-of-file is read.
* ch_term== Termination character. When scanning a line of input
* is read until either a newline, the 'ch' termination
* character is read, or the end-of-file is read.
*
* Output:
* This function returns the number of characters in the string
* input,
* excluding the null character. Error conditions are currently
* handled by returning with negative return values.
* Output:
* This function returns the number of characters in the string input,
* excluding the null character. Error conditions are currently
* handled by returning with negative return values.
*/
{
int retn_value, i;
@ -1001,29 +998,29 @@ int read_line(FILE* ifp, char input[], const int print_flag)
int read_string(FILE* ifp, char string[], const char ch)
/*
* This routine reads the standard input until encountering
* the end-of-file, a newline, the character 'ch' or until
* MAX_INPUT_STR_LN characters are read. The inputted characters
* are read into 'string'.
* This routine reads the standard input until encountering
* the end-of-file, a newline, the character 'ch' or until
* MAX_INPUT_STR_LN characters are read. The inputted characters
* are read into 'string'.
* If an EOF occurs, -1 is returned.
* If a line is longer than MAX_INPUT_STR_LN, a -2 is returned
* and an error message is written to standard error.
* string[] will be returned null-terminated with the
* first MAX_INPUT_STR_LN of the line.
* Upon successful completion with the read terminated by the
* character 'ch', the number of characters read plus 1 for the
* null character at the end of the string is returned. If the
* read is terminated by '\n', a 0 is returned, even if ch = '\n'
* Upon successful completion with the read terminated by the
* character 'ch', the number of characters read plus 1 for the
* null character at the end of the string is returned. If the
* read is terminated by '\n', a 0 is returned, even if ch = '\n'
*
*
* Parameter list:
* Parameter list:
*
* ifp == pointer to file "input"
* string == On output, 'string' contains the characters read
* from the input stream. However, the termination character
* or the newline character is not included
* ch == Additional Termination character. That is, input function
* stops when 'ch' or '\n' is read.
* ifp == pointer to file "input"
* string == On output, 'string' contains the characters read
* from the input stream. However, the termination character
* or the newline character is not included
* ch == Additional Termination character. That is, input function
* stops when 'ch' or '\n' is read.
*/
{
int i = 0, rtn_value, new_ch;
@ -1235,19 +1232,19 @@ static bool interpret_double(const char* token, double* retn_value,
int strip(char str[])
/*
* This routine strips off blanks and tabs (only leading and trailing
* characters) in 'str'. On return, it returns the number of
* characters still included in the string (excluding the null character).
* This routine strips off blanks and tabs (only leading and trailing
* characters) in 'str'. On return, it returns the number of
* characters still included in the string (excluding the null character).
*
* Comments are excluded -> All instances of the comment character, '!',
* are replaced by '\0' thereby terminating
* the string
* Comments are excluded -> All instances of the comment character, '!',
* are replaced by '\0' thereby terminating
* the string
*
* Parameter list:
* Parameter list:
*
* str == On output 'str' contains the same characters as on
* input except the leading and trailing white space and
* comments have been removed.
* str == On output 'str' contains the same characters as on
* input except the leading and trailing white space and
* comments have been removed.
*/
{
int i = 0, j = 0;

View file

@ -1034,7 +1034,7 @@ void mdp_realloc_dbl_2(double** *array_hdl, int ndim1, int ndim2,
* mdp_realloc_dbl_2:
*
* mdp_realloc_dbl_2(array_hdl, int ndim1, int ndim2,
* int ndim1Old, int ndim2Old, const double val)
* int ndim1Old, int ndim2Old, const double val)
*
* Reallocates a two dimensional array of doubles.
* This routine will then copy the pertinent information from

View file

@ -113,11 +113,11 @@ static double de_atof(std::string s)
* @param tmax maximum temperature
*/
// static void checkTemps(std::ostream& log, double tmin,
// double tmid, double tmax)
// double tmid, double tmax)
// {
// if (tmin == 0.0 || tmid == 0.0 || tmax == 0.0) {
// throw CK_SyntaxError(log,
// "error reading Tmin, Tmid, or Tmax");
// "error reading Tmin, Tmid, or Tmax");
// }
//}

View file

@ -1387,7 +1387,7 @@ int vcs_Cantera_update_vprob(Cantera::MultiPhase* mphase,
volPhase->setMolesFromVCS(VCS_STATECALC_OLD, VCS_DATA_PTR(vprob->w));
if ((nSpPhase == 1) && (volPhase->phiVarIndex() == 0)) {
volPhase->setExistence(VCS_PHASE_EXIST_ALWAYS);
} else if (volPhase->totalMoles() > 0.0) {
} else if (volPhase->totalMoles() > 0.0) {
volPhase->setExistence(VCS_PHASE_EXIST_YES);
} else {
volPhase->setExistence(VCS_PHASE_EXIST_NO);

View file

@ -24,28 +24,27 @@ public:
std::string SpName;
VCS_SPECIES_THERMO* SpeciesThermo; /* Pointer to the thermo
structure for this species */
structure for this species */
double WtSpecies; /* Molecular Weight of the species (gm/mol) */
//! Column of the formula matrix, comprising the
//! element composition of the species */
//! element composition of the species */
std::vector<double> FormulaMatrixCol;
double Charge; /* Charge state of the species -> This may
be duplication of what's in the
FormulaMatrixCol entries. However, it's prudent
to separate it out. */
int SurfaceSpecies; /* True if this species belongs to a surface phase
*/
be duplication of what's in the
FormulaMatrixCol entries. However, it's prudent
to separate it out. */
int SurfaceSpecies; /* True if this species belongs to a surface phase */
/*
* Various Calculated Quantities that are appropriate to
* keep copies of at this level.
*/
double VolPM; /* Partial molar volume of the species */
double ReferenceMoleFraction; /* Representative value of the mole
fraction of this species in a phase.
This value is used for convergence issues
and for calculation of numerical derivs */
fraction of this species in a phase.
This value is used for convergence issues
and for calculation of numerical derivs */
/*
* constructor and destructor

View file

@ -655,7 +655,7 @@ void vcs_VolPhase::setMolesFromVCS(const int stateCalc,
// for the mole fractions, when the phase doesn't exist.
// This is currently unimplemented.
//for (int k = 0; k < m_numSpecies; k++) {
// Xmol_[k] = 1.0 / m_numSpecies;
// Xmol_[k] = 1.0 / m_numSpecies;
//}
m_existence = VCS_PHASE_EXIST_NO;
}
@ -1062,11 +1062,11 @@ void vcs_VolPhase::_updateLnActCoeffJac()
double tmp;
tmp = (ActCoeff[k] - ActCoeff_Base[k]) /
((ActCoeff[k] + ActCoeff_Base[k]) * 0.5 * deltaMoles_j);
if (fabs(tmp - lnActCoeffCol[k]) > 1.0E-4 * fabs(tmp) + fabs(lnActCoeffCol[k])) {
if (fabs(tmp - lnActCoeffCol[k]) > 1.0E-4 * fabs(tmp) + fabs(lnActCoeffCol[k])) {
// printf(" we have an error\n");
}
//tmp = lnActCoeffCol[k];
//tmp = lnActCoeffCol[k];
}
/*

View file

@ -74,18 +74,18 @@ public:
int T_Its;
//! Current number of iterations in the main loop
//! of vcs_TP() to solve for thermo equilibrium
//! of vcs_TP() to solve for thermo equilibrium
int Its;
//! Total number of optimizations of the
//! components basis set done
//! components basis set done
int T_Basis_Opts;
//! number of optimizations of the components basis set done
int Basis_Opts;
//! Current number of times the initial thermo
//! equilibrium estimator has been called
//! equilibrium estimator has been called
int T_Calls_Inest;
//! Current number of calls to vcs_TP

View file

@ -45,7 +45,7 @@ VCS_PROB::VCS_PROB(size_t nsp, size_t nel, size_t nph) :
/* Set the units for the chemical potential data to be
* unitless */
iest(-1), /* The default is to not expect an initial estimate
* of the species concentrations */
* of the species concentrations */
tolmaj(1.0E-8),
tolmin(1.0E-6),
m_Iterations(0),

View file

@ -796,7 +796,7 @@ int ReactionPathBuilder::init(ostream& logfile, Kinetics& kin)
}
size_t nrnet = m_reac[i].size();
// int npnet = m_prod[i].size();
// int npnet = m_prod[i].size();
// compute number of atoms of each element in each reaction,
// excluding molecules that appear on both sides of the

View file

@ -38,7 +38,7 @@ static doublereal calcWeightedNorm(const doublereal [], const doublereal dx[], s
// extern "C" {
// extern FSUB_TYPE dgetrf_(int *, int *, doublereal *, int *, int [], int *);
// extern FSUB_TYPE dgetrs_(char *, int *, int *, doublereal *, int *, int [],
// doublereal [], int *, int *, unsigned int);
// doublereal [], int *, int *, unsigned int);
// }
/*****************************************************************************
* PROTOTYPES and PREPROC DIRECTIVES FOR MISC. ROUTINES
@ -165,7 +165,7 @@ solveSP::solveSP(ImplicitSurfChem* surfChemPtr, int bulkFunc) :
//InterfaceKinetics *m_kin = m_objects[iKinObject];
//int bulkIndex = m_bulkKinObjPhaseID[isp];
//kstart = m_kin->kineticsSpeciesIndex(0, bulkIndex);
// nsp = m_numBulkSpecies[isp];
//nsp = m_numBulkSpecies[isp];
//m_eqnIndexStartSolnPhase[isp] = kindexSP;
//for (k = 0; k < nsp; k++, kindexSP++) {
// m_kinSpecIndex[kindexSP] = kstart + k;
@ -397,7 +397,7 @@ int solveSP::solveSurfProb(int ifunc, doublereal time_scale, doublereal TKelvin,
* Solve Linear system (with LAPACK). The solution is in resid[]
*/
// (void) dgetrf_(&m_neq, &m_neq, m_JacCol[0], &m_neq,
// DATA_PTR(m_ipiv), &info);
// DATA_PTR(m_ipiv), &info);
ct_dgetrf(m_neq, m_neq, m_JacCol[0], m_neq, DATA_PTR(m_ipiv), info);
if (info==0) {
ct_dgetrs(ctlapack::NoTranspose, m_neq, nrhs, m_JacCol[0],
@ -565,9 +565,9 @@ void solveSP::updateState(const doublereal* CSolnSP)
}
//if (m_bulkFunc == BULK_DEPOSITION) {
// for (int n = 0; n < m_numBulkPhasesSS; n++) {
// m_bulkPhasePtrs[n]->setConcentrations(CSolnSP + loc);
// loc += m_numBulkSpecies[n];
// }
// m_bulkPhasePtrs[n]->setConcentrations(CSolnSP + loc);
// loc += m_numBulkSpecies[n];
// }
//}
}
@ -581,10 +581,10 @@ void solveSP::updateMFSolnSP(doublereal* XMolSolnSP)
m_ptrsSurfPhase[isp]->getMoleFractions(XMolSolnSP + keqnStart);
}
//if (m_bulkFunc == BULK_DEPOSITION) {
// for (int isp = 0; isp < m_numBulkPhasesSS; isp++) {
// int keqnStart = m_eqnIndexStartSolnPhase[isp + m_numSurfPhases];
// m_bulkPhasePtrs[isp]->getMoleFractions(XMolSolnSP + keqnStart);
// }
// for (int isp = 0; isp < m_numBulkPhasesSS; isp++) {
// int keqnStart = m_eqnIndexStartSolnPhase[isp + m_numSurfPhases];
// m_bulkPhasePtrs[isp]->getMoleFractions(XMolSolnSP + keqnStart);
// }
//}
}

View file

@ -1340,7 +1340,7 @@ double BEulerInt::step(double t_max)
* if (Cur_Realm->Realm_Nonlinear.Constraint_Backtracking_Flag ==
* Constraint_Backtrack_Enable) {
* cropNorm = cropPredictor(mesh, x_pred_n, abs_time_error,
* m_reltol);
* m_reltol);
*/
/*
@ -2039,7 +2039,7 @@ int BEulerInt::dampStep(double time_curr, const double* y0,
// HKM setting intermediate y's to zero was a tossup.
// slightly different, equivalent results
//#ifdef DEBUG_HKM
// y1[j] = MAX(0.0, y1[j]);
// y1[j] = MAX(0.0, y1[j]);
//#endif
}
calc_ydot(m_order, y1, ydot1);
@ -2274,7 +2274,7 @@ int BEulerInt::solve_nonlinear_problem(double* const y_comm,
// HKM setting intermediate y's to zero was a tossup.
// slightly different, equivalent results
// #ifdef DEBUG_HKM
// y_new[j] = MAX(0.0, y_new[j]);
// y_new[j] = MAX(0.0, y_new[j]);
// #endif
// }
// }

View file

@ -2942,7 +2942,7 @@ int NonlinearSolver::decideStep(const doublereal time_curr, int leg, doublereal
// NextTrustFactor_ *= 0.5;
// ll = trustRegionLength();
// if (m_print_flag >= 5) {
// printf("\t\tdecideStep(): Trust region decreased from %g to %g due to bounds constraint\n", ll*2, ll);
// printf("\t\tdecideStep(): Trust region decreased from %g to %g due to bounds constraint\n", ll*2, ll);
//}
} else {
retn = 0;

View file

@ -185,7 +185,7 @@ int solveProb::solve(int ifunc, doublereal time_scale,
* 5 iterations.
*/
// if (iter%5 == 4) {
// evalSurfLarge(DATA_PTR(m_CSolnSP));
// evalSurfLarge(DATA_PTR(m_CSolnSP));
// }
/*
@ -529,8 +529,8 @@ doublereal solveProb::calc_damping(doublereal x[], doublereal dxneg[], size_t di
*label = i;
}
// else if (fabs(xnew) > 2.0*MAX(fabs(x[i]), 1.0E-10)) {
// damp = 0.5 * MAX(fabs(x[i]), 1.0E-9)/ fabs(xnew);
// *label = i;
// damp = 0.5 * MAX(fabs(x[i]), 1.0E-9)/ fabs(xnew);
// *label = i;
// }
double denom = fabs(x[i]) + 1.0E5 * m_atol[i];
if ((fabs(delta_x) / denom) > 0.3) {

View file

@ -498,7 +498,7 @@ eval(size_t jg, doublereal* xg, doublereal* rg,
// zero Lambda
if (!m_flow_left->fixed_mdot()) {
; // rb[0] = xb[0] - xb[0-nc]; //zero U gradient
; // rb[0] = xb[0] - xb[0-nc]; //zero U gradient
} else {
rb[0] = xb[3]; // zero Lambda
}

View file

@ -301,6 +301,6 @@ static PyMethodDef ct_methods[] = {
#include "usermethods.h"
#endif
{NULL, NULL} /* sentinel */
{NULL, NULL} /* sentinel */
};

View file

@ -2263,8 +2263,8 @@ void DebyeHuckel::s_update_dlnMolalityActCoeff_dT() const
m_dlnActCoeffMolaldT[k] =
m_lnActCoeffMolal[k] * dAdT / m_A_Debye;
}
d_lnActivitySolvent_dT = 2.0 / 3.0 * dAdT * m_Mnaught *
m_IionicMolality * sqrt(m_IionicMolality);
d_lnActivitySolvent_dT = 2.0 / 3.0 * dAdT * m_Mnaught *
m_IionicMolality * sqrt(m_IionicMolality);
m_dlnActCoeffMolaldT[m_indexSolvent] = d_lnActivitySolvent_dT;
break;

View file

@ -124,7 +124,7 @@ void GeneralSpeciesThermo::install(std::string name,
m_kk = index+1;
}
//AssertThrow(m_sp[index] == 0,
// "Index position isn't null, duplication of assignment: " + int2str(index));
// "Index position isn't null, duplication of assignment: " + int2str(index));
//int nfreq = 3;
/*
@ -255,7 +255,7 @@ update(doublereal t, doublereal* cp_R,
sp_ptr->updatePropertiesTemp(t, cp_R, h_RT, s_R);
}
// else {
// writelog("General::update: sp_ptr is NULL!\n");
// writelog("General::update: sp_ptr is NULL!\n");
//}
}
}

View file

@ -2667,8 +2667,8 @@ s_updatePitzer_lnMolalityActCoeff() const
}
#endif
/*
* both species have a non-zero charge, and one is positive
* and the other is negative
* both species have a non-zero charge, and one is positive
* and the other is negative
*/
if (charge[i]*charge[j] < 0.0) {
BMX[counterIJ] = beta0MX[counterIJ]
@ -2723,8 +2723,8 @@ s_updatePitzer_lnMolalityActCoeff() const
n = m_kk*i + j;
counterIJ = m_CounterIJ[n];
/*
* both species have a non-zero charge, and one is positive
* and the other is negative
* both species have a non-zero charge, and one is positive
* and the other is negative
*/
if (charge[i]*charge[j] < 0.0) {
CMX[counterIJ] = CphiMX[counterIJ]/
@ -2771,8 +2771,8 @@ s_updatePitzer_lnMolalityActCoeff() const
n = m_kk*i + j;
counterIJ = m_CounterIJ[n];
/*
* both species have a non-zero charge, and one is positive
* and the other is negative
* both species have a non-zero charge, and one is positive
* and the other is negative
*/
if (charge[i]*charge[j] > 0) {
z1 = (int) fabs(charge[i]);
@ -2831,8 +2831,8 @@ s_updatePitzer_lnMolalityActCoeff() const
n = m_kk*i + j;
counterIJ = m_CounterIJ[n];
/*
* both species have a non-zero charge, and one is positive
* and the other is negative
* both species have a non-zero charge, and one is positive
* and the other is negative
*/
if (charge[i]*charge[j] < 0) {
F = F + molality[i]*molality[j] * BprimeMX[counterIJ];
@ -3731,8 +3731,8 @@ void HMWSoln::s_updatePitzer_dlnMolalityActCoeff_dT() const
n = m_kk*i + j;
counterIJ = m_CounterIJ[n];
/*
* both species have a non-zero charge, and one is positive
* and the other is negative
* both species have a non-zero charge, and one is positive
* and the other is negative
*/
if (charge[i]*charge[j] < 0.0) {
BMX_L[counterIJ] = beta0MX_L[counterIJ]
@ -3787,8 +3787,8 @@ void HMWSoln::s_updatePitzer_dlnMolalityActCoeff_dT() const
n = m_kk*i + j;
counterIJ = m_CounterIJ[n];
/*
* both species have a non-zero charge, and one is positive
* and the other is negative
* both species have a non-zero charge, and one is positive
* and the other is negative
*/
if (charge[i]*charge[j] < 0.0) {
CMX_L[counterIJ] = CphiMX_L[counterIJ]/
@ -3826,8 +3826,8 @@ void HMWSoln::s_updatePitzer_dlnMolalityActCoeff_dT() const
n = m_kk*i + j;
counterIJ = m_CounterIJ[n];
/*
* both species have a non-zero charge, and one is positive
* and the other is negative
* both species have a non-zero charge, and one is positive
* and the other is negative
*/
if (charge[i]*charge[j] > 0) {
z1 = (int) fabs(charge[i]);
@ -3890,8 +3890,8 @@ void HMWSoln::s_updatePitzer_dlnMolalityActCoeff_dT() const
n = m_kk*i + j;
counterIJ = m_CounterIJ[n];
/*
* both species have a non-zero charge, and one is positive
* and the other is negative
* both species have a non-zero charge, and one is positive
* and the other is negative
*/
if (charge[i]*charge[j] < 0) {
dFdT = dFdT + molality[i]*molality[j] * BprimeMX_L[counterIJ];
@ -4602,8 +4602,8 @@ void HMWSoln::s_updatePitzer_d2lnMolalityActCoeff_dT2() const
n = m_kk*i + j;
counterIJ = m_CounterIJ[n];
/*
* both species have a non-zero charge, and one is positive
* and the other is negative
* both species have a non-zero charge, and one is positive
* and the other is negative
*/
if (charge[i]*charge[j] < 0.0) {
BMX_LL[counterIJ] = beta0MX_LL[counterIJ]
@ -4658,8 +4658,8 @@ void HMWSoln::s_updatePitzer_d2lnMolalityActCoeff_dT2() const
n = m_kk*i + j;
counterIJ = m_CounterIJ[n];
/*
* both species have a non-zero charge, and one is positive
* and the other is negative
* both species have a non-zero charge, and one is positive
* and the other is negative
*/
if (charge[i]*charge[j] < 0.0) {
CMX_LL[counterIJ] = CphiMX_LL[counterIJ]/
@ -4697,8 +4697,8 @@ void HMWSoln::s_updatePitzer_d2lnMolalityActCoeff_dT2() const
n = m_kk*i + j;
counterIJ = m_CounterIJ[n];
/*
* both species have a non-zero charge, and one is positive
* and the other is negative
* both species have a non-zero charge, and one is positive
* and the other is negative
*/
if (charge[i]*charge[j] > 0) {
z1 = (int) fabs(charge[i]);
@ -4721,8 +4721,8 @@ void HMWSoln::s_updatePitzer_d2lnMolalityActCoeff_dT2() const
sni = speciesName(i);
snj = speciesName(j);
//printf(" %-16s %-16s %10.6f %10.6f %10.6f \n",
// sni.c_str(), snj.c_str(),
// Phi_L[counterIJ], Phiprime[counterIJ], Phiphi_L[counterIJ] );
// sni.c_str(), snj.c_str(),
// Phi_L[counterIJ], Phiprime[counterIJ], Phiphi_L[counterIJ] );
printf(" %-16s %-16s %10.6f %10.6f %10.6f \n",
sni.c_str(), snj.c_str(),
Phi_LL[counterIJ], Phiprime[counterIJ], Phiphi_LL[counterIJ]);
@ -4755,7 +4755,7 @@ void HMWSoln::s_updatePitzer_d2lnMolalityActCoeff_dT2() const
// + (2.0/1.2) * log(1.0+1.2*(sqrtIs)));
//dAphidT = Al / (4.0 * GasConstant * T * T);
//dFdT = -dAphidT * ( sqrt(Is) / (1.0 + 1.2*sqrt(Is))
// + (2.0/1.2) * log(1.0+1.2*(sqrtIs)));
// + (2.0/1.2) * log(1.0+1.2*(sqrtIs)));
d2FdT2 = -d2AphidT2 * (sqrt(Is) / (1.0 + 1.2*sqrt(Is))
+ (2.0/1.2) * log(1.0+1.2*(sqrtIs)));
#ifdef DEBUG_MODE
@ -4771,8 +4771,8 @@ void HMWSoln::s_updatePitzer_d2lnMolalityActCoeff_dT2() const
n = m_kk*i + j;
counterIJ = m_CounterIJ[n];
/*
* both species have a non-zero charge, and one is positive
* and the other is negative
* both species have a non-zero charge, and one is positive
* and the other is negative
*/
if (charge[i]*charge[j] < 0) {
d2FdT2 = d2FdT2 + molality[i]*molality[j] * BprimeMX_LL[counterIJ];
@ -5484,8 +5484,8 @@ void HMWSoln::s_updatePitzer_dlnMolalityActCoeff_dP() const
n = m_kk*i + j;
counterIJ = m_CounterIJ[n];
/*
* both species have a non-zero charge, and one is positive
* and the other is negative
* both species have a non-zero charge, and one is positive
* and the other is negative
*/
if (charge[i]*charge[j] < 0.0) {
BMX_P[counterIJ] = beta0MX_P[counterIJ]
@ -5540,8 +5540,8 @@ void HMWSoln::s_updatePitzer_dlnMolalityActCoeff_dP() const
n = m_kk*i + j;
counterIJ = m_CounterIJ[n];
/*
* both species have a non-zero charge, and one is positive
* and the other is negative
* both species have a non-zero charge, and one is positive
* and the other is negative
*/
if (charge[i]*charge[j] < 0.0) {
CMX_P[counterIJ] = CphiMX_P[counterIJ]/
@ -5579,8 +5579,8 @@ void HMWSoln::s_updatePitzer_dlnMolalityActCoeff_dP() const
n = m_kk*i + j;
counterIJ = m_CounterIJ[n];
/*
* both species have a non-zero charge, and one is positive
* and the other is negative
* both species have a non-zero charge, and one is positive
* and the other is negative
*/
if (charge[i]*charge[j] > 0) {
z1 = (int) fabs(charge[i]);
@ -5643,8 +5643,8 @@ void HMWSoln::s_updatePitzer_dlnMolalityActCoeff_dP() const
n = m_kk*i + j;
counterIJ = m_CounterIJ[n];
/*
* both species have a non-zero charge, and one is positive
* and the other is negative
* both species have a non-zero charge, and one is positive
* and the other is negative
*/
if (charge[i]*charge[j] < 0) {
dFdP = dFdP + molality[i]*molality[j] * BprimeMX_P[counterIJ];

View file

@ -1382,8 +1382,8 @@ initThermoXML(XML_Node& phaseNode, std::string id)
#endif
} else {
// throw CanteraError("HMWSoln::initThermoXML",
// "Solvent SS Model \"" + modelStringa +
// "\" is not allowed, name = " + sss[0]);
// "Solvent SS Model \"" + modelStringa +
// "\" is not allowed, name = " + sss[0]);
m_waterSS = providePDSS(0);
m_waterSS->setState_TP(300., OneAtm);
double dens = m_waterSS->density();

View file

@ -711,7 +711,7 @@ void LatticeSolidPhase::modifyOneHf298SS(const int k, const doublereal Hf298New)
for (int n = 0; n < m_nlattice; n++) {
if (lkstart_[n+1] < k) {
int kk = k-lkstart_[n];
SpeciesThermo& l_spthermo = m_lattice[n]->speciesThermo();
SpeciesThermo& l_spthermo = m_lattice[n]->speciesThermo();
l_spthermo.modifyOneHf298(kk, Hf298New);
}
}

View file

@ -916,21 +916,21 @@ void MargulesVPSSTP::s_update_dlnActCoeff_dlnN_diag() const
dlnActCoeffdlnN_diag_[iK] += 2*(delBK-XB)*(g0*(delAK-XA)+g1*(2*(delAK-XA)*XB+XA*(delBK-XB)));
// double gfac = g0 + g1 * XB;
// double gggg = (delBK - XB) * g1;
// double gfac = g0 + g1 * XB;
// double gggg = (delBK - XB) * g1;
// dlnActCoeffdlnN_diag_[iK] += gfac * delAK * ( - XB + delBK);
// dlnActCoeffdlnN_diag_[iK] += gfac * delAK * ( - XB + delBK);
// dlnActCoeffdlnN_diag_[iK] += gfac * delBK * ( - XA + delAK);
// dlnActCoeffdlnN_diag_[iK] += gfac * delBK * ( - XA + delAK);
// dlnActCoeffdlnN_diag_[iK] += gfac * (2.0 * XA * XB - delAK * XB - XA * delBK);
// dlnActCoeffdlnN_diag_[iK] += gfac * (2.0 * XA * XB - delAK * XB - XA * delBK);
// dlnActCoeffdlnN_diag_[iK] += (delAK * XB + XA * delBK - XA * XB) * g1 * (-XB + delBK);
// dlnActCoeffdlnN_diag_[iK] += (delAK * XB + XA * delBK - XA * XB) * g1 * (-XB + delBK);
// dlnActCoeffdlnN_diag_[iK] += gggg * ( - 2.0 * XA * XB + delAK * XB + XA * delBK);
// dlnActCoeffdlnN_diag_[iK] += gggg * ( - 2.0 * XA * XB + delAK * XB + XA * delBK);
// dlnActCoeffdlnN_diag_[iK] += - g1 * XA * XB * (- XB + delBK);
// dlnActCoeffdlnN_diag_[iK] += - g1 * XA * XB * (- XB + delBK);
}
dlnActCoeffdlnN_diag_[iK] = XK*dlnActCoeffdlnN_diag_[iK];//-XK;
}
@ -991,21 +991,21 @@ void MargulesVPSSTP::s_update_dlnActCoeff_dlnN() const
dlnActCoeffdlnN_(iK,iM) += g0*((delAM-XA)*(delBK-XB)+(delAK-XA)*(delBM-XB));
dlnActCoeffdlnN_(iK,iM) += 2*g1*((delAM-XA)*(delBK-XB)*XB+(delAK-XA)*(delBM-XB)*XB+(delBM-XB)*(delBK-XB)*XA);
// double gfac = g0 + g1 * XB;
// double gggg = (delBK - XB) * g1;
// double gfac = g0 + g1 * XB;
// double gggg = (delBK - XB) * g1;
// dlnActCoeffdlnN_(iK, iM) += gfac * delAK * ( - XB + delBM);
// dlnActCoeffdlnN_(iK, iM) += gfac * delAK * ( - XB + delBM);
// dlnActCoeffdlnN_(iK, iM) += gfac * delBK * ( - XA + delAM);
// dlnActCoeffdlnN_(iK, iM) += gfac * delBK * ( - XA + delAM);
// dlnActCoeffdlnN_(iK, iM) += gfac * (2.0 * XA * XB - delAM * XB - XA * delBM);
// dlnActCoeffdlnN_(iK, iM) += gfac * (2.0 * XA * XB - delAM * XB - XA * delBM);
// dlnActCoeffdlnN_(iK, iM) += (delAK * XB + XA * delBK - XA * XB) * g1 * (-XB + delBM);
// dlnActCoeffdlnN_(iK, iM) += (delAK * XB + XA * delBK - XA * XB) * g1 * (-XB + delBM);
// dlnActCoeffdlnN_(iK, iM) += gggg * ( - 2.0 * XA * XB + delAM * XB + XA * delBM);
// dlnActCoeffdlnN_(iK, iM) += gggg * ( - 2.0 * XA * XB + delAM * XB + XA * delBM);
// dlnActCoeffdlnN_(iK, iM) += - g1 * XA * XB * (- XB + delBM);
// dlnActCoeffdlnN_(iK, iM) += - g1 * XA * XB * (- XB + delBM);
}
dlnActCoeffdlnN_(iK,iM) = XM*dlnActCoeffdlnN_(iK,iM);
}

View file

@ -917,21 +917,21 @@ void MixedSolventElectrolyte::s_update_dlnActCoeff_dlnN_diag() const
dlnActCoeffdlnN_diag_[iK] += 2*(delBK-XB)*(g0*(delAK-XA)+g1*(2*(delAK-XA)*XB+XA*(delBK-XB)));
// double gfac = g0 + g1 * XB;
// double gggg = (delBK - XB) * g1;
// double gfac = g0 + g1 * XB;
// double gggg = (delBK - XB) * g1;
// dlnActCoeffdlnN_diag_[iK] += gfac * delAK * ( - XB + delBK);
// dlnActCoeffdlnN_diag_[iK] += gfac * delAK * ( - XB + delBK);
// dlnActCoeffdlnN_diag_[iK] += gfac * delBK * ( - XA + delAK);
// dlnActCoeffdlnN_diag_[iK] += gfac * delBK * ( - XA + delAK);
// dlnActCoeffdlnN_diag_[iK] += gfac * (2.0 * XA * XB - delAK * XB - XA * delBK);
// dlnActCoeffdlnN_diag_[iK] += gfac * (2.0 * XA * XB - delAK * XB - XA * delBK);
// dlnActCoeffdlnN_diag_[iK] += (delAK * XB + XA * delBK - XA * XB) * g1 * (-XB + delBK);
// dlnActCoeffdlnN_diag_[iK] += (delAK * XB + XA * delBK - XA * XB) * g1 * (-XB + delBK);
// dlnActCoeffdlnN_diag_[iK] += gggg * ( - 2.0 * XA * XB + delAK * XB + XA * delBK);
// dlnActCoeffdlnN_diag_[iK] += gggg * ( - 2.0 * XA * XB + delAK * XB + XA * delBK);
// dlnActCoeffdlnN_diag_[iK] += - g1 * XA * XB * (- XB + delBK);
// dlnActCoeffdlnN_diag_[iK] += - g1 * XA * XB * (- XB + delBK);
}
dlnActCoeffdlnN_diag_[iK] = XK*dlnActCoeffdlnN_diag_[iK];//-XK;
}
@ -990,21 +990,21 @@ void MixedSolventElectrolyte::s_update_dlnActCoeff_dlnN() const
dlnActCoeffdlnN_(iK,iM) += g0*((delAM-XA)*(delBK-XB)+(delAK-XA)*(delBM-XB));
dlnActCoeffdlnN_(iK,iM) += 2*g1*((delAM-XA)*(delBK-XB)*XB+(delAK-XA)*(delBM-XB)*XB+(delBM-XB)*(delBK-XB)*XA);
// double gfac = g0 + g1 * XB;
// double gggg = (delBK - XB) * g1;
// double gfac = g0 + g1 * XB;
// double gggg = (delBK - XB) * g1;
// dlnActCoeffdlnN_(iK, iM) += gfac * delAK * ( - XB + delBM);
// dlnActCoeffdlnN_(iK, iM) += gfac * delAK * ( - XB + delBM);
// dlnActCoeffdlnN_(iK, iM) += gfac * delBK * ( - XA + delAM);
// dlnActCoeffdlnN_(iK, iM) += gfac * delBK * ( - XA + delAM);
// dlnActCoeffdlnN_(iK, iM) += gfac * (2.0 * XA * XB - delAM * XB - XA * delBM);
// dlnActCoeffdlnN_(iK, iM) += gfac * (2.0 * XA * XB - delAM * XB - XA * delBM);
// dlnActCoeffdlnN_(iK, iM) += (delAK * XB + XA * delBK - XA * XB) * g1 * (-XB + delBM);
// dlnActCoeffdlnN_(iK, iM) += (delAK * XB + XA * delBK - XA * XB) * g1 * (-XB + delBM);
// dlnActCoeffdlnN_(iK, iM) += gggg * ( - 2.0 * XA * XB + delAM * XB + XA * delBM);
// dlnActCoeffdlnN_(iK, iM) += gggg * ( - 2.0 * XA * XB + delAM * XB + XA * delBM);
// dlnActCoeffdlnN_(iK, iM) += - g1 * XA * XB * (- XB + delBM);
// dlnActCoeffdlnN_(iK, iM) += - g1 * XA * XB * (- XB + delBM);
}
dlnActCoeffdlnN_(iK,iM) = XM*dlnActCoeffdlnN_(iK,iM);
}

View file

@ -1009,8 +1009,8 @@ int MixtureFugacityTP::corr0(doublereal TKelvin, doublereal pres, doublereal& de
doublereal densLiq = densityCalc(TKelvin, pres, FLUID_LIQUID_0, densLiqGuess);
if (densLiq <= 0.0) {
// throw Cantera::CanteraError("MixtureFugacityTP::corr0",
// "Error occurred trying to find liquid density at (T,P) = "
// + Cantera::fp2str(TKelvin) + " " + Cantera::fp2str(pres));
// "Error occurred trying to find liquid density at (T,P) = "
// + Cantera::fp2str(TKelvin) + " " + Cantera::fp2str(pres));
retn = -1;
} else {
densLiqGuess = densLiq;
@ -1021,8 +1021,8 @@ int MixtureFugacityTP::corr0(doublereal TKelvin, doublereal pres, doublereal& de
doublereal densGas = densityCalc(TKelvin, pres, FLUID_GAS, densGasGuess);
if (densGas <= 0.0) {
//throw Cantera::CanteraError("MixtureFugacityTP::corr0",
// "Error occurred trying to find gas density at (T,P) = "
// + Cantera::fp2str(TKelvin) + " " + Cantera::fp2str(pres));
// "Error occurred trying to find gas density at (T,P) = "
// + Cantera::fp2str(TKelvin) + " " + Cantera::fp2str(pres));
if (retn == -1) {
throw Cantera::CanteraError("MixtureFugacityTP::corr0",
"Error occurred trying to find gas density at (T,P) = "

View file

@ -718,8 +718,8 @@ void MolarityIonicVPSSTP::initThermoXML(XML_Node& phaseNode, std::string id)
std::string mStringa = acNode.attrib("model");
std::string mString = lowercase(mStringa);
// if (mString != "redlich-kister") {
// throw CanteraError(subname.c_str(),
// "Unknown activity coefficient model: " + mStringa);
// throw CanteraError(subname.c_str(),
// "Unknown activity coefficient model: " + mStringa);
//}
size_t n = acNodePtr->nChildren();
for (size_t i = 0; i < n; i++) {

View file

@ -210,7 +210,7 @@ public:
m_p0 = refPressure;
} else if (fabs(m_p0 - refPressure) > 0.1) {
std::string logmsg = " ERROR NasaThermo: New Species, " + name + ", has a different reference pressure, "
+ fp2str(refPressure) + ", than existing reference pressure, " + fp2str(m_p0) + "\n";
+ fp2str(refPressure) + ", than existing reference pressure, " + fp2str(m_p0) + "\n";
writelog(logmsg);
logmsg = " This is now a fatal error\n";
writelog(logmsg);

View file

@ -1421,8 +1421,8 @@ doublereal RedlichKwongMFTP::densityCalc(doublereal TKelvin, doublereal presPa,
} else if (TKelvin > tcrit) {
molarVolLast = Vroot_[0];
} else {
// molarVolLast = Vroot_[0];
//printf("DensityCalc(): Possible problem encountered\n");
// molarVolLast = Vroot_[0];
// printf("DensityCalc(): Possible problem encountered\n");
return -2.0;
}
} else {
@ -1952,7 +1952,7 @@ int RedlichKwongMFTP::NicholsSolve(double TKelvin, double pres, doublereal a, do
}
}
}
// writelog("RedlichKwongMFTP::NicholsSolve(T = " + fp2str(TKelvin) + ", p = " + fp2str(pres) + "): finished");
// writelog("RedlichKwongMFTP::NicholsSolve(T = " + fp2str(TKelvin) + ", p = " + fp2str(pres) + "): finished");
// writelogendl();
return nSolnValues;
}

View file

@ -208,7 +208,7 @@ public:
} else if (fabs(m_p0 - refPressure) > 0.1) {
std::string logmsg = " ERROR ShomateThermo: New Species, " + name
+ ", has a different reference pressure, "
+ fp2str(refPressure) + ", than existing reference pressure, " + fp2str(m_p0) + "\n";
+ fp2str(refPressure) + ", than existing reference pressure, " + fp2str(m_p0) + "\n";
writelog(logmsg);
logmsg = " This is now a fatal error\n";
writelog(logmsg);

View file

@ -98,7 +98,7 @@ static void getSpeciesThermoTypes(std::vector<XML_Node*> & spDataNodeList,
} else {
has_other = 1;
//throw UnknownSpeciesThermoModel("getSpeciesThermoTypes:",
// spNode->attrib("name"), "missing");
// spNode->attrib("name"), "missing");
}
} else {
throw CanteraError("getSpeciesThermoTypes:",

View file

@ -413,11 +413,11 @@ void VPSSMgr::initThermoXML(XML_Node& phaseNode, std::string id)
m_p0_k = m_spthermo->refPressure(k);
if (m_p0 != m_p0_k) {
//throw CanteraError("VPSSMgr::initThermoXML",
// "inconsistent ref pressures" + fp2str(m_p0) + " "
// + fp2str(m_p0_k));
// "inconsistent ref pressures" + fp2str(m_p0) + " "
// + fp2str(m_p0_k));
// writelog("VPSSMgr::initThermoXML:"
// "inconsistent ref pressures: " + fp2str(m_p0) + " "
// + fp2str(m_p0_k) + " for SpeciesThermo k = " + int2str(k) + "\n");
// "inconsistent ref pressures: " + fp2str(m_p0) + " "
// + fp2str(m_p0_k) + " for SpeciesThermo k = " + int2str(k) + "\n");
}
}
}
@ -427,11 +427,11 @@ void VPSSMgr::initThermoXML(XML_Node& phaseNode, std::string id)
m_p0_k = kPDSS->refPressure();
if (m_p0 != m_p0_k) {
//throw CanteraError("VPSSMgr::initThermoXML",
// "inconsistent ref pressures" + fp2str(m_p0) + " "
// + fp2str(m_p0_k));
// "inconsistent ref pressures" + fp2str(m_p0) + " "
// + fp2str(m_p0_k));
//writelog("VPSSMgr::initThermoXML"
// "inconsistent ref pressures: " + fp2str(m_p0) + " "
// + fp2str(m_p0_k) + " for PDSS k = " + int2str(k) + "\n");
// "inconsistent ref pressures: " + fp2str(m_p0) + " "
// + fp2str(m_p0_k) + " for PDSS k = " + int2str(k) + "\n");
}
}
#endif

View file

@ -158,7 +158,7 @@ VPSSMgr_ConstVol::initThermoXML(XML_Node& phaseNode, std::string id)
// void
// VPSSMgr_ConstVol::installSpecies(int k, const XML_Node& speciesNode,
// const XML_Node *phaseNode_ptr) {
// const XML_Node *phaseNode_ptr) {
//}
PDSS*

View file

@ -369,7 +369,7 @@ doublereal WaterProps::ADebye(doublereal T, doublereal P_input, int ifunc)
#ifdef DEBUG_HKM
//printf("dAdT = %g, contrib1 = %g, contrib2 = %g\n",
// dAdT, contrib1, contrib2);
// dAdT, contrib1, contrib2);
#endif
if (ifunc == 1) {

View file

@ -20,8 +20,8 @@ Tt = 90.68,
Pt=11743.5675,
R = 5.18253475866e2,
Gamma=3.72992471469e-5,
alpha = 1.5, //Used with Psat
alpha1 = .36, //used with ldens;
alpha = 1.5, //Used with Psat
alpha1 = .36, //used with ldens;
Rot=451.562,
beta=2009.152,
u0 = 357696.0858,

View file

@ -171,16 +171,16 @@ double water::Psat()
/*
double water::dPsatdT(){
double log, sum1=0, sum2=0;
double log, sum1=0, sum2=0;
int i;
if ((T < Tmn) || (T > Tc))
set_Err(TempError); // Error("water::dPsatdT",TempError,T);
for (i=1;i<=8;i++)
sum1 += F[i-1]*pow(a*(T-Tp),double(i-1));
for (i=2;i<=8;i++)
sum2 += F[i-1]*a*(i-1)*pow(a*(T-Tp),double(i-2));
log = (Tc/T-1)*sum2 - Tc*sum1/(T*T);
return log*Psat();
if ((T < Tmn) || (T > Tc))
set_Err(TempError); // Error("water::dPsatdT",TempError,T);
for (i=1;i<=8;i++)
sum1 += F[i-1]*pow(a*(T-Tp),double(i-1));
for (i=2;i<=8;i++)
sum2 += F[i-1]*a*(i-1)*pow(a*(T-Tp),double(i-2));
log = (Tc/T-1)*sum2 - Tc*sum1/(T*T);
return log*Psat();
}
*/

View file

@ -495,7 +495,7 @@ void AqueousTransport::update_C()
//int iStateNew = m_thermo->getIStateMF();
//if (iStateNew == m_iStateMF) {
// if (pres == m_press) {
// return;
// return;
// }
// } else {
// m_iStateMF = iStateNew;
@ -674,7 +674,7 @@ void AqueousTransport::stefan_maxwell_solve()
* Just for Note, m_A(i,j) refers to the ith row and jth column.
* They are still fortran ordered, so that i varies fastest.
*/
switch (VIM) {
switch (VIM) {
case 1: /* 1-D approximation */
m_B(0,0) = 0.0;
for (size_t j = 0; j < m_nsp; j++) {

View file

@ -768,7 +768,7 @@ void LiquidTransport::getBinaryDiffCoeffs(size_t ld, doublereal* d)
for (size_t j = 0; j < m_nsp; j++) {
//if (!( ( m_bdiff(i,j) > 0.0 ) | ( m_bdiff(i,j) < 0.0 ))){
// throw CanteraError("LiquidTransport::getBinaryDiffCoeffs ",
// "m_bdiff has zero entry in non-diagonal.");}
// "m_bdiff has zero entry in non-diagonal.");}
d[ld*j + i] = 1.0 / m_bdiff(i,j);
}
@ -1703,7 +1703,7 @@ void LiquidTransport::stefan_maxwell_solve()
if (j != i) {
//if ( !( m_bdiff(i,j) > 0.0 ) )
//throw CanteraError("LiquidTransport::stefan_maxwell_solve",
// "m_bdiff has zero entry in non-diagonal.");
// "m_bdiff has zero entry in non-diagonal.");
tmp = m_molefracs_tran[j] * m_bdiff(i,j);
m_A(i,i) -= tmp;
m_A(i,j) = + tmp;
@ -1767,7 +1767,7 @@ void LiquidTransport::stefan_maxwell_solve()
if (j != i) {
//if ( !( m_bdiff(i,j) > 0.0 ) )
//throw CanteraError("LiquidTransport::stefan_maxwell_solve",
// "m_bdiff has zero entry in non-diagonal.");
// "m_bdiff has zero entry in non-diagonal.");
tmp = m_molefracs_tran[j] * m_bdiff(i,j);
m_A(i,i) -= tmp;
m_A(i,j) = + tmp;
@ -1812,7 +1812,7 @@ void LiquidTransport::stefan_maxwell_solve()
if (j != i) {
//if ( !( m_bdiff(i,j) > 0.0 ) )
//throw CanteraError("LiquidTransport::stefan_maxwell_solve",
// "m_bdiff has zero entry in non-diagonal.");
// "m_bdiff has zero entry in non-diagonal.");
tmp = m_molefracs_tran[j] * m_bdiff(i,j);
m_A(i,i) -= tmp;
m_A(i,j) = + tmp;

View file

@ -141,7 +141,7 @@ private:
*
* @return
*/
doublereal fitDelta(int table, int ntstar, int degree, doublereal* c);
doublereal fitDelta(int table, int ntstar, int degree, doublereal* c);
//! m_o22poly
std::vector<vector_fp> m_o22poly;

View file

@ -285,7 +285,7 @@ bool SimpleTransport::initLiquid(LiquidTransportParams& tr)
//LiquidTR_Model cm0 = ltd0.model_thermalCond;
//if (cm0 != vm0) {
// throw CanteraError("SimpleTransport::initLiquid",
// "Conductivity model is not the same as the viscosity model for species " + spName0);
// "Conductivity model is not the same as the viscosity model for species " + spName0);
// }
for (size_t k = 0; k < m_nsp; k++) {

View file

@ -77,8 +77,8 @@ int main(int argc, char** argv)
g.setState_TPX(T1, pres, DATA_PTR(Xset));
g.getPureGibbs(DATA_PTR(Gvalues));
//printf(" -- %13g %13.5g %13.5g %13.5g %13.5g \n",
// Gvalues[0], Gvalues[1], Gvalues[2],
// Gvalues[3], Gvalues[4]);
// Gvalues[0], Gvalues[1], Gvalues[2],
// Gvalues[3], Gvalues[4]);
double visc = tran->viscosity();
double cond = tran->thermalConductivity();
printf(" %13g %13.5g %13.5g\n", T1, visc, cond);

View file

@ -217,18 +217,18 @@ int main(int argc, char** argv)
double G_ex_formula = 2 * Is * rgas * T * (- osm1 + log(meanAC));
/*
if (fabs (T-298.15) < 1.0) {
printf("mu0_Naplus = %g\n", mu0_Naplus);
printf("mu0_Clminus = %g\n", mu0_Clminus);
printf("mu0_NaCl(s) = %g, mu_NaCl(s) = %g\n",mu0_NaCl, mu_NaCl);
printf("mu0_Naplus = %g\n", mu0_Naplus);
printf("mu0_Clminus = %g\n", mu0_Clminus);
printf("mu0_NaCl(s) = %g, mu_NaCl(s) = %g\n",mu0_NaCl, mu_NaCl);
}
*/
double pbar = pres * 1.0E-5;
//if (extraCols && T == 323.15) {
// for (int k = 0; k < nsp; k++) {
// printf("mus_kJ/gmol - %s - %14.8g %14.8g %g\n",
// HMW->speciesName(k).c_str(), mu0_RT[k], mu[k], Xmol[k]);
// }
// for (int k = 0; k < nsp; k++) {
// printf("mus_kJ/gmol - %s - %14.8g %14.8g %g\n",
// HMW->speciesName(k).c_str(), mu0_RT[k], mu[k], Xmol[k]);
// }
//}
printf("%10g, %10g, %12g, %12g, %12g, %12g, %12g, %12g, %14.9g, %14.9g",

View file

@ -104,23 +104,23 @@ int main()
* Calculate a few test points for the estimated
* saturation pressure function
*/
T = 273.15 + 0.;
T = 273.15 + 0.;
pres = water->psat_est(T);
printf("psat_est(%g) = %g\n", T, pres);
T = 313.9999;
T = 313.9999;
pres = water->psat_est(T);
printf("psat_est(%g) = %g\n", T, pres);
T = 314.0001;
T = 314.0001;
pres = water->psat_est(T);
printf("psat_est(%g) = %g\n", T, pres);
T = 273.15 + 100.;
T = 273.15 + 100.;
pres = water->psat_est(T);
printf("psat_est(%g) = %g\n", T, pres);
T = 647.25;
T = 647.25;
pres = water->psat_est(T);
printf("psat_est(%g) = %g\n", T, pres);