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
Changelog added; commented blocks removed.
  • Loading branch information
Rolf Stierle committed Dec 1, 2022
commit 2d048314f8d02226553de0775fa8a5e0dfeada25
3 changes: 3 additions & 0 deletions feos-dft/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- `PlanarInterface` can now has methods for the calculation of the 90-10 interface thickness (`PlanarInterface::interfacial_thickness`), interfacial enrichtment (`PlanarInterface::interfacial_enrichment`), and the relative adsorption (`PlanarInterface::relative_adsorption`).

### Changed
- Added `Send` and `Sync` as supertraits to `HelmholtzEnergyFunctional` and all related traits. [#57](https://github.com/feos-org/feos/pull/57)
- Renamed the `3d_dft` feature to `rayon` in accordance to the other feos crates. [#62](https://github.com/feos-org/feos/pull/62)
Expand Down
9 changes: 1 addition & 8 deletions feos-dft/src/interface/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,6 @@ impl<U: EosUnit, F: HelmholtzEnergyFunctional> PlanarInterface<U, F> {

// Calculate the partial densities in the liquid and in the vapor phase
for i in 0..s[0] {
// rho_l.try_set(i, self.profile.density.get((i, 0)) * m[i])?;
// rho_v.try_set(i, self.profile.density.get((i, s[1] - 1)) * m[i])?;
rho_l.try_set(i, self.profile.density.get((i, 0)))?;
rho_v.try_set(i, self.profile.density.get((i, s[1] - 1)))?;
}
Expand Down Expand Up @@ -239,7 +237,7 @@ impl<U: EosUnit, F: HelmholtzEnergyFunctional> PlanarInterface<U, F> {
.index_axis(Axis_nd(0), i)
.iter()
.max_by(|&a, &b| a.total_cmp(b))
.unwrap()) // panics only of itertor is empty
.unwrap()) // panics only of iterator is empty
/ rho_l[i].max(rho_v[i])
});

Expand Down Expand Up @@ -280,10 +278,6 @@ impl<U: EosUnit, F: HelmholtzEnergyFunctional> PlanarInterface<U, F> {
let rho_l = rho[0].max(rho[s[1] - 1]);

if (rho_l - rho_v).abs() < 1.0e-10 {
// return Err(EosError::NotConverged(
// "Densities in both phases are to similar for interface thickness calculation."
// .to_string(),
// ));
return Ok(0.0 * U::reference_length());
}

Expand All @@ -293,7 +287,6 @@ impl<U: EosUnit, F: HelmholtzEnergyFunctional> PlanarInterface<U, F> {

// Get indizes right of intersection between density profile and
// constant density boundaries

let index_upper_plus = if rho[0] >= rho[s[1] - 1] {
rho.iter()
.enumerate()
Expand Down
1 change: 0 additions & 1 deletion feos-dft/src/python/interface/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ macro_rules! impl_planar_interface {
///
#[pyo3(text_signature = "($self)")]
Comment thread
RolfStierle marked this conversation as resolved.
fn interfacial_thickness(&self) -> PyResult<PySINumber> {
// let limits = (0.9, 0.1);
Ok(self.0.interfacial_thickness()?.into())
}
}
Expand Down
1 change: 0 additions & 1 deletion feos-dft/src/python/interface/surface_tension_diagram.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ macro_rules! impl_surface_tension_diagram {

#[getter]
pub fn interfacial_thickness(&self) -> PySIArray1 {
// let limits = (0.9, 0.1);
self.0.interfacial_thickness().into()
}
}
Expand Down