Remove commented-out code

This commit is contained in:
Ray Speth 2015-07-20 17:20:46 -04:00
parent de005c083e
commit 6cc5652de6
62 changed files with 4 additions and 274 deletions

View file

@ -30,11 +30,6 @@ public:
return m_ok;
}
//friend std::ostream& operator<<(std::ostream& s, IdealGasMix& mix) {
// std::string r = report(mix, true);
// s << r;
// return s;
protected:
bool m_ok;
XML_Node* m_r;

View file

@ -1606,7 +1606,6 @@ public:
//! Tentative value of the mole number vector. It's also used to store the
//! mole fraction vector.
//std::vector<double> wt;
std::vector<double> m_molNumSpecies_new;
//! Delta G(irxn) for the noncomponent species in the mechanism.

View file

@ -22,12 +22,10 @@ class FalloffMgr
{
public:
//! Constructor.
FalloffMgr(/*FalloffFactory* f = 0*/) :
FalloffMgr() :
m_worksize(0) {
//if (f == 0)
m_factory = FalloffFactory::factory(); // RFB:TODO This raw pointer should be encapsulated
// because accessing a 'Singleton Factory'
//else m_factory = f;
}
//! Install a new falloff function calculator.

View file

@ -49,14 +49,12 @@ public:
* Decrement the atom numbers by those in group 'other'.
*/
void operator-=(const Group& other) {
verifyInputs(*this, other);
for (size_t m = 0; m < m_comp.size(); m++) {
m_comp[m] -= other.m_comp[m];
}
validate();
}
void operator+=(const Group& other) {
verifyInputs(*this, other);
for (size_t m = 0; m < m_comp.size(); m++) {
m_comp[m] += other.m_comp[m];
}
@ -69,7 +67,6 @@ public:
validate();
}
bool operator==(const Group& other) const {
verifyInputs(*this, other);
for (size_t m = 0; m < m_comp.size(); m++) {
if (m_comp[m] != other.m_comp[m]) {
return false;
@ -78,27 +75,15 @@ public:
return true;
}
friend Group operator-(const Group& g1, const Group& g2) {
verifyInputs(g1, g2);
Group diff(g1);
diff -= g2;
return diff;
}
friend Group operator+(const Group& g1, const Group& g2) {
verifyInputs(g1, g2);
Group sum(g1);
sum += g2;
return sum;
}
friend void verifyInputs(const Group& g1, const Group& g2) {
// if (Debug::on) {
// if (g1.size() != g2.size()) {
// cerr << "Group: size mismatch!" << std::endl;
// cerr << " group 1 = " << g1 << std::endl;
// cerr << " group 2 = " << g2 << std::endl;
// }
// }
}
/*!
* A group is 'valid' if all of its nonzero atom numbers have
* the same sign, either positive or negative. This method

View file

@ -259,8 +259,6 @@ protected:
vector_fp m_concSpecies;
vector_fp m_concSpeciesSave;
//std::vector<vector_fp> m_vectorConcKinSpecies;
//std::vector<vector_fp> m_vectorNetSpeciesProdRate;
/**
* Index into the species vector of the kinetics manager,
* pointing to the first species from the surrounding medium.

View file

@ -326,7 +326,6 @@ protected:
std::vector<std::vector<int> > m_groups;
std::vector<Group> m_sgroup;
std::vector<std::string> m_elementSymbols;
// std::map<int, int> m_warn;
std::map<size_t, std::map<size_t, std::map<size_t, Group> > > m_transfer;
std::vector<bool> m_determinate;
Array2D m_atoms;

View file

@ -140,9 +140,7 @@ public:
}
for (size_t n = 0; n < m_nmcov; n++) {
k = m_msp[n];
// changed n to k, dgg 1/22/04
th = std::max(theta[k], Tiny);
// th = fmaxx(theta[n], Tiny);
m_mcov += m_mc[n]*std::log(th);
}
}

View file

@ -416,10 +416,6 @@ private:
*/
std::vector<size_t> m_numBulkSpecies;
//std::vector<int> m_bulkKinObjID;
//std::vector<int> m_bulkKinObjPhaseID;
//! Total number of species in all bulk phases.
/*!
* This is also the number of bulk equations to solve when bulk equation

View file

@ -60,9 +60,6 @@ public:
virtual ~Integrator() {
}
/** Set or reset the number of equations. */
//virtual void resize(int n)=0;
//! Set error tolerances.
/*!
* @param reltol scalar relative tolerance

View file

@ -373,7 +373,6 @@ public:
virtual void _getInitialSoln(doublereal* x) {
x[0] = m_temp;
//m_kin->advanceCoverages(1.0);
m_sphase->getCoverages(x+1);
}

View file

@ -180,7 +180,6 @@ public:
//! Call after one or more grids has been refined.
void resize();
//void setTransientMask();
vector_int& transientMask() {
return m_mask;
}

View file

@ -107,8 +107,6 @@ public:
void setTimeStep(doublereal stepsize, size_t n, integer* tsteps);
//void setMaxTimeStep(doublereal tmax) { m_maxtimestep = tmax; }
void solve(int loglevel = 0, bool refine_grid = true);
void eval(doublereal rdt=-1.0, int count = 1) {

View file

@ -85,20 +85,6 @@ public:
*/
virtual doublereal entropy_mole() const;
/**
* Molar heat capacity at constant pressure of the solution.
* Units: J/kmol/K.
*/
//virtual doublereal cp_mole() const;
/**
* Molar heat capacity at constant volume of the solution.
* Units: J/kmol/K.
*/
//virtual doublereal cv_mole() const {
// return cp_mole();
//}
//@}
/** @name Mechanical Equation of State Properties
*

View file

@ -122,8 +122,6 @@ public:
*cp_R = cp;
*h_RT = h;
*s_R = s;
//writelog("NASA1: for species "+int2str(m_index)+", h_RT = "+
// fp2str(h)+"\n");
}
virtual void updatePropertiesTemp(const doublereal temp,

View file

@ -631,8 +631,6 @@ protected:
//! Temporary storage - length = m_kk.
mutable vector_fp m_tmpV;
// mutable vector_fp m_tmpV2;
// Partial molar volumes of the species
mutable vector_fp m_partialMolarVolumes;

View file

@ -41,7 +41,6 @@ const int cSurf = 3;
/// A metal phase.
const int cMetal = 4; // MetalPhase in MetalPhase.h
// const int cSolidCompound = 5; // SolidCompound in SolidCompound.h
const int cStoichSubstance = 5; // StoichSubstance.h
const int cSemiconductor = 7;

View file

@ -39,7 +39,6 @@ public:
if (m_mode == CK_Mode) {
throw CanteraError("HighPressureGasTransport::model",
"CK_Mode not accepted");
//return cHighP;
} else {
return cHighP;
}
@ -80,8 +79,6 @@ protected:
vector_fp store(size_t i, size_t nsp);
//virtual doublereal CT_i(doublereal T_0);
virtual doublereal FQ_i(doublereal Q, doublereal Tr, doublereal MW);
virtual doublereal setPcorr(doublereal Pr, doublereal Tr);

View file

@ -136,7 +136,6 @@ public:
}
virtual void getMatrixTransProp(DenseMatrix& mat, doublereal* speciesValues = 0) {
//mat = m_Dij;
throw NotImplementedError("LiquidTranInteraction::getMixTransProp");
}
@ -151,8 +150,6 @@ protected:
//! pointer to thermo object to get current temperature
thermo_t* m_thermo;
//LiquidTransportParams* m_trParam;
//! Matrix of interaction coefficients for polynomial in molefraction*weight of
//! speciesA (no temperature dependence, dimensionless)
std::vector<DenseMatrix*> m_Aij;
@ -181,12 +178,6 @@ class LTI_Solvent : public LiquidTranInteraction
public:
LTI_Solvent(TransportPropertyType tp_ind = TP_UNKNOWN);
//! Copy constructor
// LTI_Solvent( const LTI_Solvent &right );
//! Assignment operator
// LTI_Solvent& operator=( const LTI_Solvent &right );
//! Return the mixture transport property value.
/**
* Takes the separate species transport properties as input (this method
@ -220,12 +211,6 @@ public:
m_model = LTI_MODEL_MOLEFRACS;
}
//! Copy constructor
// LTI_MoleFracs( const LTI_MoleFracs &right );
//! Assignment operator
// LTI_MoleFracs& operator=( const LTI_MoleFracs &right );
//! Return the mixture transport property value.
/**
* Takes the separate species transport properties as input (this method
@ -262,12 +247,6 @@ public:
m_model = LTI_MODEL_MASSFRACS;
}
//! Copy constructor
// LTI_MassFracs( const LTI_MassFracs &right );
//! Assignment operator
// LTI_MassFracs& operator=( const LTI_MassFracs &right );
//! Return the mixture transport property value.
/**
* Takes the separate species transport properties as input (this method
@ -333,12 +312,6 @@ public:
m_model = LTI_MODEL_LOG_MOLEFRACS;
}
//! Copy constructor
// LTI_Log_MoleFracs( const LTI_Log_MoleFracs &right );
//! Assignment operator
// LTI_Log_MoleFracs& operator=( const LTI_Log_MoleFracs &right );
//! Return the mixture transport property value.
/**
* Takes the separate species transport properties as input (this method
@ -386,12 +359,6 @@ public:
m_model = LTI_MODEL_PAIRWISE_INTERACTION;
}
//! Copy constructor
// LTI_Pairwise_Interaction( const LTI_Pairwise_Interaction &right );
//! Assignment operator
// LTI_Pairwise_Interaction& operator=( const LTI_Pairwise_Interaction &right );
void setParameters(LiquidTransportParams& trParam) ;
//! Return the mixture transport property value.
@ -492,12 +459,6 @@ public:
m_model = LTI_MODEL_STEFANMAXWELL_PPN;
}
//! Copy constructor
// LTI_StefanMaxwell_PPN( const LTI_StefanMaxwell_PPN &right );
//! Assignment operator
// LTI_StefanMaxwell_PPN& operator=( const LTI_StefanMaxwell_PPN &right );
void setParameters(LiquidTransportParams& trParam) ;
//! Return the mixture transport property value.
@ -538,12 +499,6 @@ public:
m_model = LTI_MODEL_STOKES_EINSTEIN;
}
//! Copy constructor
// LTI_StokesEinstein( const LTI_StokesEinstein &right );
//! Assignment operator
// LTI_StokesEinstein& operator=( const LTI_StokesEinstein &right );
void setParameters(LiquidTransportParams& trParam);
//! Return the mixture transport property value.
@ -583,12 +538,6 @@ public:
m_model = LTI_MODEL_MOLEFRACS_EXPT;
}
//! Copy constructor
// LTI_MoleFracs_ExpT( const LTI_MoleFracs_ExpT &right );
//! Assignment operator
// LTI_MoleFracs_ExpT& operator=( const LTI_MoleFracs_ExpT &right );
//! Return the mixture transport property value.
/**
* Takes the separate species transport properties as input (this method

View file

@ -154,7 +154,6 @@ protected:
// L matrix quantities
DenseMatrix m_Lmatrix;
SquareMatrix m_aa;
//DenseMatrix m_Lmatrix;
vector_fp m_a;
vector_fp m_b;

View file

@ -73,31 +73,6 @@ public:
* shallow pointer that should be zero during destructor
*/
LTPspecies* defectActivity;
protected:
//protected members of SolidTransportData are analogous to those found in TransportParams
//! Local storage of the number of species
// int nsp_;
//! Pointer to the ThermoPhase object
// thermo_t* thermo;
//! Local storage of the molecular weights of the species
/*!
* Length is nsp_ and units are kg kmol-1.
*/
// vector_fp mw;
//! Maximum temperatures for parameter fits
// doublereal tmax;
//! Minimum temperatures for parameter fits
// doublereal tmin;
//! Log level
// int log_level;
};
}

View file

@ -29,7 +29,6 @@ void demoprog()
// location, followed by the 7 low-temperature coefficients, then
// the seven high-temperature ones.
const int LOW_A6 = 6;
//const int HIGH_A6 = 13;
for (n = 0; n < nsp; n++) {

View file

@ -653,7 +653,6 @@ void vcs_MultiPhaseEquil::reportCSV(const std::string& reportFile)
string phaseName = tref.name();
vcs_VolPhase* volP = m_vprob.VPhaseList[iphase];
double TMolesPhase = volP->totalMoles();
//AssertTrace(TMolesPhase == m_mix->phaseMoles(iphase));
size_t nSpecies = tref.nSpecies();
activity.resize(nSpecies, 0.0);
ac.resize(nSpecies, 0.0);
@ -1162,7 +1161,6 @@ int vcs_Cantera_update_vprob(MultiPhase* mphase, VCS_PROB* vprob)
* Loop through each species in the current phase
*/
size_t nSpPhase = tPhase->nSpecies();
// volPhase->TMoles = 0.0;
tmpMoles.resize(nSpPhase);
for (size_t k = 0; k < nSpPhase; k++) {
tmpMoles[k] = mphase->speciesMoles(kT);

View file

@ -153,7 +153,6 @@ void VCS_SOLVE::vcs_initSizes(const size_t nspecies0, const size_t nelements,
m_indexRxnToSpecies.resize(nspecies0, 0);
/* Initialize all species to be major species */
//m_rxnStatus.resize(nspecies0, 1);
m_speciesStatus.resize(nspecies0, 1);
m_SSPhase.resize(2*nspecies0, 0);
@ -595,7 +594,6 @@ int VCS_SOLVE::vcs_prob_specifyFully(const VCS_PROB* pub)
* Define all species to be major species, initially.
*/
for (size_t i = 0; i < nspecies; i++) {
// m_rxnStatus[i] = VCS_SPECIES_MAJOR;
m_speciesStatus[i] = VCS_SPECIES_MAJOR;
}
/*
@ -903,9 +901,7 @@ int VCS_SOLVE::vcs_prob_update(VCS_PROB* pub)
pub->w[i] = m_molNumSpecies_old[k1];
} else {
pub->w[i] = 0.0;
// plogf("voltage species = %g\n", m_molNumSpecies_old[k1]);
}
//pub->mf[i] = m_molNumSpecies_new[k1];
pub->m_gibbsSpecies[i] = m_feSpecies_old[k1];
pub->VolPM[i] = m_PMVolumeSpecies[k1];
}

View file

@ -1028,8 +1028,7 @@ extern "C" {
status_t ctgetcanteraerror_(char* buf, ftnlen buflen)
{
try {
std::string e; // = "<no error>";
//if (nErrors() > 0)
std::string e;
e = lastErrorMessage();
int n = std::min((int) e.size(), buflen-1);
copy(e.begin(), e.begin() + n, buf);

View file

@ -499,30 +499,12 @@ void InterfaceKinetics::updateROP()
//
// Calculate the overpotential of the reaction
//
// double nStoichElectrons = - rmc->m_phaseChargeChange[metalPhaseRS_];
double nStoichElectrons=1;
//*nStoich = nStoichElectrons;
getDeltaGibbs(0);
if (nStoichElectrons != 0.0) {
OCV = m_deltaG[jrxn]/Faraday/ nStoichElectrons;
}
/*
double exp1 = nu * nStoich * beta / rtdf
double exp2 = -nu * nStoich * Faraday * (1.0 - beta) / (GasConstant * temp);
double val = io * (exp(exp1) - exp(exp2));
doublereal BVterm = exp(exp1 ) - exp(exp2);
m_ropnet[j] = m_ropf[j] * BVterm
m_ropf[j] =
//
m_ropr[j] = m_ropnet[j] - m_ropf[j];
*/
}
}

View file

@ -2,7 +2,6 @@
#define CT_MATUTILS_H
const double Undef = -999.123;
//const double DERR = -999.999;
#include <string>

View file

@ -143,7 +143,6 @@ extern "C" {
break;
default:
mexPrintf("iclass = %d",iclass);
//mexErrMsgTxt("unknown class");
}
}
}

