Skip to content
This repository was archived by the owner on Sep 14, 2022. It is now read-only.
Merged
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
17 changes: 8 additions & 9 deletions src/dft/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use feos_core::{IdealGasContribution, MolarWeight};
use feos_dft::adsorption::FluidParameters;
use feos_dft::fundamental_measure_theory::{FMTContribution, FMTProperties, FMTVersion};
use feos_dft::solvation::PairPotential;
use feos_dft::{FunctionalContribution, HelmholtzEnergyFunctional, DFT};
use feos_dft::{FunctionalContribution, HelmholtzEnergyFunctional, MoleculeShape, DFT};
use hard_chain::ChainFunctional;
use ndarray::{Array, Array1, Array2};
use num_dual::DualNum;
Expand Down Expand Up @@ -92,15 +92,14 @@ impl PcSaftFunctional {
None => Joback::default(parameters.m.len()),
};

let func = Self {
(Self {
parameters: parameters.clone(),
fmt_version,
options: saft_options,
contributions,
joback,
};

DFT::new_homosegmented(func, &parameters.m)
})
.into()
}
}

Expand All @@ -126,6 +125,10 @@ impl HelmholtzEnergyFunctional for PcSaftFunctional {
fn ideal_gas(&self) -> &dyn IdealGasContribution {
&self.joback
}

fn molecule_shape(&self) -> MoleculeShape {
MoleculeShape::NonSpherical(&self.parameters.m)
}
}

impl MolarWeight<SIUnit> for PcSaftFunctional {
Expand Down Expand Up @@ -156,10 +159,6 @@ impl FluidParameters for PcSaftFunctional {
fn sigma_ff(&self) -> &Array1<f64> {
&self.parameters.sigma
}

fn m(&self) -> Array1<f64> {
self.parameters.m.clone()
}
}

impl PairPotential for PcSaftFunctional {
Expand Down