-
-
Notifications
You must be signed in to change notification settings - Fork 346
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
Deprecate redundant ThermoPhase classes #787
Conversation
Codecov Report
@@ Coverage Diff @@
## master #787 +/- ##
==========================================
- Coverage 71.45% 71.43% -0.03%
==========================================
Files 372 372
Lines 43522 43547 +25
==========================================
+ Hits 31098 31106 +8
- Misses 12424 12441 +17
Continue to review full report at Codecov.
|
src/thermo/FixedChemPotSSTP.cpp
Outdated
importPhase(xmlphase, this); | ||
} | ||
|
||
FixedChemPotSSTP::FixedChemPotSSTP(const std::string& Ename, doublereal val) : | ||
chemPot_(0.0) | ||
{ | ||
warn_deprecated("classFixedChemPotSSTP", "To be removed after Cantera 2.5. " | ||
"Use class StoichSubstance with a Mu0Poly (piecewise-Gibbs) species " | ||
"thermo model"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this deprecated
message different from the others?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a copy paste error, but still incorrect. I had initially thought that Mu0Poly
was the species thermo model that could be used here, but the constant-cp
model is actually the one that has the same behavior as this class.
Hi @speth - sorry for the time it took me to look at this. I feel like we discussed this at the steering committee meeting, and from what I remember these classes are indeed largely redundant. The specific changes all look good to me.
|
This model can easily be replaced with StoichSustance using ConstCpPoly for the species thermo. The changed values in the LiSi regression tests suggest that there are some implementation errors in the FixedChemPotSSTP class which will be automatically resolved by eliminating it.
9ba7926
to
d2608d9
Compare
The internal energy values change because the
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. A few general questions, but I'm guessing there are no real issues, here.
-
So a general question: am I correct that VPSS stands for "variable pressure standard state" (i.e. the standard state depends on both temperature and pressure? If so,
a. This seems coincidentally relevant to issue IdealGasPhase getStandardChemPotentials #841 that I added yesterday (i.e. this PR provides insight on that issue, not vice-versa), and
b. I wonder if there is any reason a user would want to have this as a separate option? The actual phase behavior between
IdealGasPhase
and thegas
option forIdealSolnGasVPSS
would be exactly the same, it seems; is there any benefit to the user to having the standard state be pressure sensitive? Would they ever want to interrogate that property? My guess:- No.
- Even if so, the benefit and degree of interest in this capability would be so minimal that this PR is still the right move.
-
Now that I'm thinking about this a little more, are the solid and liquid options here also redundant? It seems like they might duplicate
IdealSolidSolution
? Just a hunch. Side note: I'll also note that there's no real reason to have theSolid
as part of this latter class's name. I've found it just as useful for liquid solutions. But I digress...
Assuming the answers to the above are what I think they are, this looks like it's ready to go.
Thanks!
Yes. I think this name is a bit of a misnomer, however, compared to what the class actually does.
Let's deal with that elsewhere.
Well, as far as I can tell, both
The |
It seems like this PR reverted to SUNDIALS 5.0.0. Was that intentional? |
No, obviously not. Fix pushed directly to master (5ae37ad). |
scons build
&scons test
) and unit tests address code coverageChanges proposed in this pull request
IdealSolnGasVPSS
- this mode duplicates the more widely-usedIdealGasPhase
class.FixedChemPotSSTP
- this class can be easily replaced using theStoichSubstance
class with aConstCpPoly
species thermo object.