[Input] Allow "=" as a delimiter for reversible reactions in YAML

This commit is contained in:
Ray Speth 2019-01-10 22:56:19 -05:00
parent cae5c498ca
commit d7734e3f19
2 changed files with 4 additions and 4 deletions

View file

@ -446,7 +446,7 @@ void setupReaction(Reaction& R, const AnyMap& node)
bool reactants = true;
for (size_t i = 1; i < tokens.size(); i++) {
if (tokens[i] == "+" || ba::starts_with(tokens[i], "(+") ||
tokens[i] == "<=>" || tokens[i] == "=>") {
tokens[i] == "<=>" || tokens[i] == "=" || tokens[i] == "=>") {
std::string species = tokens[i-1];
double stoich;
@ -480,7 +480,7 @@ void setupReaction(Reaction& R, const AnyMap& node)
}
// Tokens after this point are part of the products string
if (tokens[i] == "<=>") {
if (tokens[i] == "<=>" || tokens[i] == "=") {
R.reversible = true;
reactants = false;
} else if (tokens[i] == "=>") {

View file

@ -32,7 +32,7 @@ TEST(Reaction, ThreeBodyFromYaml1)
{
IdealGasMix gas("gri30.xml");
AnyMap rxn = AnyMap::fromYamlString(
"{equation: 2 O + M <=> O2 + M,"
"{equation: 2 O + M = O2 + M,"
" type: three-body,"
" rate-constant: [1.20000E+17 cm^6/mol^2/s, -1, 0],"
" efficiencies: {AR: 0.83, H2O: 5}}");
@ -61,7 +61,7 @@ TEST(Reaction, FalloffFromYaml1)
{
IdealGasMix gas("gri30.xml");
AnyMap rxn = AnyMap::fromYamlString(
"{equation: N2O (+M) <=> N2 + O (+ M),"
"{equation: N2O (+M) = N2 + O (+ M),"
" type: falloff,"
" high-P-rate-constant: [7.91000E+10, 0, 56020],"
" low-P-rate-constant: [6.37000E+14, 0, 56640],"