peritheos 0.2.0__tar.gz → 0.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- peritheos-0.5.0/CHANGELOG.md +149 -0
- peritheos-0.5.0/CITATION.cff +20 -0
- peritheos-0.5.0/CODE_OF_CONDUCT.md +19 -0
- peritheos-0.5.0/CONTRIBUTING.md +46 -0
- peritheos-0.5.0/MANIFEST.in +9 -0
- {peritheos-0.2.0 → peritheos-0.5.0}/PKG-INFO +76 -7
- {peritheos-0.2.0 → peritheos-0.5.0}/README.md +69 -3
- peritheos-0.5.0/SECURITY.md +25 -0
- peritheos-0.5.0/SUPPORT.md +14 -0
- peritheos-0.5.0/docs/api-stability.md +39 -0
- peritheos-0.5.0/docs/api.md +150 -0
- peritheos-0.5.0/docs/dac-thermal-pressure.md +134 -0
- peritheos-0.5.0/docs/development.md +46 -0
- peritheos-0.5.0/docs/equation-reference.md +432 -0
- peritheos-0.5.0/docs/fitting.md +312 -0
- peritheos-0.5.0/docs/getting-started.md +109 -0
- peritheos-0.5.0/docs/index.md +51 -0
- peritheos-0.5.0/docs/models.md +77 -0
- peritheos-0.5.0/docs/project-policies.md +14 -0
- peritheos-0.5.0/docs/references.md +55 -0
- peritheos-0.5.0/docs/requirements.txt +3 -0
- peritheos-0.5.0/docs/thermoelastic-properties.md +104 -0
- peritheos-0.5.0/docs/uncertainty.md +298 -0
- peritheos-0.5.0/docs/units.md +65 -0
- peritheos-0.5.0/docs/validation.md +79 -0
- peritheos-0.5.0/mkdocs.yml +55 -0
- peritheos-0.5.0/peritheos/__init__.py +16 -0
- {peritheos-0.2.0 → peritheos-0.5.0}/peritheos/constants.py +1 -1
- peritheos-0.5.0/peritheos/eos/__init__.py +666 -0
- peritheos-0.5.0/peritheos/eos/rt/__init__.py +23 -0
- {peritheos-0.2.0 → peritheos-0.5.0}/peritheos/eos/rt/bm.py +28 -24
- {peritheos-0.2.0 → peritheos-0.5.0}/peritheos/eos/rt/holzapfel.py +1 -0
- peritheos-0.5.0/peritheos/eos/rt/murnaghan.py +60 -0
- peritheos-0.5.0/peritheos/eos/rt/natural_strain.py +87 -0
- peritheos-0.5.0/peritheos/eos/rt/tait.py +95 -0
- {peritheos-0.2.0 → peritheos-0.5.0}/peritheos/eos/rt/vinet.py +1 -0
- peritheos-0.5.0/peritheos/eos/thermal/__init__.py +15 -0
- peritheos-0.5.0/peritheos/eos/thermal/holland_powell.py +86 -0
- peritheos-0.5.0/peritheos/eos/thermal/mie_gruneisen.py +277 -0
- {peritheos-0.2.0 → peritheos-0.5.0}/peritheos/eos/thermal/sokolova2016.py +82 -80
- peritheos-0.5.0/peritheos/fitting.py +832 -0
- peritheos-0.5.0/peritheos/uncertainty.py +694 -0
- peritheos-0.5.0/peritheos/units.py +101 -0
- {peritheos-0.2.0 → peritheos-0.5.0}/peritheos/utils.py +29 -28
- {peritheos-0.2.0 → peritheos-0.5.0}/peritheos.egg-info/PKG-INFO +76 -7
- peritheos-0.5.0/peritheos.egg-info/SOURCES.txt +67 -0
- peritheos-0.5.0/peritheos.egg-info/requires.txt +2 -0
- {peritheos-0.2.0 → peritheos-0.5.0}/pyproject.toml +32 -3
- peritheos-0.5.0/tests/data/literature_reference_cases.json +130 -0
- {peritheos-0.2.0 → peritheos-0.5.0}/tests/test_bm.py +11 -2
- peritheos-0.5.0/tests/test_eos_api.py +102 -0
- peritheos-0.5.0/tests/test_fitting.py +479 -0
- {peritheos-0.2.0 → peritheos-0.5.0}/tests/test_holzapfel.py +1 -1
- peritheos-0.5.0/tests/test_literature_reference_cases.py +63 -0
- peritheos-0.5.0/tests/test_murnaghan.py +58 -0
- peritheos-0.5.0/tests/test_natural_strain.py +61 -0
- peritheos-0.5.0/tests/test_numerical_stress.py +271 -0
- peritheos-0.5.0/tests/test_package_metadata.py +17 -0
- peritheos-0.5.0/tests/test_tait.py +73 -0
- peritheos-0.5.0/tests/test_thermal_mie_gruneisen.py +145 -0
- {peritheos-0.2.0 → peritheos-0.5.0}/tests/test_thermal_sokolova.py +80 -53
- peritheos-0.5.0/tests/test_thermoelastic_api.py +134 -0
- peritheos-0.5.0/tests/test_uncertainty.py +546 -0
- peritheos-0.5.0/tests/test_units.py +43 -0
- {peritheos-0.2.0 → peritheos-0.5.0}/tests/test_vinet.py +1 -2
- peritheos-0.2.0/peritheos/__init__.py +0 -3
- peritheos-0.2.0/peritheos/eos/__init__.py +0 -234
- peritheos-0.2.0/peritheos/eos/rt/__init__.py +0 -7
- peritheos-0.2.0/peritheos/eos/thermal/__init__.py +0 -5
- peritheos-0.2.0/peritheos.egg-info/SOURCES.txt +0 -24
- peritheos-0.2.0/peritheos.egg-info/requires.txt +0 -2
- peritheos-0.2.0/tests/test_eos_api.py +0 -51
- peritheos-0.2.0/tests/test_package_metadata.py +0 -7
- {peritheos-0.2.0 → peritheos-0.5.0}/LICENSE +0 -0
- {peritheos-0.2.0 → peritheos-0.5.0}/peritheos.egg-info/dependency_links.txt +0 -0
- {peritheos-0.2.0 → peritheos-0.5.0}/peritheos.egg-info/top_level.txt +0 -0
- {peritheos-0.2.0 → peritheos-0.5.0}/setup.cfg +0 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to Peritheos are documented here. The project follows
|
|
4
|
+
[Semantic Versioning](https://semver.org/).
|
|
5
|
+
|
|
6
|
+
## [Unreleased]
|
|
7
|
+
|
|
8
|
+
## [0.5.0] - 2026-08-30
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- A comprehensive equation reference for every public isothermal and thermal
|
|
13
|
+
EOS, including parameter definitions, model domains, numerical inversion,
|
|
14
|
+
thermoelastic identities, fitting diagnostics, uncertainty propagation, and
|
|
15
|
+
explicit public-unit conversion factors.
|
|
16
|
+
- Documentation distinguishing the equations typeset in Sokolova et al. (2016)
|
|
17
|
+
from the accompanying Excel workbook calculation implemented by
|
|
18
|
+
`Sokolova2016`, including differences in the bulk-modulus derivative,
|
|
19
|
+
characteristic-temperature multiplier, oscillator pressure contributions,
|
|
20
|
+
reference-isotherm subtraction, and working pressure units.
|
|
21
|
+
- Temperature inversion from pressure and volume for all thermal EOS models,
|
|
22
|
+
including NumPy broadcasting through `temperature()` and
|
|
23
|
+
`calculate_temperature()`.
|
|
24
|
+
- Coupled temperature inference from ambient and heated volumes with a
|
|
25
|
+
fractional DAC confinement contribution through `temperature_from_volumes()`.
|
|
26
|
+
The empirical `f_dac * thermal_pressure` pressure increment is solved in its
|
|
27
|
+
algebraically reduced form and requires `0 <= f_dac < 1`.
|
|
28
|
+
Documentation distinguishes this fraction of EOS thermal pressure from a
|
|
29
|
+
fraction of cold pressure and describes its physical limits, calibration,
|
|
30
|
+
identifiability, baseline-drift, and uncertainty constraints.
|
|
31
|
+
- Fixed-volume preparation for temperature inversion, avoiding repeated
|
|
32
|
+
Sokolova volume-integral evaluations during root finding.
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
- Refreshed the locked runtime, development, documentation, and release
|
|
37
|
+
dependencies to their latest versions compatible with the supported Python
|
|
38
|
+
and declared package-version ranges.
|
|
39
|
+
- The minimum supported SciPy version is now 1.9.3, ensuring a stable binary
|
|
40
|
+
installation and numerical fitting path on Python 3.9 across supported
|
|
41
|
+
platforms.
|
|
42
|
+
- Documentation now uses Material for MkDocs with responsive navigation,
|
|
43
|
+
improved search and code presentation, and automatic light and dark themes.
|
|
44
|
+
- The model overview now focuses on model selection and reference-EOS
|
|
45
|
+
compatibility, while advanced two-volume DAC analysis has moved out of the
|
|
46
|
+
introductory tutorial into a dedicated guide.
|
|
47
|
+
|
|
48
|
+
## [0.4.0] - 2026-08-09
|
|
49
|
+
|
|
50
|
+
### Added
|
|
51
|
+
|
|
52
|
+
- Branch-aware coverage enforcement, Ruff lint and formatting gates, and a
|
|
53
|
+
minimum-supported-dependency CI job.
|
|
54
|
+
- Literature-tagged numerical cases for all public EOS families and an
|
|
55
|
+
independently solvable weighted least-squares fitting benchmark.
|
|
56
|
+
- Automatic GitHub Releases with source and wheel artifacts.
|
|
57
|
+
- Citation metadata, API stability, contribution, security, support, conduct,
|
|
58
|
+
issue, and pull-request policies.
|
|
59
|
+
- Versioned Read the Docs builds using the locked uv documentation environment.
|
|
60
|
+
- Joint reference-isotherm and thermal parameter fitting with complete
|
|
61
|
+
cross-covariance through `fit_joint_eos`.
|
|
62
|
+
- Per-observation correlated P-V and P-V-T covariance matrices and robust
|
|
63
|
+
least-squares losses for all fitting entry points.
|
|
64
|
+
- Human-readable fit summaries and versioned, JSON-safe result export including
|
|
65
|
+
model parameters, covariance, adjusted observations, diagnostics, and solver
|
|
66
|
+
metadata.
|
|
67
|
+
|
|
68
|
+
### Changed
|
|
69
|
+
|
|
70
|
+
- Uncertainty propagation tests now cover Monte Carlo state sampling, invalid
|
|
71
|
+
covariance and option handling, one-sided numerical derivatives, wrapper
|
|
72
|
+
behavior, and failed sampling; branch-aware project coverage exceeds 90%.
|
|
73
|
+
- Corrected the fourth-order Birch-Murnaghan documentation to match its
|
|
74
|
+
implemented Eulerian-strain signs and exponents.
|
|
75
|
+
- Package maturity metadata now identifies the 0.4 development line as beta.
|
|
76
|
+
- The minimum supported NumPy version is now 1.21, matching the public typing
|
|
77
|
+
APIs used by Peritheos.
|
|
78
|
+
- Distribution package discovery is restricted to `peritheos`, preventing
|
|
79
|
+
generated documentation directories from entering or blocking builds.
|
|
80
|
+
|
|
81
|
+
## [0.3.0] - 2026-08-08
|
|
82
|
+
|
|
83
|
+
### Added
|
|
84
|
+
|
|
85
|
+
- Murnaghan, modified Tait, and second- through fourth-order natural-strain
|
|
86
|
+
room-temperature equations of state.
|
|
87
|
+
- Holland-Powell thermal modified Tait equation of state.
|
|
88
|
+
- Bounded P-V and P-V-T errors-in-variables fitting with independently optional
|
|
89
|
+
pressure, volume, and temperature standard errors.
|
|
90
|
+
- `FitResult` covariance, correlation, parameter-error, residual, chi-square,
|
|
91
|
+
information-criterion, and adjusted-state diagnostics.
|
|
92
|
+
- `EOSUncertainty` for propagating complete covariance matrices, parameter
|
|
93
|
+
errors with correlations, or partial independent parameter errors into EOS
|
|
94
|
+
calculations.
|
|
95
|
+
- Linear covariance propagation and reproducible Monte Carlo propagation for
|
|
96
|
+
pressure, volume, bulk modulus, and arbitrary public EOS quantities.
|
|
97
|
+
- Optional propagation of pressure, volume, and temperature errors in the
|
|
98
|
+
requested state.
|
|
99
|
+
- Explicit combination of separately quantified thermal and reference-EOS
|
|
100
|
+
uncertainty blocks.
|
|
101
|
+
- Isothermal compressibility, thermal expansivity, constant-volume and
|
|
102
|
+
constant-pressure heat capacities, thermodynamic Gruneisen parameter, and
|
|
103
|
+
adiabatic bulk modulus APIs.
|
|
104
|
+
- Vibrational entropy, internal energy, Helmholtz energy, enthalpy, and Gibbs
|
|
105
|
+
energy for the Mie-Gruneisen-Debye and Mie-Gruneisen-Einstein models.
|
|
106
|
+
- Molar-volume and density conversion helpers with explicit unit validation.
|
|
107
|
+
- Literature-tagged reference cases and expanded numerical regression tests.
|
|
108
|
+
- A multi-page MkDocs documentation site covering models, fitting,
|
|
109
|
+
uncertainty, properties, units, validation, references, and development.
|
|
110
|
+
|
|
111
|
+
### Changed
|
|
112
|
+
|
|
113
|
+
- EOS models now expose reconstructable parameter values and safe parameter
|
|
114
|
+
replacement, including dotted reference-EOS parameters such as
|
|
115
|
+
`rt_eos.K0`.
|
|
116
|
+
- Thermal EOS calculations consistently document and enforce their molar
|
|
117
|
+
volume, pressure, and temperature units.
|
|
118
|
+
- CI now builds the documentation strictly, and source distributions include
|
|
119
|
+
documentation and literature-validation data.
|
|
120
|
+
- The legacy fitting argument `sigma` remains supported as an alias for
|
|
121
|
+
`pressure_sigma`.
|
|
122
|
+
|
|
123
|
+
### Statistical assumptions
|
|
124
|
+
|
|
125
|
+
- Parameters omitted from an uncertainty specification are treated as exact.
|
|
126
|
+
- Individual parameter errors without a correlation matrix are treated as
|
|
127
|
+
mutually independent.
|
|
128
|
+
- Combining thermal and reference-EOS results from separate fits requires an
|
|
129
|
+
explicit block-independence assumption.
|
|
130
|
+
|
|
131
|
+
## [0.2.0] - 2026-08-07
|
|
132
|
+
|
|
133
|
+
### Added
|
|
134
|
+
|
|
135
|
+
- Fourth-order Birch-Murnaghan support.
|
|
136
|
+
- Complete Sokolova et al. (2016) pressure terms and parameters.
|
|
137
|
+
- Automated test and trusted PyPI publication workflows.
|
|
138
|
+
|
|
139
|
+
### Changed
|
|
140
|
+
|
|
141
|
+
- EOS pressure and volume validation and inversion were hardened for invalid
|
|
142
|
+
and out-of-domain states.
|
|
143
|
+
- Project naming and release metadata were standardized.
|
|
144
|
+
|
|
145
|
+
[Unreleased]: https://github.com/CPrescher/peritheos/compare/v0.5.0...HEAD
|
|
146
|
+
[0.5.0]: https://github.com/CPrescher/peritheos/compare/v0.4.0...v0.5.0
|
|
147
|
+
[0.4.0]: https://github.com/CPrescher/peritheos/compare/v0.3.0...v0.4.0
|
|
148
|
+
[0.3.0]: https://github.com/CPrescher/peritheos/compare/v0.2.0...v0.3.0
|
|
149
|
+
[0.2.0]: https://github.com/CPrescher/peritheos/releases/tag/v0.2.0
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: >-
|
|
3
|
+
If you use Peritheos in published work, please cite the software and the
|
|
4
|
+
original references for the equation-of-state models you use.
|
|
5
|
+
title: Peritheos
|
|
6
|
+
type: software
|
|
7
|
+
version: 0.5.0
|
|
8
|
+
date-released: 2026-08-30
|
|
9
|
+
authors:
|
|
10
|
+
- family-names: Prescher
|
|
11
|
+
given-names: Clemens
|
|
12
|
+
email: clemens.prescher@gmail.com
|
|
13
|
+
repository-code: https://github.com/CPrescher/peritheos
|
|
14
|
+
url: https://peritheos.readthedocs.io/
|
|
15
|
+
license: MIT
|
|
16
|
+
keywords:
|
|
17
|
+
- equation of state
|
|
18
|
+
- high pressure
|
|
19
|
+
- thermodynamics
|
|
20
|
+
- solid materials
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Code of conduct
|
|
2
|
+
|
|
3
|
+
Peritheos is committed to a respectful, inclusive, and scientifically rigorous
|
|
4
|
+
community.
|
|
5
|
+
|
|
6
|
+
Participants are expected to communicate constructively, distinguish evidence
|
|
7
|
+
from opinion, acknowledge uncertainty, welcome correction, and respect differing
|
|
8
|
+
levels of experience. Harassment, personal attacks, discriminatory language,
|
|
9
|
+
deliberate misrepresentation, and disclosure of another person's private
|
|
10
|
+
information are unacceptable.
|
|
11
|
+
|
|
12
|
+
Project maintainers may edit or remove contributions that violate these
|
|
13
|
+
expectations and may temporarily or permanently restrict participation. Report
|
|
14
|
+
conduct concerns privately to `clemens.prescher@gmail.com`. Reports will be
|
|
15
|
+
handled as confidentially as practical, with attention to the safety of the
|
|
16
|
+
reporter and others affected.
|
|
17
|
+
|
|
18
|
+
This policy applies in project spaces and when someone publicly represents the
|
|
19
|
+
project.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Contributing to Peritheos
|
|
2
|
+
|
|
3
|
+
Contributions are welcome, particularly independently reproducible validation
|
|
4
|
+
cases, numerical robustness improvements, and documentation clarifications.
|
|
5
|
+
|
|
6
|
+
## Development setup
|
|
7
|
+
|
|
8
|
+
Install [uv](https://docs.astral.sh/uv/) and create the locked development
|
|
9
|
+
environment:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
uv sync --all-groups
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Run the same checks used by continuous integration:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
uv run ruff check .
|
|
19
|
+
uv run ruff format --check .
|
|
20
|
+
uv run pytest -q -W error --cov --cov-report=term-missing
|
|
21
|
+
uv run --group docs mkdocs build --strict
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Scientific changes
|
|
25
|
+
|
|
26
|
+
Changes to an equation, constant, unit convention, fitting statistic, or
|
|
27
|
+
uncertainty calculation should include:
|
|
28
|
+
|
|
29
|
+
- the primary literature reference and DOI where one exists;
|
|
30
|
+
- an independently calculated numerical case, not only a value generated by
|
|
31
|
+
the implementation under test;
|
|
32
|
+
- reference-state, derivative, array, invalid-domain, and inversion tests when
|
|
33
|
+
applicable;
|
|
34
|
+
- the model order, units, parameter convention, and valid state range in the
|
|
35
|
+
documentation; and
|
|
36
|
+
- an entry under `Unreleased` in `CHANGELOG.md`.
|
|
37
|
+
|
|
38
|
+
Do not silently change an existing scientific convention. Follow the
|
|
39
|
+
[API stability policy](https://peritheos.readthedocs.io/en/latest/api-stability/)
|
|
40
|
+
and document any migration path.
|
|
41
|
+
|
|
42
|
+
## Pull requests
|
|
43
|
+
|
|
44
|
+
Keep each pull request focused. Explain the physical or statistical motivation,
|
|
45
|
+
identify the validation source, and call out any API or numerical-compatibility
|
|
46
|
+
impact. All checks must pass before merging.
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: peritheos
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
4
4
|
Summary: A library for thermodynamic equations of state calculations
|
|
5
5
|
Author-email: Clemens Prescher <clemens.prescher@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
7
7
|
Project-URL: Homepage, https://github.com/cprescher/peritheos
|
|
8
|
+
Project-URL: Documentation, https://peritheos.readthedocs.io/
|
|
9
|
+
Project-URL: Source, https://github.com/cprescher/peritheos
|
|
8
10
|
Project-URL: Bug Tracker, https://github.com/cprescher/peritheos/issues
|
|
11
|
+
Project-URL: Changelog, https://github.com/cprescher/peritheos/blob/main/CHANGELOG.md
|
|
9
12
|
Keywords: equation-of-state,high-pressure,thermodynamics
|
|
10
|
-
Classifier: Development Status ::
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
14
|
Classifier: Intended Audience :: Science/Research
|
|
12
15
|
Classifier: Programming Language :: Python :: 3
|
|
13
16
|
Classifier: Programming Language :: Python :: 3.9
|
|
@@ -21,30 +24,47 @@ Classifier: Topic :: Scientific/Engineering :: Physics
|
|
|
21
24
|
Requires-Python: >=3.9
|
|
22
25
|
Description-Content-Type: text/markdown
|
|
23
26
|
License-File: LICENSE
|
|
24
|
-
Requires-Dist: numpy>=1.
|
|
25
|
-
Requires-Dist: scipy>=1.
|
|
27
|
+
Requires-Dist: numpy>=1.21.0
|
|
28
|
+
Requires-Dist: scipy>=1.9.3
|
|
26
29
|
Dynamic: license-file
|
|
27
30
|
|
|
28
31
|
# Peritheos
|
|
29
32
|
|
|
30
33
|
A Python library for thermodynamic equations of state calculations for solid materials.
|
|
31
34
|
|
|
35
|
+
Full model, fitting, units, and development documentation is available at
|
|
36
|
+
[peritheos.readthedocs.io](https://peritheos.readthedocs.io/).
|
|
37
|
+
Release history is recorded in the [changelog](CHANGELOG.md).
|
|
38
|
+
|
|
32
39
|
## Features
|
|
33
40
|
|
|
34
41
|
- Room temperature equations of state (EOS) implementations
|
|
35
42
|
- Birch-Murnaghan
|
|
43
|
+
- Murnaghan
|
|
44
|
+
- Natural strain (orders 2-4)
|
|
45
|
+
- Modified Tait
|
|
36
46
|
- Vinet
|
|
37
47
|
- Holzapfel
|
|
38
48
|
- Thermal equations of state (EOS) implementations
|
|
49
|
+
- Mie-Gruneisen-Debye
|
|
50
|
+
- Mie-Gruneisen-Einstein
|
|
51
|
+
- Holland-Powell thermal modified Tait
|
|
39
52
|
- Sokolova 2016, including its complete thermal-pressure parameter set
|
|
53
|
+
- P-V and P-V-T parameter fitting with covariance and diagnostics
|
|
54
|
+
- Joint reference-isotherm and thermal fitting with cross-covariance
|
|
55
|
+
- Correlated observation errors and robust least-squares losses
|
|
56
|
+
- Reproducible fit summaries and versioned JSON export
|
|
57
|
+
- EOS prediction uncertainty from fitted covariance or published parameter errors
|
|
58
|
+
- Thermoelastic derivatives, heat capacities, and vibrational potentials
|
|
40
59
|
|
|
41
60
|
## Unit conventions
|
|
42
61
|
|
|
43
62
|
- Public pressure and bulk-modulus values are in GPa.
|
|
44
63
|
- Temperatures are in K.
|
|
45
|
-
- Birch-Murnaghan and Vinet accept any consistent
|
|
46
|
-
|
|
47
|
-
|
|
64
|
+
- Birch-Murnaghan, Murnaghan, modified Tait, and Vinet accept any consistent
|
|
65
|
+
volume unit.
|
|
66
|
+
- Holzapfel and all thermal EOS implementations require molar volume in
|
|
67
|
+
J bar^-1 mol^-1, which is equivalent to cm^3/mol divided by 10.
|
|
48
68
|
|
|
49
69
|
## Installation
|
|
50
70
|
|
|
@@ -84,6 +104,46 @@ print(f"Recovered volume: {volume}")
|
|
|
84
104
|
|
|
85
105
|
### Thermal equations of state
|
|
86
106
|
|
|
107
|
+
Mie-Gruneisen-Debye and Mie-Gruneisen-Einstein models can wrap any of the
|
|
108
|
+
room-temperature equations of state:
|
|
109
|
+
|
|
110
|
+
```python
|
|
111
|
+
from peritheos.eos.rt import BM3
|
|
112
|
+
from peritheos.eos.thermal import MieGruneisenDebye
|
|
113
|
+
|
|
114
|
+
# Thermal models require molar volume in J bar^-1 mol^-1.
|
|
115
|
+
rt_eos = BM3(V0=1.0, K0=160.0, K0_prime=4.0)
|
|
116
|
+
eos = MieGruneisenDebye(
|
|
117
|
+
rt_eos=rt_eos,
|
|
118
|
+
Tr=300.0,
|
|
119
|
+
theta0=800.0,
|
|
120
|
+
gamma0=1.5,
|
|
121
|
+
q=1.0,
|
|
122
|
+
n=2,
|
|
123
|
+
)
|
|
124
|
+
|
|
125
|
+
pressure = eos.pressure(V=0.9, T=2000.0)
|
|
126
|
+
volume = eos.volume(P=pressure, T=2000.0)
|
|
127
|
+
temperature = eos.temperature(P=pressure, V=0.9)
|
|
128
|
+
|
|
129
|
+
# Infer temperature from volumes measured before and during DAC heating.
|
|
130
|
+
ambient_volume = 0.80000
|
|
131
|
+
heated_volume = 0.80001
|
|
132
|
+
temperature_with_dac = eos.temperature_from_volumes(
|
|
133
|
+
V_ambient=ambient_volume,
|
|
134
|
+
V_heated=heated_volume,
|
|
135
|
+
f_dac=0.25,
|
|
136
|
+
)
|
|
137
|
+
ambient_pressure = eos.rt_eos.pressure(ambient_volume)
|
|
138
|
+
heated_pressure = ambient_pressure + 0.25 * eos.thermal_pressure(
|
|
139
|
+
heated_volume, temperature_with_dac
|
|
140
|
+
)
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
The two-volume method uses the empirical `f_dac * thermal_pressure` confinement
|
|
144
|
+
increment and requires `0 <= f_dac < 1`; report and sensitivity-test the assumed
|
|
145
|
+
fraction.
|
|
146
|
+
|
|
87
147
|
Diamond thermal equation of state from sokolova et al. 2016
|
|
88
148
|
|
|
89
149
|
```python
|
|
@@ -137,9 +197,18 @@ thermal_pressure = sokolova.thermal_pressure(V, T)
|
|
|
137
197
|
rt_pressure = holzapfel.pressure(V)
|
|
138
198
|
pressure = sokolova.pressure(V, T)
|
|
139
199
|
recovered_volume = sokolova.volume(pressure, T)
|
|
200
|
+
recovered_temperature = sokolova.temperature(pressure, V)
|
|
140
201
|
|
|
141
202
|
print(f"Thermal pressure: {thermal_pressure} GPa")
|
|
142
203
|
print(f"RT pressure: {rt_pressure} GPa")
|
|
143
204
|
print(f"Total pressure: {pressure} GPa")
|
|
144
205
|
print(f"Recovered volume: {recovered_volume} J bar^-1")
|
|
206
|
+
print(f"Recovered temperature: {recovered_temperature} K")
|
|
145
207
|
```
|
|
208
|
+
|
|
209
|
+
## Citation and support
|
|
210
|
+
|
|
211
|
+
Use the repository's `CITATION.cff` to cite Peritheos and cite the original
|
|
212
|
+
publication for each EOS used. Reproducible bugs and numerical discrepancies
|
|
213
|
+
can be reported through [GitHub Issues](https://github.com/CPrescher/peritheos/issues).
|
|
214
|
+
See [SUPPORT.md](SUPPORT.md) for the information needed to investigate a result.
|
|
@@ -2,22 +2,39 @@
|
|
|
2
2
|
|
|
3
3
|
A Python library for thermodynamic equations of state calculations for solid materials.
|
|
4
4
|
|
|
5
|
+
Full model, fitting, units, and development documentation is available at
|
|
6
|
+
[peritheos.readthedocs.io](https://peritheos.readthedocs.io/).
|
|
7
|
+
Release history is recorded in the [changelog](CHANGELOG.md).
|
|
8
|
+
|
|
5
9
|
## Features
|
|
6
10
|
|
|
7
11
|
- Room temperature equations of state (EOS) implementations
|
|
8
12
|
- Birch-Murnaghan
|
|
13
|
+
- Murnaghan
|
|
14
|
+
- Natural strain (orders 2-4)
|
|
15
|
+
- Modified Tait
|
|
9
16
|
- Vinet
|
|
10
17
|
- Holzapfel
|
|
11
18
|
- Thermal equations of state (EOS) implementations
|
|
19
|
+
- Mie-Gruneisen-Debye
|
|
20
|
+
- Mie-Gruneisen-Einstein
|
|
21
|
+
- Holland-Powell thermal modified Tait
|
|
12
22
|
- Sokolova 2016, including its complete thermal-pressure parameter set
|
|
23
|
+
- P-V and P-V-T parameter fitting with covariance and diagnostics
|
|
24
|
+
- Joint reference-isotherm and thermal fitting with cross-covariance
|
|
25
|
+
- Correlated observation errors and robust least-squares losses
|
|
26
|
+
- Reproducible fit summaries and versioned JSON export
|
|
27
|
+
- EOS prediction uncertainty from fitted covariance or published parameter errors
|
|
28
|
+
- Thermoelastic derivatives, heat capacities, and vibrational potentials
|
|
13
29
|
|
|
14
30
|
## Unit conventions
|
|
15
31
|
|
|
16
32
|
- Public pressure and bulk-modulus values are in GPa.
|
|
17
33
|
- Temperatures are in K.
|
|
18
|
-
- Birch-Murnaghan and Vinet accept any consistent
|
|
19
|
-
|
|
20
|
-
|
|
34
|
+
- Birch-Murnaghan, Murnaghan, modified Tait, and Vinet accept any consistent
|
|
35
|
+
volume unit.
|
|
36
|
+
- Holzapfel and all thermal EOS implementations require molar volume in
|
|
37
|
+
J bar^-1 mol^-1, which is equivalent to cm^3/mol divided by 10.
|
|
21
38
|
|
|
22
39
|
## Installation
|
|
23
40
|
|
|
@@ -57,6 +74,46 @@ print(f"Recovered volume: {volume}")
|
|
|
57
74
|
|
|
58
75
|
### Thermal equations of state
|
|
59
76
|
|
|
77
|
+
Mie-Gruneisen-Debye and Mie-Gruneisen-Einstein models can wrap any of the
|
|
78
|
+
room-temperature equations of state:
|
|
79
|
+
|
|
80
|
+
```python
|
|
81
|
+
from peritheos.eos.rt import BM3
|
|
82
|
+
from peritheos.eos.thermal import MieGruneisenDebye
|
|
83
|
+
|
|
84
|
+
# Thermal models require molar volume in J bar^-1 mol^-1.
|
|
85
|
+
rt_eos = BM3(V0=1.0, K0=160.0, K0_prime=4.0)
|
|
86
|
+
eos = MieGruneisenDebye(
|
|
87
|
+
rt_eos=rt_eos,
|
|
88
|
+
Tr=300.0,
|
|
89
|
+
theta0=800.0,
|
|
90
|
+
gamma0=1.5,
|
|
91
|
+
q=1.0,
|
|
92
|
+
n=2,
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
pressure = eos.pressure(V=0.9, T=2000.0)
|
|
96
|
+
volume = eos.volume(P=pressure, T=2000.0)
|
|
97
|
+
temperature = eos.temperature(P=pressure, V=0.9)
|
|
98
|
+
|
|
99
|
+
# Infer temperature from volumes measured before and during DAC heating.
|
|
100
|
+
ambient_volume = 0.80000
|
|
101
|
+
heated_volume = 0.80001
|
|
102
|
+
temperature_with_dac = eos.temperature_from_volumes(
|
|
103
|
+
V_ambient=ambient_volume,
|
|
104
|
+
V_heated=heated_volume,
|
|
105
|
+
f_dac=0.25,
|
|
106
|
+
)
|
|
107
|
+
ambient_pressure = eos.rt_eos.pressure(ambient_volume)
|
|
108
|
+
heated_pressure = ambient_pressure + 0.25 * eos.thermal_pressure(
|
|
109
|
+
heated_volume, temperature_with_dac
|
|
110
|
+
)
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
The two-volume method uses the empirical `f_dac * thermal_pressure` confinement
|
|
114
|
+
increment and requires `0 <= f_dac < 1`; report and sensitivity-test the assumed
|
|
115
|
+
fraction.
|
|
116
|
+
|
|
60
117
|
Diamond thermal equation of state from sokolova et al. 2016
|
|
61
118
|
|
|
62
119
|
```python
|
|
@@ -110,9 +167,18 @@ thermal_pressure = sokolova.thermal_pressure(V, T)
|
|
|
110
167
|
rt_pressure = holzapfel.pressure(V)
|
|
111
168
|
pressure = sokolova.pressure(V, T)
|
|
112
169
|
recovered_volume = sokolova.volume(pressure, T)
|
|
170
|
+
recovered_temperature = sokolova.temperature(pressure, V)
|
|
113
171
|
|
|
114
172
|
print(f"Thermal pressure: {thermal_pressure} GPa")
|
|
115
173
|
print(f"RT pressure: {rt_pressure} GPa")
|
|
116
174
|
print(f"Total pressure: {pressure} GPa")
|
|
117
175
|
print(f"Recovered volume: {recovered_volume} J bar^-1")
|
|
176
|
+
print(f"Recovered temperature: {recovered_temperature} K")
|
|
118
177
|
```
|
|
178
|
+
|
|
179
|
+
## Citation and support
|
|
180
|
+
|
|
181
|
+
Use the repository's `CITATION.cff` to cite Peritheos and cite the original
|
|
182
|
+
publication for each EOS used. Reproducible bugs and numerical discrepancies
|
|
183
|
+
can be reported through [GitHub Issues](https://github.com/CPrescher/peritheos/issues).
|
|
184
|
+
See [SUPPORT.md](SUPPORT.md) for the information needed to investigate a result.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Security policy
|
|
2
|
+
|
|
3
|
+
## Supported versions
|
|
4
|
+
|
|
5
|
+
Peritheos supports the latest released minor series. Security fixes may be
|
|
6
|
+
backported when an older release remains widely used, but no backport is
|
|
7
|
+
guaranteed before version 1.0.
|
|
8
|
+
|
|
9
|
+
## Reporting a vulnerability
|
|
10
|
+
|
|
11
|
+
Please do not open a public issue for a vulnerability that could expose users.
|
|
12
|
+
Use the repository's
|
|
13
|
+
[private vulnerability reporting](https://github.com/CPrescher/peritheos/security/advisories/new)
|
|
14
|
+
or email Clemens Prescher at `clemens.prescher@gmail.com` with:
|
|
15
|
+
|
|
16
|
+
- the affected version;
|
|
17
|
+
- a minimal reproduction or proof of concept;
|
|
18
|
+
- the expected impact; and
|
|
19
|
+
- any proposed mitigation.
|
|
20
|
+
|
|
21
|
+
You should receive an acknowledgement within seven days. A fix and disclosure
|
|
22
|
+
timeline will be coordinated after the report is reproduced.
|
|
23
|
+
|
|
24
|
+
Numerical inaccuracies without a security impact should use the scientific
|
|
25
|
+
validation issue template instead.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Support
|
|
2
|
+
|
|
3
|
+
Use [GitHub Issues](https://github.com/CPrescher/peritheos/issues) for confirmed
|
|
4
|
+
bugs, documentation problems, and focused feature requests.
|
|
5
|
+
|
|
6
|
+
For a numerical discrepancy, include the Peritheos version, model and complete
|
|
7
|
+
parameter set, units, input state, observed result, expected result, and the
|
|
8
|
+
publication or independent program used for comparison. A minimal Python
|
|
9
|
+
example is strongly preferred.
|
|
10
|
+
|
|
11
|
+
Peritheos is research software supplied without warranty. Users remain
|
|
12
|
+
responsible for checking model choice, reference state, units, weighting, and
|
|
13
|
+
extrapolation limits before relying on results in publications or safety-
|
|
14
|
+
critical decisions.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# API stability
|
|
2
|
+
|
|
3
|
+
Peritheos follows [Semantic Versioning](https://semver.org/). Before 1.0, a
|
|
4
|
+
minor release may include a necessary breaking correction, particularly when a
|
|
5
|
+
published equation or unit convention was implemented incorrectly. Such a
|
|
6
|
+
change must be prominent in the changelog and release notes.
|
|
7
|
+
|
|
8
|
+
## Public API
|
|
9
|
+
|
|
10
|
+
The supported public API consists of:
|
|
11
|
+
|
|
12
|
+
- names documented in the [API reference](api.md);
|
|
13
|
+
- names exported by a module's `__all__`;
|
|
14
|
+
- constructor parameters and documented public methods of exported EOS classes;
|
|
15
|
+
- the documented GPa, kelvin, and molar-volume conventions; and
|
|
16
|
+
- scalar and NumPy broadcasting behavior described in the documentation.
|
|
17
|
+
|
|
18
|
+
Names beginning with an underscore, implementation details not documented in
|
|
19
|
+
the API reference, and exact optimizer messages are private.
|
|
20
|
+
|
|
21
|
+
## Compatibility commitments
|
|
22
|
+
|
|
23
|
+
`volume()` is the preferred pressure-to-volume method. `calculate_volume()` is
|
|
24
|
+
a supported compatibility alias and will remain available throughout the 1.x
|
|
25
|
+
series.
|
|
26
|
+
|
|
27
|
+
`temperature()` is the preferred pressure-and-volume-to-temperature method.
|
|
28
|
+
`calculate_temperature()` is its supported compatibility alias and will remain
|
|
29
|
+
available throughout the 1.x series.
|
|
30
|
+
|
|
31
|
+
After 1.0, planned public API removals will normally emit
|
|
32
|
+
`DeprecationWarning` for at least two minor releases. Scientific corrections
|
|
33
|
+
that cannot preserve old behavior will include a reproducible before-and-after
|
|
34
|
+
case and a migration note.
|
|
35
|
+
|
|
36
|
+
Patch releases may improve numerical precision, validation, warning text, or
|
|
37
|
+
solver robustness without treating the last floating-point bit or exact error
|
|
38
|
+
message as stable. Published calculations should record the Peritheos version,
|
|
39
|
+
model order, complete parameters, units, and uncertainty convention.
|