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

Inconsistent presentation of thermophysical properties #212

Closed
ccokerlanl opened this issue Dec 4, 2024 · 6 comments · Fixed by #214
Closed

Inconsistent presentation of thermophysical properties #212

ccokerlanl opened this issue Dec 4, 2024 · 6 comments · Fixed by #214
Assignees
Labels
bug Something isn't working

Comments

@ccokerlanl
Copy link

ccokerlanl commented Dec 4, 2024

Description

The mendeleev Element object returns the melting and boiling temperatures, if they exist, at what appears to be the minimum pressure at which that phase transition may occur. As a result, the boiling point for carbon returned is less than the melting point for carbon. It is not clear to the user that this is the convention.

Current Behavior

Minimum Reproducible Example

Script

#!/usr/bin/env python
import mendeleev

# create element
carbon = mendeleev.element('C')

# print melting and boiling points
print(carbon.melting_point)
print(carbon.boiling_point)

Output

>>>{'graphite': 4762.15, 'diamond': 4713.15}
>>>{'graphite': 4098.15, 'diamond': None}

Discussion

Data from this Mendeleev carbon object present a boiling temperature (4762 K) for graphite that is lower than the its melting temperature for graphite (4098 K). According to the carbon phase diagram, Fig. 3 in [1], this melting temperature corresponds to the triple point (~10 GPa or ~100,000 atm), whereas the boiling temperature from this Mendeleev object appears to correspond to standard pressure (1 atm).

[1] Wang, X., Scandolo, S., & Car, R. (2005). Carbon Phase Diagram from Ab Initio Molecular Dynamics. Phys. Rev. Lett., 95, 185701.

Expected behavior

If the entire pressure-temperature phase relationship is not implemented, thermophysical properties (e.g. melt temperature, latent heat of fusion) are expected to be presented for standard pressure (1 atm) unless otherwise specified. If such a phase transition does not exist at standard pressure (e.g. carbon melt point), the thermophysical property should return None (or perhaps NaN or Inf if that is more useful).

Compute Environment Specification

  • mendleev version 0.17
  • python version 3.12.7
  • RHEL
@ccokerlanl ccokerlanl added the bug Something isn't working label Dec 4, 2024
@ccokerlanl ccokerlanl changed the title Inconsistent presentation ofthermophysicalproperties Inconsistent presentation of thermophysicalproperties Dec 4, 2024
@ccokerlanl
Copy link
Author

Edit: Fixed a typo.

@ccokerlanl
Copy link
Author

Edit: added a discussion and reference to the example.

@ccokerlanl
Copy link
Author

Edit: fixed markdown heading levels.

@lmmentel
Copy link
Owner

Thanks, I'll have a look.

@lmmentel lmmentel self-assigned this Dec 18, 2024
@lmmentel
Copy link
Owner

I've verified that indeed the melting and boiling point might be misleading. The values are taken straight from the PhaseTransition object but the crucial context is missing. It'll be safer to return None in those cases and leave users to dig through PhaseTransition data for further details.

@lmmentel
Copy link
Owner

Have a look at the PR #214 for the fix. I ended up dropping data for diamond since there was nothing available at the source at std conditions. There is a small example illustrating the changes, appreciate any feedback if that works.

@lmmentel lmmentel changed the title Inconsistent presentation of thermophysicalproperties Inconsistent presentation of thermophysical properties Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants