Skip to content

Commit a9a6d2b

Browse files
authored
Fix ideal gas contribution for EquationOfState (#17)
1 parent 987c6a1 commit a9a6d2b

File tree

5 files changed

+20
-5
lines changed

5 files changed

+20
-5
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [0.2.1] - 2022-05-13
10+
### Fixed
11+
- 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)
12+
913
## [0.2.0] - 2022-05-10
1014
### Added
1115
- Added [gc-PC-SAFT](https://github.com/feos-org/feos-gc-pcsaft) equation of state and Helmholtz energy functional.

Cargo.lock

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "feos"
3-
version = "0.2.0"
3+
version = "0.2.1"
44
authors = ["Gernot Bauer <[email protected]>", "Philipp Rehner <[email protected]>"]
55
edition = "2018"
66
rust-version = "1.53"

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ The following models are currently published as part of the `FeOs` framework
3535
|[`feos-pets`](https://github.com/feos-org/feos-pets)|perturbed truncated and shifted Lennard-Jones mixtures|||
3636
|[`feos-uvtheory`](https://github.com/feos-org/feos-uvtheory)|equation of state for Mie fluids and mixtures|||
3737

38-
The list is being expanded continuously. Currently under development are implementations of ePC-SAFT, a Helmholtz energy functional for the UV theory, SAFT-VRQ-Mie.
38+
The list is being expanded continuously. Currently under development are implementations of ePC-SAFT, a Helmholtz energy functional for the UV theory, and SAFT-VRQ-Mie.
3939

4040
Other public repositories that implement models within the `FeOs` framework, but are currently not part of the `feos` Python package, are
4141

src/eos.rs

+11
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,17 @@ impl EquationOfState for EosVariant {
7575
EosVariant::UVTheory(eos) => eos.residual(),
7676
}
7777
}
78+
79+
fn ideal_gas(&self) -> &dyn IdealGasContribution {
80+
match self {
81+
EosVariant::PcSaft(eos) => eos.ideal_gas(),
82+
EosVariant::GcPcSaft(eos) => eos.ideal_gas(),
83+
EosVariant::PengRobinson(eos) => eos.ideal_gas(),
84+
EosVariant::Python(eos) => eos.ideal_gas(),
85+
EosVariant::Pets(eos) => eos.ideal_gas(),
86+
EosVariant::UVTheory(eos) => eos.ideal_gas(),
87+
}
88+
}
7889
}
7990

8091
impl MolarWeight<SIUnit> for EosVariant {

0 commit comments

Comments
 (0)