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

YAML surface phase requires kinetics model #1244

Closed
speth opened this issue Apr 16, 2022 · 0 comments · Fixed by #1247
Closed

YAML surface phase requires kinetics model #1244

speth opened this issue Apr 16, 2022 · 0 comments · Fixed by #1247
Assignees
Labels
Input Input parsing and conversion (for example, ck2yaml)

Comments

@speth
Copy link
Member

speth commented Apr 16, 2022

Problem description

For bulk phases, the default behavior if no kinetics field is specified in the YAML phase definition is to just instantiate the base Kinetics class. However, this does not work for interface phases.

Steps to reproduce

For the YAML input (say, test.yaml):

phases:
- name: test
  thermo: ideal-surface
  species: [{ptcombust.yaml/species: all}]
  state: {T: 300, P: 1 atm}

Importing in Python yields the exception:

p = ct.Solution("test.yaml")

File build/python/cantera/base.pyx:63, in cantera._cantera._SolutionBase.__cinit__()

File build/python/cantera/base.pyx:120, in cantera._cantera._SolutionBase._cinit()

File build/python/cantera/base.pyx:207, in cantera._cantera._SolutionBase._init_yaml()

CanteraError: 
*******************************************************************************
CanteraError thrown by Interface::setKinetics:
Kinetics object of type 'None' does not descend from InterfaceKinetics.
*******************************************************************************

Trying to load with ct.Interface yields the same exception.

In Cantera 2.5.1, loading the phase with ct.Solution worked, while using ct.Interface failed with the exception:

TypeError: Underlying Kinetics class is not of the correct type.

I expect that the same issue would occur using the C++ newInterface() constructor.

System information

  • Cantera version: 2.6.0b2 / e7b931b
  • OS: macOS 12.2, though I assume this is universal
  • Python/MATLAB/other software versions: Python 3.10
@speth speth added the Input Input parsing and conversion (for example, ck2yaml) label Apr 16, 2022
@ischoegl ischoegl self-assigned this Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Input Input parsing and conversion (for example, ck2yaml)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants