Skip to content

Revive PhaseEquilibrium::new_npt in the public interface#164

Merged
prehner merged 2 commits intomainfrom
revive_new_npt
Jul 7, 2023
Merged

Revive PhaseEquilibrium::new_npt in the public interface#164
prehner merged 2 commits intomainfrom
revive_new_npt

Conversation

@prehner
Copy link
Copy Markdown
Contributor

@prehner prehner commented Jul 7, 2023

Currently there is no way to create a PhaseEquilibrium object without calling any of the solvers. Some solvers (e.g., the tp flash), however, use a PhaseEquilibrium as initialization. Therefore the new_npt function can be used to create custom initial guesses. Currently the docstring informs the users that the result is not a phase equilibrium, but I would not be surprised if someone uses the function with the assumption that it is a (much faster and better converging) tp flash.

@prehner prehner marked this pull request as ready for review July 7, 2023 10:48
@prehner prehner enabled auto-merge (squash) July 7, 2023 10:48
@prehner prehner requested a review from g-bauer July 7, 2023 10:48
@prehner prehner added enhancement New feature or request core related to features in feos-core labels Jul 7, 2023
@prehner prehner added this to the v0.5.0 milestone Jul 7, 2023
///
/// The constructor can be used in custom phase equilibrium solvers or,
/// e.g., to generate initial guesses for an actual VLE solver.
/// In general, the two states generated are NOT in an equilibrium.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make this even more visible, we could add a header, i.e.

/// # Note
///
/// In general, the two states generated are NOT in an equilibrium.

@prehner prehner merged commit 9cd80cd into main Jul 7, 2023
@prehner prehner deleted the revive_new_npt branch July 7, 2023 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core related to features in feos-core enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants