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

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.1.0.tar.gz (20.4 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.1.0-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file peritheos-0.1.0.tar.gz.

File metadata

  • Download URL: peritheos-0.1.0.tar.gz
  • Upload date:
  • Size: 20.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for peritheos-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6f94496fe2af4d854041e4a38021e6301f2b5dab2af7623902de1b25b1d13fda
MD5 8b5a9de2463a8384163b3fc8af9c1ca5
BLAKE2b-256 c9775ce490b66a5bb1c71b7d7a908b112bd1b5ff7c04b4c2fcac94bd3c970d5e

See more details on using hashes here.

Provenance

The following attestation bundles were made for peritheos-0.1.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.1.0-py3-none-any.whl.

File metadata

  • Download URL: peritheos-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.5 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 94f8e8c676178572f059df2df6b4ab77b8fa50ab8d6e2b51b9767817769c554f
MD5 dc32856fc1b7ee3f4480256a6943f5d1
BLAKE2b-256 1d78d882fcc7241d5c605e58584a31b42e74507551aebaaed258692ec2389d8b

See more details on using hashes here.

Provenance

The following attestation bundles were made for peritheos-0.1.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