-
-
Notifications
You must be signed in to change notification settings - Fork 353
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 IdealSolidSolnPhase and BinarySolutionTabulatedThermo #1442
Conversation
Tabulated molar volumes were not being included in YAML output
…hermo Calculate partial molar volumes based on linearly interpolated dV/dXtab rather than linearly interpolating the partial molar volumes themselves, which does not satisfy the identity Vm == sum(vm[k]*X[k]).
Codecov Report
@@ Coverage Diff @@
## main #1442 +/- ##
==========================================
+ Coverage 70.91% 70.93% +0.01%
==========================================
Files 369 369
Lines 55232 55235 +3
Branches 18196 18196
==========================================
+ Hits 39168 39179 +11
+ Misses 13602 13594 -8
Partials 2462 2462
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
I'm curious about this identity you mentioned: It seems like it should be sum V_(m, k) = V_m and V_(m, k) = X_k V_m, analogous to partial pressures. Is it because V_(m, k) is the partial molar volume? |
…Thermo Previously, calculations of partial molar enthalpies, entropies, and chemical potentials were using the pure-species molar volumes rather than the ones calculated by inverting the tabulated mixture molar volume.
…Thermo Fixes behavior when the tabulated species mole fraction has become 1.0 to within machine precision, while the other species mole fraction is not quite zero.
d60030e
to
ac60a59
Compare
Yes, I meant |
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.
As this fix is covered by thermodynamic consistency tests (which pass), I am approving.
Changes proposed in this pull request
BinarySolutionTabulatedThermo
to include tabulated molar volumesBinarySolutionTabulatedThermo
so calculated values are consistent with the identityIdealSolidSolnPhase::gibbs_mole
BinarySolutionTabulatedThermo
, use molar volumes corresponding to the current mole fractions when calculating other thermo propertiesIf applicable, fill in the issue number this pull request is fixing
Closes #1301
Closes #1302
I was hoping this would also address #1303, but I still have some questions on that one about what the model is actually supposed to be doing.
Checklist
scons build
&scons test
) and unit tests address code coverage