Added a getDeltaElectrochemPotentials() member function

This commit is contained in:
Harry Moffat 2010-10-18 19:27:06 +00:00
parent 78b2d5689c
commit 550c33c628
3 changed files with 76 additions and 16 deletions

View file

@ -780,8 +780,8 @@ namespace Cantera {
m_kdata->m_ROP_ok = true;
}
/**
//=================================================================================================
/*
*
* getDeltaGibbs():
*
@ -812,8 +812,35 @@ namespace Cantera {
*/
m_rxnstoich.getReactionDelta(m_ii, DATA_PTR(m_grt), deltaG);
}
/**
//=================================================================================================
// Return the vector of values for the reaction electrochemical free energy change.
/*
* These values depend upon the concentration of the solution and
* the voltage of the phases
*
* units = J kmol-1
*
* @param deltaM Output vector of deltaM's for reactions
* Length: m_ii.
*/
void InterfaceKinetics::getDeltaElectrochemPotentials(doublereal* deltaM) {
/*
* Get the chemical potentials of the species in the
* ideal gas solution.
*/
int np = nPhases();
int n;
for (n = 0; n < np; n++) {
thermo(n).getElectrochemPotentials(DATA_PTR(m_grt) + m_start[n]);
}
/*
* Use the stoichiometric manager to find deltaG for each
* reaction.
*/
m_rxnstoich.getReactionDelta(m_ii, DATA_PTR(m_grt), deltaM);
}
//=================================================================================================
/*
*
* getDeltaEnthalpy():
*

View file

@ -190,8 +190,28 @@ namespace Cantera {
void getExchangeCurrentQuantities();
//! Return the vector of values for the reaction gibbs free energy change.
/*!
* These values depend upon the concentration of the solution.
*
* units = J kmol-1
*
* @param deltaG Output vector of deltaG's for reactions
* Length: m_ii.
*/
virtual void getDeltaGibbs(doublereal* deltaG);
virtual void getDeltaGibbs( doublereal* deltaG);
//! Return the vector of values for the reaction electrochemical free energy change.
/*!
* These values depend upon the concentration of the solution and
* the voltage of the phases
*
* units = J kmol-1
*
* @param deltaM Output vector of deltaM's for reactions
* Length: m_ii.
*/
virtual void getDeltaElectrochemPotentials(doublereal* deltaM);
/**
* Return the vector of values for the reactions change in
@ -201,7 +221,7 @@ namespace Cantera {
*
* units = J kmol-1
*/
virtual void getDeltaEnthalpy( doublereal* deltaH);
virtual void getDeltaEnthalpy(doublereal* deltaH);
//! Return the vector of values for the change in
//! entropy due to each reaction

View file

@ -509,20 +509,33 @@ namespace Cantera {
err("getReactionDelta");
}
/**
* Return the vector of values for the reaction gibbs free
* energy change. These values depend upon the concentration
* of the solution.
//! Return the vector of values for the reaction gibbs free energy change.
/*!
* These values depend upon the concentration of the solution.
*
* units = J kmol-1
*
* @param deltaG Output vector of deltaG's for reactions
* Length: m_ii.
*/
virtual void getDeltaGibbs( doublereal* deltaG) {
virtual void getDeltaGibbs(doublereal* deltaG) {
err("getDeltaGibbs");
}
//! Return the vector of values for the reaction electrochemical free energy change.
/*!
* These values depend upon the concentration of the solution and
* the voltage of the phases
*
* units = J kmol-1
*
* @param deltaM Output vector of deltaM's for reactions
* Length: m_ii.
*/
virtual void getDeltaElectrochemPotentials(doublereal* deltaM) {
err("getDeltaElectrochemPotentials");
}
/**
* Return the vector of values for the reactions change in
* enthalpy. These values depend upon the concentration of
@ -533,7 +546,7 @@ namespace Cantera {
* @param deltaH Output vector of deltaH's for reactions
* Length: m_ii.
*/
virtual void getDeltaEnthalpy( doublereal* deltaH) {
virtual void getDeltaEnthalpy(doublereal* deltaH) {
err("getDeltaEnthalpy");
}
@ -547,7 +560,7 @@ namespace Cantera {
* @param deltaS Output vector of deltaS's for reactions
* Length: m_ii.
*/
virtual void getDeltaEntropy( doublereal* deltaS) {
virtual void getDeltaEntropy(doublereal* deltaS) {
err("getDeltaEntropy");
}
@ -561,7 +574,7 @@ namespace Cantera {
* @param deltaG Output vector of ss deltaG's for reactions
* Length: m_ii.
*/
virtual void getDeltaSSGibbs( doublereal* deltaG) {
virtual void getDeltaSSGibbs(doublereal* deltaG) {
err("getDeltaSSGibbs");
}
@ -575,7 +588,7 @@ namespace Cantera {
* @param deltaH Output vector of ss deltaH's for reactions
* Length: m_ii.
*/
virtual void getDeltaSSEnthalpy( doublereal* deltaH) {
virtual void getDeltaSSEnthalpy(doublereal* deltaH) {
err("getDeltaSSEnthalpy");
}
@ -589,7 +602,7 @@ namespace Cantera {
* @param deltaS Output vector of ss deltaS's for reactions
* Length: m_ii.
*/
virtual void getDeltaSSEntropy( doublereal* deltaS) {
virtual void getDeltaSSEntropy(doublereal* deltaS) {
err("getDeltaSSEntropy");
}