Skip to content
Open
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
73 changes: 49 additions & 24 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,41 @@ All notable changes to this project will be documented in this file.
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).

## [Breaking]
### Added
- Added `PoreSpecification` enum to specify the state of the fluid in the pore (currently chemical potential or moles). [#371](https://github.com/feos-org/feos/pull/371)
- Added the `Grid` and `PoreProfile` classes as an entry points to DFT in various coordinate systems in Python. [#376](https://github.com/feos-org/feos/pull/376)
- `PoreProfile.solver_log` now stores a timing profile of the different solver steps. [#385](https://github.com/feos-org/feos/pull/385)

### Changed
- Changed data type of initial temperatures or pressure for phase equilibrium calculations (`TemperatureOrPressure::Other`) from `D` to `f64`. [#369](https://github.com/feos-org/feos/pull/369)
- Reworked DFT solution algorithms slightly for the cases in which additional specifications are given. [#371](https://github.com/feos-org/feos/pull/371)
- External potentials are passed and returned as quantities (energies) instead of reduced units. [#372](https://github.com/feos-org/feos/pull/372)
- Merged the `Adsorption1D` and `Adsorption3D` classes in Python into `Adsorption` using dynamically dimensioned arrays. [#376](https://github.com/feos-org/feos/pull/376)
- If the `rayon` feature is activated (default for the released Python wheels), the evaluation of the helmholtz energy density and its derivatives will now be run in parallel. The number of CPUs can be set via the global rayon threadpool (see changelog for `0.9.5`) [#385](https://github.com/feos-org/feos/pull/385)

### Removed
- Removed the `DFTSpecification` trait in favor of only using the `DFTSpecification` enum (renamed from `DFTSpecifications`). [#371](https://github.com/feos-org/feos/pull/371)
- Removed the `Pore2D` and `Pore3D` interfaces including the (limited) calculation of external potentials for complex pore grometries. [#376](https://github.com/feos-org/feos/pull/376)
- Removed the free energy-averaged external (FEA) potential. [#376](https://github.com/feos-org/feos/pull/376)

### Fixed
- The Newton solver for cDFT now correctly handles specifications other than the chemical potential. [#384](https://github.com/feos-org/feos/pull/384)

### Packaging
- Removed the `gauss-quad` dependency which was only used in the FEA potential calculation. [#376](https://github.com/feos-org/feos/pull/376)
- Updated `quantity` and `num-dual` dependencies to 0.15. [#380](https://github.com/feos-org/feos/pull/380)

## [Unreleased]

## [0.10.1] - 2026-07-24
## [0.10.1](https://github.com/feos-org/feos/releases/tag/v0.10.1) - 2026-07-24
### Fixed
- Fixed some `unwrap`s in VLE routines. [#367](https://github.com/feos-org/feos/pull/367)

### Packaging
- Updated github action workflows to include pyodide/emscripten wheels. [#368](https://github.com/feos-org/feos/pull/368)

## [0.10.0] - 2026-07-15
## [0.10.0](https://github.com/feos-org/feos/releases/tag/v0.10.0) - 2026-07-15
### Added
- Extended tp-flash algorithm to static numbers of components and enabled automatic differentiation for binary systems. [#336](https://github.com/feos-org/feos/pull/336)
- Rewrote `PhaseEquilibrium::pure_p` to mirror `pure_t` and enabled automatic differentiation. [#337](https://github.com/feos-org/feos/pull/337)
Expand Down Expand Up @@ -46,15 +71,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updated `gauss-quad` dependency to 0.3. [#360](https://github.com/feos-org/feos/pull/360)
- Update `itertools` dependency to 0.15.

## [0.9.6] - 2026-07-03
## [0.9.6](https://github.com/feos-org/feos/releases/tag/v0.9.6) - 2026-07-03
### Added
- Added parameter import from SQL using the `rusqlite` dependency. [#352](https://github.com/feos-org/feos/pull/352)

### Fixed
- Fixed `PhaseDiagram.binary_vle()` panicking during search for VLLE (tried to access unallocated element). [#362](https://github.com/feos-org/feos/pull/362)
- Fixed reading binary association parameters from JSON. [#363](https://github.com/feos-org/feos/pull/363)

## [0.9.5] - 2026-04-14
## [0.9.5](https://github.com/feos-org/feos/releases/tag/v0.9.5) - 2026-04-14
### Added
- Add Rayon global thread pool control via `FEOS_MAX_THREADS` and `set_num_threads()`/ `get_num_threads()` to Python. [#346](https://github.com/feos-org/feos/pull/346)
- Added DIPPR107 parameterization for ideal gas heat capacities of Burkhardt et al. [#344](https://github.com/feos-org/feos/pull/344)
Expand All @@ -63,32 +88,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed the calculation of temperature and pressure derivatives of dew and bubble points. [#347](https://github.com/feos-org/feos/pull/347)
- Fixed the implementation of binary interaction parameters in ePC-SAFT. [#353](https://github.com/feos-org/feos/pull/353)

## [0.9.4] - 2026-03-09
## [0.9.4](https://github.com/feos-org/feos/releases/tag/v0.9.4) - 2026-03-09
### Changed
- Automatically detect VLLEs in `BinaryPhaseDiagram`. [#341](https://github.com/feos-org/feos/pull/341)

### Fixed
- Fixed the sign of the isothermal compressibility. [#342](https://github.com/feos-org/feos/pull/342)

## [0.9.3] - 2026-01-26
## [0.9.3](https://github.com/feos-org/feos/releases/tag/v0.9.3) - 2026-01-26
### Added
- Added `py-feos` tests to GitHub Actions and moved `pyo3/extension-module` feature to `pyproject.toml`. [#334](https://github.com/feos-org/feos/pull/334)

### Fixed
- Fixed `None` transformation when binary parameters are provided to `PyParameters` to properly raise errors. [#334](https://github.com/feos-org/feos/pull/334)
- Fixed the calculation of critical points and tp-flashes when one or more of the mixture components have zero composition. [#331](https://github.com/feos-org/feos/pull/331)

## [0.9.2] - 2025-12-11
## [0.9.2](https://github.com/feos-org/feos/releases/tag/v0.9.2) - 2025-12-11
### Fixed
- Fixed calculation of enthalpies of adsorption for mixtures. [#329](https://github.com/feos-org/feos/pull/329)
- Updated to `ndarray` 0.17 and `num-dual`0.13 to fix a broken dependency resolution. [#327](https://github.com/feos-org/feos/pull/327)
- Fixed calculation of parameter combination in entropy scaling for mixtures in `viscosity_correlation`, `diffusion_correlation`, `thermal_conductivity_correlation`. [#323](https://github.com/feos-org/feos/pull/323)

## [0.9.1] - 2025-11-24
## [0.9.1](https://github.com/feos-org/feos/releases/tag/v0.9.1) - 2025-11-24
### Fixed
- Fixed a wrong Jacobian entry in `heteroazeotrope_t`. (Thanks to @ImagineBaggins for reporting the issue) [#320](https://github.com/feos-org/feos/pull/320)

## [0.9.0] - 2025-11-08
## [0.9.0](https://github.com/feos-org/feos/releases/tag/v0.9.0) - 2025-11-08
### Added
- Integrated the functionalities of [`feos-ad`](https://github.com/feos-org/feos-ad). [#289](https://github.com/feos-org/feos/pull/289)
- In Rust: Full access to arbitrary derivatives of properties and phase equilibria with respect to model parameters. See, e.g., [`feos-campd`](https://github.com/feos-org/feos-campd) for an application to molecular design.
Expand All @@ -110,7 +135,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updated `numpy`, `PyO3` and `pythonize` dependencies to 0.27.
- Updated `nalgebra` dependency to 0.34.

## [0.8.0] - 2024-12-28
## [0.8.0](https://github.com/feos-org/feos/releases/tag/v0.8.0) - 2024-12-28
### Fixed
- Fixed the handling of association records in combination with induced association in PC-SAFT [#264](https://github.com/feos-org/feos/pull/264)

Expand All @@ -119,7 +144,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updated `num-dual` dependency to 0.11. [#262](https://github.com/feos-org/feos/pull/262)
- Updated `numpy` and `PyO3` dependencies to 0.23. [#262](https://github.com/feos-org/feos/pull/262)

## [0.7.0] - 2024-05-21
## [0.7.0](https://github.com/feos-org/feos/releases/tag/v0.7.0) - 2024-05-21
### Added
- Added SAFT-VR Mie equation of state. [#237](https://github.com/feos-org/feos/pull/237)
- Added ePC-SAFT equation of state. [#229](https://github.com/feos-org/feos/pull/229)
Expand All @@ -140,10 +165,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updated `num-dual` dependency to 0.9. [#238](https://github.com/feos-org/feos/pull/238)
- Updated `numpy` and `PyO3` dependencies to 0.21. [#238](https://github.com/feos-org/feos/pull/238)

## [0.6.1] - 2024-01-11
## [0.6.1](https://github.com/feos-org/feos/releases/tag/v0.6.1) - 2024-01-11
- Python only: Release the changes introduced in `feos-core` 0.6.1.

## [0.6.0] - 2023-12-19
## [0.6.0](https://github.com/feos-org/feos/releases/tag/v0.6.0) - 2023-12-19
### Added
- Added `EquationOfState.ideal_gas()` to initialize an equation of state that only consists of an ideal gas contribution. [#204](https://github.com/feos-org/feos/pull/204)
- Added `PureRecord`, `SegmentRecord`, `Identifier`, and `IdentifierOption` to `feos.ideal_gas`. [#205](https://github.com/feos-org/feos/pull/205)
Expand All @@ -154,10 +179,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Split `feos.ideal_gas` into `feos.joback` and `feos.dippr`. [#204](https://github.com/feos-org/feos/pull/204)

## [0.5.1] - 2023-11-23
## [0.5.1](https://github.com/feos-org/feos/releases/tag/v0.5.1) - 2023-11-23
- Python only: Release the changes introduced in `feos-core` 0.5.1.

## [0.5.0] - 2023-10-20
## [0.5.0](https://github.com/feos-org/feos/releases/tag/v0.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 @@ -178,20 +203,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- 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
## [0.4.3](https://github.com/feos-org/feos/releases/tag/v0.4.3) - 2023-03-20
- Python only: Release the changes introduced in `feos-core` 0.4.2.

## [0.4.2] - 2023-03-20
## [0.4.2](https://github.com/feos-org/feos/releases/tag/v0.4.2) - 2023-03-20
- Python only: Release the changes introduced in `feos-core` 0.4.1 and `feos-dft` 0.4.1.

## [0.4.1] - 2023-01-28
## [0.4.1](https://github.com/feos-org/feos/releases/tag/v0.4.1) - 2023-01-28
### Changed
- Replaced some slow array operations to make calculations with multiple associating molecules significantly faster. [#129](https://github.com/feos-org/feos/pull/129)

### Fixed
- Fixed a regression introduced in [#108](https://github.com/feos-org/feos/pull/108) that lead to incorrect results for the 3B association scheme. [#129](https://github.com/feos-org/feos/pull/129)

## [0.4.0] - 2023-01-27
## [0.4.0](https://github.com/feos-org/feos/releases/tag/v0.4.0) - 2023-01-27
### Added
- Added SAFT-VRQ Mie equation of state and Helmholtz energy functional for first order Feynman-Hibbs corrected Mie fluids. [#79](https://github.com/feos-org/feos/pull/79)
- Added `estimator` module to documentation. [#86](https://github.com/feos-org/feos/pull/86)
Expand All @@ -215,14 +240,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed incorrect indexing that lead to panics in the polar contribution of gc-PC-SAFT. [#104](https://github.com/feos-org/feos/pull/104)
- `VaporPressure` now returns an empty array instead of crashing. [#124](https://github.com/feos-org/feos/pull/124)

## [0.3.0] - 2022-09-14
## [0.3.0](https://github.com/feos-org/feos/releases/tag/v0.3.0) - 2022-09-14
- Major restructuring of the entire `feos` project. All individual models are reunited in the `feos` crate. `feos-core` and `feos-dft` still live as individual crates within the `feos` workspace.

## [0.2.1] - 2022-05-13
## [0.2.1](https://github.com/feos-org/feos/releases/tag/v0.2.1) - 2022-05-13
### Fixed
- Fixed a bug due to which the default ideal gas contribution was used for every equation of state. [#17](https://github.com/feos-org/feos/pull/17)

## [0.2.0] - 2022-05-10
## [0.2.0](https://github.com/feos-org/feos/releases/tag/v0.2.0) - 2022-05-10
### Added
- Added [gc-PC-SAFT](https://github.com/feos-org/feos-gc-pcsaft) equation of state and Helmholtz energy functional.
- Added [PeTS](https://github.com/feos-org/feos-pets) equation of state and Helmholtz energy functional.
Expand All @@ -237,7 +262,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updated [`feos-dft`](https://github.com/feos-org/feos-dft/blob/main/CHANGELOG.md) to 0.2.0.
- Updated [`feos-pcsaft`](https://github.com/feos-org/feos-pcsaft/blob/main/CHANGELOG.md) to 0.2.0.

## [0.1.1] - 2022-02-23
## [0.1.1](https://github.com/feos-org/feos/releases/tag/v0.1.1) - 2022-02-23
### Added
- Added `pyproject.toml`. [#8](https://github.com/feos-org/feos/pull/8)
- Fixed modules of `SI` classes to make them pickleable. [#8](https://github.com/feos-org/feos/pull/8)
Expand All @@ -246,6 +271,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updated [`feos-core`](https://github.com/feos-org/feos-core/blob/main/CHANGELOG.md) to 0.1.5.
- Updated [`feos-dft`](https://github.com/feos-org/feos-dft/blob/main/CHANGELOG.md) to 0.1.3.

## [0.1.0] - 2022-01-14
## [0.1.0](https://github.com/feos-org/feos/releases/tag/v0.1.0) - 2022-01-14
### Added
- Initial release
5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ keywords = [
categories = ["science"]

[workspace.dependencies]
quantity = "0.14"
num-dual = "0.14"
quantity = "0.15"
num-dual = "0.15"
ndarray = "0.17"
nalgebra = "0.35"
thiserror = "2.0"
Expand All @@ -38,7 +38,6 @@ petgraph = "0.8"
rustdct = "0.7"
rustfft = "6.0"
libm = "0.2"
gauss-quad = "0.3"
approx = "0.5"
criterion = "0.8"
paste = "1.0"
Expand Down
7 changes: 3 additions & 4 deletions crates/feos-core/src/ad/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ mod properties;
pub use dataset::*;
pub use properties::*;

pub(crate) type Gradient<const P: usize> = DualSVec<f64, f64, P>;
pub(crate) type Gradient<const P: usize> = DualSVec<f64, P>;

/// A model that can be evaluated with derivatives of its parameters.
pub trait ParametersAD<N: Dim>: Residual<N>
Expand All @@ -23,7 +23,7 @@ where
/// defines the canonical parameter order.
///
/// Set `differentiable` to `false` for fixed parameters.
fn build<D: DualNum<f64, Inner = f64> + Copy>(
fn build<D: DualNum<Primitive = f64, Inner = f64> + Copy>(
f: impl FnMut(&'static str, bool) -> D,
) -> Self::Lifted<D>;

Expand Down Expand Up @@ -66,8 +66,7 @@ where
idx += 1;
let mut d = Gradient::<P>::from(parameter_values[i]);
if let Some(seed_idx) = derivative_names.iter().position(|&n| n == name) {
d.eps =
Derivative::<_, _, Const<P>, _>::derivative_generic(Const::<P>, U1, seed_idx);
d.eps = Derivative::<_, Const<P>, _>::derivative_generic(Const::<P>, U1, seed_idx);
}
d
})
Expand Down
2 changes: 1 addition & 1 deletion crates/feos-core/src/ad/properties/boiling_temperature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ where
type Unit = _Temperature;
const REFERENCE: Temperature = KELVIN;

fn evaluate<E: Residual<N, D>, D: DualNum<f64, Inner = f64> + Copy>(
fn evaluate<E: Residual<N, D>, D: DualNum<Primitive = f64, Inner = f64> + Copy>(
&self,
eos: &E,
) -> FeosResult<Temperature<D>> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ where
type Unit = _Pressure;
const REFERENCE: Pressure = PASCAL;

fn evaluate<E: Residual<N, D>, D: DualNum<f64, Inner = f64> + Copy>(
fn evaluate<E: Residual<N, D>, D: DualNum<Primitive = f64, Inner = f64> + Copy>(
&self,
eos: &E,
) -> FeosResult<Pressure<D>>
Expand Down
2 changes: 1 addition & 1 deletion crates/feos-core/src/ad/properties/dew_point_pressure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ where
type Unit = _Pressure;
const REFERENCE: Pressure = PASCAL;

fn evaluate<E: Residual<N, D>, D: DualNum<f64, Inner = f64> + Copy>(
fn evaluate<E: Residual<N, D>, D: DualNum<Primitive = f64, Inner = f64> + Copy>(
&self,
eos: &E,
) -> FeosResult<Pressure<D>>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ where
type Unit = _MolarEnergy;
const REFERENCE: MolarEnergy = MolarEnergy::new(1.0);

fn evaluate<E: Residual<N, D>, D: DualNum<f64, Inner = f64> + Copy>(
fn evaluate<E: Residual<N, D>, D: DualNum<Primitive = f64, Inner = f64> + Copy>(
&self,
eos: &E,
) -> FeosResult<MolarEnergy<D>> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ where
type Unit = _Density;
const REFERENCE: Density = Density::new(1000.0);

fn evaluate<E: Residual<N, D>, D: DualNum<f64, Inner = f64> + Copy>(
fn evaluate<E: Residual<N, D>, D: DualNum<Primitive = f64, Inner = f64> + Copy>(
&self,
eos: &E,
) -> FeosResult<Density<D>> {
Expand Down
2 changes: 1 addition & 1 deletion crates/feos-core/src/ad/properties/liquid_density.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ where
type Unit = _Density;
const REFERENCE: Density = Density::new(1000.0);

fn evaluate<E: Residual<N, D>, D: DualNum<f64, Inner = f64> + Copy>(
fn evaluate<E: Residual<N, D>, D: DualNum<Primitive = f64, Inner = f64> + Copy>(
&self,
eos: &E,
) -> FeosResult<Density<D>> {
Expand Down
2 changes: 1 addition & 1 deletion crates/feos-core/src/ad/properties/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ where
const REFERENCE: Quantity<f64, Self::Unit>;

/// Evaluate the property for an arbitrary derivative.
fn evaluate<E: Residual<N, D>, D: DualNum<f64, Inner = f64> + Copy>(
fn evaluate<E: Residual<N, D>, D: DualNum<Primitive = f64, Inner = f64> + Copy>(
&self,
eos: &E,
) -> FeosResult<Quantity<D, Self::Unit>>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ where
type Unit = _MolarEntropy;
const REFERENCE: MolarEntropy = MolarEntropy::new(1.0);

fn evaluate<E: Residual<N, D>, D: DualNum<f64, Inner = f64> + Copy>(
fn evaluate<E: Residual<N, D>, D: DualNum<Primitive = f64, Inner = f64> + Copy>(
&self,
eos: &E,
) -> FeosResult<MolarEntropy<D>> {
Expand Down
2 changes: 1 addition & 1 deletion crates/feos-core/src/ad/properties/vapor_pressure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ where
type Unit = _Pressure;
const REFERENCE: Pressure = PASCAL;

fn evaluate<E: Residual<N, D>, D: DualNum<f64, Inner = f64> + Copy>(
fn evaluate<E: Residual<N, D>, D: DualNum<Primitive = f64, Inner = f64> + Copy>(
&self,
eos: &E,
) -> FeosResult<Pressure<D>> {
Expand Down
4 changes: 2 additions & 2 deletions crates/feos-core/src/cubic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ impl ResidualDyn for PengRobinson {
self.tc.len()
}

fn compute_max_density<D: DualNum<f64> + Copy>(&self, molefracs: &DVector<D>) -> D {
fn compute_max_density<D: DualNum<Primitive = f64> + Copy>(&self, molefracs: &DVector<D>) -> D {
D::from(0.9) / molefracs.dot(&self.b.map(D::from))
}

fn reduced_helmholtz_energy_density_contributions<D: DualNum<f64> + Copy>(
fn reduced_helmholtz_energy_density_contributions<D: DualNum<Primitive = f64> + Copy>(
&self,
state: &StateHD<D>,
) -> Vec<(&'static str, D)> {
Expand Down
2 changes: 1 addition & 1 deletion crates/feos-core/src/density_iteration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use nalgebra::{DefaultAllocator, Dim, OVector};
use num_dual::{Dual, DualNum, first_derivative};
use quantity::{Density, Pressure, Temperature};

pub fn density_iteration<E: Residual<N, D>, N: Dim, D: DualNum<f64> + Copy>(
pub fn density_iteration<E: Residual<N, D>, N: Dim, D: DualNum<Primitive = f64> + Copy>(
eos: &E,
temperature: Temperature<D>,
pressure: Pressure<D>,
Expand Down
Loading