View file

@ -65,8 +65,8 @@ extern "C" {
void* f_data)
{
try {
double* ydata = NV_DATA_S(y); //N_VDATA(y);
double* ydotdata = NV_DATA_S(ydot); //N_VDATA(ydot);
double* ydata = NV_DATA_S(y);
double* ydotdata = NV_DATA_S(ydot);
FuncData* d = (FuncData*)f_data;
FuncEval* f = d->m_func;
if (d->m_pars.size() == 0) {

View file

@ -216,7 +216,6 @@ string Func1::write(const std::string& arg) const
string Pow1::write(const std::string& arg) const
{
//cout << "Pow1" << endl;
string c = "";
if (m_c == 0.5) {
return "\\sqrt{" + arg + "}";

View file

@ -291,7 +291,6 @@ void Empty1D::eval(size_t jg, doublereal* xg, doublereal* rg,
doublereal* x = xg + loc();
doublereal* r = rg + loc();
integer* diag = diagg + loc();
// integer *db;
r[0] = x[0];
diag[0] = 0;

View file

@ -215,8 +215,6 @@ doublereal DebyeHuckel::cp_mole() const
doublereal DebyeHuckel::cv_mole() const
{
throw NotImplementedError("DebyeHuckel::cv_mole");
//getPartialMolarCv(m_tmpV.begin());
//return mean_X(m_tmpV.begin());
}
//

View file

@ -1678,8 +1678,6 @@ void HMWSoln::s_updatePitzer_lnMolalityActCoeff() const
const double* alpha2MX = DATA_PTR(m_Alpha2MX_ij);
const double* psi_ijk = DATA_PTR(m_Psi_ijk);
//n = k + j * m_kk + i * m_kk * m_kk;
double* gamma_Unscaled = DATA_PTR(m_gamma_tmp);
/*

View file

@ -135,7 +135,6 @@ IonsFromNeutralVPSSTP::operator=(const IonsFromNeutralVPSSTP& b)
IOwnNThermoPhase_ = b.IOwnNThermoPhase_;
moleFractionsTmp_ = b.moleFractionsTmp_;
muNeutralMolecule_ = b.muNeutralMolecule_;
// gammaNeutralMolecule_ = b.gammaNeutralMolecule_;
lnActCoeff_NeutralMolecule_ = b.lnActCoeff_NeutralMolecule_;
dlnActCoeffdT_NeutralMolecule_ = b.dlnActCoeffdT_NeutralMolecule_;
dlnActCoeffdlnX_diag_NeutralMolecule_ = b.dlnActCoeffdlnX_diag_NeutralMolecule_;
@ -1058,10 +1057,6 @@ void IonsFromNeutralVPSSTP::getdlnActCoeffds(const doublereal dTds, const double
return;
}
// static vector_fp dlnActCoeff_NeutralMolecule(numNeutMolSpec);
// static vector_fp dX_NeutralMolecule(numNeutMolSpec);
getNeutralMoleculeMoleGrads(DATA_PTR(dXds),DATA_PTR(dX_NeutralMolecule_));
// All mole fractions returned to normal

View file

@ -1277,7 +1277,6 @@ int RedlichKwongMFTP::NicholsSolve(double TKelvin, double pres, doublereal a, do
doublereal ratio1 = 3.0 * an * cn / (bn * bn);
doublereal ratio2 = pres * b / (GasConstant * TKelvin);
if (fabs(ratio1) < 1.0E-7) {
//printf("NicholsSolve(): Alternative solution (p = %g T = %g)\n", pres, TKelvin);
doublereal ratio3 = a / (GasConstant * sqt) * pres / (GasConstant * TKelvin);
if (fabs(ratio2) < 1.0E-5 && fabs(ratio3) < 1.0E-5) {
doublereal zz = 1.0;

View file

@ -279,7 +279,6 @@ void
VPSSMgr::getStandardVolumes_ref(doublereal* vol) const
{
getStandardVolumes(vol);
//err("getStandardVolumes_ref");
}
/*****************************************************************/

View file

@ -257,7 +257,6 @@ VPSSMgr_Water_HKFT::createInstallPDSS(size_t k, const XML_Node& speciesNode,
throw CanteraError("VPSSMgr_Water_HKFT::installSpecies",
"wrong SS mode: " + model);
}
//VPSSMgr::installSTSpecies(k, speciesNode, phaseNode_ptr);
delete m_waterSS;
m_waterSS = new PDSS_Water(m_vptp_ptr, 0);

View file

@ -308,8 +308,6 @@ void VPStandardStateTP::setState_TP(doublereal t, doublereal pres)
* we haven't touched m_tlast or m_plast, so some calculations may still
* need to be done at the ThermoPhase object level.
*/
//setTemperature(t);
//setPressure(pres);
calcDensity();
}

View file

@ -208,7 +208,6 @@ doublereal WaterPropsIAPWS::density_const(doublereal pressure,
delta = deltaGuess;
m_phi->tdpolycalc(tau, delta);
// setState_TR(temperature, rhoguess);
doublereal delta_retn = m_phi->dfind(p_red, tau, deltaGuess);
doublereal density_retn;

View file

@ -36,7 +36,6 @@ public:
return ((up() - m_energy_offset) - fp())/T + m_entropy_offset;
}
double Psat();
// double dPsatdT();
private:
double ldens();
};

View file

@ -74,13 +74,7 @@ public:
double ldens();
protected:
double m_tcrit, m_pcrit, m_mw, m_a, m_b;
//double m_tmin, m_tmax;
//string m_name, m_formula;
private:
};
}

View file

@ -176,7 +176,6 @@ LiquidTranInteraction& LiquidTranInteraction::operator=(const LiquidTranInteract
m_model = right.m_model;
m_property = right.m_property;
m_thermo = right.m_thermo;
//m_trParam = right.m_trParam;
m_Aij = right.m_Aij;
m_Bij = right.m_Bij;
m_Eij = right.m_Eij;

View file

@ -74,7 +74,6 @@ void MultiTransport::init(ThermoPhase* thermo, int mode, int log_level)
// precompute and store log(epsilon_ij/k_B)
m_log_eps_k.resize(m_nsp, m_nsp);
// int j;
for (size_t i = 0; i < m_nsp; i++) {
for (size_t j = i; j < m_nsp; j++) {
m_log_eps_k(i,j) = log(m_epsilon(i,j)/Boltzmann);

View file

@ -17,7 +17,6 @@ int main(int argc, char** argv)
double pres = 1.0E5;
g.setState_TPX(1000.1, pres, "O2:0.4, N2:0.6");
g.equilibrate("TP", "auto");
//cout << g;
double enth = g.enthalpy_mass();
printf(" enth = %g\n", enth);
enth -= 2.0E2;
@ -26,7 +25,6 @@ int main(int argc, char** argv)
g.equilibrate("HP", "auto");
enth = g.enthalpy_mass();
printf(" enth = %g\n", enth);
//cout << g;
return 0;

View file

@ -29,7 +29,6 @@ int main(int argc, char** argv)
_set_output_format(_TWO_DIGIT_EXPONENT);
#endif
suppress_deprecation_warnings();
// int solver = 2;
int numSucc = 0;
int numFail = 0;
int printLvl = 1;

View file

@ -17,10 +17,8 @@ int main(int argc, char** argv)
try {
IdealSolnGasVPSS gg("silane.xml", "silane");
ThermoPhase* g = &gg;
//ThermoPhase *g = newPhase("silane.xml", "silane");
cout.precision(4);
g->setState_TPX(1500.0, 100.0, "SIH4:0.01, H2:0.99");
//g.setState_TPX(1500.0, 1.0132E5, "SIH4:0.01, H2:0.99");
g->equilibrate("TP");
cout << g->report(true, 0.0) << endl;
return 0;

View file

@ -47,7 +47,6 @@ int main(int argc, char** argv)
size_t i1 = HMW->speciesIndex("Na+");
size_t i2 = HMW->speciesIndex("Cl-");
//int i3 = HMW->speciesIndex("H2O(L)");
for (i = 0; i < nsp; i++) {
moll[i] = 0.0;
}
@ -73,7 +72,6 @@ int main(int argc, char** argv)
ThermoPhase* hmwtb = (ThermoPhase*)HMW;
ThermoPhase* hmwtbDupl = hmwtb->duplMyselfAsThermoPhase();
//ThermoPhase *hmwtbDupl = 0;
HMWSoln* HMW1 = HMW;
HMWSoln* HMW2 = dynamic_cast<HMWSoln*>(hmwtbDupl);
@ -130,11 +128,6 @@ int main(int argc, char** argv)
} else {
T = TTable.T[i];
}
/*
* RT is in units of J/kmolK
*/
//double RT = GasConstant * T;
/*
* Make sure we are at the saturation pressure or above.
*/
@ -206,7 +199,6 @@ int main(int argc, char** argv)
double Aphi = HMW->A_Debye_TP(T, pres) / 3.0;
//double AL = HMW->ADebye_L(T,pres);
double AJ = HMW->ADebye_J(T, pres);
for (size_t k = 0; k < nsp; k++) {

View file

@ -157,8 +157,6 @@ void calc(double temp, double Iionic)
double molecWeight = 18.01528;
//double RT = GasConst * temp * 1.0E-3;
double xo = 1.0 / (molecWeight/1000. * 2 * m + 1.0);
printf(" no = %g\n", xo);
}

View file

@ -48,7 +48,6 @@ int main(int argc, char** argv)
size_t i1 = HMW->speciesIndex("Na+");
size_t i2 = HMW->speciesIndex("Cl-");
//int i3 = HMW->speciesIndex("H2O(L)");
for (i = 0; i < nsp; i++) {
moll[i] = 0.0;
}
@ -117,11 +116,6 @@ int main(int argc, char** argv)
} else {
T = TTable.T[i];
}
/*
* RT is in units of J/kmolK
*/
//double RT = GasConstant * T;
/*
* Make sure we are at the saturation pressure or above.
*/
@ -161,8 +155,6 @@ int main(int argc, char** argv)
Cp_Naplus = pmCp[i1] * 1.0E-6;
Cp_Clminus = pmCp[i2] * 1.0E-6;
//double Delta_Cp_Salt = Cp_NaCl - (Cp_Naplus + Cp_Clminus);
double molarCp = HMW->cp_mole() * 1.0E-6;
/*

View file

@ -54,7 +54,6 @@ int main(int argc, char** argv)
size_t i1 = HMW->speciesIndex("Na+");
size_t i2 = HMW->speciesIndex("Cl-");
//int i3 = HMW->speciesIndex("H2O(L)");
for (i = 1; i < nsp; i++) {
moll[i] = 0.0;
}
@ -136,7 +135,6 @@ int main(int argc, char** argv)
mu0_NaCl = mu0_RT[0] * RT * 1.0E-6;
HMW->getGibbs_RT(mu0_RT);
//double mu0_water = mu0_RT[0] * RT * 1.0E-6;
mu0_Naplus = mu0_RT[i1] * RT * 1.0E-6;
mu0_Clminus = mu0_RT[i2] * RT * 1.0E-6;
Delta_G0 = (mu0_Naplus + mu0_Clminus) - mu0_NaCl;
@ -203,13 +201,6 @@ int main(int argc, char** argv)
*/
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]);
// }
//}
printf("%10g, %10g, %12g, %12g, %12g, %12g, %12g, %12g, %14.9g, %14.9g",
T, pbar, Aphi, Delta_G0, Delta_G, Gibbs0_kgWater, Gibbs_kgWater, G_ex_kgWater,
meanAC, osm1);

View file

@ -48,7 +48,6 @@ int main(int argc, char** argv)
size_t i1 = HMW->speciesIndex("Na+");
size_t i2 = HMW->speciesIndex("Cl-");
//int i3 = HMW->speciesIndex("H2O(L)");
for (i = 1; i < nsp; i++) {
moll[i] = 0.0;
}
@ -156,8 +155,6 @@ int main(int argc, char** argv)
H_H2O = pmEnth[0] * 1.0E-6;
H_Naplus = pmEnth[i1] * 1.0E-6;
H_Clminus = pmEnth[i2] * 1.0E-6;
//double Delta_H_Salt = H_NaCl - (H_Naplus + H_Clminus);
//double Lfunc = HMW->relative_enthalpy() * 1.0E-6;
molarEnth = HMW->enthalpy_mole() * 1.0E-6;
double Delta_Hs = (Xmol[0] * H_H2O +

View file

@ -131,11 +131,6 @@ void calc(double temp, double Iionic)
double molecWeight = 18.01528;
//double RT = GasConst * temp * 1.0E-3;
//double IdealMixing = 2.0 * RT * m * (log(m) - 1.0);
//printf(" IdealMixing = %20.13g kJ/kg_water\n", IdealMixing);
double xo = 1.0 / (molecWeight/1000. * 2 * m + 1.0);
printf(" no = %g\n", xo);
}

View file

@ -31,8 +31,6 @@ int main(int argc, char** argv)
size_t nsp = HMW->nSpecies();
//double acMol[100];
//double act[100];
double mf[100];
double moll[100];
HMW->getMoleFractions(mf);
@ -45,7 +43,6 @@ int main(int argc, char** argv)
size_t i1 = HMW->speciesIndex("Na+");
size_t i2 = HMW->speciesIndex("Cl-");
//int i3 = HMW->speciesIndex("H2O(L)");
for (i = 0; i < nsp; i++) {
moll[i] = 0.0;
}
@ -113,11 +110,6 @@ int main(int argc, char** argv)
} else {
T = TTable.T[i];
}
/*
* RT is in units of J/kmolK
*/
//double RT = GasConstant * T;
/*
* Make sure we are at the saturation pressure or above.
*/
@ -147,7 +139,6 @@ int main(int argc, char** argv)
double dd = solid->density();
double MW_NaCl = solid->meanMolecularWeight();
V_NaCl = MW_NaCl / dd;
//printf("V_NaCl = %g , V0_NaCl = %g %g\n", V_NaCl, V0_NaCl, 1.0/solid->molarDensity());
/*
* Get the partial molar volumes
@ -157,17 +148,12 @@ int main(int argc, char** argv)
V_Naplus = pmV[i1];
V_Clminus = pmV[i2];
//double Delta_V_Salt = V_NaCl - (V_Naplus + V_Clminus);
/*
* Calculate the molar volume of solution
*/
double dsoln = HMW->density();
meanMW = HMW->meanMolecularWeight();
double molarV = meanMW / dsoln;
//double md = HMW->molarDensity();
//printf("compare %g %g\n", molarV, 1.0/md);
/*
* Calculate the delta volume of solution for the reaction
@ -196,7 +182,6 @@ int main(int argc, char** argv)
double phiV = Vex / Xmol[i1];
double Aphi = HMW->A_Debye_TP(T, pres) / 3.0;
//double AL = HMW->ADebye_L(T,pres);
double Av = HMW->ADebye_V(T, pres) * 1.0E3;
molarV0 = 0.0;

View file

@ -145,7 +145,6 @@ void calc(double temp, double Iionic)
double molecWeight = 18.01528;
//double RT = GasConst * temp * 1.0E-3;
double xo = 1.0 / (molecWeight/1000. * 2 * m + 1.0);
printf(" no = %g\n", xo);
}

View file

@ -21,13 +21,6 @@ int main(int argc, char** argv)
XML_Node* xm = get_XML_NameID("phase", file_ID, 0);
StoichSubstanceSSTP* solid = new StoichSubstanceSSTP(*xm);
/*
* Load in and initialize the
*/
//string nacl_s = "NaCl_Solid.xml";
//string id = "NaCl(S)";
//Cantera::ThermoPhase *solid = Cantera::newPhase(nacl_s, id);
size_t nsp = solid->nSpecies();
if (nsp != 1) {
throw CanteraError("main","Should just be one species");

View file

@ -135,9 +135,6 @@ int main()
double d = w->density();
double mw = w->molecularWeight();
double vbar = mw/d;
// not implemented
//w.getPartialMolarVolumes(&vbar);
printf("%10g %10g %12g %13.4f %13.4f\n", temp, press*1.0E-5,
psat*1.0E-5, d, vbar);

View file

@ -142,9 +142,6 @@ int main()
double d = w->density();
double mw = w->molecularWeight(0);
double vbar = mw/d;
// not implemented
//w.getPartialMolarVolumes(&vbar);
printf("%10g %10g %12g %13.4f %13.4f\n", temp, press*1.0E-5,
psat*1.0E-5, d, vbar);

View file

@ -58,8 +58,6 @@ int equil_example1(int job)
}
// create a gas mixture, and set its state
//IdealGasMix gas("silane.cti", "silane");
IdealGasMix gas("silane.xml", "silane");
size_t nsp = gas.nSpecies();

View file

@ -46,7 +46,6 @@ int main(int argc, char** argv)
XML_Node* const xs = xc->findNameID("phase", "diamond_100");
ThermoPhase* diamond100TP = newPhase(*xs);
//SurfPhase *diamond100TP = new SurfPhase(*xs);
int nsp_d100 = diamond100TP->nSpecies();
cout << "Number of species in diamond_100 = " << nsp_d100 << endl;

View file

@ -190,7 +190,6 @@ int main(int argc, char** argv)
vector_fp specMob(nsp, 0.0);
//tranMix->getMobilities(DATA_PTR(specMob));
printf(" Dump of the species mobilities:\n");
for (size_t k = 0; k < nsp; k++) {
string sss = g.speciesName(k);

View file

@ -137,9 +137,6 @@ int main()
double d = w->density();
double mw = w->molecularWeight(0);
double vbar = mw/d;
// not implemented
//w.getPartialMolarVolumes(&vbar);
printf("%10g %10g %12g %13.4g %13.4g\n", temp, press*1.0E-5,
psat*1.0E-5, d, vbar);

View file

@ -16,7 +16,6 @@ int main(int argc, char** argv)
IdealGasMix g("silane.xml", "silane");
g.setState_TPX(1500.0, 100.0, "SIH4:0.01, H2:0.99");
g.equilibrate("TP");
//cout << g;
return 0;
} catch (CanteraError& err) {
std::cerr << err.what() << std::endl;

View file

@ -317,7 +317,6 @@ int main(int argc, char** argv)
/*
* Solve the Equation system
*/
//iKin_ptr->advanceCoverages(100.);
iKin_ptr->solvePseudoSteadyStateProblem();
/*