Skip to content

Sticking species not detected correctly when ‘solid’ species are involved #1210

@ischoegl

Description

@ischoegl

Problem description

Steps to reproduce

Convert haca2.cti (CTI file pulled verbatim from Cantera 2.5.1)

Open interface as:

In [1]: import cantera as ct
   ...: 
   ...: phase = ct.Interface("haca2.yaml", "soot_interface")
---------------------------------------------------------------------------
CanteraError                              Traceback (most recent call last)
Input In [2], in <module>
      1 import cantera as ct
----> 3 phase = ct.Interface("haca2.yaml", "soot_interface")

File /work/GitHub/cantera/interfaces/cython/cantera/base.pyx:63, in cantera._cantera._SolutionBase.__cinit__()

File /work/GitHub/cantera/interfaces/cython/cantera/base.pyx:120, in cantera._cantera._SolutionBase._cinit()

File /work/GitHub/cantera/interfaces/cython/cantera/base.pyx:207, in cantera._cantera._SolutionBase._init_yaml()

CanteraError: 
*******************************************************************************
CanteraError thrown by addReactions:

*******************************************************************************
InputFileError thrown by InterfaceKinetics::buildSurfaceArrhenius:
Error on line 89 of ./haca2.yaml:
Multiple non-interface species ('CB-CB3' and 'OH')
found in sticking reaction: 'CB-CB3 + Csoot-H + OH => CO + Csoot-* + H2'.
Sticking species must be explicitly specified.
|  Line |
|    84 |   rate-constant: {A: 2.0e+13, b: 0.0, Ea: 0.0}
|    85 | - equation: Csoot-* + C2H2 => Csoot-H + H + 2 CB-CB3  # Reaction 6
|    86 |   rate-constant: {A: 8.0e+07, b: 1.56, Ea: 3.8}
|    87 | - equation: Csoot-* + O2 + 2 CB-CB3 => Csoot-* + 2 CO  # Reaction 7
|    88 |   rate-constant: {A: 2.2e+12, b: 0.0, Ea: 7.5}
>    89 > - equation: OH + Csoot-H + CB-CB3 => Csoot-* + CO + H2  # Reaction 8
            ^
|    90 |   sticking-coefficient: {A: 0.13, b: 0.0, Ea: 0.0}
*******************************************************************************
*******************************************************************************

Behavior

presumably the original CTI input file is valid (it has been part of the test suite), so it is not entirely clear what is going on … it looks like an issue with the logic in the validation of the sticking species that somehow has evaded detection: it probably should only consider gas phases?

System information

  • Cantera version: 2.6.0a4
  • OS: any
  • Python/MATLAB/other software versions: Python 3.10 (conda)

Additional context

Issue was found when working on #1205

Resolution is contingent on #1181, and can be incorporated into #1205 [Edit: the unit test using haca2 bypasses the (newly introduced) validation step, so this issue doesn't need to be resolved for #1205]

As a reference, the sticking species is (presumably manually) added in the current ‘official’ YAML file https://github.com/Cantera/cantera/blob/main/test_problems/surfSolverTest/haca2.yaml

Possible Solutions

  1. Add detection and specification of sticking species to cti2yaml
  2. Only consider species that are in the gas phase in InterfaceKinetics::buildSurfaceArrhenius

I believe (2) is both more robust and easier to implement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    InputInput parsing and conversion (for example, ck2yaml)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions