-
-
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
Fix pressure dependence in IdealSolidSolnPhase::getPartialMolarEnthalpies #1087
Conversation
01b0710
to
6892199
Compare
Removing remnant code from a different update on another branch.
One question: I moved the "multiply by RT" step into the |
Codecov Report
@@ Coverage Diff @@
## main #1087 +/- ##
==========================================
+ Coverage 73.45% 73.46% +0.01%
==========================================
Files 362 364 +2
Lines 47554 47626 +72
==========================================
+ Hits 34929 34987 +58
- Misses 12625 12639 +14
Continue to review full report at Codecov.
|
FYI, I'm going to add a test to check that |
- Test that `enthalpy_mole = sum(X_k * h_k)` for `IdealSolidSolnPhase` class, where `X_k` is mole fraction and `h_k` partial molar enthalpy. - Also test the pressure independence of this equality, by verifying at pressures 1 atm and 2 atm.
Okay, once the tests finish running, this should be ready for review. |
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.
Looks good to me.
As to the question about calling scale
versus multiplying by RT()
inside the loop, I think the latter (as you've opted for) is better, as it involves only one loop -- the scale
function would have to loop internally anyway.
Changes proposed in this pull request
If applicable, fill in the issue number this pull request is fixing
Closes #1080
If applicable, provide an example illustrating new features this pull request is introducing
Previously, the partial molar enthalpies had no pressure dependence for this class. As a check, the sum of partial molar enthalpy times mole fraction should equal the average phase molar enthalpy. Prior to this change:
With the implemented correction:
Checklist
scons build
&scons test
) and unit tests address code coverage