Skip to content
This repository has been archived by the owner on Sep 14, 2022. It is now read-only.

Commit

Permalink
Fixes for changes in feos-dft (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
prehner authored Apr 8, 2022
1 parent fc32a85 commit 04ff8f4
Showing 1 changed file with 8 additions and 9 deletions.
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

0 comments on commit 04ff8f4

Please sign in to comment.