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

ideal-solution-vpss model with HKFT species thermo does not satisfy Maxwell relation #1318

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

Comments

@speth
Copy link
Member

speth commented Jun 6, 2022

Problem description

A phase using the ideal-solution-vpss thermo model (class IdealSolnGasVPSS) with the HKFT species thermo model does not satisfy the Maxwell relation based on the Gibbs free energy, that is ds/dP at constant T = - dv/dT at constant P. The discrepancies seem to grow as temperature increases.

Steps to reproduce

p = ct.Solution('test/data/pdss_hkft.yaml')
p.TPX = 360, 5*ct.one_atm, "H2O(L):0.6, Na+:0.2, Cl-:0.2"
s1 = p.entropy_mole
T1 = 360
P1 = 5*ct.one_atm
v1 = p.volume_mole
dP = 1e-6 * P1
dT = 1e-6 * T1
p.TP = T1 + dT, P1
v2 = p.volume_mole
p.TP = T1, P1 + dP
s2 = p.entropy_mole
print((s2-s1)/dP)
print(-(v2-v1)/dT)

Behavior

The output values differ by ~8% in this case.

6.083871037790048e-07
5.599036232721721e-07

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.

@ischoegl ischoegl moved this to In Progress in Cantera 3.0 Release Planning Jul 3, 2022
@ischoegl ischoegl moved this from In Progress to Todo in Cantera 3.0 Release Planning Jul 3, 2022
@speth speth moved this from Todo to Deferred in Cantera 3.0 Release Planning Jun 20, 2023
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