Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
thank god for unit tests
  • Loading branch information
prehner committed Jun 12, 2025
commit d501f13df314260c758760541dd5f5809c4de1b2
2 changes: 1 addition & 1 deletion crates/feos-core/src/parameter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ where
pure_records: Vec<PureRecord<Self::Pure>>,
binary_record: Option<Self::Binary>,
) -> FeosResult<Self> {
let binary_record = binary_record.into_iter().map(|r| ([0, 0], r)).collect();
let binary_record = binary_record.into_iter().map(|r| ([0, 1], r)).collect();
Self::from_records(pure_records, binary_record)
}

Expand Down
18 changes: 0 additions & 18 deletions crates/feos/src/epcsaft/parameters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,24 +209,6 @@ impl ElectrolytePcSaftBinaryRecord {
}
}

impl From<f64> for ElectrolytePcSaftBinaryRecord {
fn from(k_ij: f64) -> Self {
Self {
k_ij: vec![k_ij, 0., 0., 0.],
association: None,
}
}
}

impl From<Vec<f64>> for ElectrolytePcSaftBinaryRecord {
fn from(k_ij: Vec<f64>) -> Self {
Self {
k_ij,
association: None,
}
}
}

impl From<ElectrolytePcSaftBinaryRecord> for f64 {
fn from(binary_record: ElectrolytePcSaftBinaryRecord) -> Self {
match binary_record.k_ij.first() {
Expand Down
16 changes: 0 additions & 16 deletions crates/feos/src/saftvrmie/parameters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,22 +177,6 @@ impl SaftVRMieBinaryRecord {
}
}

impl From<f64> for SaftVRMieBinaryRecord {
fn from(k_ij: f64) -> Self {
Self {
k_ij,
gamma_ij: f64::default(),
association: None,
}
}
}

impl From<SaftVRMieBinaryRecord> for f64 {
fn from(binary_record: SaftVRMieBinaryRecord) -> Self {
binary_record.k_ij
}
}

impl std::fmt::Display for SaftVRMieBinaryRecord {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut tokens = vec![];
Expand Down
20 changes: 0 additions & 20 deletions crates/feos/src/saftvrqmie/parameters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,26 +109,6 @@ impl std::fmt::Display for SaftVRQMieBinaryRecord {
}
}

impl TryFrom<f64> for SaftVRQMieBinaryRecord {
type Error = FeosError;

fn try_from(_f: f64) -> Result<Self, Self::Error> {
Err(FeosError::IncompatibleParameters(
"Cannot infer k_ij and l_ij from single float.".to_string(),
))
}
}

impl TryFrom<SaftVRQMieBinaryRecord> for f64 {
type Error = FeosError;

fn try_from(_f: SaftVRQMieBinaryRecord) -> Result<Self, Self::Error> {
Err(FeosError::IncompatibleParameters(
"Cannot infer k_ij and l_ij from single float.".to_string(),
))
}
}

/// Parameter set required for the SAFT-VRQ Mie equation of state and Helmholtz energy functional.
pub struct SaftVRQMieParameters {
pub molarweight: Array1<f64>,
Expand Down