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 not handling pressure dependent - multiple Arrhenius type reactions correctly #245

Open
lynnrinkui opened this issue Oct 6, 2022 · 1 comment

Comments

@lynnrinkui
Copy link

While modeling my combustion, I found there is one reaction in my kinetic library of the multiple Arrhenius type:
HCCO + OH <=> CO2 + CH2
which uses the sum of multiple k's as the rate constant

Screen Shot 2022-10-06 at 6 16 21 PM

RMG handled this incorrectly and split it into three duplicate reactions:

! Reaction index: Chemkin #374; RMG #3557
! Library reaction: NOx2018
OH(7)+HCCO(25)=CO2(19)+CH2(13) 1.000e+00 0.000 0.000
PLOG/ 0.100000 1.700e+15 -1.190 -0.521 /
PLOG/ 1.000000 7.200e+27 -5.023 2.468 /
PLOG/ 10.000000 1.000e+91 -20.137 114.841 /
DUPLICATE
! Reaction index: Chemkin #375; RMG #3557
! Library reaction: NOx2018
OH(7)+HCCO(25)=CO2(19)+CH2(13) 1.000e+00 0.000 0.000
PLOG/ 0.100000 -7.400e+17 -1.920 1.686 /
PLOG/ 1.000000 1.100e+21 -2.280 16.960 /
PLOG/ 10.000000 2.300e+65 -16.078 19.592 /
DUPLICATE
! Reaction index: Chemkin #376; RMG #3557
! Library reaction: NOx2018
OH(7)+HCCO(25)=CO2(19)+CH2(13) 1.000e+00 0.000 0.000
PLOG/ 0.010000 1.000e+19 -2.080 0.044 /
PLOG/ 0.100000 1.400e+19 -2.120 0.088 /
PLOG/ 1.000000 7.100e+19 -2.300 0.824 /
PLOG/ 10.000000 1.800e+20 -2.340 2.421 /
DUPLICATE

Apparently this has caused some trouble in my model as it has some very large values (1.000e+91, 2.300e+65). I have to delete them to avoid errors in my other tool, i.e., Cantera

@rwest
Copy link
Member

rwest commented Oct 6, 2022

Here's the entry in RMG-database: https://github.com/ReactionMechanismGenerator/RMG-database/blob/0de0ae134683ba83d89b06b22879e5f0cb41ef3a/input/kinetics/libraries/NOx2018/reactions.py#L8496

entry(
    index = 467,
    label = "HCCO + OH <=> CO2 + CH2",
    degeneracy = 1,
    duplicate = True,
    kinetics = MultiPDepArrhenius(
        arrhenius = [
            PDepArrhenius(
                pressures = ([0.1, 1, 10], 'atm'),
                arrhenius = [
                    Arrhenius(
                        A = (1.7e+15, 'cm^3/(mol*s)'),
                        n = -1.19,
                        Ea = (-521, 'cal/mol'),
                        T0 = (1, 'K'),
                    ),
                    Arrhenius(
                        A = (7.2e+27, 'cm^3/(mol*s)'),
                        n = -5.023,
                        Ea = (2468, 'cal/mol'),
                        T0 = (1, 'K'),
                    ),
                    Arrhenius(
                        A = (1e+91, 'cm^3/(mol*s)'),
                        n = -20.137,
                        Ea = (114841, 'cal/mol'),
                        T0 = (1, 'K'),
                    ),
                ],
            ),
            PDepArrhenius(
                pressures = ([0.1, 1, 10], 'atm'),
                arrhenius = [
                    Arrhenius(
                        A = (-7.4e+17, 'cm^3/(mol*s)'),
                        n = -1.92,
                        Ea = (1686, 'cal/mol'),
                        T0 = (1, 'K'),
                    ),
                    Arrhenius(
                        A = (1.1e+21, 'cm^3/(mol*s)'),
                        n = -2.28,
                        Ea = (16960, 'cal/mol'),
                        T0 = (1, 'K'),
                    ),
                    Arrhenius(
                        A = (2.3e+65, 'cm^3/(mol*s)'),
                        n = -16.078,
                        Ea = (19592, 'cal/mol'),
                        T0 = (1, 'K'),
                    ),
                ],
            ),
            PDepArrhenius(
                pressures = ([0.01, 0.1, 1, 10], 'atm'),
                arrhenius = [
                    Arrhenius(A=(1e+19, 'cm^3/(mol*s)'), n=-2.08, Ea=(44, 'cal/mol'), T0=(1, 'K')),
                    Arrhenius(A=(1.4e+19, 'cm^3/(mol*s)'), n=-2.12, Ea=(88, 'cal/mol'), T0=(1, 'K')),
                    Arrhenius(A=(7.1e+19, 'cm^3/(mol*s)'), n=-2.3, Ea=(824, 'cal/mol'), T0=(1, 'K')),
                    Arrhenius(
                        A = (1.8e+20, 'cm^3/(mol*s)'),
                        n = -2.34,
                        Ea = (2421, 'cal/mol'),
                        T0 = (1, 'K'),
                    ),
                ],
            ),
        ],
    ),
)

