TC-Python is a Python™ language-based SDK available with Thermo-Calc that allows users to openly couple Thermo-Calc calculations with other software.

The SDK is built in the popular language Python™ to give Thermo-Calc users access to many other programs, such as numerical packages like NumPy and SciPy, which can now be used in combination with our calculations. It is truly a tool for Integrated Computational Materials Engineering (ICME). 

Read about the key features or follow the links to more details about TC‑Python.


Key Features of TCPython Include: 

  • TC‑Python is available starting with Thermo-Calc version 2018a and can be used with all operating systems supported by Thermo-Calc (Windows, Mac and Linux).
  • As of Thermo-Calc version 2019a, it includes all the powerful functionality available from within Thermo-Calc Graphical Mode and the majority of the features available in the classic Console Mode.
  • Built in Python™ to give users access to many other programs. The language is also easier to start with than, for example, Fortran or C.
  • Uses intelligent code completion to help you more easily navigate through the available classes and methods.
  • Allows users to easily do parallel computations.
  • Takes an object-oriented approach, which makes it easier to reuse information (classes/methods) and more quickly run your calculations when you need to change the compositions.
  • Guides you through the process of setting up the simulation, using good default values when you are unsure of what to use and prompts you to add missing information, for example. This minimises the occurrence of errors and makes it an easy option even for those who do not have experience working with APIs.
  • Couples with other software programs such as numerical packages like NumPy and SciPy in a very open way, making it an integral part of the ICME framework.
  • Can be used from within Jupyter notebooks or comparable interactive Python™ consoles.
  • Includes several examples with the installation which can be used to both learn about the use of TCPython and as a way to build your own calculation simulation.
  • Once you have a license for TCPython, the other software components are open source and have good development tools.

Calculation Types Available with Thermo-Calc and the Add-On Modules

  • Single equilibrium 
  • Phase (map) diagrams
  • Property (step) diagrams
  • Scheil-Gulliver solidification
  • Batch equilibrium: This is similar to single equilibrium calculations, but it offers significant performance improvements when calculating a lot of fast single equilibria, which are systems with few or non-complicated phases.
  • Property models - Access the property models and the features of the Property Model Calculator via the TCPython API. This includes both preinstalled and custom property models built using the Property Model Development Framework.
  • Precipitation - All of the precipitation calculations available in the Precipitation module (TCPRISMA) can be integrated into your own programming workflow with TCPython. This is the first Thermo-Calc SDK that can be used for precipitation calculations.
  • Diffusion - All of the functionality available with the Diffusion module (DICTRA) in Graphical Mode, and the majority of the commands available with Console Mode, are implemented for use in TCPython.

NOTE: Users who do not have a Precipitation module (TCPRISMA) or Diffusion module (DICTRA) license can make calculations with up to three elements using the DEMO versions for each add-on module that is already included in your Thermo-Calc software installation. 

Installing and Updating TC-Python

In order to run TCPython, you must have Thermo-Calc 2018a or newer and you must install additional software programs. There are various ways to do this, but we recommend the following open source programs: 

  • Anaconda - Python distribution software
  • PyCharm Community - Integrated Development Environment (IDE) that makes it easy to get started writing code and gives you access to the Intellisense feature in the program

Detailed instructions are included in the TC-Python Quick Installation Guide. You can also  watch the installation video below.


Updating TC‑Python from Earlier Versions

Note the following if you installed earlier versions (e.g. updating from 2018a or 2018b to 2019a) of TCPython with Thermo-Calc. When updating to a newer version of Thermo-Calc, you always also need to install the latest version of TCPython. It is not sufficient to run the installer of Thermo-Calc. 

TC-Python API Reference Documentation

Troubleshooting and Diagnostics

Troubleshooting Guide
TC-Python comes with a troubleshooting guide to help you with common problems in the software. To access the troubleshooting guide, open Thermo-Calc and go to the Help menu > Manuals Folder > TC-Python then double click on index.html. Select Troubleshooting from the menu within the help.

Diagnostic Script
There is also a diagnostic script to help you diagnose your problem, or that you can send to us if you need to contact us for support. 

Click here and then select the diagnostic script for your version of Thermo-Calc »

It is important to run the diagnostic script EXACTLY the same way as you run your TC-Python script (in the same IDE, same project, same Python environment, same Jupyter notebook, etc).  

The script automatically prints useful suggestions that, in many cases, will help you to fix the problem yourself. If you are unable to solve the problem, contact us for support.

Contact Thermo-Calc Software for Support with TC-Python
To contact Thermo-Calc Software for support with TC-Python, save the diagnostic script for your version of Thermo-Calc by right clicking on the link and selecting "Save link as" or similar. Run the script with Python EXACTLY the same way as you run your TC-Python script (in the same IDE, same project, same Python environment, same Jupyter notebook, etc). Finally, fill out the form on our Request Support page and paste the results of the diagnostic script into the dialogue box titled Describe your issue with as much detail as possible. This will help us to provide faster, more accurate support.

Request for More Information About TC-Python

Fill out the form below to find out how you can add a license for TC-Python to your existing Thermo-Calc license.