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
cleanup
  • Loading branch information
prehner committed Apr 3, 2023
commit fba05c232e482e552f143ef195fe04e49ac528ef
28 changes: 0 additions & 28 deletions src/pcsaft/parameters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use feos_core::parameter::{
};
use ndarray::{Array, Array1, Array2};
use num_dual::DualNum;
use num_traits::Zero;
use quantity::si::{JOULE, KB, KELVIN};
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
Expand Down Expand Up @@ -517,33 +516,6 @@ impl PcSaftParameters {
}
}

impl std::fmt::Display for PcSaftParameters {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "PcSaftParameters(")?;
write!(f, "\n\tmolarweight={}", self.molarweight)?;
write!(f, "\n\tm={}", self.m)?;
write!(f, "\n\tsigma={}", self.sigma)?;
write!(f, "\n\tepsilon_k={}", self.epsilon_k)?;
if !self.dipole_comp.is_empty() {
write!(f, "\n\tmu={}", self.mu)?;
}
if !self.quadpole_comp.is_empty() {
write!(f, "\n\tq={}", self.q)?;
}
// if !self.association.is_empty() {
// write!(f, "\n\tassociating={}", self.association.assoc_comp)?;
// write!(f, "\n\tkappa_ab={}", self.association.kappa_ab)?;
// write!(f, "\n\tepsilon_k_ab={}", self.association.epsilon_k_ab)?;
// write!(f, "\n\tna={}", self.association.na)?;
// write!(f, "\n\tnb={}", self.association.nb)?;
// }
if !self.k_ij.iter().all(|k| k.is_zero()) {
write!(f, "\n\tk_ij=\n{}", self.k_ij)?;
}
write!(f, "\n)")
}
}

#[cfg(test)]
pub mod utils {
use super::*;
Expand Down
4 changes: 0 additions & 4 deletions src/pcsaft/python.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,6 @@ impl PyPcSaftParameters {
fn _repr_markdown_(&self) -> String {
self.0.to_markdown()
}

fn __repr__(&self) -> PyResult<String> {
Ok(self.0.to_string())
}
}

#[pymodule]
Expand Down
26 changes: 0 additions & 26 deletions tests/gc_pcsaft/dft.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,35 +135,9 @@ fn test_bulk_association() -> Result<(), Box<dyn Error>> {
let state_func = State::new_nvt(&func, t, v, &n)?;
let p_eos = state_eos.pressure_contributions();
let p_func = state_func.pressure_contributions();
// println!(
// "Equation of state:
// \tcomps: {}
// \tkappa_ab: {}
// \tepsilon_k_ab: {}
// \tna: {}
// \tnb: {}",
// eos_parameters.association.assoc_comp,
// eos_parameters.association.kappa_ab,
// eos_parameters.association.epsilon_k_ab,
// eos_parameters.association.na,
// eos_parameters.association.nb,
// );
for (s, x) in &p_eos {
println!("{s:18}: {x:21.16}");
}
// println!(
// "\nHelmholtz energy functional:
// \tcomps: {}
// \tkappa_ab: {}
// \tepsilon_k_ab: {}
// \tna: {}
// \tnb: {}",
// func_parameters.association.assoc_comp,
// func_parameters.association.kappa_ab,
// func_parameters.association.epsilon_k_ab,
// func_parameters.association.na,
// func_parameters.association.nb,
// );
for (s, x) in &p_func {
println!("{s:26}: {x:21.16}");
}
Expand Down