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

Enabling beta = 0. #955

Merged
merged 2 commits into from
Jan 19, 2021
Merged

Enabling beta = 0. #955

merged 2 commits into from
Jan 19, 2021

Conversation

decaluwe
Copy link
Member

@decaluwe decaluwe commented Jan 9, 2021

Changes proposed in this pull request

  • For electrochemical reactions, changes the default beta value in ctml_writer.py to None, and checks to see if beta has been set to a value that is not None to detect an electrochemical reaction.
  • Previously, the default was beta = 0.0 which resulted in electrochemical reactions with beta = 0.0 not being detected, and therefore handled incorrectly.

If applicable, fill in the issue number this pull request is fixing

Fixes #954

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

Comment on lines 1325 to 1326
else:
self._beta = 0.0
Copy link
Member

@speth speth Jan 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's necessary to set a value for _beta here. This would just have the awkward effect of having the result of build change if it was called a second time (not that this actually happens in practice).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, thanks @speth. Just went in and corrected that.

@speth speth merged commit 5a47434 into Cantera:main Jan 19, 2021
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.

ctml_writer.py ignores beta=0 for electrochemical reactions
2 participants