Fix pressure dependence in IdealSolidSolnPhase::getPartialMolarEnthalpies#1087
Fix pressure dependence in IdealSolidSolnPhase::getPartialMolarEnthalpies#1087speth merged 3 commits intoCantera:mainfrom
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. |
speth
left a comment
There was a problem hiding this comment.
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