Skip to content

Commit

Permalink
Enabling charge-transfer/electrochemical surface reactions
Browse files Browse the repository at this point in the history
The previous formulation will only consider a rection as electrochemical
if a beta value is supplied for that reaction *and* the reaction is an
'edge_reaction.'  This is problematic for two reasons: (1) many/most
charge-transfer reactions of interest occur at two-phase boundaries (see,
for example, Li-ion batteries and PEM fuel cells), not the three-phase-
boundary-like edges (which are most relevant for SOFCs).  (2) determining
whether a reaction is electrochemical or not should not rely at all upon
user input - the program itself should check to see whether charge is
transferred between phases, and the appropriate steps should be taken
during rate-of-progress calcuations.

This commit addresses the former issue.  Currently, if a charge-transfer
reaction is written as a surface_reaction, the code does not apply the
voltage correction to the forward rate.  By default, then, the entire
voltage correction is applied to the reverse reaction, which is the same
as setting beta = 0; not a good 'default' behavior (beta = 0.5 is a more
appropriate default).  With this change, surface reactions can now be
supplied with a beta value in cti or xml formats, and will be recognized
as a charge transfer reaction.

Longer term, it would be better to change the constructor routines such
that charge transfer is automatically detected and handled, rather than
relying upon user-specified flags.
  • Loading branch information
decaluwe authored and speth committed Feb 26, 2017
1 parent f9d5f16 commit 51f419f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
12 changes: 10 additions & 2 deletions interfaces/cython/cantera/ctml_writer.py
Expand Up @@ -1296,7 +1296,7 @@ def build(self, p):
elif self._type == 'chebyshev':
self._kf = []

if self._type == 'edge':
if self._type == 'edge' or self._type == 'surface':
if self._beta > 0:
electro = kfnode.addChild('electrochem')
electro['beta'] = repr(self._beta)
Expand Down Expand Up @@ -1605,7 +1605,8 @@ class surface_reaction(reaction):
A heterogeneous chemical reaction with pressure-independent rate
coefficient and mass-action kinetics.
"""
def __init__(self, equation='', kf=None, id='', order='', options=[]):
def __init__(self, equation='', kf=None, id='', order='', beta = 0.0,
options=[]):
"""
:param equation:
A string specifying the chemical equation.
Expand All @@ -1625,9 +1626,16 @@ def __init__(self, equation='', kf=None, id='', order='', options=[]):
reaction in the file.
:param options:
Processing options, as described in :ref:`sec-reaction-options`.
:param beta:
Charge transfer coefficient: A number between 0 and 1 which, for a
charge transfer reaction, determines how much of the electric
potential difference between two phases is applied to the
activiation energy of the fwd reaction. The remainder is applied to
the reverse reaction.
"""
reaction.__init__(self, equation, kf, id, order, options)
self._type = 'surface'
self._beta = beta


class edge_reaction(reaction):
Expand Down
7 changes: 4 additions & 3 deletions src/kinetics/Reaction.cpp
Expand Up @@ -605,9 +605,10 @@ shared_ptr<Reaction> newReaction(const XML_Node& rxn_node)
{
std::string type = ba::to_lower_copy(rxn_node["type"]);

// Modify the reaction type for edge reactions which contain electrochemical
// reaction data
if (rxn_node.child("rateCoeff").hasChild("electrochem") && type == "edge") {
// Modify the reaction type for interface reactions which contain
// electrochemical reaction data
if (rxn_node.child("rateCoeff").hasChild("electrochem")
&& (type == "edge" || type == "surface")) {
type = "electrochemical";
}

Expand Down

0 comments on commit 51f419f

Please sign in to comment.