Equilibrium Calculator: Calculating and Plotting Functions

The Functions tab allows you to define your own functions that can be plotted in a Plot Renderer.

For an example of how you can use functions that you define, see T_07: User-Defined Functions.

  1. Add an Equilibrium Calculator node and click it in the Project window.
  2. In the Configuration window click the Functions tab.
  3. Under Quantity Definitions, define Q1. Click the add Button: plus sign to add something button to Add a new quantity. Then from the lists, choose the variable for each quantity to define. The quantities are called Q1, Q2, Q3 and so on. In this example, the quantity Q1 is defined as the Amount of phase, with No normalization, LIQUID in Mole units.

    Example of Function Definitions being added to an Equilibrium Calculator

  4. Under Function Definitions, click the add Button: plus sign to add something button to add a new function. In the left field edit the default name of each function and enter the function itself in the right field after the equal sign. In this example, the quantity defined as Q1 is renamed to fraction_solid, which gives as its output the fraction of solid phase (1-Q1).

    You can also use Console Mode syntax when entering the function. For example, the function above can be entered as 1-NP(LIQUID). See Parameters, Functions, and Variables.

  5. To plot the defined function, right-click Equilibrium Calculator and choose Create New Successor → Plot Renderer .
  6. Click the new Plot Renderer node.
    1. For the axis variable, which is grouped under an Axes section (Flexible Mode), or listed individually as X, Y, or Z (Grouped Mode), choose All variables from the first list.
    2. Select Function from the second list.
    3. From the third list, choose the function you defined on the Equilibrium Calculator Functions tab. In this example the Y axis is set to plot the value of the function f_solid.
    4. When run, the Plot Renderer plots the value of the function.
  7. Example of the Plot Renderer settings for functions