Fix open WaterPropsIAPWS issues / add WaterSSTP as alternative Water backend#921
Conversation
45c9a0e to
422792c
Compare
Codecov Report
@@ Coverage Diff @@
## main #921 +/- ##
==========================================
+ Coverage 71.26% 71.28% +0.02%
==========================================
Files 377 377
Lines 46299 46323 +24
==========================================
+ Hits 32993 33020 +27
+ Misses 13306 13303 -3
Continue to review full report at Codecov.
|
speth
left a comment
There was a problem hiding this comment.
While I appreciate some of the improvements here, and think they're worth including, I am concerned about making the current implementation of the IAPWS95 equation of state more user accessible because it is so incomplete when it comes to the two phase and vapor regions. Without being able to handle those portions of the phase diagram, I don't think it makes sense to include a phase definition in liquidvapor.yaml.
And given the prospect of using CoolProp (Cantera/enhancements#35), I'm not sure it would be worth extending the implementation of this phase definition to handle those regions.
fa548e2 to
d5c5d1b
Compare
|
@speth ... thank you for the review! I believe all is taken care of ... see 1069692
With the changes of this PR, appropriate errors are raised if a user attempts to set a state outside of the permissible region (and it's only possible to deactivate in C++, where caveats are now clearly stated). Since
I personally agree, but am not sure what will become of |
9c83577 to
1069692
Compare
|
A small change takes care of #577. The updated Python |
|
Inactive for 3 months - closing. |
|
Based on a UG post there may be value in wrapping this up after all |
1a644ff to
79e3616
Compare
|
@bryanwweber and @speth ... let me know if this is of interest for 2.5 (I believe all feedback is taken care of). It’s the last of my pending PRs. |
- Docstrings are updated to include information already available in MATLAB (or C++ base classes)
Co-authored by: Shekhar Shukla <47356149+24sharkS@users.noreply.github.com>
While the current 'liquid-water-IAPWS95' thermo model only implements liquid (and supercritical) states, the underlying IAPWS formulation can be extended beyond in future revisions. - avoid 'liquid' as part of the nomenclature - YAML phase name is updated to `water-iapws95` - Instead of creating a new wrapper, `iapws95` is added as an alternative backend to the existing `Water` class
Some initial guesses fail (see GitHUb issue Cantera#577, or starting with an initial density guess equl to the critical density); running an alternative initial guess prevents spurious failures (fix is a band-aid).
79e3616 to
4b3bf78
Compare
|
.... Triggering CI |
speth
left a comment
There was a problem hiding this comment.
Overall, I think this looks pretty good. I'm happy to merge this pending my one suggestion below.
|
@speth ... thanks for the review (and the ones that came before) as well as all the work towards 2.5 ... |
|
No problem. As you can tell from some of the recent activity, @bryanwweber and I are just working out the last few things that need to be taken care of for the 2.5.0 release. |
There are some open issues with
WaterPropsIAWSS; adding access toWaterSSTPvia an alternative backend to theWaterwrapper facilitates interactions with underlying C++ objects.The
WaterPropsIAPWShelper classes implement a highly accurate Industrial Formulation for the equation of state for pure water, which is currently used byWaterSSTPandPDSS_Waterclasses. The former is loadable via YAML as part of theThermoFactoryapproach, but only implements the liquid portion. Per @bryanwweber ’s observations (in #721):The current loader is cumbersome and involves a custom input file, e.g.
from within the cantera source folder (see #721), i.e. suitable input files aren’t distributed outside the test suite. The proposed change enables loading of the
WaterSSTPmodel viawhile the existing behavior remains the default. Beyond, this PR also fixes some open issues.
Changes proposed in this pull request
liquid-water-IAPWS95toliquidvapor.yamlbackend=iawps95switch to the existing PythonWaterinterface to facilitate usage to theliquid-water-IAPWS95thermo model; the existing behavior corresponds tobackend=defaultWaterSSTPhelper classes (based on @24sharkS 's solution in Improve WaterSSTP helper class documentation. #809)WaterSSTPremains liquid (or supercritical) - this checks the classical criterion for saturated conditions.If applicable, fill in the issue number this pull request is fixing
Fixes #577, fixes #646, fixes #721
Related Issues
Cantera/enhancements#6, #809
Checklist
scons build&scons test) and unit tests address code coverageOther thoughts
backends for existing wrapper objects, see Implement an interface to the CoolProp library enhancements#35.