Skip to content
This repository was archived by the owner on Jul 28, 2022. It is now read-only.

Tangential pressure#22

Merged
prehner merged 3 commits intov0.2.0from
tangential_pressure
Apr 12, 2022
Merged

Tangential pressure#22
prehner merged 3 commits intov0.2.0from
tangential_pressure

Conversation

@RolfStierle
Copy link
Collaborator

Added grand potential density and grand potential to DFT<T> and Python interface. Allows accessing the grand potential density for a density profile.

@RolfStierle RolfStierle added the enhancement New feature or request label Mar 14, 2022
@prehner
Copy link
Contributor

prehner commented Mar 14, 2022

This is a bit of a sensitive topic as the grand potential is the most important property describing open inhomogeneous systems. Therefore it should work in all circumstances including heterosegmented DFT (whether the chains are fused or not is irrelevant). What I wonder is: is there ever a need for a residual grand potential density? I assume to factor out some ideal gas pressure in a non-equilibrium application? In any way we shouldn't have two functions for the same purpose.

For the functions in DFTProfile: There is no need to instantiate a new Convolver. For the entropy function, this is only required because we need a Dual64 convolver. For the grand potential you can just use self.convolver. Also, to reduce redundancy, grand_potential should just call grand_potential_density and integrate it. To have it as a function of DFTProfile is nice to have, because right now the grand potential is calculated e.g. as

// calculate grand potential density
let omega = self
    .profile
    .integrate(&self.profile.dft.grand_potential_density(
        self.profile.temperature,
        &self.profile.density,
        &self.profile.convolver,
    )?);

These instances should be changed, when there is a simpler way available.

@RolfStierle RolfStierle requested a review from prehner March 14, 2022 10:22
@prehner prehner force-pushed the tangential_pressure branch 2 times, most recently from 1f00914 to 90f5466 Compare April 12, 2022 13:17
@prehner prehner force-pushed the tangential_pressure branch from 90f5466 to 8e8d1b3 Compare April 12, 2022 13:18
@prehner prehner changed the base branch from main to v0.2.0 April 12, 2022 13:19
@prehner prehner merged commit c68bc73 into v0.2.0 Apr 12, 2022
@prehner prehner deleted the tangential_pressure branch April 12, 2022 13:36
prehner added a commit that referenced this pull request Apr 12, 2022
* Release v0.2.0

* Add additional dual numbers for crit point calculation

* change dependency to github

* moved creation of python module to build_wheel crate

* back to github

* use StateVec in SurfaceTensionDiagram

* fix python macro

* update Cargo.toml

* Add density as additional parameter to DFTProfile::new() (#24)

* Add density as additional parameter to DFTProfile::new()

* Fix calculation of pore volume

* update changelog

* Less redundant approach to the `DFT` wrapper struct (#27)

* Add optional field cutoff_radius to FEA Potential (#25)

* Tangential pressure (#22)

* Tangential pressure

* fix python getters

* remove partially duplicate grand_potential getter

Co-authored-by: Philipp Rehner <prehner@ethz.ch>

* update changelog and version number

* udpate feos-core dependency

Co-authored-by: Rolf Stierle <RolfStierle@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants