Skip to content
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

Merged
merged 4 commits into from
Mar 26, 2022

Conversation

prehner
Copy link
Contributor

@prehner prehner commented Mar 21, 2022

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:

  • The distinction between _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 and PhaseDiagramPure had the same data structure and are thus combined into one single struct PhaseDiagram

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), and PhaseDiagram::binary_vlle (which returns an instance of PhaseDiagramHetero).

Single phase equilibria can be calculated from PhaseEquilibrium::pure, PhaseEquilibrium::bubble_point, PhaseEquilibrium::dew_point, PhaseEquilibrium::tp_flash, PhaseEquilibrium::heteroazeotrope, and PhaseEquilibrium::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

@prehner prehner added this to the v0.2.0 milestone Mar 21, 2022
prehner added a commit that referenced this pull request Mar 25, 2022
@g-bauer g-bauer merged commit 9cd78e6 into main Mar 26, 2022
@g-bauer g-bauer deleted the state_vec branch March 26, 2022 10:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

units in PhaseDiagramPure
2 participants