T_07: User-Defined Functions

This example shows how to implement user-defined functions. A series of equilibria for an Fe-Cr-C alloy are calculated by varying temperature between 500 and 3000 K. In the configuration window of the Equilibrium Calculator under the Functions tab, two identically meaning functions are defined, fraction solid and f solid, the values of which are plotted against temperature in two Plot Renderer activities. Functions can be entered in terms of QuantitiesQ1, Q2, Q3 and so forth, or by using the Thermo‑Calc syntax.

Visualizations

This example is included as a tutorial on our website and as part of the Graphical Mode Examples playlist on our YouTube channel.

Open the example project file to review the node setup on the Project window and the associated settings on the Configuration window for each node. For some types of projects, you can also adjust settings on the Plot Renderer Configuration window to preview results before performing the simulation. Click Perform Tree to generate plots and tables to see the results on the Visualizations window.

T_07 Plot settings window showing the selection of the fraction solid function.

In the Plot Renderer settings window, click Show more and Show less to toggle between viewing all or some of the available settings.

T_07 result of the fraction solid function.

Figure 1: The result of the fraction_solid function.

The result of the f_solid function.

Figure 2: The result of the f_solid function.