-
-
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
IdealSolidSolnPhase::getPartialMolarEnthalpies - needs pressure dependence? #1080
Comments
Seems correct to me. If you follow through the more convoluted logic for the similar |
Sorry if this is dense, but: "seems correct to me" meaning "the current implementation seems correct," or "your critique seems correct?" 🙄 Since import cantera as ct
import numpy as np
gas = ct.Solution('IdealSolidSolnPhaseExample.yaml',"solidSolutionExample")
# At standard pressure: h_mole = sum(X_k*h_k)
h_mole = gas.enthalpy_mole
h_k = gas.partial_molar_enthalpies
h_check = np.dot(h_k,gas.X)
print(h_mole, h_check)
5895465.481744414 5895465.481744414
# At non-standard pressure, h_mole shows the correct pressure dependence, but the partial molar enthalpies do not:
gas.TP = None, 3*ct.one_atm
h_mole = gas.enthalpy_mole
h_k = gas.partial_molar_enthalpies
h_check = np.dot(h_k,gas.X)
print(h_mole, h_check)
6199440.481744414 5895465.481744414 When I originally created this issue, I thought we were considering folding |
Yes, I meant your interpretation seems correct and |
lol, thanks for the confirmation :) |
Problem description
The
getPartialMolarEnthalpies
routine inIdealSolidSolnPhase
would appear to be missing the required pressure dependence implemented elsewhere in the model.All other enthalpy (and, by association, chemical potential) calculations involve some form of
(P - Pref)*molarVolume
(wheremolarVolume
is of either the phase or the individual species).IdealSolidSolnPhase::getPartialMolarEnthalpies
does not:I think this ought to be replaced with:
System information
Wanted to check if I was missing something, before fixing it.
The text was updated successfully, but these errors were encountered: