Peritheos
A Python library for thermodynamic equations of state calculations for solid materials.
Features
- Room temperature equations of state (EOS) implementations
- Birch-Murnaghan
- Vinet
- Holzapfel
- Thermal equations of state (EOS) implementations
- Sokolova 2016, including its complete thermal-pressure parameter set
Unit conventions
- Public pressure and bulk-modulus values are in GPa.
- Temperatures are in K.
- Birch-Murnaghan and Vinet accept any consistent volume unit.
- Holzapfel and Sokolova 2016 require molar volume in J bar^-1, which is equivalent to cm^3/mol divided by 10.
Installation
pip install peritheos
The latest development version can instead be installed directly from GitHub:
pip install git+https://github.com/CPrescher/peritheos.git
Usage
Room-temperature equations of state
Third-order Birch-Murnaghan equation of state:
from peritheos.eos.rt import BM3
# V0 may use any volume unit for a room-temperature EOS; K0 is in GPa here.
eos = BM3(V0=50, K0=130, K0_prime=4.3)
# Calculate pressure and bulk modulus at a given volume.
pressure = eos.pressure(V=40)
bulk_modulus = eos.bulk_modulus(V=40)
# Invert the EOS to calculate volume at a given pressure.
volume = eos.volume(P=pressure)
print(f"Pressure: {pressure} GPa")
print(f"Bulk modulus: {bulk_modulus} GPa")
print(f"Recovered volume: {volume}")
Thermal equations of state
Diamond thermal equation of state from sokolova et al. 2016
from peritheos.eos.rt.holzapfel import Holzapfel
from peritheos.eos.thermal.sokolova2016 import Sokolova2016
# Diamond parameters from Sokolova et al. 2016.
# The thermal model requires molar volume in J bar^-1 (= [cm^3/mol] / 10),
# pressure parameters in GPa, and temperatures in K.
V0 = 0.3414
K0 = 441.5
K0_prime = 3.9 # pressure derivative of bulk modulus at reference volume
QE1o = 684 # first Einstein characteristic temperature
mE1 = 0.564 # first Einstein number
QE2o = 1561 # second Einstein characteristic temperature
mE2 = 2.436 # second Einstein number
delta = -0.506 # additive normalizing constant for the Gruneisen parameter
t = 1.085 # generalized Gruneisen parameter
a_0 = 0 # intrinsic anharmonicity parameter
m = 0 # anharmonic analogue of the Grüneisen parameter
e_0 = 0 # free electrons parameter
g = 0 # electronic analogue of the Grüneisen parameter
n = 1 # number of atoms in the formula unit
z = 6 # atomic number of the formula unit
Tr = 298.15 # in K - Reference temperature
# Initialize the Holzapfel EOS
holzapfel = Holzapfel(V0=V0, K0=K0, K0_prime=K0_prime, n=n, Z=z)
# Initialize the Sokolova 2016 EOS
sokolova = Sokolova2016(
rt_eos=holzapfel,
Tr=Tr,
QE1o=QE1o,
mE1=mE1,
QE2o=QE2o,
mE2=mE2,
delta=delta,
t=t,
a_0=a_0,
m=m,
g=g,
e_0=e_0,
)
# Calculate the thermal pressure at a given volume and temperature
V = V0 * 0.8
T = 3000 # in K
thermal_pressure = sokolova.thermal_pressure(V, T)
rt_pressure = holzapfel.pressure(V)
pressure = sokolova.pressure(V, T)
recovered_volume = sokolova.volume(pressure, T)
print(f"Thermal pressure: {thermal_pressure} GPa")
print(f"RT pressure: {rt_pressure} GPa")
print(f"Total pressure: {pressure} GPa")
print(f"Recovered volume: {recovered_volume} J bar^-1")
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file peritheos-0.2.0.tar.gz.
File metadata
- Download URL: peritheos-0.2.0.tar.gz
- Upload date:
- Size: 19.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc17ed7543e71b00011d621a8d675236c93150eed457f6dd4f861b3e9d9fba84
|
|
| MD5 |
7220b51e3bfa7d90a3c42f37c5da735e
|
|
| BLAKE2b-256 |
7d7f581b1cae124d67bfc24353f1ada883becba9165ee25e4d7aa62985a6d7ba
|
Provenance
The following attestation bundles were made for peritheos-0.2.0.tar.gz:
Publisher:
publish.yml on CPrescher/peritheos
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
peritheos-0.2.0.tar.gz -
Subject digest:
cc17ed7543e71b00011d621a8d675236c93150eed457f6dd4f861b3e9d9fba84 - Sigstore transparency entry: 2370618485
- Sigstore integration time:
-
Permalink:
CPrescher/peritheos@47c0695cbf5beae5ce58b95491cc3f4370d88ff2 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/CPrescher
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@47c0695cbf5beae5ce58b95491cc3f4370d88ff2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file peritheos-0.2.0-py3-none-any.whl.
File metadata
- Download URL: peritheos-0.2.0-py3-none-any.whl
- Upload date:
- Size: 16.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7775792cac882623b3770b7357df4bdc7e52289d449ec9b963dd611c2c32cc99
|
|
| MD5 |
122e8b39f0df316d7214aa63f14a630f
|
|
| BLAKE2b-256 |
9fbc783c1df16d4c21d524a53b1e662a3d61c886d5c50d8aa6311c5747b37774
|
Provenance
The following attestation bundles were made for peritheos-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on CPrescher/peritheos
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
peritheos-0.2.0-py3-none-any.whl -
Subject digest:
7775792cac882623b3770b7357df4bdc7e52289d449ec9b963dd611c2c32cc99 - Sigstore transparency entry: 2370618584
- Sigstore integration time:
-
Permalink:
CPrescher/peritheos@47c0695cbf5beae5ce58b95491cc3f4370d88ff2 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/CPrescher
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@47c0695cbf5beae5ce58b95491cc3f4370d88ff2 -
Trigger Event:
push
-
Statement type: