Skip to main content

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

peritheos-0.2.0.tar.gz (19.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

peritheos-0.2.0-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

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

Hashes for peritheos-0.2.0.tar.gz
Algorithm Hash digest
SHA256 cc17ed7543e71b00011d621a8d675236c93150eed457f6dd4f861b3e9d9fba84
MD5 7220b51e3bfa7d90a3c42f37c5da735e
BLAKE2b-256 7d7f581b1cae124d67bfc24353f1ada883becba9165ee25e4d7aa62985a6d7ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for peritheos-0.2.0.tar.gz:

Publisher: publish.yml on CPrescher/peritheos

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for peritheos-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7775792cac882623b3770b7357df4bdc7e52289d449ec9b963dd611c2c32cc99
MD5 122e8b39f0df316d7214aa63f14a630f
BLAKE2b-256 9fbc783c1df16d4c21d524a53b1e662a3d61c886d5c50d8aa6311c5747b37774

See more details on using hashes here.

Provenance

The following attestation bundles were made for peritheos-0.2.0-py3-none-any.whl:

Publisher: publish.yml on CPrescher/peritheos

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page