TC‑Python Additive Manufacturing Examples
You do not need an Additive Manufacturing license to use most of these examples. However, a TC-Python license is needed.
To run more complex AM calculations, you need an Additive Manufacturing (AM) Module license.

File name: pyex_AM_01_Transient_DE_No_Marangoni.py
Also see the Graphical Mode example that this is based on: AM_01: Transient Simulation of a Single Track.
The transient model solves for the heat equation in the entire 3D domain, including the melt pool, and is therefore, computationally expensive to solve. The fluid flow inside the melt pool due to the Marangoni effect is not included in this example. The double ellipsoidal, or the so-called Goldak heat source model, is used to predict melt pool size and temperature distribution during single track scanning. The parameters for the double ellipsoidal heat source are computed using optimization in a steady-state case for the given process parameters (power and scanning speed) and the melt pool size reported in the paper by Grange et al. [2021Gra].
Reference
[2021Gra] D. Grange, A. Queva, G. Guillemot, M. Bellet, J.-D. Bartout, C. Colin, Effect of processing parameters during the laser beam melting of Inconel 738: Comparison between simulated and experimental melt pool shape. J. Mater. Process. Technol. 289, 116897 (2021).

File name: pyex_AM_02_Transient_SS_DE.py
Also see the Graphical Mode example that this is based on:AM_02: Transient and Steady-state Simulations of a Single Track.
In this example a steady state and a single track simulation (with heat source from steady-state) are performed for Inconel 738LC.
The Transient with heat source from Steady-state model exploits the assumption that the melt pool size and temperature distribution reaches a steady-state almost instantly and thus first solves for a Steady-state case with the given process parameters. The result from the Steady-state in the form of temperature distribution in the melt pool is then mapped as a heat source in the transient simulation. This novel approach is much faster and efficient than the approach used in example pyex_AM_01 where the heat equation is solved in the entire 3D domain.

File name: pyex_AM_03_Steady.py
Also see the Graphical Mode example that this is based on:AM_03: Steady-state Simulations.
In this example steady-state simulations are performed for IN625 with different conditions, i.e.
- without fluid flow in the melt pool,
- with fluid flow in the melt pool due to Marangoni effect,
- and using separate material properties for the powder.
and then the results are compared to demonstrate the effects of fluid flow and separate material properties for the powder on the temperature distribution as well as on the shape of the melt pool. For the first two simulations, the same material properties are used for both powder and solid substrate while for the third simulation no fluid flow is included in the melt pool.

File name: pyex_AM_04_Scheil_TransientSS.py
Also see the Graphical Mode example that this is based on: AM_04: Scheil Transient Steady-state.
In this example, three different simulations are performed:
- Steady-state
- Transient Single track
- Transient Multilayer
Both Transient_Single track and Transient_Multilayer use Transient with heat source from Steady-state model to compute time-dependent temperature distribution in the given geometry. The primary difference between this example and the previous examples (pyex_AM_01 to pyex_AM_03) is that, in this case, the material properties data is retrieved from the Scheil Calculator whereas in the previous examples the material properties are taken from the preinstalled material library.
Furthermore, this example simulates scanning of two layers of powder where the second layer is spread on the top of the first layer when scanning of the first layer is completed.

File name: pyex_AM_05_Printability_map.py
Also includes a CSV file, pyex_AM_05_melt_pool_experiments.csv
This example requires an Additive Manufacturing (AM) Module license.
In this example a calibrated double ellipsoidal heat source is used to perform batch steady-state AM calculations for all the experimental variations of power and scan speed in the single track experiments.
A printability map is then produced using simple functions for the defects keyholing, balling, and lack of fusion. All defect functions are based on the melt pool dimensions (width, depth and length).
The Graphical Mode examples, AM_06a: Calibrating a Heat Source for a 316L Steel and AM_06b: Using the Calibrated Heat Source for a 316L Steel are similar to this version.

File name: pyex_AM_06_Keyhole.py
The Graphical Mode examples, AM_06a: Calibrating a Heat Source for a 316L Steel and AM_06b: Using the Calibrated Heat Source for a 316L Steel are similar to this version.
In this example a steady state with Gaussian heat source and keyhole model is demonstrated. The parameters for the Gaussian heat source are computed using optimization in a steady-state case for the given process parameters (power and scanning speed) and the melt pool size reported in the paper by Hu et al. [2019Hu].
Reference
[2019Hu] Z. Hu, B. Nagarajan, X. Song, R. Huang, W. Zhai, J. Wei, Formation of SS316L Single Tracks in Micro Selective Laser Melting: Surface, Geometry, and Defects. Adv. Mater. Sci. Eng. 2019, Article ID 9451406, 1–9 (2019).

File name: pyex_AM_07_Laser_Strategy_Probe_Position.py
The Graphical Mode example AM_12: Using AM Calculator Probe Data with the Precipitation Module (TC-PRISMA) is similar to this.
This example shows how to visualize and assess the laser strategy, and use this information to guide probe placement. There is a ScanningPath
class which stores the information about the laser scanning path for each layer. The example plots the laser strategy with a figure created for each layer. A line-scan of probes is created that is positioned on a laser as it passes the closest to the center. It starts and ends at the midpoint with the neighboring laser passes. The location of the probes are shown on the plots.

File name: pyex_AM_08_CET_IN718.py
The Graphical Mode example AM_10: CET Transition in an IN718 Alloy is similar to this.
In this example the thermal gradients and solidification rates are calculated after a AM steady state simulation for the alloy IN718. The Property Model Columnar-to-Equiaxed-Transition (CET) is used to calculate the transition limits for the same alloy and range of thermal gradients and solidification rates.
The results from the two calculations are overlaid in a 2d plot showing that most solidification conditions are for columnar growth. The thermal gradients and solidification rates are visualized in 3d plots.

File name: pyex_AM_09_CoreRing_BeamShape.py
Also see the Graphical Mode example that this is based on: AM_13: Using the Core-ring Beam Shape
In this example a batch of steady state calculations are run using the Core-Ring heat source model. The heat source parameters for the Core-ring heat source as well as the processing parameters [power and speed] are taken from Holla et al. [2024Hol]. In the end, the predicted melt pool width and depth are compared to the experimental data.
Reference
[2024Hol] V. Holla, J. Grünewald, P. Kopp, P. M. Praegla, C. Meier, K. Wudy, S. Kollmannsberger, Validity of Thermal Simulation Models for Different Laser Beam Shapes in Bead-on-Plate Melting. Integr. Mater. Manuf. Innov. 13, 969–985 (2024).

File name: pyex_AM_10_TopHat_BeamShape.py
Also see the Graphical Mode example that this is based on: AM_14: Using the Top-hat Beam Shape
In this example a batch of steady state calculations are run using the Top-hat heat source model. The heat source parameters for the Top-hat heat source as well as the processing parameters [power and speed] are taken from Sow et al. [2020Sow]. The beam radius of the top-hat beam is adjusted to match the laser distribution of the large multimode laser spot (Fig. 2 in [2020Sow]). In the end, the predicted melt pool width and depth are compared to the experimental data.
Reference
[2020Sow] M. C. Sow, T. De Terris, O. Castelnau, Z. Hamouche, F. Coste, R. Fabbro, P. Peyre, Influence of beam diameter on Laser Powder Bed Fusion (L-PBF) process. Addit. Manuf. 36, 101532 (2020).

File name: pyex_AM_11_Multiple_process.py
This example demonstrates how to efficiently run multiple additive manufacturing (AM) simulations in parallel using TC-Python with Python's multiprocessing capabilities. The code implements a systematic approach to handle multiple simulations with different process parameters (power and scanning speed).