Skip to content

Make constructors in Parameter trait fallible #161

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

Merged
merged 3 commits into from
Jul 3, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed
- Adjusted all model's implementation of `Parameter` which now requires `Result`s in some methods. [#161](https://github.com/feos-org/feos/pull/161)

## [0.4.3] - 2023-03-20
- Python only: Release the changes introduced in `feos-core` 0.4.2.

Expand Down
3 changes: 2 additions & 1 deletion benches/contributions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ fn pcsaft(c: &mut Criterion) {
let moles = arr1(&[1.0, 1.0]) * MOL;
for comp1 in &[hexane, acetone, co2, ethanol] {
for comp2 in [&heptane, &dme, &acetylene, &propanol] {
let params = PcSaftParameters::new_binary(vec![comp1.clone(), comp2.clone()], None);
let params =
PcSaftParameters::new_binary(vec![comp1.clone(), comp2.clone()], None).unwrap();
let eos = Arc::new(PcSaft::new(Arc::new(params)));
let state = State::new_npt(&eos, t, p, &moles, DensityInitialization::Liquid).unwrap();
let state_hd = state.derive1(Derivative::DT);
Expand Down
3 changes: 2 additions & 1 deletion benches/dual_numbers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ fn methane_co2_pcsaft(c: &mut Criterion) {
)
.unwrap();
let k_ij = -0.0192211646;
let parameters = PcSaftParameters::new_binary(parameters.pure_records, Some(k_ij.into()));
let parameters =
PcSaftParameters::new_binary(parameters.pure_records, Some(k_ij.into())).unwrap();
let eos = Arc::new(PcSaft::new(Arc::new(parameters)));

// 230 K, 50 bar, x0 = 0.15
Expand Down
3 changes: 3 additions & 0 deletions feos-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Added new functions `isenthalpic_compressibility`, `thermal_expansivity` and `grueneisen_parameter` to `State`. [#154](https://github.com/feos-org/feos/pull/154)

### Changed
- Changed constructors of `Parameter` trait to return `Result`s. [#161](https://github.com/feos-org/feos/pull/161)

## [0.4.2] - 2023-04-03
### Fixed
- Fixed a wrong reference state in the implementation of the Peng-Robinson equation of state. [#151](https://github.com/feos-org/feos/pull/151)
Expand Down
Loading