Skip to content

Commit

Permalink
Fix ideal gas contribution for EquationOfState (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
prehner authored May 13, 2022
1 parent 987c6a1 commit a9a6d2b
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.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
### Added
- Added [gc-PC-SAFT](https://github.com/feos-org/feos-gc-pcsaft) equation of state and Helmholtz energy functional.
Expand Down
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "feos"
version = "0.2.0"
version = "0.2.1"
authors = ["Gernot Bauer <[email protected]>", "Philipp Rehner <[email protected]>"]
edition = "2018"
rust-version = "1.53"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The following models are currently published as part of the `FeOs` framework
|[`feos-pets`](https://github.com/feos-org/feos-pets)|perturbed truncated and shifted Lennard-Jones mixtures|||
|[`feos-uvtheory`](https://github.com/feos-org/feos-uvtheory)|equation of state for Mie fluids and mixtures|||

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.
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.

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

Expand Down
11 changes: 11 additions & 0 deletions src/eos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,17 @@ impl EquationOfState for EosVariant {
EosVariant::UVTheory(eos) => eos.residual(),
}
}

fn ideal_gas(&self) -> &dyn IdealGasContribution {
match self {
EosVariant::PcSaft(eos) => eos.ideal_gas(),
EosVariant::GcPcSaft(eos) => eos.ideal_gas(),
EosVariant::PengRobinson(eos) => eos.ideal_gas(),
EosVariant::Python(eos) => eos.ideal_gas(),
EosVariant::Pets(eos) => eos.ideal_gas(),
EosVariant::UVTheory(eos) => eos.ideal_gas(),
}
}
}

impl MolarWeight<SIUnit> for EosVariant {
Expand Down

0 comments on commit a9a6d2b

Please sign in to comment.