-
-
Notifications
You must be signed in to change notification settings - Fork 349
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
Fix consistency issues with SurfPhase and RedlichKisterVPSSTP #1449
Conversation
Derivatives of the activity coefficients were being calculated incorrectly, leading to bad values for enthalpies, entropies, and specific heat capacities. Partially resolves Cantera#1320
Partially resolves Cantera#1320
The terms involving d(log(gamma))/dT and d^2(log(gamma))/dT cancel out, so there's not reason to calculate them.
Test phase with non-zero excess entropy, and with multiple interactions defined.
Codecov Report
@@ Coverage Diff @@
## main #1449 +/- ##
=======================================
Coverage 70.94% 70.94%
=======================================
Files 369 369
Lines 55259 55262 +3
Branches 18207 18213 +6
=======================================
+ Hits 39201 39207 +6
+ Misses 13593 13591 -2
+ Partials 2465 2464 -1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
PDSS_ConstVol now converts 'density' and 'molar-density' fields from the 'equation-of-state' field, making it consistent with other phases that support these options.
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.
@speth ... thanks for the bug fixes. As in #1442, these changes are covered by unit tests, so I am approving (the plots further illustrate that things work as expected).
As an aside, one comment I have about consistency checks is that it may be worthwhile separating them from the test-thermo
gtest runner, as the volume of output makes it hard to check on other thermo tests.
Changes proposed in this pull request
SurfPhase::partialMolarEntropies
to include concentration termSurfPhase::getChemPotentials
to avoid returninginf
RedlichKisterVPSSTP
RedlichKisterVPSSTP
that includes "excess entropy" terms and more than just a binary solution.RedlichKisterVPSSTP
density
andmolar-density
options inequation-of-state
fields for phases that usePDSS_ConstVol
.If applicable, fill in the issue number this pull request is fixing
Fixes #1313
Fixes #1314
Fixes #1320
If applicable, provide an example illustrating new features this pull request is introducing
Plots corresponding to those in #1320 with updated results:
Checklist
scons build
&scons test
) and unit tests address code coverage