0% found this document useful (0 votes)
15 views

Intro OC6

The document provides an introduction to the OpenCalphad software version 6, summarizing its structure, capabilities, and new features. It describes the background and goals of the software, how to download and run it, and gives an overview of its commands and functionality.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Intro OC6

The document provides an introduction to the OpenCalphad software version 6, summarizing its structure, capabilities, and new features. It describes the background and goals of the software, how to download and run it, and gives an overview of its commands and functionality.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

Introduction to

OpenCalphad version 6
summary of new and old features
Bo Sundman March 29, 2020

Bo Sundman, [email protected]

1
Contents
1 Background 4
1.1 Long term goals for the OC software . . . . . . . . . . . . . . . . . . . . . . 4

2 Download and run OC on your computer 5


2.1 Reporting problems, errors and using the LOG file . . . . . . . . . . . . . . . 5

3 Dependencies and databases 5

4 Structure of the OC software 6


4.1 Utility and numerical routines . . . . . . . . . . . . . . . . . . . . . . . . . . 6
4.2 Thermodynamic model software . . . . . . . . . . . . . . . . . . . . . . . . . 6
4.3 Equilibrium calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4.4 Phase diagrams and other diagrams . . . . . . . . . . . . . . . . . . . . . . . 7
4.5 Command line user interface . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4.6 Graphical User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4.7 Assessment of model parameters . . . . . . . . . . . . . . . . . . . . . . . . . 7
4.8 Application Software Interface . . . . . . . . . . . . . . . . . . . . . . . . . . 8
4.9 Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

5 Software updates 8
5.1 New features in version 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
5.2 New features in version 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5.3 New features in version 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5.4 New features in version 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5.5 New features in version 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5.6 New features in version 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

6 A general description 11
6.1 Thermodynamic models and data . . . . . . . . . . . . . . . . . . . . . . . . 11
6.2 Symbols and TP functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
6.3 Equilibrium calculations and conditions . . . . . . . . . . . . . . . . . . . . . 12

2
6.3.1 Parallelization of equilibrium calculation . . . . . . . . . . . . . . . . 12
6.3.2 Calculation of partial derivatives . . . . . . . . . . . . . . . . . . . . 12
6.3.3 Calculation of the Darken stability matrix and diffusion coefficients. . 13
6.4 Calculation and plotting of diagrams . . . . . . . . . . . . . . . . . . . . . . 14
6.5 Saving results on a file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
6.6 The beginning of an assessment procedure . . . . . . . . . . . . . . . . . . . 15
6.7 Modeling other properties that depend on T, P and phase composition . . . 15
6.8 Application software interface . . . . . . . . . . . . . . . . . . . . . . . . . . 16
6.8.1 The phase tuple . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
6.9 Multiple equilibria and parallelization . . . . . . . . . . . . . . . . . . . . . . 17
6.10 Known bugs, problems and missing features . . . . . . . . . . . . . . . . . . 17

7 Short summary of all commands in OC6 17


7.1 All top level commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
7.2 Commands without subcommands . . . . . . . . . . . . . . . . . . . . . . . . 18
7.3 Commands with subcommands . . . . . . . . . . . . . . . . . . . . . . . . . 19
7.3.1 AMEND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
7.3.2 CALCULATE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
7.3.3 DEBUG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
7.3.4 DELETE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
7.3.5 ENTER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
7.3.6 LIST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
7.3.7 PLOT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
7.3.8 READ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
7.3.9 SAVE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
7.3.10 SELECT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
7.3.11 SET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
7.3.12 STEP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

8 Bibliography 32

