Skip to content

Commit

Permalink
[Kinetics] Deprecate undocumented Butler-Volmer reaction options
Browse files Browse the repository at this point in the history
  • Loading branch information
speth committed Nov 30, 2019
1 parent 46fbdc4 commit 8d18757
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/cantera/kinetics/InterfaceKinetics.h
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ class InterfaceKinetics : public Kinetics
*/
int phaseStability(const size_t iphase) const;

//! @deprecated To be removed after Cantera 2.5.
virtual void determineFwdOrdersBV(ElectrochemicalReaction& r, vector_fp& fwdFullorders);

protected:
Expand Down Expand Up @@ -533,6 +534,7 @@ class InterfaceKinetics : public Kinetics
* directly.
* m_ctrxn_BVform[i] = 2; this means that the irxn reaction is calculated via the BV format
* directly, using concentrations instead of activity concentrations.
* @deprecated To be removed after Cantera 2.5.
*/
std::vector<size_t> m_ctrxn_BVform;

Expand Down
1 change: 1 addition & 0 deletions include/cantera/kinetics/Reaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ class ElectrochemicalReaction : public InterfaceReaction
* add an electrical resistance to the formulation. The resistance modifies
* the electrical current flow in both directions. Only valid for Butler-
* Volmer formulations. Units are in ohms m2. Default = 0.0 ohms m2.
* @deprecated Unused. To be removed after Cantera 2.5.
*/
doublereal film_resistivity;

Expand Down
4 changes: 4 additions & 0 deletions include/cantera/kinetics/reaction_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,21 @@ const int INTERFACE_RXN = 20;
//! This is a surface reaction that is formulated using the Butler-Volmer
//! formulation and using concentrations instead of activity concentrations
//! for its exchange current density formula.
//! @deprecated To be removed after Cantera 2.5.
const int BUTLERVOLMER_NOACTIVITYCOEFFS_RXN = 25;

//! This is a surface reaction that is formulated using the Butler-Volmer
//! formulation. Note the B-V equations can be derived from the forward
//! and reverse rate constants for a single step reaction. However, there
//! are some advantages to using the formulation directly.
//! @deprecated To be removed after Cantera 2.5.
const int BUTLERVOLMER_RXN = 26;

//! This is a surface reaction that is formulated using the affinity
//! representation, common in the geochemistry community.
//! This is generally a global non-mass action reaction with an additional functional
//! form dependence on delta G of reaction.
//! @deprecated To be removed after Cantera 2.5.
const int SURFACEAFFINITY_RXN = 27;

/**
Expand All @@ -104,6 +107,7 @@ const int EDGE_RXN = 22;
/**
* A global reaction. These may have non-mass action reaction orders,
* and are not allowed to be reversible.
* @deprecated To be removed after Cantera 2.5.
*/
const int GLOBAL_RXN = 30;

Expand Down
14 changes: 14 additions & 0 deletions src/kinetics/Reaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -860,12 +860,20 @@ void setupElectrochemicalReaction(ElectrochemicalReaction& R,
std::string type = toLowerCopy(rxn_node["type"]);
if (type == "butlervolmer") {
R.reaction_type = BUTLERVOLMER_RXN;
warn_deprecated("reaction type 'ButlerVolmer'",
"To be removed after Cantera 2.5.");
} else if (type == "butlervolmer_noactivitycoeffs") {
R.reaction_type = BUTLERVOLMER_NOACTIVITYCOEFFS_RXN;
warn_deprecated("reaction type 'butlervolmer_noactivitycoeffs'",
"To be removed after Cantera 2.5.");
} else if (type == "surfaceaffinity") {
R.reaction_type = SURFACEAFFINITY_RXN;
warn_deprecated("reaction type 'surfaceaffinity'",
"To be removed after Cantera 2.5.");
} else if (type == "global") {
R.reaction_type = GLOBAL_RXN;
warn_deprecated("reaction type 'global'",
"To be removed after Cantera 2.5.");
}

XML_Node& rc = rxn_node.child("rateCoeff");
Expand All @@ -884,6 +892,10 @@ void setupElectrochemicalReaction(ElectrochemicalReaction& R,
R.beta = fpValueCheck(rc.child("electrochem")["beta"]);
}

if (rxn_node.hasChild("filmResistivity")) {
warn_deprecated("reaction filmResistivity",
"Not implemented. To be removed after Cantera 2.5.");
}
getOptionalFloat(rxn_node, "filmResistivity", R.film_resistivity);
setupInterfaceReaction(R, rxn_node);

Expand All @@ -908,6 +920,8 @@ void setupElectrochemicalReaction(ElectrochemicalReaction& R,

// For affinity reactions, fill in the global reaction formulation terms
if (rxn_node.hasChild("reactionOrderFormulation")) {
warn_deprecated("reactionOrderFormulation",
"To be removed after Cantera 2.5.");
Composition initial_orders = R.orders;
R.orders.clear();
R.allow_nonreactant_orders = true;
Expand Down

0 comments on commit 8d18757

Please sign in to comment.