Skip to content
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

LatticePhase partial molar property calculations are incorrect #1309

Open
speth opened this issue Jun 3, 2022 · 0 comments
Open

LatticePhase partial molar property calculations are incorrect #1309

speth opened this issue Jun 3, 2022 · 0 comments

Comments

@speth
Copy link
Member

speth commented Jun 3, 2022

Problem description

Although the calculation is often done separately for efficiency, the molar enthalpy, internal energy, entropy, Gibbs free energy, and volume should be equal to the mole fraction weighted sum of the corresponding partial molar properties. For LatticePhase, most of these do not agree. The partial_molar_enthalpies seem to be particularly bad.

Additionally, the implementations of getStandardChemPotentials and getGibbs_RT (which is supposed to calculated the nondimensional standard chemical potentials) are inconsistent.

Steps to reproduce

>>> p = ct.Solution('test/data/thermo-models.yaml', 'Li7Si3-interstitial')
>>> p.gibbs_mole, sum(p.X * p.chemical_potentials)
-349994.3375144891, -349042.0221149627)
>>> p.enthalpy_mole, sum(p.X * p.partial_molar_enthalpies)
(261425.4600475561, 174272.0)
>>> p.volume_mole, sum(p.X * p.partial_molar_volumes)
(0.09557086388415284, 0.09661515524531131)
>>> p.entropy_mole, sum(p.X * p.partial_molar_entropies)
(843.3376518097174, 843.3376518097147) # this one is OK
# partial_molar_int_energies is not implemented

System information

  • Cantera version: 2.6.0 or main at 1ab81ac

Additional context

This was discovered as part of #1299, which implements Cantera/enhancements#114.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

1 participant