© MatCalc (2008)
 
 
 
 
 
 
 
 
   
 
   

T5: MatCalc built-in variables; graphical output (2)

This tutorial was created on

MatCalc version 5.23 rel 1.026

license: free

database: mc_sample_fe.tdb

 

Contents

  • Adding further plots to a plot window
  • Using the built-in variables
  • Defining a default x-axis
  • Modifying the series
  • Adding a new series to a plot
  • Removing a series from a plot
  • Duplicating and locking series
  • Editing series data
  • Converting series to tables

Before starting...

Re-open the file saved in Tutorial 4 and save it under a new name.

1. Adding plots of different variables

Creating a new plot

Highlight the plot window and right-click in this window outside the plot area to bring up the plot context menu already seen in Tutorial 4. Click on 'New plot'.

 

 

An empty plot appears below the original one.

Variables

As well as the phase fraction variables 'F$*' encountered in the previous tutorial, MatCalc contains many other built-in variables which are evaluated at each step-value of the stepped equilibrium calculations. These can be found in the variables window. Information about each variable is contained in the small window below the main variables window. Locate the 'driving forces' category and drag 'DFM$*' to the empty plot window, to give a plot as shown below.

 

 

Other variable categories of particular interest for stepped equilibrium calculations are highlighted in blue in the image below:

 

- 'favorites'

This contains the most frequently needed variables: temperature in Kelvin ('T') and in Celsius ('T$C'), step-value, phase fractions ('F$*') and compositions expressed in mole fraction ('X$*$*') and in weight percent ('X$*$*$wp'). In these composition variables, the first asterisk represents the phase, and the second, the element, for example 'X$LIQUID$C'.

- 'general'

Temperature, step-value and pressure can also be found under this category. The temperature is in Kelvin by default, but the temperature in Celsius can be obtained by appending '$C', as has already been seen in the 'Favorites' category. This suffix is known as a 'unit qualifier'. The 'information on variables' window shows the valid unit qualifiers for the variables:

 

- 'phase fractions'

The phase fractions 'F$*' are repeated here.

- 'composition'

This contains the 'X$*$*' composition variables mentioned above, and a number of other composition-related variables, expressed either as either mole fractions (X...) or as u-fractions (U...). (Not all of these are applicable to stepped-equilibrium calculations, however: 'XP$*$*' and 'UP$*$*' are for precipitation calculations.)

Compositions in weight percent are not given separately here, but it can be seen from the 'variables information' window that 'wp' is a valid unit qualifier for the variables beginning with 'X'. This means that weight percentages can be obtained by appending '$wp' to the names of these variables.

- 'site fractions'

The 'Y$*$*$*' variables give the site fraction of an element on a particular sublattice of a phase. For example, BCC_A2 has the variables 'Y$BCC_A2$FE$0' (site fraction of iron on sublattice 0) and 'Y$BCC_A2$C$1' (site fractions of carbon and vacancies on sublattice 1). The 'YX$*$*' variables represent the mole fraction of an element on a particular sublattice position of a phase; in this case, vacancies are not considered.

- 'state variables'

This category consists of a number of thermodynamic variables, including molar Gibbs free energies, entropies, enthalpies and heat capacities of the system and of each phase.

- 'chemical potentials', 'activities'

These categories include chemical potentials 'MU$*$*', activities 'AC$*$*' and activity coefficients 'ACC$*$*'.

Further plots can be added to the same plot window using 'New plot'; they will share the same buffer, default x-data and colour scheme. Some examples are shown below:


- Molar Gibbs free energy ('GMP$*')

 

- Chemical potential of carbon ('MU$*$C')

 

- Molar heat capacity ('CPP$*', note the lambda-anomaly at the Curie temperature in BCC_A2)

 

Default x-axis

To give a consistent appearance to all the x-axes in the plot window, a 'default x-axis' can be defined. This is found towards the top of the 'Options' window. Change 'no' to 'yes' in the 'use for all plots' line and define the properties of the x-axis in the same way as for a normal x-axis.

 

Displaying x-values of multiple plots

If the plot window contains several plots, right-clicking and dragging the mouse in one of these will display not only a cross in that plot, but a vertical line at the same x-value in all the others. An example is shown below:

 

2. Modifying the series in a plot

This part of the tutorial will demonstrate how to use the unit qualifiers mentioned above. Add a new plot to the plot window and drag and drop 'X$*$C' (carbon content of the phases) from the 'variables' window. The resulting plot should look like this:

 

 

By default, the carbon content is expressed in mole fraction. To change the units to weight percent, firstly click on the new plot to select it. This should expand the section of the 'Options' list which applies to the new plot. Click on the plus-sign by 'series' to open the series options:

 

 

Double-click on 'y-data' for the first series to open the following box. Append '$wp' to the existing expression and click 'OK'.

 

 

This will change the values plotted for the 'LIQUID' series. Repeat for the other three series. The final appearance of the plot, with appropriate axis labels added, should be as shown below.

 

 

3. Other series operations

Right-clicking in the 'Options' window displays a context menu:

 

 

- 'New series'

 

The 'New series' part of the menu expands to give the following sub-menu.

 

 

Clicking on 'Buffer results' creates an empty series (given the name of 'auto' on the plot) to contain variables evaluated from the results of a buffer. Edit the 'y-data' line in the 'Options' window for this series to enter any valid built-in or user-defined variable or an expression.

Variables can be copied from the 'Variables' window by right-clicking on the expression required to display a menu containing Copy, Paste and other operations.

 

 

The other series types which can be added are as follows:

'Table/experimental data': allows the user to add a set of experimental data points to a plot.
'Function/expression': enables an algebraic expression in (x) to be entered.

- 'Remove series', 'Remove all series', 'Remove all locked series'

To remove a series from a plot, first click on the plot to select it. This will expand the part of the Options list which applies to the plot. Select the name of the series from this list and choose 'Remove series' from the right-click menu (shown above) or press 'Delete'. Multiple series in the same plot can be selected at once by holding down the CTRL key while clicking on the series names. 'Remove all series' in the right-click menu deletes all the series in the selected plot. 'Remove all locked series' removes all the series which are locked (locking the series is described below).

- 'Duplicate and lock series ...', 'Duplicate and lock all series'

This feature is available in the right-click menus of both the Options window and the plot window. Select a series from the list shown and click on 'Duplicate'. This will lock the original series and create a copy. 'Duplicate and lock all series' performs this for all series in the selected plot.

The locked series is protected from any changes when the buffer contents are updated with new calculation results, but the copy is unlocked. This enables easy comparison between results obtained under different conditions.

 

- 'Edit series data ...'

This is also available in both the Options and the plot windows. Select a series and click on 'Edit...' to display a table containing the numerical data used to plot the graph.

 

 

The data can be copied using the 'Copy selection' or 'Copy all' buttons. The contents of the rows and columns can be modified using 'Paste' (to add data copied from another source), 'Clear cell(s)', 'Insert row', 'Insert col' and 'Delete rows/cols' buttons. Use 'Write' to save the whole dataset to a text file and 'Read' to load a dataset from a text file.

- 'Convert series to table'

This places the data from the series into a named table, which can be accessed from the 'Global' menu.
Select the series, click on 'Convert' and edit the name of the table, if necessary, in the box which appears, as shown below.

 

 

To open and edit a table, select 'Tables...' from the 'Global' menu. This will display a list of all the available tables, which can be edited in the same way as the series data described above.

 

‹‹ to the Top ››  ‹‹ to the Tutorial files ››