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

Fix ideal gas contribution for EquationOfState #17

Merged
merged 1 commit into from
May 13, 2022
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
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