This repository has been archived by the owner on Jun 14, 2022. It is now read-only.
New struct StateVec
and simpler interfaces for phase equilibria
#48
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a new struct
StateVec
which contains a list of references to states and can be generated e.g. from a phase diagram or an adsorption isotherm to conveniently calculate properties of all states. Unfortunately, for the python interface the states need to be cloned. In this context some optimizations for the interfaces of phase equilibrium and diagram calculations are included:_t
and_p
functions is eliminated, because the code is well capable to determine the specification of the phase equilibrium from the units alone.PhaseDiagramBinary
andPhaseDiagramPure
had the same data structure and are thus combined into one single structPhaseDiagram
Phase diagrams can now be calculated using
PhaseDiagram::pure
,PhaseDiagram::binary_vle
,PhaseDiagram::lle
(technically this functionality can be used for an arbitrary number of components), andPhaseDiagram::binary_vlle
(which returns an instance ofPhaseDiagramHetero
).Single phase equilibria can be calculated from
PhaseEquilibrium::pure
,PhaseEquilibrium::bubble_point
,PhaseEquilibrium::dew_point
,PhaseEquilibrium::tp_flash
,PhaseEquilibrium::heteroazeotrope
, andPhaseEquilibrium::vle_pure_comps
. The latter is modified to return states with the same amount of components as the initial equation of state, as it is mainly used to calculate limiting behaviors of phase diagrams.closes #46