and here is the extract from the original CHEMKIN file from https://doi.org/10.1016/j.pecs.2018.01.002

HCCO+OH=CO2+CH2		             7.2E27   -5.023   2468 ! 1 atm
!PLOG / 0.01                          3.4E14  -1.400    1240 / !results in negative rate constant
PLOG / 0.1                           1.7E15  -1.190    -521 /
!PLOG / 1                             9.3E15  -0.970    -309 / !replaced convergence trouble 
PLOG/  1.00                          7.2E27   -5.023   2468 / !refit 
PLOG/  10.00                         1.0E91  -20.137 114841 / !refit 
!PLOG / 10                            6.0E15  -0.640     363 /
!PLOG / 100                           1.0E14   0.060     447 / !results in negative rate constant
 DUPLICATE
HCCO+OH=CO2+CH2		             1.1E21   -2.280  16960 ! 1 atm
!PLOG / 0.01                         -3.3E17  -2.220    3684 /
PLOG / 0.1                          -7.4E17  -1.920    1686 /
!PLOG / 1                            -5.3E18  -1.740    2024 /
PLOG/  1.00                          1.1E21   -2.280  16960 / !Average (max) fitting error: 0.6% (3.2%) over T of 400--3000 [K] 
PLOG/  10.00                         2.3E65  -16.078  19592 / 
!PLOG / 10                           -2.6E19  -1.640    3539 /
!PLOG / 100                          -5.6E19  -1.510    5657 /
 DUPLICATE
! Xiong et al., Combust. Flame 161 (2014) 885�897
! ASSUMING 3-CHCOOH = 1-CHCOOH ==fast==> CO2+CH2
 DUPLICATE
HCCO+OH=CO2+CH2		             7.1E19  -2.300     824 ! 1 atm
PLOG / 0.01                          1.0E19  -2.080      44  /
PLOG / 0.1                           1.4E19  -2.120      88  /
PLOG / 1                             7.1E19  -2.300     824  /
PLOG / 10                            1.8E20  -2.340    2421  /
!PLOG / 100                           8.2E02   2.870      -3  / !results in negative rate constant
!PLOG / 100                          -2.3E24  -2.700   20416 /
! Xiong et al., Combust. Flame 161 (2014) 885�897
! ASSUMING 3-CHCOOH = 1-CHCOOH ==fast==> CO2+CH2
DUPLICATE

As you can see, the chemkin file is a bit of a confusing mess with many lines commented out.
But it also uses three duplicate reactions (although that is not needed for PLOG format).

So it's not clear yet what error, if any, RMG has made.
If you can figure out that there is one, and what it is, please do elucidate here!

It's quite possible that there is, because this type of thing is complicated (see ReactionMechanismGenerator/RMG-Py#1341 for example)

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