Skip to content

Commit 8627d79

Browse files
authored
Release v0.5.0 (#178)
1 parent 0fc8bfa commit 8627d79

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+1307
-1641
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
9+
## [0.5.0] - 2023-10-20
810
### Added
911
- Added `IdealGasModel` enum that collects all implementors of the `IdealGas` trait. [#158](https://github.com/feos-org/feos/pull/158)
1012
- Added `feos.ideal_gas` module in Python from which (currently) `Joback` and `JobackParameters` are available. [#158](https://github.com/feos-org/feos/pull/158)
@@ -21,7 +23,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2123
- Moved `molar_weight` impls to `Residual` due to removal of `MolarWeight` trait. [#177](https://github.com/feos-org/feos/pull/158)
2224

2325
### Packaging
24-
- Updated `num-dual` dependency to 0.7. [#137](https://github.com/feos-org/feos/pull/137)
26+
- Updated `quantity` dependency to 0.7.
27+
- Updated `num-dual` dependency to 0.8. [#137](https://github.com/feos-org/feos/pull/137)
28+
- Updated `numpy` and `PyO3` dependencies to 0.20.
2529

2630
## [0.4.3] - 2023-03-20
2731
- Python only: Release the changes introduced in `feos-core` 0.4.2.

Cargo.toml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[package]
22
name = "feos"
3-
version = "0.4.3"
3+
version = "0.5.0"
44
authors = ["Gernot Bauer <bauer@itt.uni-stuttgart.de>", "Philipp Rehner <prehner@ethz.ch>"]
5-
edition = "2018"
5+
edition = "2021"
66
readme = "README.md"
77
license = "MIT OR Apache-2.0"
88
description = "FeOs - A framework for equations of state and classical density functional theory."
@@ -22,12 +22,12 @@ members = ["feos-core", "feos-dft", "feos-derive"]
2222
crate-type = ["rlib", "cdylib"]
2323

2424
[dependencies]
25-
quantity = { version = "0.6", optional = true }
26-
num-dual = "0.7"
27-
feos-core = { version = "0.4", path = "feos-core" }
28-
feos-dft = { version = "0.4", path = "feos-dft", optional = true }
29-
feos-derive = { version = "0.2", path = "feos-derive" }
30-
numpy = { version = "0.18", optional = true }
25+
quantity = { version = "0.7", optional = true }
26+
num-dual = "0.8"
27+
feos-core = { version = "0.5", path = "feos-core" }
28+
feos-dft = { version = "0.5", path = "feos-dft", optional = true }
29+
feos-derive = { version = "0.3", path = "feos-derive" }
30+
numpy = { version = "0.20", optional = true }
3131
ndarray = { version = "0.15", features = ["approx"] }
3232
petgraph = { version = "0.6", optional = true }
3333
thiserror = "1.0"
@@ -36,19 +36,19 @@ num-traits = "0.2"
3636
serde = "1.0"
3737
serde_json = "1.0"
3838
lazy_static = { version = "1.4", optional = true }
39-
indexmap = "1.8"
40-
rayon = { version = "1.5", optional = true }
41-
itertools = "0.10"
39+
indexmap = "2.0"
40+
rayon = { version = "1.7", optional = true }
41+
itertools = "0.11"
4242
typenum = "1.16"
4343

4444
[dependencies.pyo3]
45-
version = "0.18"
45+
version = "0.20"
4646
features = ["extension-module", "abi3", "abi3-py37"]
4747
optional = true
4848

4949
[dev-dependencies]
50-
approx = "0.4"
51-
criterion = "0.4"
50+
approx = "0.5"
51+
criterion = "0.5"
5252

5353
[profile.release-lto]
5454
inherits = "release"

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@ The `FeOs` package provides Rust implementations of different equation of state
99

1010
```python
1111
from feos.eos import EquationOfState, State
12-
from feos.pcsaft import PcSaftParameters
12+
from feos.pcsaft import PcSaftParameters, PcSaftRecord
13+
14+
# PC-SAFT parameters for methanol (Gross and Sadowski 2002)
15+
record = PcSaftRecord(1.5255, 3.23, 188.9, kappa_ab=0.035176, epsilon_k_ab=2899.5, na=1, nb=1)
1316

1417
# Build an equation of state
15-
parameters = PcSaftParameters.from_json(['methanol'], 'parameters.json')
18+
parameters = PcSaftParameters.from_model_records([record])
1619
eos = EquationOfState.pcsaft(parameters)
1720

1821
# Define thermodynamic conditions

benches/state_creation.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use feos::pcsaft::{PcSaft, PcSaftParameters};
44
use feos_core::si::*;
55
use feos_core::{
66
parameter::{IdentifierOption, Parameter},
7-
Contributions, DensityInitialization, PhaseEquilibrium, Residual, State, TPSpec,
7+
Contributions, DensityInitialization, PhaseEquilibrium, Residual, State, TemperatureOrPressure,
88
};
99
use ndarray::{Array, Array1};
1010
use std::sync::Arc;
@@ -28,18 +28,12 @@ fn critical_point<E: Residual>((eos, n): (&Arc<E>, Option<&Moles<Array1<f64>>>))
2828
}
2929

3030
/// Evaluate critical point constructor for binary systems at given T or p
31-
fn critical_point_binary<E: Residual, TP>((eos, tp): (&Arc<E>, TP))
32-
where
33-
TPSpec: From<TP>,
34-
{
31+
fn critical_point_binary<E: Residual, TP: TemperatureOrPressure>((eos, tp): (&Arc<E>, TP)) {
3532
State::critical_point_binary(eos, tp, None, None, Default::default()).unwrap();
3633
}
3734

3835
/// VLE for pure substance for given temperature or pressure
39-
fn pure<E: Residual, TP>((eos, t_or_p): (&Arc<E>, TP))
40-
where
41-
TPSpec: From<TP>,
42-
{
36+
fn pure<E: Residual, TP: TemperatureOrPressure>((eos, t_or_p): (&Arc<E>, TP)) {
4337
PhaseEquilibrium::pure(eos, t_or_p, None, Default::default()).unwrap();
4438
}
4539

docs/theory/dft/derivatives.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Derivatives of density profiles
2-
For converged density properties equilibrium properties can be calculated as partial derivatives of thermodynamic potentials analogous to classical (bulk) thermodynamics. The difference is that the derivatives have to be along a path of valid density profiles (solutions of the [Euler-Lagrange equation](euler_lagrange_equation.md)).
2+
For converged density profiles equilibrium properties can be calculated as partial derivatives of thermodynamic potentials analogous to classical (bulk) thermodynamics. The difference is that the derivatives have to be along a path of valid density profiles (solutions of the [Euler-Lagrange equation](euler_lagrange_equation.md)).
33

44
The density profiles are calculated implicitly from the Euler-Lagrange equation, which can be written simplified as
55

0 commit comments

Comments
 (0)