Skip to content

[FIX] Correct melting and boiling points for Carbon allotropes#214

Merged
lmmentel merged 9 commits intomasterfrom
fix/melting-boling-points
Dec 28, 2024
Merged

[FIX] Correct melting and boiling points for Carbon allotropes#214
lmmentel merged 9 commits intomasterfrom
fix/melting-boling-points

Conversation

@lmmentel
Copy link
Copy Markdown
Owner

@lmmentel lmmentel commented Dec 22, 2024

Fixes #212

Proposed Changes

  • Drop melting points from PhaseTransition for carbon allotropes (graphite and diamond) since they are not at starndard pressueres.
  • Add is_sublimation_point to PhaseTransition where boiling point is a sublimation point
  • Add is_transition to PhaseTransition where melting point is a phase transition to the crystalline form.
  • Element.melting_point and Element.boiling_point consistently return either a float or None

After the changes

>>> from mendeleev import C
>>> print(C.melting_point)
None
>>> print(C.boiling_point)
4098.15
>>> print(C.phase_transitions)
[PhaseTransition(atomic_number=6, allotrope=graphite, melting_point=None, boiling_point=4098.15, triple_point_temperature=4762.15, triple_point_pressure=10300.0, critical_temperature=None, pritical_pressure=None, is_sublimation_point=True, is_transition=None)]

@lmmentel lmmentel self-assigned this Dec 22, 2024
@lmmentel lmmentel added data Data update bugfix labels Dec 22, 2024
@lmmentel lmmentel changed the title [FIX] Correct metling and boiling points for Carbon allotropes [FIX] Correct melting and boiling points for Carbon allotropes Dec 22, 2024
@property
def boiling_point(self) -> Union[float, Dict[str, float]]:
"""Boiling point"""
def boiling_point(self) -> float | None:

Check notice

Code scanning / CodeQL

Explicit returns mixed with implicit (fall through) returns

Mixing implicit and explicit returns may indicate an error as implicit returns always return None.
@property
def melting_point(self) -> Union[float, Dict[str, float]]:
"""Melting point"""
def melting_point(self) -> float | None:

Check notice

Code scanning / CodeQL

Explicit returns mixed with implicit (fall through) returns

Mixing implicit and explicit returns may indicate an error as implicit returns always return None.
@lmmentel lmmentel merged commit 3d4b1ca into master Dec 28, 2024
@lmmentel lmmentel deleted the fix/melting-boling-points branch December 28, 2024 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix data Data update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistent presentation of thermophysical properties

1 participant