-
-
Notifications
You must be signed in to change notification settings - Fork 409
Description
In Reaction.cpp, there is a bit of processing of the XML reaction entry to extract the specific type of an electrochemical reaction:
cantera/src/kinetics/Reaction.cpp
Lines 859 to 869 in 719cb3d
| // Fix reaction_type for some specialized reaction types | |
| std::string type = toLowerCopy(rxn_node["type"]); | |
| if (type == "butlervolmer") { | |
| R.reaction_type = BUTLERVOLMER_RXN; | |
| } else if (type == "butlervolmer_noactivitycoeffs") { | |
| R.reaction_type = BUTLERVOLMER_NOACTIVITYCOEFFS_RXN; | |
| } else if (type == "surfaceaffinity") { | |
| R.reaction_type = SURFACEAFFINITY_RXN; | |
| } else if (type == "global") { | |
| R.reaction_type = GLOBAL_RXN; | |
| } |
I believe a relevant XML reaction entry should look like
<reaction ... type="butlervolmer">
...
</reaction>and similar for the other types in the C++ code. @decaluwe has suggested that the current method of specifying these reaction rate formalisms in the XML is somewhat tortured and should possibly be replaced, especially with the move to YAML input. There are currently no XML files in the Cantera repo that exercise the functionality present in the code snippet above, so there is no guarantee that they work as advertised.
I'm creating this issue to start the discussion about possibly deprecating and re-implementing (as necessary) these reaction rate types.