ℜeos: A Rust Library for Equations Of State and Thermodynamics
Project description
Welcome to ℜeos
ℜeos is a thermodynamic library written in Rust with a Python interface. It provides tools for calculating thermodynamic properties and phase equilibria.
import numpy as np
from reos.cpa import CPAParameters, CPAPureRecord
from reos.eos import EquationOfState
from reos.state import State
parameters = CPAParameters.from_json(["water", "carbon dioxide"],
rdf_model="kg",
cubic_model="srk",
ppath="../../../parameters/cpa/tsivintzelis2011.json",
bpath= "../../../parameters/cpa/tsivintzelis2011_binary.json")
eos = EquationOfState.cpa(parameters)
# 2. Initialize the state
T = 323.15; P = 1e5; z = np.array([0.75, 0.25])
state = State.tpx(eos, T, P, z)
# 3. Calculate properties
unbonded_sites_fraction = eos.get_assoc_calcs(state.temperature, state.density, state.composition)["X"]
Models
| Model | Description |
|---|---|
| CPA | CPA, SCPA |
| cubic | SRK, PR76, PR78, Twu-91, volume-translation |
Each model implement its analytical expressions of derived properties of Helmholtz potential.
Installation
Python
From pip
pip install reos
From source
You must have rust compiler and maturin/PyO3 installed.
To install the python package in your machine (such pip install -e .) and use the optimized version of the package:
cd pyreos
maturin develop --release
To build the the python wheel, just use
maturin build --release
Project layout
Repository
├── crates
├── parameters
├── pyreos
├── pyreos-dev
└── pyreos-examples
-
parameters: Directory with pure and binary parameters for the current models implemented in Reos -
crates: Containsreos, which is the Rust package that implement all the core functionalites -
pyreos: Rust package that create the Python interface fromreos -
pyreos-dev: Directory used to test functionalites ofreosin Python -
pyreos-examples: Python examples of how to usereos
Python package
-
reos.eos: Enables the creation and manipulation of equations of state with different models. -
reos.state: Provides tools for working with thermodynamic states, including property calculations and phase equilibria. -
reos.{model_name}: Each current model has its own submodule with its name, which contains the pure model record, the binary model record and the parameters objects .
Project details
Release history Release notifications | RSS feed
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 reos-1.0.0.tar.gz.
File metadata
- Download URL: reos-1.0.0.tar.gz
- Upload date:
- Size: 64.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1de74e754d35c5b6f31f3e2567d0622d1d8c5aed02bf3b7b12b10c2c01e658b4
|
|
| MD5 |
36431c375abf1e2f684d25f355fd93ff
|
|
| BLAKE2b-256 |
992c743d03dc08b30ea07a20b399bcec96c6e7426cf91769399921d10cf43f1d
|
File details
Details for the file reos-1.0.0-cp312-cp312-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: reos-1.0.0-cp312-cp312-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 623.2 kB
- Tags: CPython 3.12, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8ce991d191705f45a7b11ba1f771538d8dffbf7d2cb24a5d4b1940eb7c35cf3
|
|
| MD5 |
f6473621175ee0f4b383f41823cf41c3
|
|
| BLAKE2b-256 |
a6ba6e5e52a2a14a068f4c2f1d80f5abc6ea3431b0b2dfe5486abb9921d01dff
|