Skip to content

Fix using reactors with both surface and gas phase chemistry with YAML input#981

Merged
bryanwweber merged 2 commits into
Cantera:mainfrom
speth:fix-surfreactor-yaml
Mar 19, 2021
Merged

Fix using reactors with both surface and gas phase chemistry with YAML input#981
bryanwweber merged 2 commits into
Cantera:mainfrom
speth:fix-surfreactor-yaml

Conversation

@speth
Copy link
Copy Markdown
Member

@speth speth commented Feb 19, 2021

Changes proposed in this pull request

  • Remove check that gas phase is the first phase in a reactor surface InterfaceKinetics object
  • Change a regression test to exercise the case where this condition is not met

The functions for creating InterfaceKinetics objects from YAML input files results in having the surface (reacting) phase as the first phase, in contrast to the functions for creating these objects from CTI/XML files, which put the surface last. This led to a few errors as identified by @ischoegl, which were fixed by @bryanwweber in #905.

However, there was actually a check in Reactor::initialize that was meant to make sure that the InterfaceKinetics object was ordered such that the gas phase came first, as would occur with CTI input files. It just turns out that the examples which were exercising this only include reactors where there are no gas phase reactions, and this check was erroneously not running in that case. But thanks to #905, we can remove it now. I noticed this problem while trying to run the Matlab surfreactor.m example.

Checklist

  • There is a clear use-case for this code change
  • The commit message has a short title & references relevant issues
  • Build passes (scons build & scons test) and unit tests address code coverage
  • The pull request is ready for review

@speth speth changed the title Fix surfreactor yaml Fix using reactors with both surface and gas phase chemistry with YAML input Feb 19, 2021
@speth speth requested a review from bryanwweber March 19, 2021 00:16
@bryanwweber bryanwweber merged commit c6ff662 into Cantera:main Mar 19, 2021
@speth speth deleted the fix-surfreactor-yaml branch March 19, 2021 13:39
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

Successfully merging this pull request may close these issues.

2 participants