TC-Toolbox Thermo-Calc Examples

File name: matex_T_01_Single-point_equilibrium_looping_and_3d_plotting.mlx
The file type suffix mlx
demonstrates using Live Scripts, not regular scripts.
This example shows how you create a single equilibrium calculation from a ternary system, loop it while changing Al and Cr concentration, then calculate density and plot the result as a 3D surface.
Using a Live Script provides function hints, i.e. direct description of the method parameters. T

File name: matex_T_02_Single_equilibrium_solidus_and_liquidus_temperature.m
This example shows how to create a single equilibrium calculation from a ternary system and configure it to calculate the solidus and liquidus temperature using fixed phase conditions for the liquid phase. There can be multiple solutions to a fixed phase condition and it is good practice to perform a regular equilibrium calculation close to where the phase transition is. This example starts with an equilibrium calculation at 1700 K in order to get good start values.

File name: matex_T_08_Property_diagram.m
This example shows how to create a property (step) diagram using TC-Python.
The alloy system Fe-Ni is used as an example.

File name: matex_T_09_Property_diagram_loop_parallel.mlx
The file type suffix mlx
demonstrates using Live Scripts, not regular scripts.
This example shows how to run multiple property (step) diagram calculations in parallel. Note that only multi-processing and not multi-threading can be used.
This example requires the Parallel Computing Toolbox of MATLAB®.
The alloy system Fe-C-Cr is used as an example.

File name: matex_T_10_Property_diagram_alloy_A_to_alloy_B.m
This example shows how to perform step calculations for a multi-material system. Such a calculation is not possible using the Thermo-Calc Graphical User Interface.

File name: matex_T_11_Phase_diagram.m
This example shows how to calculate and plot a phase diagram.
The system Fe-Cr is used as an example.

File name: matex_T_12_Phase_diagram_export_to_csv_file.m
Exports the line data of a phase diagram into a CSV-file that can be imported into other plotting software for creating customized plots for example. It is easy to adapt the code to generate a different format of the CSV-file or to use a completely different output file format.
The system Fe-C-Cr is used as an example.

File name: matex_T_13_Phase_diagram_single_phase_region_shift_Al_Si_Cu.m
Calculates and plots the single phase FCC_A1 region of Al-Si-Cu alloys and compares them for different Cu-contents.
For simplicity only FCC_A1 and DIAMOND_A4 are enabled as solid phases.

File name: matex_T_14_Batch_equilibria.mlx
The file type suffix mlx
demonstrates using Live Scripts, not regular scripts.
This example shows how you create a batch equilibrium calculation from a ternary system, loop it while changing Al and Cr concentration, then calculate the density and plot the result as a 3D surface.
This is almost the same example as matex_T_01_Single_equilibrium_looping_and_3d_plotting.mlx
, but instead of 100 equilibria it calculates 10000 but only for BCC_A2.
It is much more efficient, since it is using BatchEquilibriumCalculation
and not SingleEquilibriumCalculation
. BatchEquilibriumCalculation
has improved performance when calculating a large number of equilibria when each individual calculations is quick. E.g. when evaluating single phase properties for thousands of compositions.
Scheil Examples

File name: matex_T_03_Scheil_mole_fraction_of_solid.m
Shows the basic usage of Scheil calculations and mixing them with equilibrium calculations.

File name: matex_T_04_Scheil_composition_distribution_Al_Si_Cu_Mg.m
Calculates the variation of the 80% solid temperature using Scheil solidification for random compositions within a specification range.
The alloy system Al-Si-Cu is used as an example.

File name: matex_T_05_Scheil_composition_profiles_Ni_base.m
Calculates the microsegregation profile in a solidified Ni-based superalloy using the Scheil-method.
The plot is normalized relative to the nominal composition and shows the composition of the matrix phase (FCC).
A model alloy in the system Ni-Al-Cr is used as an example.

File name: matex_T_06_Scheil_eutectic_fraction_Al_Si_Cu.mlx
The file type suffix mlx
demonstrates using Live Scripts, not regular scripts.
Calculates the eutectic fraction using Scheil-solidification for varied alloying element content.
The alloy system Al-Si-Cu is used as an example.

File name: matex_T_07_Scheil_latent_heat_for_solidification_simulations.mlx
The file type suffix mlx
demonstrates using Live Scripts, not regular scripts.
Calculates the characteristic properties of the solidification of a range of alloys using Scheil-solidification and saves the data into a CSV-file (named Al_Si_Cu_scheil_solidification. csv
) that can be imported by other software.
Such data is typically used as an input into other simulation software, e.g. for casting simulation.
The alloy system Al-Si-Cu is used as an example.

File name: matex_T_15_Scheil_back_diffusion.m
Calculates solidification using Scheil with back diffusion in the primary phase, and compares the result to other calculation types.

Calculates the solidification with and without Solute Trapping.
Then compare the solidification in the two cases by plotting temperature vs. mole fraction of solid phase. The alloy system Al-Si-Cu is used as an example.
File name: matex_T_16_Scheil_Solute_Trapping_Al_Si_Cu.m
Graphical Mode example T_13: Scheil Solidification with Solute Trapping.
Material to Material Calculator Examples

Calculates the phases occurring for a material mixture, in this case for a mixture of a martensitic stainless steel with Alloy 800.
This type of calculation is for example useful for understanding effects when welding dissimilar materials - without the need to perform diffusion calculations.
File name: matex_T_17_Material_to_Material_single_fraction_of_B.m

Calculates the phases occurring during a gradual transition between two materials, in this case from a martensitic stainless steel to Alloy 800.
This type of calculation is for example useful for understanding effects when welding dissimilar materials - without the need to perform diffusion calculations.
File name: matex_T_18_Material_to_Material_step_along_fraction_of_B.m

Calculates the phases occurring for a material mixture with varying temperature, in this case for a mixture of a martensitic stainless steel with Alloy 800.
This type of calculation is for example useful for understanding effects when welding dissimilar materials - without the need to perform diffusion calculations.
File name: matex_T_19_Material_to_Material_step_along_temperature.m

Calculates a "phase diagram" for a material mixture, in this case for a mixture of a martensitic stainless steel with Alloy 800.
This type of calculation is for example useful for understanding effects when welding dissimilar materials - without the need to perform diffusion calculations.
File name: matex_T_20_Material_to_Material_phase_diagram.m