Phase Equilibria

The IDAES toolset contains methods for generating and displaying phase equilibria data.

Available Methods

The phase equilibria methods include methods to calculate bubble and dew temperatures ( Txy_data()) and include this data in a readable Class (TXYDataClass). This class can be used in the method build_txy_diagrams() to create T-x-y diagrams.

idaes.core.util.phase_equilibria.Txy_data(model, component_1, component_2, pressure, num_points=20, temperature=298.15, print_level=0, solver=None, solver_op=None)[source]

Function to generate T-x-y data. The function builds a state block and extracts bubble and dew temperatures at P pressure for N number of compositions. As N is increased increase the time of the calculation will increase and create a smoother looking plot.

Parameters
  • component_1 – Component 1

  • component_2 – Component 2

  • pressure – Pressure at which the bubble and drew temperatures will be calculates

  • temperature – Temperature at which to initialize state block

  • num_points – Number of data point to be calculated

  • model – Model wit intialized Property package which contains data to calculate

  • 2 (bubble and dew temperatures for component 1 and component) –

  • print_level – printing level from initialization

  • solver – solver to use (default=None, use IDAES default solver)

  • solver_op – solver options

Returns

A class containing the T-x-y data

Return type

(Class)

idaes.core.util.phase_equilibria.TXYDataClass(component_1, component_2, Punits, Tunits, pressure)[source]

Write data needed for build_txy_diagrams() into a class. The class can be obtained by running Txy_data() or by assigining values to the class.

idaes.core.util.phase_equilibria.build_txy_diagrams(txy_data, figure_name=None, print_legend=True, include_pressure=False)[source]
Parameters
  • txy_data – Txy data class includes components bubble and dew

  • temperatures

  • compositions

  • components

  • pressure

  • units. (and) –

  • figure_name – if a figure name is included the plot will save with the name

  • figure_name.png

  • print_legend (bool) – = If True, include legend to distinguish between Bubble and dew temperature. The default is True.

  • include_pressure (bool) –

  • False. (calculated in legends. The default is) –

Returns

t-x-y plot

The methods also include Txy_diagram() which is a method that calculates the data and creates the plots automatically.

idaes.core.util.phase_equilibria.Txy_diagram(model, component_1, component_2, pressure, num_points=20, temperature=298.15, figure_name=None, print_legend=True, include_pressure=False, print_level=0, solver=None, solver_op=None)[source]

This method generates T-x-y plots. Given the components, pressure and property dictionary this function calls Txy_data() to generate T-x-y data and once the data has been generated calls build_txy_diagrams() to create a plot.

Parameters
  • component_1 – Component which composition will be plotted in x axis

  • component_2 – Component which composition will decrease in x axis

  • pressure – Pressure at which the bubble and drew temperatures will be calculated

  • temperature – Temperature at which to initialize state block

  • num_points – Number of data point to be calculated

  • properties – property package which contains parameters to calculate bubble

  • specified. (and dew temperatures for the mixture of the compnents) –

  • figure_name – if a figure name is included the plot will save with the name

  • figure_name.png

  • print_legend (bool) – = If True, include legend to distinguish between Bubble and dew temperature. The default is True.

  • include_pressure (bool) –

  • False. (calculated in legends. The default is) –

  • print_level – printing level from initialization

  • solver – solver to use (default=None, use IDAES default solver)

  • solver_op – solver options

Returns

Plot