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

[Reactor] Use correct phase state after mass flow rate evaluation #651

Merged
merged 1 commit into from
Jun 27, 2019

Conversation

speth
Copy link
Member

@speth speth commented Jun 14, 2019

A user-defined mass flow rate function can modify the ThermoPhase object used by a reactor, for example if it depends on calculating some property of a different reactor. To make sure that the reactor governing equations are evaluated correctly, the ThermoPhase state needs to be set after all user-defined functions have been called.

Resolves a problem reported on the Cantera Users' Group.

A user-defined mass flow rate function can modify the ThermoPhase object used by
a reactor, for example if it depends on calculating some property of a different
reactor. To make sure that the reactor governing equations are evaluated
correctly, the ThermoPhase state needs to be set after all user-defined
functions have been called.
@codecov
Copy link

codecov bot commented Jun 14, 2019

Codecov Report

Merging #651 into master will increase coverage by <.01%.
The diff coverage is 91.89%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #651      +/-   ##
=========================================
+ Coverage   68.49%   68.5%   +<.01%     
=========================================
  Files         368     368              
  Lines       40027   40031       +4     
=========================================
+ Hits        27418   27424       +6     
+ Misses      12609   12607       -2
Impacted Files Coverage Δ
include/cantera/zeroD/ReactorBase.h 55.55% <ø> (ø) ⬆️
include/cantera/zeroD/Reactor.h 76.47% <ø> (ø) ⬆️
src/zeroD/IdealGasReactor.cpp 88.6% <100%> (-0.15%) ⬇️
src/zeroD/Reactor.cpp 84.58% <100%> (+0.26%) ⬆️
src/zeroD/ReactorBase.cpp 72.54% <100%> (+1.12%) ⬆️
src/zeroD/ConstPressureReactor.cpp 66.66% <75%> (+0.84%) ⬆️
src/zeroD/IdealGasConstPressureReactor.cpp 81.94% <83.33%> (ø) ⬆️
src/transport/GasTransport.cpp 90.98% <0%> (+0.2%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9a5c270...baa1f45. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Jun 14, 2019

Codecov Report

Merging #651 into master will increase coverage by <.01%.
The diff coverage is 91.89%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #651      +/-   ##
=========================================
+ Coverage   68.49%   68.5%   +<.01%     
=========================================
  Files         368     368              
  Lines       40027   40031       +4     
=========================================
+ Hits        27418   27424       +6     
+ Misses      12609   12607       -2
Impacted Files Coverage Δ
include/cantera/zeroD/ReactorBase.h 55.55% <ø> (ø) ⬆️
include/cantera/zeroD/Reactor.h 76.47% <ø> (ø) ⬆️
src/zeroD/IdealGasReactor.cpp 88.6% <100%> (-0.15%) ⬇️
src/zeroD/Reactor.cpp 84.58% <100%> (+0.26%) ⬆️
src/zeroD/ReactorBase.cpp 72.54% <100%> (+1.12%) ⬆️
src/zeroD/ConstPressureReactor.cpp 66.66% <75%> (+0.84%) ⬆️
src/zeroD/IdealGasConstPressureReactor.cpp 81.94% <83.33%> (ø) ⬆️
src/transport/GasTransport.cpp 90.98% <0%> (+0.2%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9a5c270...baa1f45. Read the comment docs.

@speth speth merged commit a247d0f into Cantera:master Jun 27, 2019
@speth speth deleted the fix-reactor-updates branch January 8, 2020 21: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.

1 participant