Skip to content

Commit

Permalink
Merge branch '7-constants'
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxcode123 committed Mar 19, 2024
2 parents 68cb1e9 + c7b5b77 commit ca85e21
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/property_utils/constants/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from property_utils.constants.constants import *
28 changes: 28 additions & 0 deletions src/property_utils/constants/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
from property_utils.properties.property import Property
from property_utils.units.units import (
EnergyUnit,
AmountUnit,
AbsoluteTemperatureUnit,
LengthUnit,
TimeUnit,
)

__all__ = [
"GLOBAL_GAS_CONSTANT",
"BOLTZMANN_CONSTANT",
"VACUUM_LIGHT_SPEED",
"AVOGADRO_NUMBER",
"PLANCK_CONSTANT",
"REDUCED_PLANCK_CONSTANT",
]

GLOBAL_GAS_CONSTANT = Property(
8.31446261815324, EnergyUnit.JOULE / AmountUnit.MOL / AbsoluteTemperatureUnit.KELVIN
)
BOLTZMANN_CONSTANT = Property(
1.380649e-13, EnergyUnit.JOULE / AbsoluteTemperatureUnit.KELVIN
)
VACUUM_LIGHT_SPEED = Property(299792458, LengthUnit.METER / TimeUnit.SECOND)
AVOGADRO_NUMBER = Property(6.02214076e23, AmountUnit.MOL.inverse())
PLANCK_CONSTANT = Property(6.62607015e-34, EnergyUnit.JOULE * TimeUnit.SECOND)
REDUCED_PLANCK_CONSTANT = Property(1.054571817e-34, EnergyUnit.JOULE * TimeUnit.SECOND)

0 comments on commit ca85e21

Please sign in to comment.