Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RMG includes duplicate reaction paths for ThirdBody reactions #2742

Open
rwest opened this issue Dec 4, 2024 · 1 comment
Open

RMG includes duplicate reaction paths for ThirdBody reactions #2742

rwest opened this issue Dec 4, 2024 · 1 comment

Comments

@rwest
Copy link
Member

rwest commented Dec 4, 2024

Bug Description

If you request two reaction libraries and the same reaction appears in both, then only the one from the library you listed first should be included. For some types of reactions RMG includes both (which is then detected as an error with undeclared duplicates by Cantera).

For example,
BurkeH2O2inN2 represents H + H + M <=> H2 + M like this

entry(
    index = 5,
    label = "H2 <=> H + H",
    degeneracy = 1,
    kinetics = ThirdBody(
        arrheniusLow = Arrhenius(A=(4.577e+19, 'cm^3/(mol*s)'), n=-1.40, Ea=(104380, 'cal/mol'), T0 = (1, 'K')),
        efficiencies = {'[H][H]': 2.5, 'O': 12, '[C-]#[O+]': 1.9, 'O=C=O': 3.8, '[Ar]': 0, '[He]': 0},
    ),
    shortDesc = u"""Tsang and Hampson, J. Phys. Chem. Ref. Data, 15:1087 (1986)""",
)

entry(
    index = 6,
    label = "H2 + Ar <=> H + H + Ar",
    degeneracy = 1,
    kinetics = Arrhenius(A=(5.84e+18, 'cm^3/(mol*s)'), n=-1.10, Ea=(104380, 'cal/mol'), T0 = (1, 'K')),
    shortDesc = u"""Tsang and Hampson, J. Phys. Chem. Ref. Data, 15:1087 (1986)""",
)

entry(
    index = 7,
    label = "H2 + He <=> H + H + He",
    degeneracy = 1,
    kinetics = Arrhenius(A=(5.84e+18, 'cm^3/(mol*s)'), n=-1.10, Ea=(104380, 'cal/mol'), T0 = (1, 'K')),
    shortDesc = u"""Tsang and Hampson, J. Phys. Chem. Ref. Data, 15:1087 (1986)""",
)

Ar and He are special cases with their own rate, and all other M are dealt with in the first reaction with ThirdBody kinetics (which explicitly says Ar and He have collision efficiencies of 0 to avoid double counting)

GRI Mech has this

entry(
    index = 33,
    label = "H + H + H2 <=> H2 + H2",
    degeneracy = 1,
    kinetics = Arrhenius(A=(9e+16, 'cm^6/(mol^2*s)'), n=-0.6, Ea=(0, 'cal/mol'), T0=(1, 'K')),
)

entry(
    index = 34,
    label = "H + H + H2O <=> H2 + H2O",
    degeneracy = 1,
    kinetics = Arrhenius(A=(6e+19, 'cm^6/(mol^2*s)'), n=-1.25, Ea=(0, 'cal/mol'), T0=(1, 'K')),
)

entry(
    index = 35,
    label = "H + H + CO2 <=> H2 + CO2",
    degeneracy = 1,
    kinetics = Arrhenius(A=(5.5e+20, 'cm^6/(mol^2*s)'), n=-2, Ea=(0, 'cal/mol'), T0=(1, 'K')),
)

entry(
    index = 176,
    label = "H + H <=> H2",
    degeneracy = 1,
    kinetics = ThirdBody(
        arrheniusLow = Arrhenius(A=(1e+18, 'cm^6/(mol^2*s)'), n=-1, Ea=(0, 'cal/mol'), T0=(1, 'K')),
        efficiencies = {'C': 2, 'O=C=O': 0, 'CC': 3, 'O': 0, '[H][H]': 0, '[Ar]': 0.63},
    ),
)

With H2, H2O, CO2 treated as special and everything else lumped.

If you tell RMG to use both BurkeH2O2inN2 (first choice) and also GRI-Mech3.0 then it includes all the Burke reactions (correctly) but then instead of realizing the H + H + H2, H + H + H2O, and H + H + CO2 reactions from GRI-Mech are already included (by Burke's H2+M reaction) it adds them also. Now those pathways are twice as fast as they should be.

Cantera correctly identifies these as unintended duplicates and complains when you try to validate the file.

How To Reproduce

Request BurkeH2O2inN2 (first choice) and also GRI-Mech3.0 as reaction libraries, build a combustion model, grab a chemkin file, run it though Cantera's ck2yaml.

Expected Behavior

If you request two reaction libraries and the same reaction appears in both only the one from the library you listed first should be included. RMG should detect that H + H + H2O <=> H2 + H2O is the same as H2 <=> H + H with ThirdBody kinetics and only include one of them.

Installation Information

Describe your installation method and system information.

  • OS (include version if known): linux
  • Installation method: from source with anaconda
  • RMG version information: November 2024

Additional Context

Apparently people have been using post-hoc scripts to add missing DUPLICATE tags to RMG-built chemkin files so they will run without Cantera complaining. But they have probably inadvertently been using reactions that are too fast.

This problem may not be limited to Reaction Libraries. The recognition that H + H + H2O <=> H2 + H2O is the same as H2 <=> H + H with ThirdBody kinetics should be generalized so reactions made by families and Pdep networks are also checked properly.

@mjohnson541
Copy link
Contributor

While H2 + H2O => 2 H + H2O may not be a legitimate reaction with its own transition state, A + B => B + C + D in general should be able to have a legitimate transition state. Families do not have ThirdBody kinetics or generate reactions that correspond to ThirdBody so I don't think this should be an issue for families assuming there is at least a pdep form for H2 <=> H + H in the library. @alongd is this the case?

Can we simply create a way to rewrite H + H + H2O <=> H2 + H2O as a third body H + H <=> H2 with zero efficiencies for everything except H2O and apply this across the libraries? This should resolve the above issue without causing problems with catalyzed reactions in libraries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants