Phase Sorting
Table of Contents
Introduction
Dynamics mode supports three phases, and stores each in a different slot, and keeps track of each phase. It can happen that part of the simulation has only one liquid phase and other parts of it have two liquid phases. The flash by default also uses arbitrary cut-off rules to determine whether a phase is aqueous or not, and that can cause the order of phases returned by the flash to suddenly change. This can cause severe model instability and you can best see this on the vessel phases page:

If the liquid levels and moles flip between the second and third slots as the integrator runs, then the case has a phase sorting problem.
Configuration
This problem can best be dealt with by using the phase sorting options of the fluid package in the basis environment:

These settings allow a custom definition of when a liquid phase should be in slot1 versus slot 2. It should be set up in such a way that the same phase will always end up in the same slot throughout the model (i.e. no phase flipping).
It is generally recommended that the phase sorting option be applied to avoid the possibility of this type of problem.
< Advanced Topics | Index | Choosing Controller Process Variables >