3
1 Background
The Open Calphad (OC) initiative started in 2011 when a group of scientists decided that
there was a need of a high quality open source software to gain wider acceptance of computa-
tional thermodynamics (CT) as a useful tool in materials science. The use of thermodynamic
calculations in many applications is severely restricted by the cost as well as the hardware
and software limitations imposed by most proprietary thermodynamic software. Providing
a free software would simplify such implementations and open a much larger market also for
the high quality databases provided by the commercial vendors.
Another aim was to support the scientific interest in new thermodynamic models and im-
proved algorithms for multicomponent thermodynamic calculations and a better software for
thermodynamic assessments as described in the book by Lukas et al.[07Luk]. At present such
developments can only be done by scientists who are affiliated to the commercial software
companies.
The last stable version of the OC software is available on [http://www.opencalphad.org].
The last development version, with more features but maybe less stable, is available on a
repository called opencalphad at [http://github.com].
The OC software in its present state is mainly of interest for researchers, scientists and
students with programming skills. It is probably less stable than equivalent commercial
software but it is already used in demanding commercial applications and it can be used for
teaching computational thermodynamics and development of software using CT. There are
three papers describing OC [15Sun1, 15Sun2, 16Sun].
This summary includes also the essential parts of the features of the previous versions.

1.1 Long term goals for the OC software


Several of the long term software goals with the OC initiative has now been reached

• A model package open for the implementation of new thermodynamic and kinetic
models.

• A stable minimizer calculating equilibria for a flexible set of conditions.

• Calculation of property and phase diagrams with graphics output.

• An assessment package for fitting model parameters.

• A software interface to different applications.

• Sufficiently fast for practical calculations in multicomponent system with paralleliza-


tion.

4
All of this in an open software free for non-commercial applications. But there are still
many bugs and features missing or not fully implemented.
The aim of OC is to open a rich field for testing new thermodynamic models and applica-
tions for any interested researcher, even if he does not have any economic support. It will
also be useful for testing different minimizers, optimizers and to improve the graphics.

2 Download and run OC on your computer


For Windows there is an automatic installation setup (from Jordan Russel’s software,
https://jrsoftware.org/isinfo.php) on the opencalphad.org download page. Please report
any problems using this. Downloading and running this setup may give some warnings from
Windows but as far as I can find there are no problems. You can select the installation
directory and do not have to be administrator of your computer. The setup will create an
icon with the working directory set to “Documents/OpenCalphad/OC6”.
In the folder “Documents/OpenCalphad/OC6/macros/” there are about 30 macro files
and some small databases which are useful to learn to use OC. OC has extensive on-line
help facilities using a ? or ?? when you are running OC. This help file and an introduction
is also available as PDF file in “Documents/OpenCalphad/OC6”.
If you want to use OC as a tool in your own software or if you use Linux, MacOS or
any other operating system you need a compiler for Fortran and C in order to install OC
and the OC Application Software Interface (OCASI). You should then download the source
code of most recent version from http://www.github.com/sundmanbo/opencalpad. In that
download you also get documentation of the source code and some examples of applications
such as a Scheil solidification simulator.

2.1 Reporting problems, errors and using the LOG file


If you need to contact the OC team for problems or errors you find in the software you
should use th LOG file facility. The command SET LOG will copy all your command on
a file and this can then (after some editing) be used as a macro file. Sending this logfile
together with the necessary databases you use will make it possible for the OC team to find
the error or solve your problem.

3 Dependencies and databases


For graphics GNUPLOT 5.2 (or later) software must be installed and included in the path on
your computer. GNUPLOT is available free from “https://sourceforge.net/projects/gnuplot”
or many other sites on the web.

5
To install and run OC on other OS than Windows you need:

• A compiler for Fortran 95/08 like GNU gfortran 7.2 or later.

• For fast numerics versions of the LAPACK/BLAS libraries adapted to your hardware
are recommended but default versions are provided with OC.

If you need help to handle the installation please ask a local guru, the OC team provides
the software for free and have no resources to help with installations.
At present there are no databases provided with OC except those used for the macro files
to test the software. A user must develop or search for a database for his system, most
commercial databases are encrypted and cannot be used by OC. To develop and maintain a
high quality multi-component database is a very demanding task and there is now way such
databases can be free but the hope is that one can collect a number of high quality assessed
binary systems, or some with 3-4 elements, using good models which can be free and used
as a basis for many different databases.

4 Structure of the OC software


The software is divided into packages. There are well defined software interfaces between
the packages that makes it possible to extend and change them independently.

4.1 Utility and numerical routines


• The METLIB package is used mainly for the interactive user interface. Originally writ-
ten in Fortran 77 it has now been completely converted to the new Fortran standard.

• OC needs numeric routines for inverting a matrix and solving a system of linear equa-
tions and calculate eigenvectors of the Darken stability matrix. LAPACK and BLAS
are used for this and if you have a LAPACK library adapted to your hardware please
use that rather than the small subset provided with OC.

• The LMDIF1 package for least square fitting of model parameters and the HYBRD
package to solve systems of non-linear equations are free software developed at Argonne
National Lab (1980).

4.2 Thermodynamic model software


The General Thermodynamic Package (GTP) has data structures for storing model param-
eters, conditions and calculated results and code to calculate the Gibbs energy and its first
and second derivatives of phase when the T, P and constitution of the phase is known. At

6
present the Compound Energy Formalism (CEF) and the partially Ionic two-sublattice liq-
uid model (I2SL) are implemented. For more information on thermodynamic models see
Lukas et al.[07Luk].
For describing the T and P dependence there is a TP function package for storing and
calculating functions, including first and second derivatives of T and P .

4.3 Equilibrium calculations


The HMS minimizer implementing the algorithm by Hillert[81Hil] for finding the equilibrium
state in a multicomponent system for many different kinds of external conditions. It makes
use of GTP for calculating the Gibbs energy and its derivatives for each phase. The algorithm
is also described in [15Sun2].

4.4 Phase diagrams and other diagrams


The step/map/plot (SMP) package for calculating and plotting diagrams. It uses HMS for
calculating equilibria for conditions varying along the axis and the free software GNUPLOT
for plotting on various devices.

4.5 Command line user interface


The PMON command line user interface has a VAX/VMS flavor (VAX/VMS was a famous
computer from DEC in the 80’ies). It can be used to read data, set conditions, calculate
equilibria, property and phase diagram. Plotting is done by the free GNUPLOT software.
It has also the necessary commands to assess model parameters.

4.6 Graphical User Interface


There is an independent project developing a GUI for OC including possibly also some
application software using python. This uses the macro facility of OC to calculate multiple
equilibria or diagrams.

4.7 Assessment of model parameters


An assessment software using a least square routine (LMDIF1) to fit model parameters to
experimental and theoretical data. In collaboration with CEA and the university in Toulouse
a PhD student has started to work this year on implementing better statistical routines to
calculate covarance the matrix and estimate the validity of an assessment and the possible
extrapolations.

7
4.8 Application Software Interface
The OC Software Application Interface (OCASI) to make it possible to integrate OC in
general application software for various simulations. This has now been equipped with an
iso-C binding which makes the data structures defined in the Fortran package available to
programs in C++, java, python and other software languages. There is a paper describing
this [16Sun].

4.9 Documentation
A fairly extensive documentation of the code, a user guide and additional examples as macro
files including graphics is provided with the software. The user guide exists as PDF or as
an HTML file used when running OC on-line. The PDF version of the user guide as well as
the subroutine documentation is available only when downloading the source code.

• GTP, the thermodynamic model package.

• HMS, the implementation of Hillert’s equilibrium algorithm.

• SMP, the Step, Map and Plot package.

• MACRO, a number of test macro files.

• UG, the user guide and manual (also used on-line)

There are also a number of publications describing OC or using it, a few of them are listed
below.

5 Software updates
The main features in OC is summarized below in a historical order.

5.1 New features in version 1


The version 1 release of OC in 2013 could calculate multicomponent equilibria using Hillert’s
algorithm[81Hil] for models based on the Compound Energy Formalism (CEF)[01Hil, 07Luk].
It included a possibility to read un-encrypted TDB files and a simple command interface
with macro facilities to set conditions, calculate equilibria and list results. It had a grid
minimizer to ensure finding the global minimum and detect miscibility gaps. There was also
a limited application software interface called OC-TQ.

8
5.2 New features in version 2
The most important facilities added was generating property and phase diagrams. However,
these and many of the other features are still incomplete and fragile and may not work
properly in some cases. Feedback from users (providing the data and a macro file reproducing
the problem) is the best way to obtain a more stable and error free software.

5.3 New features in version 3


The main aim of OC version 3 is to provide a stable and accurate calculation of single
multicomponent equilibria for a very flexible set if conditions. It also include parallelization
using OpenMP on the equilibrium level and a possibility to assess model parameters.

5.4 New features in version 4


One of the main changes has been to use LAPACK and BLAS for inverting the phase matrix
and solve the equilibrium equation. That has reduced the time for an equilibrium calculation
almost 20%. Extensive use of the Valgrind software and compiling OC on different Fortran
compilers has also improved the general performance and stability and there are no important
memory leaks during parallel calculations.
During MAP and STEP OC now performs a global minimization as test At node points
and a line is suspended in the plot if there is some other phase stable. OC can now calculate
isothermal sections and plot tie-lines in these. There are new options for plotting like adding
a text label (which can be calculated as the set of stable phases) or overlaying several plots.
It is now possible to have other components than the elements. But quasi-binary sections
are still difficult. It is also possible to set conditions on the volume, V , and allow P to
vary. In materials science that is not so important but these variables are fundamental in
thermodynamics.

5.5 New features in version 5


Due to user requests the speed has been improved significantly for multicomponent (more
then 15 elements) systems. There has also been a revision of the user interface to make it
simpler to understand how to enter a system interactively and to perform an assessment. By
request there is also a possibility to write a database in the FactSage (Solgasmix) format.
The calculation of phase diagrams with tie-lines in the plane (binary and isothermal sec-
tions) using MAP has also been improved. The step length control and selection of indepen-
dent axis can now handle most problems. But the user may still have to add several start
points to have a complete diagram. Option B for handling ordering in a 4 sublattice BCC
phase has been implemented and also a special grid minimizer for FCC and BCC ordering

9
taking into account the symmetry. For ionic crystal like the spinel phase there is also a
special grid minimizer to generate gridpoints that are uncharged.
The interest in the development of new models for magnetism and heat capacity at low
temperature has added some new features to OC.
Because there are many ongoing developments the documentation of the source code is not
completely updated and there are several features that have incomplete or no description.

5.6 New features in version 6


In the development of unary models managed by Malin Selleby at KTH, Stockholm, Sweden
the OC team has contributed ideas and calculations to a paper [20Sun]. The unary project
involves modeling all elements down to 0 K using an Einstein function and also modeling the
metastable extrapolation of solids to high T as well as the liquid down to 0 K. New models
for the ferromagnetic transition and the glass transition are also developed.
To handle liquids like polymers at ambient T the UNIQAC model with a non-ideal con-
figurational entropy has been implemented in OC. This makes it possible to handle larger
systems than ternary and also combine the UNIQUAC with model parameters using stan-
dard Calphad methods.
As shown with the macro examples there are extensive possibilities to calculate phase
diagrams as well as other property diagrams with OC for unary up to system with more
than 20 elements. The most irritating problem with STEP and MAP is that some lines
are missing or incomplete now and again and a diagram may need several start points to
be complete. Generating automatic start points is on the wish list for version 7. As the
GNUPLOT graphic output files can be edited with a text editor it is always possible, with
some efforts, to obtain publishable diagrams.
This include standard binary, isothermal and isopleth phase diagram. There is no special
facility for quasi-binary or -ternary diagrams but most of them can be calculated as isopleths
(with a constant composition). Note that the same calculated diagram can be plotted with
many different axis variables, see the macro manual.
The calculation of the T-zero T for two phases has been implemented. It is important for
example for the martensite transformation in steels.
The on-line help facilities has been improved using the hypertarget feature of HTML files.
When the user types ? at a question or ?? at a menu the OC software will open the user
guide as a HTML file in a browser window and display the relevant text from the user guide.
The user can then scroll or seach the whole user guide in the browser. To find the HTML
file the installation creates an environment variable OCHOME where the ochelp.html file is
stored. The on-line help facility can be turned off or on with a SET ADVANCED command.
The metlib3 untility package has now been completely upgraded to the new Fortran stan-
dard.

10
It is now possible to set a difference in costitution fractions as a condition. This is necessary
to calculate 2nd order transition lines.
OC has now implemented a calculation of the correlation and covariance matrix for model
paraters in the assessment procedure. These are impoprtant to estimate the uncertainty for
extrapolations into multicomponent system. But how they can be integrated in the database
file is a big problem.
A file browser to open files for read and write has been incorporated in OC, the “tinyfile-
dialogs” provided free by Guillaume Vareille. If the file name is not given on the same line
as the command a new window is opened and the user can browse the directories to find
the file. In a macro file one must prefix the file to be opened name by “./” if the file is in
the same directory as the macro file. The use of this popup window can be turned off or on
with a SET ADVANCED command.
The GNUPLOT software has been a pleasant experience to use in OC. It is extremely rich
and OC use only a small part of all facilities. To obtain really nice diagrams the ocgnu.plt
file generated by OC can be edited with a text editor.

6 A general description

6.1 Thermodynamic models and data


The thermodynamic models include the Compound Energy Formalism (CEF) with up to
9 sublattices and allows for molecules, ions and vacancies as constituents. For liquids with
strong short range ordering the partially ionic 2 sublattice liquid model (I2SL) is imple-
mented. For a detailed description of these (and other) models see the book [07Luk].
The Gibbs energy can be partitioned for phases with long range ordering (sublattices) in an
ordered and a substitutional part. The implementation of this for phases with order/disorder
transformations, like A1/L12 /L10 and A2/B2/B32/D03 /L21 (Heusler) has been revised and
simplified.
The thermodynamic data can be entered interactively or read from a database. OC can
read most database files following the TDB format as defined by the SGTE organization.
There are a few free but not very high quality databases provided with the OC software.
For use of high quality databases please contact the commercial vendors.

6.2 Symbols and TP functions


In OC there are two different types of symbols that could be confused, one is called TP-
functions or TP-symbols and are used to simplify expressing the model parameters as func-
tions of T and P. These have a very strict syntax because during equilibrium calculations

11
they maybe calculated millions of times together with their first and second derivatives with
respect to T and P.
The other type of symbols are user defined functions of the general thermodynamic proper-
ties like Gibbs energy, denoted G, entropy, enthalpy, mole fractions etc. The values of these
can be obtained after an equilibrium calculation. A user defined symbol can also refer to an
already existing symbol or it can be a “dot derivative” of one state variable with respect to
another. Currently the only such derivative implemented is H.T which represent the heat
capacity (provided the conditions are T, P and the mass balance).

6.3 Equilibrium calculations and conditions


The equilibrium calculations follows the algorithm proposed by Hillert [81Hil] and recently
explained in more detail by Sundman et al[15Sun2]. It allows a very flexible set of conditions
on amounts or fractions of components, chemical potentials or activities, enthalpies, fix
phases etc.
It is possible to set condition on the enthalpy, H, or the volume, V , of a system or phase.
For mole fractions one can also set an expression as condition like
xliquid
A − xLaves
A =0
in order to calculate a congruent melting and use expressions on for total amount like
NU + NZR = 1
to specify that the sum of moles of U and Zr should be unity.
To ensure that the global equilibrium is calculated there is an initial grid minimizer de-
scribed in the paper by Sundman et al[15Sun2]. The grid minimizer can automatically detect
miscibility gaps, i.e. that a phase will be stable with two or more composition, called com-
position sets. It can optionally be turned off to speed up calculations or one can set a higher
density of gridpoints if there are problems finding the stable set of phases.

6.3.1 Parallelization of equilibrium calculation

Parallelization is possible on several levels in OC. For example one can calculate several
equilibria with different sets of conditions in parallel using the OpenMP library. This is
particularly important when OC is used for simulations, for example in a phase field software
as the calculation time is divided by the number of CPU’s available.

6.3.2 Calculation of partial derivatives

OC calculates all second derivatives with respect to T, P and all constituents of all phases.
This improves stability during equilibrium calculation and makes it possible to calculate for
example the stability function as part of an equilibrium calculation.
It also makes it possible to implement The “dot derivative” method to calculate derivatives

12
of state variables has been implemented. This allows calculation of properties like the heat
capacity without resorting to numerical derivation.
!
∂H
CP = (1)
∂T P,Ni

The calculation makes use of the analytical first and second derivatives of the Gibbs energy
for T, P and all constituent fractions calculated in the model package.

6.3.3 Calculation of the Darken stability matrix and diffusion coefficients.

The matrix of all second derivatives of the Gibbs energy for a phase is often known as Darken
stability matrix. For a binary substitutional system this matrix is simply:
 ∂Gα ∂Gα

A A
 ∂xA ∂xB
Mα =

 ∂Gα ∂Gα 
B B
∂xA ∂xB

and for a binary substitutional phase the chemical potential GαA is:

∂Gα ∂GαM X ∂Gα


!
M
GαA = = GαM + − (2)
∂NA T,P,NB6=A
∂xA i=A,B ∂xi

If the determinant of the matrix M α :


∂ 2 GαM ∂ 2 GαM ∂ 2 GαM 2
det(M α ) = − ( ) (3)
∂x2A ∂x2B ∂yA ∂yB

is negative the composition of the phase is inside a spinodal and the phase would like to
separate into two different composition, i.e. a miscibility gap.
For larger systems the determinant may be more complicated but as the model package
calculates all second derivatives analytically the software provides a command to calculate
the matrix of the derivatives of all chemical potentials with respect to all components

∂GαA ∂ 2 GαM ∂ 2 GαM ∂ 2 GαM ∂ 2 GαM


! !
1 X XX
= − xC + + xC xD (4)
∂NB N ∂xA ∂xB C ∂xA ∂xC ∂xB ∂xC C D ∂xC ∂xD

and also the eigenvalues of this matrix. If there is a negative eigenvalue it means the phase
is inside a spinodal. The derivation of eq. 4 can be found in the HMS documentation. It is
interesting to note that eq. 4 is symmetrical, ∂G
∂NB
A ∂GB
= ∂N A
.
This matrix is also important to convert the mobilities of the components to diffusion
coefficients.

13
6.4 Calculation and plotting of diagrams
The STEP procedure can calculate property diagram with a single axis variable and the user
can plot how various state variables or model properties depend on this axis variable. In the
plotting any two state variables can be used.
There is also a “step separate” option for Gibbs energy curves and similar things when
each phase is calculated separately along the axis variable.
The MAP procedure for phase diagrams requires two independent axis variables and it
calculates lines where the set of stable phases changes for different values of the axis variables.
At present only two axis are allowed.
For examples of the graphics in OC please look at the documentation of the macro exam-
ples.
The mapping has been improved but it is very dependent on selecting a good equilibrium
as a start point. If some lines are missing one may try to start at another equilibrium inside
the diagram and merge the plots. The AMEND LINE command makes it possible to remove
lines that are wrong.
Mapping of binary systems has been significantly improved in version 5 and mapping of
multicomponent system is also reasonable. But there is still a missing feature in detecting exit
lines from invariant equilibria for an isopleth. Additionally the present version of mapping
will not discover miscibility gaps that occurs during mapping but it will check the global
equilibrium at each node point and suspend lines that ends in a metastable equilibrium.
things will improve gradually. Feedback from users are welcome.
During both MAP and STEP all calculated equilibria are saved and it is possible to plot
many different properties. All node points are saved as equilibria which can be inspected
individually and it is also possible to copy equilibria along a line to a current equilibria and
extract values.
The results from a STEP or MAP command can only be saved graphically or as a GNU-
PLOT file. It is not possible to save the results on a file for later use by the OC software
but we are working on that. The user can always create MACRO files for calculations he
would like to repeat.
GNUPLOT version 5.2 or later is needed to generate the graphics. In the user interface of
OC some additional graphics options, like a title and ranges of the x and y axis, has been
added. It is also possible to edit the output files from OC to take advantage of the extensive
graphics facilities of GNUPLOT.
With version 5 the possibility to plot so called Gibbs triangle diagrams for isothermal
sections of thernary diagrams has been added. For such diagrams it is also possible to plot
tie-lines, i.e. a line between the composition of the phases in equilibrium in a two-phase
region. Note that tie-lines can be useful also when plotting binary phase diagrams with two
extensiove variables on the axis as shown in the map1 macro.

14
6.5 Saving results on a file
It is possible to save the current state of a calculation or assessment on an UNFORMATTED
Fortran file. This will save all equilibria created but not results from a STEP or MAP
command. The unformatted file can be read back into the program and used for future
calculations. This means that the current state of an assessment can always be saved.
However, the unformatted file may not be readable in a later version of OC so save also
macro files and other documentation.
The reason step and map results are not saved is that sometimes they will exceed the
available memory. For such cases one need to have a random access or DIRECT file which
has not yet been implemented. The problem is to detect that the memory is exhausted and
to stop the ongoing step or map procedure while saving the calculated equilibria to free up
the memory.

6.6 The beginning of an assessment procedure


The beginnings of an assessment procedure has been implemented is a straightforward least
square fit of experimental data to the same data calculated by the model. The experimental
data can be entered as equilibria (using the feature described in the previous item). In fact
very little had to be done in the OC software for this purpose as we use as a free optimizing
subroutine called LMDIF from the MINPACK software developed at Argonne National Lab
1980.
In OC some subroutines were added to allow this least square routine to change model pa-
rameters in the GTP package and to calculate the difference between the experimental data
provided by the user and the same property calculated from the models of the phases. We
would also like to develop additional statistical analysis of the results like estimating uncer-
tainties using the assessment results for extrapolations. There is a separate documentation
of this module.

6.7 Modeling other properties that depend on T, P and phase com-


position
OC has a flexible way to handle properties that may depend on T, P and the phase consti-
tution for example mobilities, elastic constants etc. Some model parameters are predefined
and can be found with the command LIST MODEL-PARAM-ID but many of those has
no software connected with the parameter. A skilled programmer can the write the code
needed for a specific identifier in a model and use it in a calculation. The values of specific
identifiers can be obtained from the user interface or by application software in the same
way as normal thermodynamic state variables.

15
6.8 Application software interface
For use in application software there is an OC Software Application interface, OCASI. This
follows the TQ standard[95Eri]. There are some examples to use this interface provided with
the software, both for Fortran and C++ and a recent paper [16Sun].
A full Fortran/C++ application software interface including the use of compatible data
structures has been implemented using the isoC binding. This means that software written
in C++ as well as Fortran can directly access results form an OC calculation without using
calls to subroutines.

6.8.1 The phase tuple

In the OCASI interface a new method was introduced in version 4 to identify phases called
“phase tuples”. Initially each phase has a single “composition set” representing its constitu-
tion. Phases with miscibility gaps will have two or more “composition sets” representing the
two different constitution. However, using a separate index for the phase and another for the
composition set is rather clumsy. Thus OC has a variable called “phase tuple” as a Fortran
95 structure (TYPE). The array of phase tuples have a unique index for each combination
of phase and composition set and the phase tuples for the second compostion set of a phase
follow after those for the first composition set. This feature was introduced in version 3 of
OC and was slightly changed in version 4. The phase tuple has 5 integer indices:

1. is the location of the phase record,


2. is the composition set number,
3. is the alphabetical phase index (i.e. the normal phase index),
4. is an index to the array of “phase varres” records where conditions and results are
stored
5. the last is zero or an index in the phase tuple array of the next composition set of the
same phase.

The phase tuple is an array provided by OC to the application software and updated inter-
nally whenever there is a change. The user interface of OC sometimes displays the phase
tuple index when listing phases and composition sets.
When a phase is entered it has one composition set with index 1 and a phase tuple is
created with the same index as the phase and the composition set index equal to 1. When
a new composition set is entered for a phase, either by the user or by the software itself
(for example by the grid minimizer) the phase tuple index for the new composition set
will be higher than any of the existing phases and have as values the phase number and a
composition set number 2 or higher. Redundant phase tuples created by the grid minimizer
are normally removed automatically after a calculation.

16
6.9 Multiple equilibria and parallelization
The user can enter several equilibria from the application software (as well as interactively)
for the same system and have different conditions in each and calculate them separately and
in parallel and transfer data between them.
This facility is used also for storing node points during step/map results and when OC
is used to assess model parameters from experimental data. Each equilibrium representing
an experiment is independent and they be calculated in parallel if OC is compiled with
OpenMP.

6.10 Known bugs, problems and missing features


Some things are problematic and from the long list of things we wanted to implement but
did not manage this time, these are a few:

• There is a problem with the STEP procedure in a binary system using a composition as
axis. The STEP will stop at a phase boundary as it does not understand that nothing
changes in a two-phase region except the amount of the phases.
• There is no check on miscibility gaps during a step or map command except at node
points.
• Saving results from step and map on a file is not possible except graphically with
GNUPLOT (and the coordinates on the ocgnu.plt file).
• The mapping is very fragile, lines are sometimes missing or metastable lines plotted.
• The Scheil-Gulliver solidification model is not implemented in OC but there is an
application software written in C++ that can do this. T-zero lines and para equilibria
are also on the list to be implemented.
• The data structure now fairly stable but it may be changed in future releases.
• The complete OCASI subroutine set have not been designed yet. The earlier OC-TQ
application software interface has been revised to use phase tuples.

As OC is open source anyone who is interested to help implementing a particular feature


is welcome to start working on it.

7 Short summary of all commands in OC6


See the ochelp5.pdf for a more extensive documentation. The commands for assessment are
also explained in the assess.pdf file. Some features and the newest commands may not be
included below.

17
7.1 All top level commands
ABOUT EXIT MAP SELECT
AMEND FIN NEW SET
BACK HELP OPTIMIZE SHOW
CALCULATE HPCALC PLOT STEP
DEBUG INFORMATION QUIT
DELETE LIST READ
ENTER MACRO SAVE
One restriction I have applied to commands and subcommands is that one should not need
to type more than 3 characters to have a unique abbreviation.
Directly after the top level command the user can give some options preceded by a slash
like /output=filename or /append=filename. The output that would normally appear on
the screen will instead be listed on this file with extension DAT. The output option will
delete any previous content on the file but the append will add the new output at the end
of the file. The output is reset to the screen after the command.
A frequent Thermo-Calc user must disable his tendency to put hyphens or underscore
characters between the command and subcommand.

7.2 Commands without subcommands


• ABOUT the software

• BACK to calling software (or exit) after confirmation

• EXIT, terminate the software (in Swedish) after confirmation

• FIN, terminate the software (in French) without confirmation

• HELP gives explanations about a (few) commands from the user guide

• HPCALC starts the inverse polish calculator

• INFORMATION is not implemented yet

• MACRO asks for name of macro file and executes it. A macro file can call another
macro five levels deep.

• MAP a phase diagram with 2 or more independent axis. If the user already given a
MAP command he is asked if he wants to keep the previous results.

• NEW asks for confirmation and if so removes all data.

18
• OPTIMIZE asks for the maximum number of iterations and then use a least square
routine to obtain the best fit to experimental data by varying the set of model param-
eters specified by the user.

• QUIT terminates the software (in English) after confirmation

• SHOW a property value for a state variable like T, M U (C), G or a user defined symbol
or a model parameter identifier (always with a phase specification!).

7.3 Commands with subcommands


Many subcommands are not implemented, I have indicated some but not all.

7.3.1 AMEND

Amend should change something already entered or set. But sometimes it creates something
so one should be careful if a subcommand should be changed to ENTER or SET command.

• ALL OPTIM COEFF means you can rescale or recover previous set of the optimizing
coefficients.

• BIBLIOGRAPHY asks for a bibliographic id and amends its text.

• COMPONENTS changes the set of components.

• CONSTITUTION asks for a phase and the user can amend the amount and current
constitution of a phase. I have put this here and not as part of AMEND PHASE to
avoid confusion with adding a composition set.

• ELEMENT amends data for an element (not implemented).

• EQUILIBRIUM is not implemented and probably redundant.

• GENERAL can name of current equilibrium, the user can specify if he is a beginner (the
software can provide more help (not implemented)), or expert, if global gridminimizer
should be used and if it can merge composition sets, if composition sets can be created
automatically and if redundant composition set can be deleted after an equilibrium
calculation. The latter questions are mainly interesting for debugging.

• LINE make it possible to remove or add a line calculated for a STEP or MAP command.
A part of the line can be removed by editing the GNUPLOT file.

• PARAMETER amends a parameter expression for a phase (not implemented, use


ENTER PARAMETER to enter the new function).

19
• PHASE (default) asks for phase name and amends data for this phase. Many of the
things that formerly were part of “set bit phase” have been moved here because they
represent permanent modification which are never “reset”.

– COMPOSITION SET (default) adds or deletes a composition set. Composition


sets are needed for miscibility gaps when a phase can be stable with two or
more compositions. A composition set can be identified with a hash symbol “#”
followed by a number or by a user specified prefix or suffix.
Deleting a set will always be the one with the highest number. When adding a
set the user can provide a prefix and suffix and the default constitution for this
set.
– ADDITION to the Gibbs energy which can be:
∗ ELASTIC MODEL 1 adds an elastic model (not implemented).
∗ GADDITION a Gibbs energy value can be added to a phase.
∗ LOWT-CP-MODEL used for this phase
∗ MAGNETIC CONTRIB adds an Inden-Hillert or Inden Xiong magnetic model.
∗ QUIT no addition
∗ SCHOTTKY-ANOMALITY is added
∗ SMOOTH-CP-STEP added
∗ LIQUID 2 STATENDL adds a Gibbs energy for the glas transition model
(not implemented).
∗ VOLUME-MODEL1 is added
– AQUEUS MODEL not implemented yet.
– BCC PERMUTATIONS for the 4 sublattice BCC ordered model. Only unique
permutations of model parameters needed.
– DEFAULT CONSTITUTION allows to set min and max of constituents. ordered
phase.
– DIFFUSION not implemented yet.
– DISORDERD-FRACS adding a second substitutional fraction set to the phase.
– FCC CVM TETRAHDR for the tetrahedron CVM model for FCC ordered. Not
implemented yet.
– FCC PERMUTATIONS for the 4 sublattice FCC ordered model. Only unique
permutations of model parameters needed.
– GADDITION a Gibbs energy value can be added to a phase.
– QUASICEM MODEL specifies a quasichemical model for SRO without any LRO.
(not implemented).
– QUIT You did not want to amend anything for the phase
– UNIQUAC liquid model should be used

20
• QUIT you did not want to amend anything.

• SPECIES amends data for a species used in the UNIQUAC model

• SYMBOL the user can specify if the symbol can only be calculated when explicitly
named (usually all symbols are evaluated when any symbol is evaluated as they can
depend on each other). This is needed for symbols used as conditions. The user can
also specify that a symbol should be local to a specific equilibrium. In this way one
can store the value of a symbol from one equilibrium and calculate differences with
respect to other equilibria.

• TPFUN SYMBOL replaces an existing TPfun with a new expression.

7.3.2 CALCULATE

One can calculate many things like:

• ALL EQUILIBRIA all equilibria within the range set for experimental equilibria with
non-zero weight are calculated. This is useful for testing if there are any problems
before optimizing.
If you are running the version compiled with OpenMP the equilibria will be calculated
in parallel. Additional experimental or other symbols and properties can be calculated.

• CAREFULLY can be usefil if there are convergence problems

• EQUILIBRIUM (default) is the normal equilibrium calculation command which first


calls the grid minimizer (if the conditions allow) and then the iterative minimizer.

• GLOBAL GRIDMIN Only the grid minimizer is called to find the gridpoints that
represent the lowest Gibbs energy. These are normally used by the iterative minimizer
to find the real equilibrium. If followed by COMPUTE NO GLOBAL one will have
the same result as COMPUTE EQUILIBRIUM.

• NO GLOBAL calculates the equilibrium for the current set of conditions starting from
the current set of stable phases and their constitutions. No grid minimizer called.

• PHASE ask for phase name, amount and constitution and at current T and P calculates
either:

– ONLY G Gibbs energy and first and second derivatives with respect to T and P .
– G AND DGDY calculates also all first derivatives with respect to the phase con-
stituents.
– ALL DERIVATIVES Also all second derivatives with respect to the phase con-
stituents.

21
– CONSTITUTION ADJust You will be asked to enter a new composition (default
is current) of the phase and this command will then calculate G and all chemical
potentials after adjusting the constitution of the phase to have the minimum
Gibbs energy for the given overall composition. It is interesting when one or
more components are parts of several constituents for example in a gas or phases
with order/disorder transitions.
– DIFFUSION COEFF You will be asked to enter a new composition (default is
current) of the phase and this command will then calculate the Darken stability
matrix
∂GA
∂NB
for all components (see eq. 4) and also all mobility values (if there are any).

• QUIT if you did not really want to calculate anything.

• SYMBOL Calculate the value of one or all symbols at the current equilibrium.

• TPFUN SYMBOLS all TP functions values and their first and second derivatives with
respect to T and P (6 values).

• TRANSITION asks for a phase to be stable with zero amount and a condition to be
released to calculates the equilibrium. The phase must not have the FIX status. After
the calculation the phase is set to be entered and the released condition set to the
calculated value. If calculation fails the status is not reset (sorry I have not had time
to do all). No grid minimizer called.

• TZERO-POINT the T and composition when two phases have the same Gibbs energy.

• WITH CHECK AFTER calculates the equilibrium using the current compositions and
checks afterwards with the grid minimizer if it has found a glocal equilibrium. Mainly
for testing.

7.3.3 DEBUG

This is for testing the software

7.3.4 DELETE

Only composition sets and equilibria can be deleted. To delete a parameter you can amend
its expression to be zero.

• PHASE (default) but not allowed

22
• ELEMENTS not allowed

• SPECIES not allowed

• QUIT you did not want to delete anything

• COMPOSITION SET The highest set is deleted (one cannot delete the first). Must
be used with great care.

• EQUILIBRIUM must be used with great care.

7.3.5 ENTER

ENTER is the main command to enter data interactively. Note that in most cases data are
read from a TDB file.

• BIBLIOGRAPHY enter a bibliographic reference id and text.

• COMMENT enter a text that is saved and listed with the equilibrium.

• CONSTITUTION to enter the constitution of a phase (same as AMEND CONSTI-


TUTION).

• COPY OF EQUILIB the current equilibrium is coped to a new one with a name spec-
ified by the user.

• ELEMENT an element with data.

• EQUILIBRIUM an equilibrium record with the specified name is created. Each equi-
librium record has an independent set of conditions. Will be used for assessments and
is already used to store node points during step and map.

• EXPERIMENT data for assessments. These are a state variable of symbol followed by
an equal sign, =, larger than, ¿ or lesser than,¡ and a value and uncertainty separated
by a colon. For example:
experiment T¿1200:1 X(liq,mo)=.2:.01 HM(fcc)=-30000:5000

• GNUPLOT TERMINAL allows the user to change or add the terminal used for plot-
ting.

• MANY EQUILIBRIA allows the user to enter a table with conditions for many equi-
libria with similar conditions. It is intended for assessments but can be used also to
calculate various properties that for a range of conditions not suitable for a STEP cal-
culation. The user must give a general “head” of the table specifying phase status and
all conditions including some that are different in the different equilibria. For those
familiar with Thermo-Calc it replaces the POP file in assessments but is more flexible.

23
• MATERIAL the user can specify a database and a composition and temperature to
calculate an equilibrium. If there are already data the user can enter a new composition
for calculation.

• OPTIMIZE COEFF the coefficients for use in assessments are entered. They have the
symbols A00 to A99. If the user wants fewer than 100 coefficients he can specify a
number.

• PARAMETER the expression of a parameter of a phase. The phase, the constituent


array and degree must be specified.

• PHASE a phase with sublattices, site ratios and constituents. The parameters are
entered individually with ENTER PARAMETER.

• PLOT DATA the user can add data to be plotted for the cirrent equilibrium. Used for
equilibria with experimental data for assessments.

• QUIT you did not want to enter anything.

• SPECIES a species with name and stoichiometry. Its name must be unique but one
can have several species with the same stoichiometry.

• SYMBOL (default) name and expression of a state variable function.

• TPFUN SYMBOL The name and expression of a function of T and P that can be
used in parameters.

7.3.6 LIST

There are many things to LIST


Note the possibility to direct output to a file using /output=filename or /append=filename
directly after the command, as mentioned in the beginning.

• AXIS lists current axis set by the user.

• BIBLIOGRAPHY lists bibliographic text for specific id or all.

• CONDITIONS lists all conditions in current equilibrium.

• DATA lists all parameters on different devices and ways:

– SCREEN (default) Writes all parameters for all phases on the screen including
the bibliographic information.
– TDB Writes all parameters on file in TDB format.
– MACRO Writes all parameters on file as a macro file (not implemented).

24
– LATEX Writes all parameters on file as a LaTeX file (not implemented).
• EQUILIBRIA lists all entered equilibria with name and number (use LIST RESULTS
to list the results).
• ERROR MESSAGE lists the error message associated with an error code.
• LINE EQUILIBRIA lists all equilibria stored during STEP or MAP. With the SET
ADVANCED command one can copy one of these to the current equilibrium.
• MODEL PARAM ID lists all implemented model parameter identifiers like G, TC,
BMAGN, elastic constants etc. that can depend on T, P and constitution of a phase.
The use of such parameters require implementation of the model in the software.
• MODEL PARAM VAL lists the calculated value of a model parameter identifier for a
phase.
• OPTIMIZATION the result of an optimization is listed.
• PARAMETER lists the expression for a single parameter.
• PHASE asks for phase name and then lists for option
– CONSTITUTION (DEFAULT) lists constitution for this phase.
– DATA lists parameter for this phase (no bibliography).
– MODEL lists some model information for this phase.
• QUIT You do not want to list anything.
• RESULTS (default) from an equilibrium calculation. the program asks for a number
how to format the phase information.
1. stable phases with mole fractions in value order
2. stable phases with mole fractions and constitution in value order
3. stable phases with mole fractions and constitution in alphabetical order.
4. stable phases with mass fractions in value order
5. stable phases with mass fractions in alphabetical order.
6. stable phases with mass fractions and constitution in value order
7. all phases with mass fractions in value order
8. all phases with mole fractions and constitutions in alphabetical order
9. all phases with mole fractions and constitution in value order
The conditions are listed first, then some global properties, then some data for each
component and then the stable phases with amount and composition and possibly
constitution.

25
• SHORT

– A writes one line for all elements, species and phases.


– C writes data for all elements.
– M writes models for all phases.
– P writes one line for all phases sorted with stable first, then max 10 entered phases
in decreasing stability, finally the dormant in decreasing stability.

• STATE VARIABLES asks for state variable symbol and lists it value. replaced by
the SHOW command

• SYMBOLS lists all entered state variable symbols (same in all equilibria). To list the
values of symbols use calculate symbol or show.

• TPFUN SYMBOLS lists one or all TP function symbols and expressions (same in all
equilibria).

7.3.7 PLOT

PLOT asks for state variables or symbols for x and y axis and after that the user can plot
directly or change anything in the submenu below.
OC generates a command file for GNUPLOT and a data file with the values to plot and
then executes this in a separate shell. The user can edit the command file to add options
and execute it again inside gnuplot. But beware not to overwrite the files you want to edit.
There are 10 colors for the lines to plot. If more than 10 lines to plot the colors are repeated
cyclically.
OC keeps the previous values set of all options set until you make a new STEP or MAP
command. This means you can plot several times adding or modifying the plot until you are
satisfied.
To keep a complex plot you should rename the ocgnu.plt file as it will be overwritten by
the next plot command or copy it to another file.

• APPEND you can add a GNUPLOT file that will be added to the current plot.

• AXIS LABELS set text on X or Y axis.

• EXTRA are for less frequent options

– AXIS-FACTOR will multiply the X or Y axis with a factor.


– COLOR to select color of tie-lines and mono-variants
– GIBBS TRIANGLE set diagram to be a Gibbs triangle. Can only be used for
isothermal sections.

26
– LINE-TYPE for dashed or symbols on a line
– LOGSCALE the X or Y axis or both can have logarithmic scaling.
– LOWER-LEFT-TEXT add a short text at lower left corner.
– MANIPULATE-LINES to select color order for some lines.
– NO-HEADING the text on the top is removed. The plot is slightly larger.
– PAUSE-OPTION does not work
– QUIT do not select any extra option
– RATIOS-XY the ratios of X and Y axis can be set.
– SPAWN you can plot and keep it and continue calculate or plot
– TIE-LINE index for isothermal sections, 1 means all, 2 every second, 3 every
third, 0 means none.

• FONT you can select the font for the whle plot. Note you can only use those provided
by GNUPLOT.

• GRAPHICS FORMAT set type of terminal. See enter gnuplot-terminal for possible
terminals. Note if you plot on SCREEN you can also write the plot on a file in the
GNUPLOT window.

• OUTPUT FILE set name of plot file (default is ocgnu.dat).

• POSITION OF KEYS select position of the labels (identification) of the lines in the
plot. The labels can be placed inside/outside of the plot, to the left/center/right and
top/bottom. See the explanation of “set key” in GNUPLOT.

• QUIT you do not want to plot.

• RENDER (default) finally plot when all options set.

• SCALE-RANGES of X and Y axis.

• TEXT LABELS allows adding a text in the plot at a specific point and for phase
diagrams also to calculate the set of stable phases at that point.

• TITLE set title of plot.

7.3.8 READ

READ data from a file.

• TDB (default) an unencrypted TDB file can be read. Many TYPE DEFS are not
handled correctly and warning are given. For partitioned phases you may have to edit
the TDB file. The user can select which elements he wants to read from the file.

27
• PDB Is a new format developed for data interchange.

• UNFORMATTED an unformatted file with model parameters and results for a single
equilibrium calculation. Beware that an unformatted file may be unreadable in a future
version.

• QUIT you did not want to read anything.

• DIRECT will save results from STEP and MAP on a random access file (not imple-
mented).

7.3.9 SAVE

Ther are several possibilities to save data and results

• DIRECT not implemented yet (intended for STEP and MAP results).

• PDB writing an editable database file in PDB format

• QUIT do not save anything.

• SOLGAS writing a database in FactSage format.

• TDB same as LIST TDB

• UNFORMATTED (default) A file is written with unformatted data for all thermody-
namic data and conditions and results for a single equilibrium. There is no guarantee
an unformatted file will be readable in a later version of OC.

7.3.10 SELECT

There are a few things to SELECT.

• EQUILIBRIUM (default) change the current equilibrium to the selected one (number
or name or next or previous).

• MINIMIZER there is only one.

• OPTIMIZER there is only one.

• GRAPHICS there is only one.

• LANGUAGE there is only one (English).

28
7.3.11 SET

SET can be used for many things. The most important is conditions.

• ADVANCED This is a command for very special things.

– EEC-METHOD should be used to supress solids at high T


– EQUILIB TRANSF transfer an equilibrium calculated along a line in STEP or
MAP to the current equilibrium.
this is probably the most awkward command of all. But I do not want to have a
TRANSFER or COPY command on the top level as that will certainly be misun-
derstood and misused
– GLOAL-MIN-ONOFF turn on or off global minimizer
– GRID-DENSITY allows some densities to be selected
– HELP-POPUP-OFF turn off or on help in browser
– LEVEL you can set how good you are
– MAP-SPECIALS not implemented yet
– NO-MACRO-STOP ignore the “@&” in macro files
– OPEM-POPUP-OFF turn on or off using file browser
– QUIT you did not want to set anything advanced.
– SMALL-GRID-ONOFF depreciated command, use GRID-DENSITY
– SYMBOL some special characteristcs for symbols can be defined
– WORKING-DIRECTORY not used

• AS START EQUILIB use current equilibrium as start for step or map. Not necessary
if there is only one start equilibrium.

• AXIS axis “number” to an independent variable (must be a condition).

• BIT can affect GLOBAL, EQUILIBRIUM and PHASE records. The bit is toggled,
i.e. if already set it will be cleared. See the user guide for more information.

• CONDITION (default) the state variable and value of a condition. Normally set a
state variable equal to a value. Only a few expressions are allowed for mole fractions
and amounts of moles.

• ECHO echo of the input from macro files on the screen. There is no way to turn off
echo.

• FIXED COEFF to set an optimizing coefficient to a fixed value.

29
• INITIAL-T-AND-P is NOT to set conditions but just change local values used for
example in calculate phase.
• INPUT AMOUNTS amount of species in moles. These will be added together and
used for conditions of the components.
• INTERACTIVE at the end of macro files.
• LOG FILE the name of a file with a copy of all input and defaults. Useful for docu-
menting errors!
• NUMERIC OPTIONS maximum number of iterations (default 500) and convergence
limit (default 10−6 ).
• OPTIMIZING COND depending on the optimizer used for assessment some conditions
can be set.
• PHASE the user must specify a phase name and can then ...
– STATUS (default) the status of a single phase, or all using an asterisk “*”, can be
set. See also SET STATUS PHASE with a more flexible way to specify phases.
– DEFAULT CONSTITU the default constitution of the phase can be set. Same
as AMEND PHASE name DEFAULT CONSTITU.
– AMOUNT the amount of the phase (redundant).
– QUIT nothing is set for the phase.
– BITS some special bits for a phase can be toggled.
∗ QUIT (default) no bit is changed.
∗ EXTRA DENSE GRID to have more gridpoints in this phase
∗ NO AUTO COMP SET to prevent automatic creations of composition sets
for this phase. One can forbid creating automatic composition sets (by the
grid minimizer) for all phases with the AMEND GENERAL or SET BIT
GLOBAL commands.
– QUIT nothing is set.
• RANGE EXP EQUIL is needed for the CALCULATE ALL command. The first and
last equilibrium included in an assessment or a CALCULATE ALL command must be
specified. The first (default) equilibrium, number 1, cannot be included.
• REFERENCE STATE the reference state of a component. The phase, T and P must
be specified. The phase must exist with the component as its only component. When
the phase can exist with the component in different ways, like O in a gas can be O, O2
or O3 the most stable molecule at current T is selected.
• SCALED COEFF can be used to set a coefficient to be optimized with a specified
scaling factor and possibly a min and max value.

30
• STATUS

– PHASE (default) one or more phases can be set as suspended, dormant, entered
or fixed. You can use * to mean all phases, *S for all suspended, *D for all
dormant and *E for all entered and *U for all entered and unstable. The list of
phases is terminated by an equal sign “=” or an empty line.
If the new status is not already given after the equal sign it is asked for. If the
new status is entered or fixed the amount is asked for.
– ELEMENT an element can be entered or suspended.
– SPECIES a species can be entered or suspended.
– CONSTITUENT not implemented.

• SYSTEM-VARIABLE not implemented yet.

• UNITS like energy Joule/cal or mass kg/lb ... but not implemented yet.

• VARIABLE COEFF an optimizing parameter is specified.

• VERBOSE the software will write extra output. Not implemented

• WEIGHT to be used for assessments.

7.3.12 STEP

STEP is used to calculate along a single independent axis variable.

• NORMAL follow the axis variable from low to high limit.

• SEPARATE calculate each phase separately.

• QUIT do nothing.

• CONDITIONAL follow the axis variable and update s symbol after each step (to be
used for Scheil-Gulliver simulations, not yet implemented).

That is all (puuh)

31
8 Bibliography

References
[95Eri] G Eriksson, P Spenser and H Sippola, 2nd Colloquium on Process Simulations, pp
115-126, June 1995, HUT, Espoo, Finland.

[81Hil] M Hillert, Physica, 103B (1981) 31

[01Hil] M Hillert, J of Alloys and Comp 320 (2001) 161

[07Luk] H L Lukas, S G Fries and B Sundman, Computational Thermodynamics, Cambridge


Univ Press (2007)

[http://www.opencalphad.org] Official Open Calphad web site

[http://github.com] opencalphad repository at http://github.com/sundmanbo/opencalphad.

[15Sun1] B Sundman, U Kattner, M Palumbo and S G Fries, OpenCalphad - a free thermo-


dynamic software, Integrating Materials and Manufacturing Innovation, 4:1 (2015),
open access

[15Sun2] B Sundman, X-G Lu, H Ohtani, Comp Mat. Sci 101(2015) 127

[16Sun] B Sundman, U R Kattner, C Sigli, M Stratmann, R Le Tellier, M Palumbo and S


G Fries, The OpenCalphad thermodynamic software interface, Comp Mat Sci, 125
(2016) 188-196

[20Sun] Bo Sundman, Ursula R. Kattner, Mats Hillert, Malin Selleby, John Ågren, Sedigheh
Bigdeli, Qing Chen, Alan Dinsdale, Bengt Hallstedt, Alexandra Khvan, Huahai Mao
and Richard Otis, A method for handling the extrpolation of solid crystalline phases
to temperatures far above their melting point, Calphad 68 (2020) 101737

32

You might also like