FeOs-torch - Automatic differentiation of phase equilibria
FeOs-torch combines the FeOs thermodynamics engine with the machine learning/automatic differentiation framework PyTorch.
import torch
from feos_torch import PcSaftPure
# define PC-SAFT parameters
# m, sigma, epsilon_k, mu, kappa_ab, epsilon_k_ab, na, nb
params = torch.tensor([1.5, 3.5, 250.0, 0, 0.03, 1500.0, 1, 1], dtype=torch.float64, requires_grad=True)
pcsaft = PcSaftPure(params.repeat(5, 1))
# evaluate vapor pressures (in Pa)
temperature = torch.tensor([250., 300., 350., 400., 450.], dtype=torch.float64)
_, vp = pcsaft.vapor_pressure(temperature)
print(vp)
# determine the derivatives of the first vapor pressure w.r.t. PC-SAFT parameters
vp[0].backward()
print(params.grad)
tensor([ 20693.5960, 216164.6184, 1049770.6187, 3281855.9640, 7875531.7021],
dtype=torch.float64, grad_fn=<MulBackward0>)
tensor([-6.7923e+04, -1.7737e+04, -7.0413e+02, 0.0000e+00, -5.7458e+05,
-6.9122e+01, -3.6892e+04, -3.6892e+04], dtype=torch.float64)
Models
The following models and properties are currently implemented in FeOs-torch
| model | vapor pressure | liquid density | equilibrium liquid density | bubble point pressure | dew point pressure |
|---|---|---|---|---|---|
| PC-SAFT | ✓ | ✓ | ✓ | ✓ | ✓ |
| gc-PC-SAFT | ✓ | ✓ |
Cite us
If you find FeOs-torch useful for your own research, consider citing our publication from which this library resulted.
@article{rehner2023mixtures,
author = {Rehner, Philipp and Bardow, André and Gross, Joachim},
title = {Modeling Mixtures with PCP-SAFT: Insights from Large-Scale Parametrization and Group-Contribution Method for Binary Interaction Parameters}
journal = {International Journal of Thermophysics},
volume = {44},
number = {12},
pages = {179},
year = {2023}
}
Metadata
Release files for feos-torch 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| feos_torch-0.1.0-cp37-abi3-win_amd64.whl | CPython 3.7 | abi3 | Windows x86-64 | Details for feos_torch-0.1.0-cp37-abi3-win_amd64.whl |
| feos_torch-0.1.0-cp37-abi3-win32.whl | CPython 3.7 | abi3 | Windows x86-32 | Details for feos_torch-0.1.0-cp37-abi3-win32.whl |
| feos_torch-0.1.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.7 | abi3 | Linux glibc 2.17+ x86-64 | Details for feos_torch-0.1.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
| feos_torch-0.1.0-cp37-abi3-macosx_10_12_x86_64.whl | CPython 3.7 | abi3 | macOS 10.12+ x86-64 | Details for feos_torch-0.1.0-cp37-abi3-macosx_10_12_x86_64.whl |
| feos_torch-0.1.0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl | CPython 3.7 | abi3 | macOS 10.12+ universal2 (ARM64, x86-64), macOS 11.0+ ARM64, macOS 10.12+ x86-64 | Details for feos_torch-0.1.0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl |
Total release size: 12.5 MB
Release files / feos_torch-0.1.0-cp37-abi3-win_amd64.whl
| Download URL | feos_torch-0.1.0-cp37-abi3-win_amd64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.7 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
f04d7725f4033913f08cc6b1d96eba231631f088debaceb6a569f544a121a3bf
|
|
BLAKE2b-256 checksum How to use checksums |
1cf9e67af96f9ae1066bf53b3ec17bcd8510c21e713b8f6d1b727c92599eedc4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.19
|
Release files / feos_torch-0.1.0-cp37-abi3-win32.whl
| Download URL | feos_torch-0.1.0-cp37-abi3-win32.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.7 Windows x86-32 abi3 |
|
SHA-256 checksum How to use checksums |
8cf01617c8230c17cd97cef701d84a249872c07c538cfe8fc2c35e9e3ad207f9
|
|
BLAKE2b-256 checksum How to use checksums |
3352f2e7f1792033ee4b898c6ab71bf301831c34ebac2c29fdd1d3099083e340
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.19
|
Release files / feos_torch-0.1.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | feos_torch-0.1.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.7 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
dddbc099de1ffd532aef9982f20924c38439de806310a6bff71b61c61ce93876
|
|
BLAKE2b-256 checksum How to use checksums |
aa1687210b5771b7bf6bfd7cfa09e96e5ff8009e3bd813fb12f3a539edc08b91
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.19
|
Release files / feos_torch-0.1.0-cp37-abi3-macosx_10_12_x86_64.whl
| Download URL | feos_torch-0.1.0-cp37-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.7 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
90f06432e711401b51d3554c041300a372c3d00fde4daadba36b7f31b2baf22f
|
|
BLAKE2b-256 checksum How to use checksums |
72e3a8571a8dbe59ad8e5a6591c30ebeaf091566bc32b57040271b7f6d593b62
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.19
|
Release files / feos_torch-0.1.0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
| Download URL | feos_torch-0.1.0-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl |
|---|---|
| Size | 3.6 MB |
| Tags | CPython 3.7 abi3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
5de2511c2a282762e94b2797054ee097524b16949c2cb3d369bc3d640abd69c7
|
|
BLAKE2b-256 checksum How to use checksums |
3a3783ad2be69f352d85bcb242f792ed76cefe5cd3886544db3127c3f2820a77
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.19
|
Security for feos-torch 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.