classPhaseIdentification
Extends from Modelica.Icons.Information (Icon for general information packages).
Information
Identification of phases
This library has not added any constraints on the number of phases or in which order they appear. This makes it possible to use the library in more use cases.
The phase specification is determined by the Phases record phases and the number of phases constant nP. For an external C-medium the phases record is automatically set in MultiPhaseMixture.Templates.ExternalTwoPhaseMixture while for a native Modelica implementaiton this has to be specifyed manually. But the number of phases has to be set manually, see restrictions MultiPhaseMixture.Information.Limitations.Tool.
Generic models
In order to write generic models where the order of the phases does not change following helper functions has been added to the library
- getPhaseIndex()
- createPhaseSubstanceVector()
- checkPhaseNames()
Convention
- Name the first liquid phase to Liquid, first vapor phase to Vapor and first solid phase to Solid. Most of the use cases only contain one liquid and vapor phase and in order to simplify the usage PhaseLabelLiquid and PhaseLabelVapor has been added to the interface. They assume these naming conventions.
Note
When using this medium library in a model application library, it could be an idéa to take decisions based on density instead of a label. Example: At the bottom of an separator set properties in the connector based on the present phase with the highest density instead of using the liquid label.