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

Incorrect implementation of internal energy in WaterSSTP (liquid-water-IAPWS95) #1315

Closed
speth opened this issue Jun 4, 2022 · 0 comments · Fixed by #1394
Closed

Incorrect implementation of internal energy in WaterSSTP (liquid-water-IAPWS95) #1315

speth opened this issue Jun 4, 2022 · 0 comments · Fixed by #1394

Comments

@speth
Copy link
Member

speth commented Jun 4, 2022

Problem description

Calculations of the internal energy in the WaterSSTP class (YAML model name liquid-water-IAPWS95) give thermodynamically inconsistent results, compared to using the identity u = h - P*v and du/dT = cv.

Steps to reproduce

>>> s = ct.PureFluid('liquidvapor.yaml', 'liquid-water-IAPWS95')
>>> s.TP = 360, 101325

>>> s.enthalpy_mole
-281174223.8705604

>>> s.int_energy_mole + s.P * s.volume_mole
-101223397991.49594

>>> cv1 = s.cv_mole
>>> u1 = s.int_energy_mole
>>> dT = 0.01
>>> T = 360
>>> s.TD = T + dT, None
>>> cv2 = s.cv_mole
>>> u2 = s.int_energy_mole
>>> 0.5 * (cv1 + cv2)
69121.5991841279

>>> (u2 - u1)/dT
-256291643.85375977

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.

speth added a commit to speth/cantera that referenced this issue Sep 25, 2022
speth added a commit to speth/cantera that referenced this issue Sep 25, 2022
The nondimensional EOS should always be dimensionalized to a mass
basis using the value of R given in the original source. Values on
a molar basis can then be computed consistently using the best available
value for the molecular weight of water.

Partially resolves Cantera#1315
speth added a commit to speth/cantera that referenced this issue Sep 25, 2022
The nondimensional EOS should always be dimensionalized to a mass
basis using the value of R given in the original source. Values on
a molar basis can then be computed consistently using the best available
value for the molecular weight of water.

Partially resolves Cantera#1315
speth added a commit that referenced this issue Sep 25, 2022
speth added a commit that referenced this issue Sep 25, 2022
The nondimensional EOS should always be dimensionalized to a mass
basis using the value of R given in the original source. Values on
a molar basis can then be computed consistently using the best available
value for the molecular weight of water.

Partially resolves #1315
jongyoonbae pushed a commit to jongyoonbae/cantera that referenced this issue Feb 2, 2023
jongyoonbae pushed a commit to jongyoonbae/cantera that referenced this issue Feb 2, 2023
The nondimensional EOS should always be dimensionalized to a mass
basis using the value of R given in the original source. Values on
a molar basis can then be computed consistently using the best available
value for the molecular weight of water.

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

Successfully merging a pull request may close this issue.

1 participant