Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.5.0 #178

Merged
merged 22 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

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

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

## [0.4.3] - 2023-03-20
- Python only: Release the changes introduced in `feos-core` 0.4.2.
Expand Down
28 changes: 14 additions & 14 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "feos"
version = "0.4.3"
version = "0.5.0"
authors = ["Gernot Bauer <[email protected]>", "Philipp Rehner <[email protected]>"]
edition = "2018"
edition = "2021"
readme = "README.md"
license = "MIT OR Apache-2.0"
description = "FeOs - A framework for equations of state and classical density functional theory."
Expand All @@ -22,12 +22,12 @@ members = ["feos-core", "feos-dft", "feos-derive"]
crate-type = ["rlib", "cdylib"]

[dependencies]
quantity = { version = "0.6", optional = true }
num-dual = "0.7"
feos-core = { version = "0.4", path = "feos-core" }
feos-dft = { version = "0.4", path = "feos-dft", optional = true }
feos-derive = { version = "0.2", path = "feos-derive" }
numpy = { version = "0.18", optional = true }
quantity = { version = "0.7", optional = true }
num-dual = "0.8"
feos-core = { version = "0.5", path = "feos-core" }
feos-dft = { version = "0.5", path = "feos-dft", optional = true }
feos-derive = { version = "0.3", path = "feos-derive" }
numpy = { version = "0.20", optional = true }
ndarray = { version = "0.15", features = ["approx"] }
petgraph = { version = "0.6", optional = true }
thiserror = "1.0"
Expand All @@ -36,19 +36,19 @@ num-traits = "0.2"
serde = "1.0"
serde_json = "1.0"
lazy_static = { version = "1.4", optional = true }
indexmap = "1.8"
rayon = { version = "1.5", optional = true }
itertools = "0.10"
indexmap = "2.0"
rayon = { version = "1.7", optional = true }
itertools = "0.11"
typenum = "1.16"

[dependencies.pyo3]
version = "0.18"
version = "0.20"
features = ["extension-module", "abi3", "abi3-py37"]
optional = true

[dev-dependencies]
approx = "0.4"
criterion = "0.4"
approx = "0.5"
criterion = "0.5"

[profile.release-lto]
inherits = "release"
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ The `FeOs` package provides Rust implementations of different equation of state

```python
from feos.eos import EquationOfState, State
from feos.pcsaft import PcSaftParameters
from feos.pcsaft import PcSaftParameters, PcSaftRecord

# PC-SAFT parameters for methanol (Gross and Sadowski 2002)
record = PcSaftRecord(1.5255, 3.23, 188.9, kappa_ab=0.035176, epsilon_k_ab=2899.5, na=1, nb=1)

# Build an equation of state
parameters = PcSaftParameters.from_json(['methanol'], 'parameters.json')
parameters = PcSaftParameters.from_model_records([record])
eos = EquationOfState.pcsaft(parameters)

# Define thermodynamic conditions
Expand Down
12 changes: 3 additions & 9 deletions benches/state_creation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use feos::pcsaft::{PcSaft, PcSaftParameters};
use feos_core::si::*;
use feos_core::{
parameter::{IdentifierOption, Parameter},
Contributions, DensityInitialization, PhaseEquilibrium, Residual, State, TPSpec,
Contributions, DensityInitialization, PhaseEquilibrium, Residual, State, TemperatureOrPressure,
};
use ndarray::{Array, Array1};
use std::sync::Arc;
Expand All @@ -28,18 +28,12 @@ fn critical_point<E: Residual>((eos, n): (&Arc<E>, Option<&Moles<Array1<f64>>>))
}

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

/// VLE for pure substance for given temperature or pressure
fn pure<E: Residual, TP>((eos, t_or_p): (&Arc<E>, TP))
where
TPSpec: From<TP>,
{
fn pure<E: Residual, TP: TemperatureOrPressure>((eos, t_or_p): (&Arc<E>, TP)) {
PhaseEquilibrium::pure(eos, t_or_p, None, Default::default()).unwrap();
}

Expand Down
2 changes: 1 addition & 1 deletion docs/theory/dft/derivatives.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Derivatives of density profiles
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)).
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)).

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

Expand Down
Loading