0% found this document useful (0 votes)
53 views42 pages

Real-Time 2D Temperature Field Prediction in Metal Additive Manufacturing Using Physics-Informed Neural Networks

Accurately predicting the temperature field in metal additive manufacturing (AM) processes is critical to preventing overheating, adjusting process parameters, and ensuring process stability. While physics-based computational models offer precision, they are often time-consuming and unsuitable for real-time predictions and online control in iterative design scenarios. Conversely, machine learning models rely heavily on high-quality datasets, which can be costly and challenging to obtain within t
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views42 pages

Real-Time 2D Temperature Field Prediction in Metal Additive Manufacturing Using Physics-Informed Neural Networks

Accurately predicting the temperature field in metal additive manufacturing (AM) processes is critical to preventing overheating, adjusting process parameters, and ensuring process stability. While physics-based computational models offer precision, they are often time-consuming and unsuitable for real-time predictions and online control in iterative design scenarios. Conversely, machine learning models rely heavily on high-quality datasets, which can be costly and challenging to obtain within t
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

Real-Time 2D Temperature Field Prediction in Metal Additive

Manufacturing Using Physics-Informed Neural Networks


Pouyan Sajadi 1 Mostafa Rahmani Dehaghani 1 Yifan Tang 1
Email: [email protected] Email: [email protected] Email: [email protected]
G. Gary Wang 1*
Email: [email protected]
1
Product Design and Optimization Laboratory, Simon Fraser University, Surrey, BC, Canada

Abstract
Accurately predicting the temperature field in metal additive manufacturing (AM) processes is

critical to preventing overheating, adjusting process parameters, and ensuring process stability.

While physics-based computational models offer precision, they are often time-consuming and

unsuitable for real-time predictions and online control in iterative design scenarios. Conversely,

machine learning models rely heavily on high-quality datasets, which can be costly and

challenging to obtain within the metal AM domain. Our work addresses this by introducing a

physics-informed neural network framework specifically designed for temperature field prediction

in metal AM. This framework incorporates a physics-informed input, physics-informed loss

function, and a Convolutional Long Short-Term Memory (ConvLSTM) architecture. Utilizing

real-time temperature data from the process, our model predicts 2D temperature fields for future

timestamps across diverse geometries, deposition patterns, and process parameters. We validate

the proposed framework in two scenarios: full-field temperature prediction for a thin wall and 2D

temperature field prediction for cylinder and cubic parts, demonstrating errors below 3% and 1%,

respectively. Our proposed framework exhibits the flexibility to be applied across diverse

scenarios with varying process parameters, geometries, and deposition patterns.

Keywords: metal additive manufacturing, physics-informed neural networks, temperature

 Corresponding Author.

1
field prediction, real-time prediction, physics-informed input, physics-informed loss function

1. Introduction
Metal additive manufacturing (AM) has emerged as a transformative technology, finding

applications across a spectrum of industries, including aerospace, defense, and biomedicine. Its

attractiveness stems from its capacity to create custom-designed 3D objects layer-by-layer,

enabling mass customization, lightweight designs, efficient material recyclability, and shortened

lead times (Shamsaei et al., 2015).

In the metal AM process, rapid heating and cooling cycles typically occur, inducing substantial

fluctuations in the temperature field within both the substrate and deposited layers (Thompson et

al., 2015). This dynamic thermal environment is a critical determinant of the final product's

quality, leading to variations in microstructure (Bontha et al., 2006; Lippold et al., 2011), porosity

(Barua et al., 2014), as well as stress and strain states (Shamsaei et al., 2015; H. Yan et al., 2018).

Consequently, a precise understanding and comprehensive analysis of thermal conditions are

imperative for effectively controlling the AM deposition process (Z. Yan et al., 2018).

In this dynamic context, the integration of digital twins (DT) assumes a pivotal role, serving as

a bridge between the physical and digital realms. A digital twin represents a virtual replica of the

physical AM system, functioning in real-time synchronization with the actual manufacturing

process. Within this framework, real-time or near-real-time prediction of temperature fields

emerges not only as a pivotal element but also as a pathway towards optimizing parameters

(Hosseini et al., 2023), minimizing defects (Khairallah et al., 2016; Ren et al., 2019), ensuring

consistent product quality (Zheng et al., 2008), reducing waste, enabling predictive maintenance,

2
and continually enhancing the efficiency and reliability of metal AM technology (Zhang et al.,

2020).

Physics-based computational models, such as the finite element method (FEM) and

computational fluid dynamics (CFD), are extensively studied for predicting thermal behavior in

AM, most of which are inherently multiscale and multiphysical (Razavykia et al., 2020). These

models use partial differential equations (PDEs) like Navier–Stokes and heat transfer equations to

understand thermal history and temperature distribution. FEM models, preferred by Roberts et al.

(2009), offer computational efficiency over CFD, particularly for analyzing solid heat transfer

(Denlinger and Michaleris, 2016; Liao et al., 2022a). Li et al. (2020) applied a thermal-fluid model

integrating the level set method and Lagrangian particle tracking for laser powder-bed fusion

(LPBF). Irwin et al. (2016) predicted the thermal history in directed energy deposition (DED)

processes. Yan et al. (2018) crafted a thermal flow model for simulating flow dynamics in laser

spot melt pools. Heigel et al. (2015) introduced a thermo-mechanical model for DED,

incorporating forced convection to enhance precision. In another study, Bai et al. (2013) used

temperature data from an IR camera to calibrate uncertain input parameters in thermal simulations,

ensuring more accurate simulation input determination for weld-based additive manufacturing.

Despite advancements in numerical models for simulating temperature distributions in metal AM

processes, there exist several limitations that hinder the practical use in real-world applications,

including real-time prediction, the necessity for deep physical and mathematical understanding,

and the need for high-performance hardware (X. Ren et al., 2020).

As an alternative to physics-based numerical models, data-driven methods are employed in

modeling the intricate behaviors of AM processes. The study of data-driven thermal prediction can

3
be classified into two main categories based on their input variables. The first category comprises

models that solely map process parameters and the properties of parts to temperature profiles. In

contrast, the second category includes models that incorporate temperature data from adjacent

elements or previous time steps during the AM process, accounting for thermal transfer effects. In

the first category of studies, Roy and Wodo (2020) and Mozaffar et al.(2018) used FEM calibration

and recurrent neural network (RNN)-based models to predict the local thermal history. These

models can effectively forecast temperature fields inside fabricated parts and on their surfaces. In

the second category, studies like (Paul et al., 2019; K. Ren et al., 2020; Stathatos and Vosniakos,

2019) utilize artificial neural networks and iterative prediction methods. They considered past

temperatures, surrounding elements, and element locations relative to laser inputs, thus providing

more accurate predictions for future time steps and various laser paths. Additionally, Tang et al.

(2023) utilize temperatures from specific points on the printed layer to predict the complete

temperature field for the yet-to-print layer. An artificial neural network predicts temperature

profiles for these specific points, followed by the use of a reduced order model to reconstruct the

temperature profile for the entire layer.

Data-driven models offer computational efficiency and reduced dependence on comprehensive

physical knowledge. However, they exhibit certain drawbacks. They often operate as "black box"

systems, lacking transparency in their decision-making processes. They require substantial

amounts of data for effective training, which can be time-consuming and expensive, especially in

the context of metal AM, where obtaining extensive and high-quality training data is costly or

challenging.

4
Physics-Informed Neural Networks (PINNs) (Raissi et al., 2019) represent an innovative

machine learning (ML) paradigm that integrates the laws of physics, typically described by PDEs,

directly into the neural network architecture. PINNs have gained significant traction in recent years

across various scientific domains, such as fluid mechanics (Jin et al., 2021), electromagnetic

analysis (Noakoasteen et al., 2020), and crack recognition (Shukla et al., 2020), where they

leverage physical principles to enhance predictive accuracy even when confronted with limited

data. In the realm of metal AM, PINNs can accurately predict temperature fields and melt pool

dimensions while optimizing computational efficiency (Hosseini et al., 2023; Li et al., 2023). As

a pioneering work, Zhu et al. (2021) employed a PINN to predict temperature and melt pool fluid

dynamics in LPBF by incorporating essential conservation equations and utilizing the finite

element simulation data. These simulations run up to 2.0 milli-seconds but only a limited portion

from 1.2 to 1.5 milli-seconds are used as labeled training data. In another study focused on the

melt pool, Jiang et al. (2023) used the heat transfer equation alongside a small amount of data

obtained from simulations to predict the temperature field and melt pool dimensions. Xie et al.

(2022) integrated heat transfer laws into their PINN framework to predict temperature fields in

single-layer and multi-layer DED processes. Their model surpasses data-driven methods in both

scenarios, achieving an accuracy of over 90% with just 4000 training data points, in contrast to

tens of thousands training points employed by most data-driven models. Moreover, in another

study (Liao et al., 2022b), heat transfer principles and partially observed temperature data from

infrared cameras were employed to accurately predict the temperature history and identify hidden

parameters, such as the laser absorptivity, 𝐶𝑃 , and the material thermal conductivity, within the

process. This research also emphasizes the advantageous role of transfer learning techniques in

enhancing training efficiency and boosting prediction accuracy.

5
The detailed information of studies on PINNs to predict temperature fields is summarized in

Table 1. While significant progress has been made in integrating physics knowledge with ML

models, these advancements are often constrained to modeling only a small fraction of the process,

typically less than a second. Furthermore, a key limitation is the lack of real-time data integration

in their modeling approaches, a crucial element that enables control and provides valuable insight

into the thermal dynamics of the metal AM process. Lastly, current modeling schemes tend to be

tailored to single tracks and constant geometries, falling short when applied to processes with

varying geometries and deposition patterns.

Table 1. A summary of PINN studies for temperature field prediction of metal AM processes (MAPE is mean

absolute percentage error, MRE is mean relative error and RMSE is root mean square error)

Physics Predicted Number of


Study Process Inputs Accuracy
incorporated output data points
x, y,z, t,
Thermal
process
Hosseini et Single-track energy Temperature MAPE =
parameters, NA
al., 2023 LPBF conservation field 4.5%
material
equation
properties
Heat transfer MRE =
Single-track
Shukla et al., in deposition Temperature 0.81% for
laser metal x, y, z, t NA
2020 and cooling field three sample
deposition
stage points
Conservation
laws of
Single-track Melt pool MRE = 5.9%
momentum,
Li et al., 2023 selective laser x, y, z, t temperature NA for melt pool
mass (Navier-
beam melting and dynamics length
Stokes), and
energy
Melt pool size
Zhu et al., Single-track and
Heat transfer x, y, z, t NA MRE = 2%
2021 DED temperature
distribution
MRE =
30,000 2.05% for
Jiang et al., Single-track Temperature
Heat transfer x, y, z, t simulation average of
2023 DED field
data three multi-
layer cases
100,000 RMSE (K)
Xie et al., Single-track Temperature
Heat transfer x, y, z, t simulation with clean
2022 DED field
data data = 3.59

6
To address these existing gaps, this paper introduces a novel physics-informed Convolutional

Long Short-Term Memory (PI-ConvLSTM) framework. This framework leverages real-time

temperature field data collected during the manufacturing process to predict the 2-D temperature

field of the part for future timestamps. Unlike prior approaches, the proposed framework is

versatile and applicable to scenarios involving diverse geometries, deposition patterns, and process

parameters, enabling a real-time prediction of the manufacturing process.

The rest of the paper is organized as follows: Section 2 introduces the basics of PINNs and the

governing equations employed for modeling. This Section further delves into each component of

the proposed PI-ConvLSTM framework. In Section 3, the paper details two distinct applications

used to validate the framework with discussions of the results for each application. Section 4 is

dedicated to presenting insights, outlining limitations, and exploring prospects. Finally, Section 5

encapsulates the paper with a conclusion and suggests potential avenues for future work.

2. Methods
2.1. General PINN model

Conventional neural networks primarily operate by mapping input data to desired outputs

through training and rely heavily on the quantity and quality of labeled data for effective learning.

Meanwhile, in practical scenarios, physical systems are often governed by underlying physical

laws represented by PDEs.

PINNs seamlessly integrate the PDEs and information from measurements into the neural

network's loss function through automatic differentiation. In its general form, PDEs can be

expressed as:

7
𝑢𝑡 (𝑥, 𝑡) + 𝑁(𝑢: 𝜆) = 0 , 𝑥 ∈ 𝛺, 𝑡 ∈ [0, 𝑇] (1)

where 𝑢𝑡 (𝑥, 𝑡) serves a dual purpose, acting as both the actual PDE solution and the target neural

network's output. The term 𝑁(𝑢: 𝜆) embodies a nonlinear differential operator, with 𝜆

encapsulating relevant parameters within the PDEs. The spatial domain is denoted by 𝛺, while

[0, 𝑇] represents the temporal extent. The core of PINNs lies the concept of residual as a

quantifiable measure of PDE compliance. Mathematically, the residual of a PDE is expressed as:

𝑅𝑒𝑠 = 𝑢̂(𝑥, 𝑡) + 𝑁(𝑢: 𝜆) (2)

This residual encapsulates the underlying physical law represented by the PDEs. As the

predicted output 𝑢̂(𝑥, 𝑡) of the neural network approaches the actual solution 𝑢𝑡 (𝑥, 𝑡), the residual

progressively diminishes. Therefore, by incorporating this residual into the model's loss function,

it serves as a regularization factor, effectively constraining the neural network to adhere more

closely to the governing physical principles encoded by the PDEs. Additionally, PINNs

incorporate boundary and initial conditions, represented by Equations (3), to establish a well-posed

system.

𝑢𝑡 (𝑥, 𝑡) − 𝐵(𝑥, 𝑡) = 0 , 𝑥 ∈ 𝜕𝛺 (3)

𝑢𝑡 (𝑥, 0) − 𝐼(𝑥) = 0 , 𝑥 ∈ 𝛺 (4)

Here, 𝐵(𝑥, 𝑡) represents boundary conditions, and 𝐼(𝑥) signifies initial conditions. Integrating

these physical laws into the loss function is essential for enforcing system constraints. These

8
physical laws, alongside the supervised loss of data measurements (Equations (5)-(8)), become

integral components of the neural network's loss function, resulting in Equation (9):

𝑁𝑝
1 2
𝐿𝑝𝑑𝑒 = ∑ 𝑅𝑒𝑠𝑝𝑑𝑒 (5)
𝑁𝑝
𝑖=1

𝑁𝑖
1
𝐿𝑖𝑐 = ∑(𝑢̂𝑖 − 𝐼𝑖 (𝑥))2 (6)
𝑁𝑖
𝑖=1

𝑁𝑏
1
𝐿𝑏𝑐 = ∑(𝑢̂𝑖 − 𝐵𝑖 (𝑥, 𝑡))2 (7)
𝑁𝑏
𝑖=1

𝑁𝑑
1
𝐿𝑑𝑎𝑡𝑎 = ∑(𝑢̂𝑖 − 𝑢𝑖 )2 (8)
𝑁𝑑
𝑖=1

𝐿𝑡𝑜𝑡𝑎𝑙 = 𝑤𝑝 𝐿𝑝𝑑𝑒 + 𝑤𝑖 𝐿𝑖𝑐 + 𝑤𝑏 𝐿𝑏𝑐 + 𝑤𝑑 𝐿𝑑𝑎𝑡𝑎 (9)

Here, 𝐿 represents the loss function associated with each of the components in the provided

equations; 𝑅𝑒𝑠𝑝𝑑𝑒 is the residual of the PDE and 𝑢̂𝑖 is the neural network’s output and 𝑢𝑖

represents the ground truth data points from the supervised learning dataset. In Equation 9,

components are weighted using 𝑤𝑝 , 𝑤𝑖 , 𝑤𝑏 , and 𝑤𝑑 , respectively, and involve 𝑁𝑝 , 𝑁𝑖 , 𝑁𝑏 , and 𝑁𝑑

sampling points associated with each respective loss term. The network is effectively trained by

minimizing the loss, employing gradient-based optimizers like Adam (Kingma and Ba, 2014) and

L-BFGS (Byrd et al., 1995), all facilitated through the process of backpropagation. An overview

of the PINN algorithm is depicted in Figure 1.

9
Figure 1. During training, the neural network predicts the output 𝑢̂(𝑥, 𝑡), and computes the physics loss function,

evaluating the system's adherence to physical laws. This loss function encompasses various components, including

data-driven and physics losses, which are then minimized through backpropagation.

2.2. Governing Equations

In this Section, we introduce the governing equations for thermal prediction in this paper. Our

focus is on modeling heat conduction in the metal AM process.With an exclusion of factors such

as fluid flow and vaporization heat loss, the transient heat transfer during the process is represented

by the following heat conduction PDE (Holman, 1986):

𝜕(𝑇(𝑥, 𝑦, 𝑡)) 𝜕 𝜕𝑇(𝑥, 𝑦, 𝑡) 𝜕 𝜕𝑇(𝑥, 𝑦, 𝑡)


𝜌𝐶𝑝 = (𝑘 )+ (𝑘 ),
𝜕𝑡 𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑦
(10)

𝑥, 𝑦 ∈ 𝛺, 𝑡 ∈ [0, 𝑡𝑒𝑛𝑑 ]

where 𝑇(𝑥, 𝑦, 𝑡) is the corresponding temperature of position (𝑥, 𝑦) at time 𝑡, 𝜌 is the density of

the part material, 𝐶𝑝 is the specific heat, and 𝑘 is the thermal conductivity. The initial condition is

set equal to the ambient air temperature, 𝑇𝑎𝑚𝑏 . The boundary conditions are applied to all surfaces,

10
except for the top surface where the laser heat flux is applied, accounting for the heat radiation and

convection with the surrounding air.

For surfaces other than the top surface:

𝜕𝑇
−𝑘 = ℎ(𝑇 − 𝑇𝑎𝑚𝑏 ) + 𝜎𝜀(𝑇 4 − 𝑇𝑎𝑚𝑏 4 ), 𝑥 ∈ 𝜕𝛺 (11)
𝜕𝑛⃗

For the top surface, with an additional term corresponding to the laser heat flux:

𝜕𝑇
−𝑘 = ℎ𝑐 (𝑇 − 𝑇𝑎𝑚𝑏 ) + 𝜎𝜀(𝑇 4 − 𝑇𝑎𝑚𝑏 4 ) + 𝑄𝑙𝑎𝑠𝑒𝑟 , 𝑥 ∈ 𝜕𝛺𝑡𝑜𝑝 (12)
𝜕𝑛⃗

𝜕𝑇
Here, ⃗
denotes the normal derivative perpendicular to the boundary. The coefficient ℎ
𝜕𝑛

signifies the heat convection coefficient characterizing the interaction between the substrate and

air, while 𝜎 stands for the Stefan–Boltzmann constant, and 𝜀 represents the heat radiation

coefficient. 𝑄𝑙𝑎𝑠𝑒𝑟 denotes the energy produced by the laser heat source per unit volume. These

boundary conditions are essential for modeling the heat transfer and energy flow in the system.

2.3. Proposed Online PI-ConvLSTM Framework

In this section, we will explore the physics-informed ConvLSTM framework designed to

address the challenging task of predicting the temperature field during the metal AM process. This

framework leverages sequential thermal images and process parameters as input data to predict the

2D thermal field in subsequent timeframes. More specifically, a sequence of 𝑤 thermal images

from timestamps (𝑡 − 𝑤) to 𝑡 is input to the framework to predict the thermal image for the

timestamp (𝑡 + 𝑖). Here, 𝑤 represents the window size for the input, and 𝑖 denotes the timestamp

11
in the future for which we aim to predict the temperature field. It's essential to note that both 𝑤

and 𝑖 are hyperparameters, and their significance will be elaborated on in the following sections.

This problem is inherently high-dimensional, given that the inputs and outputs consist of 2D

thermal images. Furthermore, considering the temporal relationship between inputs and outputs

due to the sequential nature of the data, we can view this problem as a 2D sequential modeling

challenge. In

Figure 2, we provide an illustrative overview of our comprehensive framework, comprised of three

key components: the neural network, Physics-informed (PI) loss, and Physics-informed (PI) input.

These elements together underpin our strategy for addressing the complex challenge of predicting

temperature distributions in a system with spatial and temporal dependencies. In the following

sections, we will delve into each of these components, offering a closer look at their specific

functions and how they work together within the framework.

12
Figure 2. Overview of PI-ConvLSTM framework with its components: the neural network, PI-input, and PI-loss

2.3.1. Model Architecture

To tackle such complex and high-dimensional tasks, the choice of neural network architecture

is crucial. In the literature, Convolutional Neural networks (CNN) are recognized for their ability

to manage high-dimensional data by efficiently sharing parameters across layers. Spatial

dependencies within 2D-to-2D modeling tasks are effectively captured by CNNs (Neupane et al.,

2021; Wu et al., 2023; Zhou et al., 2021), which employ convolutional layers to hierarchically

extract features from the input data, enabling the learning of complex patterns.

Complementarily, the long short-term memory (LSTM) architecture excels at capturing

temporal dependencies within sequential data (Sherstinsky, 2020) The recurrent nature of LSTM

allows the maintenance of hidden states over time, rendering them suitable for modeling sequences

and time series data (Yu et al., 2019). LSTMs can capture patterns, trends, and dependencies in

the temporal aspect of the data, which are critical information for predicting the temperature

distribution across timestamps.

13
Building upon the strengths of CNNs and LSTMs, Convolutional LSTMs (ConvLSTM) have a

hybrid architecture that seamlessly combines the spatial feature extraction capabilities of CNNs

with the LSTM-like memory and sequential modeling capabilities (Shi et al., 2015). ConvLSTM

operates by replacing the standard matrix multiplication in LSTM cells with convolutional

operations. This fusion enables ConvLSTMs to simultaneously process spatial and temporal

information, making them an ideal choice for tasks addressed in this paper, where 2D thermal

images serve as inputs, and the goal is to predict a 2D temperature distribution evolving over time.

The adoption of the ConvLSTM architecture equips the neural network with the capability to excel

in the extraction of spatial features from thermal images through CNN-like operations, all while

maintaining the capacity to model temporal dependencies using LSTM-like memory. Generally,

the numbers of ConvLSMT modules and CNN modules depend on the complexity of tasks.

2.3.2. Physics-informed Loss Function


Referring to Section 2.1, a physics-informed loss function typically comprises two core

elements: data-based loss and physics-based loss. The physics-based loss encompasses the residual

of the PDE, quantifying the deviation between predictions and the PDE, along with the residual

related to the boundary and initial conditions corresponding to the PDE.

The objective is to ensure that the framework's output adheres to the physics principles

articulated by the PDE, as represented in Equations (10)-(12). To calculate temperature gradients

across both time and space, the temperature distribution must be discretized into finite locations.

This is achieved by subdividing the computation domain Ω into 𝑚 × 𝑛 cells with steps denoted as

h. This discretization process is considered crucial when dealing with pixelized data, such as

thermal images. Drawing inspiration from the finite difference method, we utilize differential

approximations to compute the derivative terms in Equation 10.

14
𝜕 2𝑇 1
≅ [𝑇(𝑥𝑖 + ℎ, 𝑦𝑖 ) − 2𝑇(𝑥𝑖 , 𝑦𝑖 ) + 𝑇(𝑥𝑖 − ℎ, 𝑦𝑖 )] (13)
𝜕𝑥 2 ℎ2

𝜕 2𝑇 1
2
≅ 2 [𝑇(𝑥𝑖 , 𝑦𝑖 + ℎ) − 2𝑇(𝑥𝑖 , 𝑦𝑖 ) + 𝑇(𝑥𝑖 , 𝑦𝑖 − ℎ)] (14)
𝜕𝑦 ℎ

The PDE loss can be formulated using the difference equations. Based on Equations (13) and

(14), we derive the difference equation for Equation (10) as follows:

(𝑇(𝑥𝑖 , 𝑦𝑗 ) − 𝑇𝑝𝑟𝑒𝑣 (𝑥𝑖 , 𝑦𝑗 ))


𝑅 (𝑥𝑖 , 𝑦𝑗 ) = −𝜌𝐶𝑝
∆𝑡

1 (15)
+ 𝑘 (𝑇(𝑥𝑖 + ℎ, 𝑦𝑗 ) + 𝑇(𝑥𝑖 − ℎ, 𝑦𝑗 ) + 𝑇(𝑥𝑖 , 𝑦𝑗 + ℎ)
ℎ2

+ 𝑇(𝑥𝑖 , 𝑦𝑗 − ℎ) − 4𝑇(𝑥𝑖 , 𝑦𝑗 )) , 𝑥 ∈ 𝛺, 𝑡 ∈ [0, 𝑡𝑒𝑛𝑑 ]

where 𝑇(𝑥𝑖 , 𝑦𝑖 ) is the temperature of the pixel at (𝑥𝑖 , 𝑦𝑖 ) in the 2D predicted temperature field and

𝑇𝑝𝑟𝑒𝑣 (𝑥𝑖 , 𝑦𝑗 ) is the temperature of the pixel at (𝑥𝑖 , 𝑦𝑖 ) for the previous timestamp. As the

framework's outputs are high-dimensional images, the residual for each output is structured as

follows:

𝑅 (𝑥0 , 𝑦0 ) ⋯ 𝑅 (𝑥𝑛 , 𝑦0 )
𝑅𝑒𝑠𝑝𝑑𝑒 = [ ⋮ ⋱ ⋮ ] (16)
𝑅 (𝑥0 , 𝑦𝑚 ) ⋯ 𝑅 (𝑥𝑛 , 𝑦𝑚 )

In an ideal situation, the framework's output temperatures should drive 𝑅𝑒𝑠𝑝𝑑𝑒 to approach zero.

Therefore, the PDE loss for the PI-ConvLSTM is formulated as:

𝑁𝑝
1 (17)
𝐿𝑝𝑑𝑒 = ∑ 𝑅𝑒𝑠(𝑖)2𝑝𝑑𝑒
𝑁𝑝
𝑖=1

15
where 𝑁𝑝 is the number of thermal images used to train the framework. The losses associated with

initial and boundary conditions remain consistent with the explanations provided in Section 2.1.

2.3.3. Physics-informed Input

In this section, the third component of the PI-ConvLSTM framework is introduced. Thus far,

we have discussed the neural network architecture for predicting 2D temperature fields and

explored the design of a specialized physics-based loss function. To improve the adaptability of

our modeling approach for various manufacturing scenarios, we include important process

parameters associated with the laser heat source.

Parameters such as laser power, laser absorptivity, beam radius, and laser location are deemed

influential in thermal modeling for laser-based metal AM processes [15, 16]. Instead of directly

providing these parameters as raw features to the model and expecting it to deduce their intricate

relationship with temperature, we opt for a more informed strategy. We create an auxiliary physics-

informed input, an intermediate feature that embeds meaningful physics knowledge related to the

heat input, and incorporate it into a hidden layer of the neural network. This intermediate feature

acts as a higher-level parameter that combines the influences of the mentioned process parameters.

In our case, the selected higher-level parameter is the laser heat flux. The concept is to integrate

information about the laser heat flux into the historical thermal information within the neural

network to enhance the modeling process. In this study, we estimate the laser heat flux using a

Gaussian surface heat flux model. The process of crafting this physics-informed input is detailed

as follows: firstly, the heat flux for each point on the layer subjected to the laser's application is

calculated as expressed in Equation (18):

16
2𝜂𝑃 2𝑑 2
𝑞𝑙𝑎𝑠𝑒𝑟 (𝑥, 𝑦) = − 2 exp ( 2 ) (18)
𝜋𝑟𝑏𝑒𝑎𝑚 𝑟𝑏𝑒𝑎𝑚

Here, 𝜂 represents the laser absorptivity, 𝑃 corresponds to the laser power, 𝑟𝑏𝑒𝑎𝑚 stands for the

laser beam radius, and 𝑑 represents the distance from the point (𝑥, 𝑦) to the laser center.

Subsequently, we aggregate the input heat flux across the entire layer where the laser is applied,

resulting in the formation of the heat flux matrix 𝑞𝑙𝑎𝑠𝑒𝑟 , as shown in Equation (19):

𝑞𝑙𝑎𝑠𝑒𝑟 (𝑥0 , 𝑦0 ) ⋯ 𝑞𝑙𝑎𝑠𝑒𝑟 (𝑥𝑛 , 𝑦0 )


𝑞𝑙𝑎𝑠𝑒𝑟 = [ ⋮ ⋱ ⋮ ] (19)
𝑞𝑙𝑎𝑠𝑒𝑟 (𝑥0 , 𝑦𝑚 ) ⋯ 𝑞𝑙𝑎𝑠𝑒𝑟 (𝑥𝑛 , 𝑦𝑚 )

Each element within the matrix 𝑞𝑙𝑎𝑠𝑒𝑟 signifies the heat flux at a specific location on the layer

where the laser is applied. Figure 3 illustrates an instance of laser application on a surface, modeled

using the Gaussian surface heat flux, along with its corresponding 𝑞𝑙𝑎𝑠𝑒𝑟 matrix. After this stage,

the 𝑞𝑙𝑎𝑠𝑒𝑟 matrix is introduced into the neural network following the ConvLSTM layers, where

temporal dependencies in the data are extracted. Subsequently, within the neural network, multiple

Convolutional layers are employed to extract spatial dependencies. This innovative approach

allows us to effectively integrate crucial process parameters into our modeling framework, offering

an enhanced understanding of the complex relationship between these parameters and temperature

distributions.

17
Figure 3. Gaussian heat flux on a surface (left) and its corresponding 𝑞𝑙𝑎𝑠𝑒𝑟 matrix (right)

3. Applications
In this Section, we delve into the practical applications of the PI-ConvLSTM framework. To

evaluate its efficacy and flexibility in thermal field prediction, we present two distinct scenarios.

Firstly, we examine its capacity to forecast a 2D temperature field within a thin wall during a metal

AM process, utilizing available experimental data from the literature. Secondly, we assess its

performance in predicting 2D temperature fields for the actively printed layer, covering both

cylindrical and cubical geometries, based on simulation data. This approach allows us to evaluate

the framework's robustness and reliability in diverse data contexts.

3.1. 2D-Temperature Field Prediction of a Thin Wall

3.1.1. Dataset and Experimental Setup

In the first application, we use the infra-red images taken during the LMD process for printing

60-layer Ti-6Al-4V thin-walled structures, provided by Marshall et al. (2016a). These data are

measured by an IR camera, which is a part of the OPTOMEC Laser Engineered Net Shaping

(LENS) 750 printer. The system setup is shown in Figure 4. The thin wall was constructed at an

18
orientation such that one of its sides was fully in-view by the IR camera. The data of the IR camera

are output to comma separated value (CSV) files, each of which contains a 320×240 (width ×

height) matrix of temperature values. In total, 2760 thermal images are captured by the IR camera

during the deposition process. These images undergo processing and are organized so that a

sequence of 𝑤 images forms one input, with the subsequent image corresponding to the next

timestamp as the output. For instance, images from timestamp 100 to timestamp (100 + 𝑤) serve

as input to the framework, predicting the output image for timestamp (100 + 𝑤 + 1) . As

mentioned in Section 2.3, 𝑤 serves as the window size for inputs and is determined through

hyperparameter tuning.

Figure 4. Side view (top) and aerial view (bottom) of IR camera and its orientation with respect to the substrate and

thin wall within the build chamber (Marshall et al., 2016b).

3.1.2. PI-ConvLSTM Framework for Full-Field Temperature Prediction


The developed PI-ConvLSTM framework serves as a tool for predicting the full temperature

field for the ith future timestamp based on thermal images captured at previous timestamps. In this

19
specific application, we simplify the model by assuming that temperature remains uniform

throughout the material's thickness, thus allowing us to disregard solid heat transfer in the through-

the-thickness direction. This simplification transforms the heat transfer problem within the thin

wall into a 2D case. In this revised model, we treat the convective and radiative heat flux occurring

on the two surfaces of the wall parallel to the yz plane as a heat source term. This leads to the

following expression of Equation 10:

𝜕(𝑇) 𝜕 2𝑇 𝜕 2𝑇 ℎ 𝜎𝜀
𝜌𝐶𝑝 − 𝑘 ( 2 + 2 ) + (𝑇 − 𝑇𝑎𝑚𝑏 ) + (𝑇 4 − 𝑇𝑎𝑚𝑏 4 ) = 0 (20)
𝜕𝑡 𝜕𝑥 𝜕𝑦 𝑤 𝑤

Here, 𝑤 represents the thickness of the wall. The boundary conditions specified in Equation

(11) are still valid for the left and right boundaries of the 2D wall, and Equation (12) applies to the

upper surface of the wall.

The input comprises a series of previous IR images and the framework is informed by heat

transfer dynamics and associated boundary conditions, which enables it to predict the full-field

temperature at the next timestamp. Additionally, laser heat flux data, as described in Section 2.3.3,

is incorporated into the model to enhance its understanding of the relevant process parameters. In

the model’s architecture, three sequential ConvLSTM layers and two Convolutional layers, each

equipped with 10 filters, are employed. The model is trained for 40 epochs using the Adam

optimizer with a learning rate of 1e-3. All implementations are performed using Python's

TensorFlow package.

3.1.3. Results and Discussion for Full Field Temperature Prediction


To assess the performance of the developed framework against experimental data, we utilize

various evaluation metrics, including Mean Absolute Error (MAE), Mean Square Error (MSE),

20
and Mean Absolute Percentage Error (MAPE). The use of these three metrics provides a

comprehensive evaluation of the model's performance. MSE emphasizes overall accuracy with a

focus on larger errors, while MAE treats all errors equally, and MAPE gauges relative accuracy

by expressing errors as a percentage of actual values. This multi-metric approach ensures a

nuanced understanding of precision, error magnitude, and percentage-wise accuracy, enhancing

the overall assessment of the model.

𝑛 𝑚
1
𝑀𝑆𝐸 = ∑ ∑(𝑌𝑖𝑗 − 𝑌̂𝑖𝑗 )2 (21)
𝑛×𝑚
𝑖=1 𝑗=1

𝑛 𝑚
1
𝑀𝐴𝐸 = ∑ ∑|𝑌𝑖𝑗 − 𝑌̂𝑖𝑗 | (22)
𝑛×𝑚
𝑖=1 𝑗=1

𝑛 𝑚
1 𝑌𝑖𝑗 − 𝑌̂𝑖𝑗 (23)
𝑀𝐴𝑃𝐸 = ∑∑| |
𝑛×𝑚 𝑌𝑖𝑗
𝑖=1 𝑗=1

where, 𝑌𝑖𝑗 and 𝑌̂𝑖𝑗 represent the actual and predicted temperature fields for each element in the

dataset respectively, with 𝑛 and 𝑚 denoting the number of rows and columns in the temperature

matrix. These metrics assess individual errors. The overall error for validation dataset is obtained

by averaging these individual errors, providing an evaluation of the entire validation dataset.

• Effect of window size on prediction error


In Section 2.3, the window size is identified as a hyperparameter to be determined through

tuning. To find the most accurate window size, a range of window sizes from 𝑤 = 1 to 6 is tested,

and the outcomes are depicted in Figure 5. Based on these results, a window size of five

demonstrates the lowest MSE, hence is chosen as the number of previous timestamps to use as

input.

21
900
800
700
600

MSE
500
400
300
200
100
0
1 2 3 4 5 6
Window Size
Figure 5. MSE on the validation dataset for different window sizes

• 2D temperature prediction results

Figure 6 shows a comparison between the predicted temperature field made by the PI-

ConvLSTM framework and the actual experiment results at different times. It also displays the

difference between the predicted and experimental data. While most areas in the prediction closely

match the real results, accuracy slightly decreases around the melt pool region. This reduced

accuracy can be attributed to the intricate and complex nature of the melt pool area. The area's

swift temperature fluctuations, complex phase transitions, and dynamic material behavior present

challenges for precise prediction due to their highly nonlinear and transient characteristics.

Moreover, the melt pool is subject to diverse boundary conditions, such as extreme temperatures

and rapid thermal gradients, which, if not accurately represented, significantly impact the model's

predictive accuracy within this region.

22
(c) Absolute difference between
(a) Framework prediction (b) Experimental result framework prediction and
experimental result
Figure 6. Comparison of the temperature field from the framework prediction and experimental results in a cross-

Sectional view (top timestamp=2300 (t=391s), middle timestamp=1900 (t=270s), below timestamp=900 (t=117s))

• Effect of Physics-informed components on prediction error

As previously described, the PI-ConvLSTM framework consists of three integral components:

the PI loss, the PI input, and a neural network. In order to evaluate the influence of each component,

23
we conducted multiple experiments. We trained the model in various configurations: one included

both the PI loss and PI input, another solely used the PI loss, a third model only implemented the

PI input, and the final model (ML-only model) excluded any PI components. The obtained results,

shown in Table 2, indicated that the model utilizing solely the PI input excelled over the ML-only

model across various evaluation metrics. Additionally, the model incorporating the PI loss

displayed a strong performance, benefiting from its ability to integrate the PDE, boundary

condition, and initial condition to enhance robustness against existing noises within the data.

Notably, the model that combined both the PI loss and PI input (i.e., PI-ConvLSTM) outperformed

other configurations across all evaluation metrics. This superiority is due to its comprehensive

integration of physics principles through the PI loss, inclusion of process parameters like laser heat

flux via the PI input, and utilization of experimental information for comprehensive field

temperature prediction.

Table 2. The results for PI-ConvLSTM frameowrk with different configurations

Model Variation MSE MAE MAPE


ML Only 1967 57.5 14.39%
PI input 1176 48.9 11.14%
PI loss 302 13.1 2.73%
PI input + PI loss 273 11.3 2.15%

3.2. 2D-Temperature Field Prediction of a Cylinder and a Cube

3.2.1. Dataset and Simulation Setup


In the second application, we employ the PI-ConvLSTM framework to predict 2D temperature

field for the currently printed layer of a cylinder and a cubic shape part. Within this section, to test

the adaptability of the framework, two distinct geometries with corresponding deposition patterns

have been selected. Cylindrical and cubic geometries, widely used in the industry are chosen to

24
serve as the foundation for the study. An overview of these geometries and deposition patterns can

be observed in Figure 7.

Figure 7. Illustrations of geometry and deposition patterns for 2D temperature field prediction. The grey lines

indicate the base, the black lines indicate the deposition geometry, and the dashed arrows indicate the direction of

the laser.

Table 3. Material properties used in the simulation

Parameter Value Unit


Density, 𝝆 7915 − 0.59 × 𝑇 𝑘𝑔⁄
𝑚3
Heat conductivity, 𝒌 12.6 + 0.015 × 𝑇 𝑊⁄
𝑚𝐶
Heat capacity, 𝑪𝒑 496.5 + 0.133 × 𝑇 𝑗
⁄𝑘𝑔 𝐶
Convection coefficient, 𝒉 10 𝑊⁄
𝑚2 𝐶
Emissivity, 𝜺 0.3 -

We utilized the pre-built formulations and integrated physics within the ANSYS AM DED

process module, specifically crafted for the Directed Energy Deposition process for the simulation

of the process. In the simulations, the pass width and the layer thickness are set to maintain a

consistent pass of 1 mm. Both the substrate and deposited parts are made from the 316 stainless

steel. A summary of material properties can be found in Table 3. Our thermal analysis encompasses

considerations such as thermal conductivity, thermal convection, and radiation. The initial

25
temperature of the substrate and ambient temperature is consistently set at 23°C. The deposition

speed stands at 10 mm/s for the cylinder and 7 mm/s for the cubic part. The ANSYS AM DED

simulation employs an inactive activation strategy, where elements representing the deposited

material are activated following the deposition sequence at specific times. Upon activation, these

elements are assigned a temperature defined as the “process temperature”. The determination of

the process temperature involves referencing empirical data from similar cases. In this scenario,

the assigned values for element activation are 1800°C for the cubic part and 2400°C for the

cylindrical part. Notably, the simulation does not model the laser heat flux. Furthermore, the laser

power is treated as a trainable parameter and adjusted during the training process. Each simulation

generates a dataset for every timestamp. In each dataset, the transient temperature values for all

nodes are recorded. These datasets are then preprocessed to extract specific points of interest.

Consequently, the input-output pairs for training and validation are structured as follows: a

sequence of the 2D temperature field for the currently printed layer and the layer below are used

as inputs, with the corresponding output representing the 2D temperature field of the currently

printed layer for the next timestamp. Each simulation comprises roughly 16,000 timestamps,

resulting in approximately 16,000 input-output pairs extracted for training and validating the

framework for each of the geometries. 80% of the data is allocated for training, while the remaining

20% is set for validation.

3.2.2. PI-ConvLSTM Framework for 2D Temperature Field Prediction


In this application, our focus lies on predicting the 2D temperature field for the currently printed

layer. To achieve this, the model exclusively integrates the boundary conditions related to the top

surface, where the laser is applied. Therefore, Equation (12) is included in the PI loss function,

which can be represented as:

26
𝐿𝑡𝑜𝑡𝑎𝑙 = 𝑤𝑏 𝐿𝑏𝑐 + 𝑤𝑖 𝐿𝑖𝑐 + 𝑤𝑑 𝐿𝑑𝑎𝑡𝑎 (24)

𝑤𝑏 , 𝑤𝑖 and 𝑤𝑑 are weights set proportionally to ensure a balanced scale among the various

terms in the loss function, contributing to the model's enhanced training robustness. This tailored

approach allows the model to work with image-based inputs for various geometries. Due to the

complexity of the geometry and availability of more training data, a more sophisticated model is

used for the second application. This approach employs a model equipped with six ConvLSTM

layers and four Convolutional layers, each utilizing 20 filters, to predict the 2D temperature field

for both cylindrical and cubic parts. The laser heat flux distribution for each geometry at every

timestamp is integrated into the model after the ConvLSTM layers. Each geometry undergoes

separate training sessions consisting of 12 epochs, utilizing the Adam optimizer with a learning

rate of 1e-3.

3.2.3. Results and Discussion for 2D Temperature Field Prediction


• Effect of the window size on the prediction error
To determine the optimal window size for 2D temperature field prediction, multiple window

sizes from 𝑤 = 1 to 7 were tested. From the outcomes detailed in Figure 8, a window size of three

was found to yield the lowest MSE, and subsequently selected as the number of preceding time

steps for the model input.

27
1000
900
800
700
600
MSE 500
400
300
200
100
0
1 2 3 4 5 6 7
Window size

Figure 8. MSE on the validation dataset for different window sizes

• 2D temperature prediction results

Consecutively, the results for 2D temperature field prediction for the cylinder and cubic parts

are presented in Table 4. These findings reveal a strong concordance between the predictions

generated by the PI-ConvLSTM framework and the simulation results. The predictions

demonstrate less than 1% MAPE and an approximate MAE of 7°C for both geometries and

deposition patterns. While the relative error in cylinder geometry is lower than in the cube, the

increased temperature range in this process contributes to generally higher MSE and MAE for the

cylinder, with the squared error notably intensifying in higher temperature ranges, particularly in

the MSE. The accuracies in both cases are notably satisfactory, indicating the robustness and

adaptability of the framework for temperature predictions across diverse process parameters,

geometries, and deposition patterns.

28
Table 4. Prediction results of 2D temperature fields using the PI-ConvLSTM framework

Geometry-deposition pattern MSE MAE MAPE


Cylinder-Spiral 149.5 7.62 0.67%
Cube-ZigZag 115.0 6.85 0.74%

Figure 9 compares the predicted temperatures from the PI-ConvLSTM with simulated

temperatures for both the cylinder and cube. The predicted temperatures match well with the actual

temperatures in most areas, with differences typically below 20°C. Closer to the melt pool,

however, there are bigger differences, likely for reasons similar to those in Figure 6. Notably, the

model's predictions are less accurate for the cylinder than for the cube, mainly because of the

higher process temperature chosen for this geometry. Additionally, the more complicated pattern

of material deposition in processing the cylinder may cause additional errors in modeling how the

heat is transferred.

29
(c) Absolute difference between
(a) Framework prediction (b) Simulation result framework prediction and
simulation result
Figure 9. Comparison of the temperature field from the framework prediction and simulation results in a top view

(top – the cylindric part, bottom – the cubic part)

• Evolution of loss terms through training

To assess the framework's performance in data-based and physics-based aspects, Figure 10

illustrates the evolution of boundary condition and data loss across the training process. The

30
decreasing data loss over training suggests the model is adapting to the data. Boundary condition

loss not converging to zero, however, suggests that while the physics-based constraints in Equation

12 provide valuable insights into the thermal behavior in the process, they might not be

comprehensive in describing the entire thermal system. The convergence to a non-zero value

implies that merely enforcing physics principles might not be adequate on their own to achieve the

desired solution. Therefore, the combination of data loss with the underlying physics principles

becomes imperative for a more accurate representation of the system dynamics.

Figure 10. Evolution of unweighted loss terms during the training process

• Residual of physics-based loss function through training

Figure 11 demonstrates the variation in the residual matrix associated with the boundary

condition loss as the training progresses, for a sample test input. Each matrix within the figure

represents the residual values corresponding to a distinct iteration during the training of the model.

These matrices depict the residuals across the surface of the dataset: brighter points denote higher

31
residuals, while dark shades indicate lower residuals. Initially, in the early stages of training, the

matrices predominantly exhibit higher residuals, signifying disparities between the model's

predictions and the standards defined in the physics-based loss. As training progresses, the

matrices gradually exhibit lower residuals, indicating improved alignment between the model's

prediction and the governing physics principles (as represented by Equation 12).

Figure 11. Residual of the Boundary Condition loss during the training process

• Effect of the number of training data

To explore the influence of training data quantity on the framework's accuracy, the model was

trained using 800, 3200, 5600, 8000, and 12500 pieces of training data. As illustrated in Figure 12,

a noteworthy finding emerged: achieving below 10% error required just 3,200 training samples,

while obtaining less than 1% error for predicting the next timestamp required 12,500 training

32
samples. This result emphasizes the framework's efficiency in delivering accurate predictions with

a limited dataset. The result highlights that the framework efficiently provides accurate predictions

despite using a limited dataset, showcasing its robustness and effectiveness in practical scenarios

when available data is limited.

18
16
Error % (MAPE)

14
12
10
8
6
4
2
0
0 2000 4000 6000 8000 10000 12000 14000
Number of training data

Figure 12. PI-ConvLSTM prediction error with different numbers of training data

• Prediction of extended timestamps

In practical applications, the utility of the framework relies on its ability to not only predict the

temperature field for the next timestamp but also for more extended future periods. To assess the

accuracy of the framework in predicting later timestamps, two distinct approaches are considered.

The first approach involves a rolling prediction, where the prediction for the timestamp (𝑡 + 1)

serves as input for predicting (𝑡 + 2), and this process continues iteratively. In this approach, the

hyperparameter 𝑖, representing the timestamp in the future for prediction, is set to 1, and the

framework iteratively predicts the next timestamp. The second approach is a direct prediction of a

future timestamp (e.g., 𝑡 + 10) by setting 𝑖 to the desired prediction timestamp. For example, with

33
𝑖 = 10, the framework predicts the thermal image (i.e., the 2D temperature field) for the 10th

timestamp in the future.

The results for both approaches are depicted in Figure 13 (a) and Figure 13 (b). In the rolling

approach, prediction errors remain below 8% for timestamps up to the 10th, but its accuracy

drastically decreases for timestamps beyond the 10th. As for the direct approach, prediction errors

for 𝑖 = 10, 20, 50, 100, and 200 are illustrated. The prediction error increases as we attempt to

predict timestamps further in the future, although it remains lower than that using the rolling

approach. This difference arises because, in the rolling approach, where predictions for later

timestamps depend on preceding ones, the error accumulates over time, limiting its effectiveness

for predicting many timestamps in the future. Conversely, the direct approach avoids error

accumulation, making it more useful for predicting timestamps far in the future.

25 30
Error % (MAPE)

Error % (MAPE)

20 25
20
15
15
10
10
5 5
0 0
1 2 3 4 5 6 7 8 9 10 11 12 10 20 50 100 200
ith timestamp in the future ith timestamp in the future

Figure 13. a) Error for rolling prediction of the ith b) Error for direct prediction of the ith timestamp in the

timestamp in the future future

However, if the focus is on understanding the dynamics of thermal behavior, the rolling

approach can provide insights at a lower computational cost, as the direct approach necessitates

training separate models for each timestamp 𝑖. In conclusion, for predicting the temperature field

34
for longer timestamps in the future, the direct approach demonstrates a higher potential. However,

if the objective is to comprehend the temporal dynamics of the temperature field, the rolling

approach can yield results by training only a single model for the next timestamp (i.e., 𝑖 = 1).

4. Insights, Constraints, and Prospects


The proposed framework demonstrates a notable capacity to predict the thermal field with a

precision that yields an error rate below 3% for the subsequent timestamp and below 7% when

forecasting up to the 50th timestamp for the cylinder part. This capability suggests its potential

integration into control systems to facilitate corrective actions by adjusting process parameters to

ensure process stability. The architecture of the ConvLSTM, along with the design of the loss

function, offers flexibility in predicting temperature fields for different geometries and diverse

deposition patterns through a single unified model, suggesting its potential in broader applications.

Notably, its utility extends to systems requiring future timestamp predictions. This model can

potentially substitute field-governing PDEs with the heat transfer PDE and laser heat flux

employed in this study, allowing for wider applicability across various domains.

Despite these advancements, the framework faces inherent limitations. While it incorporates

the heat transfer equation in the loss function, the physics-informed loss converges to a non-zero

value, indicating the PDEs are not sufficient in describing the thermal behavior within the process.

Furthermore, the resolution of the discretization, both spatially and temporally, significantly

influences the accuracy of predictions. Moreover, the approach relies on real-time temperature

data acquisition through an infrared (IR) camera, which could be a practical constraint, limiting its

applicability in processes without such sensors.

35
5. Conclusions
This study introduces the PI-ConvLSTM framework, a physics-informed neural network

designed for real-time temperature field prediction in metal additive manufacturing (AM)

processes. The framework employs transient heat transfer equations and a Gaussian surface heat

flux model as physics-informed loss and input, respectively, for a neural network with

convolutional and convolutional LSTM layers. The proposed approach predicts the temperature

field for future timestamps using real-time temperature field data from previous timestamps.

Validated with three geometries—a thin-walled structure, a cylindrical part, and a cubic part—the

highlights of this work are summarized as follows:

• Integrating residuals of transient heat transfer equations, boundary condition, and initial

condition as a physics-based regularization penalty improves model accuracy compared to

the loss solely based on data.

• Instead of inputting raw process parameters directly into the model, a Physics-informed

input—laser heat flux in this paper—is utilized to better capture the relationship between

process parameters and the temperature field. This Physics-informed input demonstrates a

positive impact on the model's accuracy.

• The proposed framework achieves high accuracy, with an error below 3% for full field

temperature prediction in a thin-walled part and below 1% for 2D temperature fields in

cylindrical and cubic parts for subsequent timestamps. The tests demonstrate the flexibility

of the proposed framework in handling diverse scenarios with varying process parameters,

geometries, and deposition patterns.

36
• The proposed framework excels in predicting temperature fields for extended future

periods, employing both rolling and direct prediction approaches. The direct approach

demonstrates superior potential for longer-term predictions, while the rolling approach

provides insights into thermal dynamics at a lower computational cost.

Future work will focus on advancing the current framework to enable online training, allowing

for the continual updating of model parameters using real-time data acquired during the

manufacturing process.

CRediT authorship contribution statement


Pouyan Sajadi: Conceptualization, Investigation, Writing – original draft, Methodology,

Visualization, Writing – review & editing. Yifan Tang: Conceptualization, Writing – review &

editing. Mostafa Rahmani Dehaghani: Conceptualization, Writing – review & editing. G. Gary

Wang: Supervision, Funding acquisition, Conceptualization, Writing – review & editing,

Declaration of Competing Interest


The authors declare that they have no known competing financial interests or personal

relationships that could have appeared to influence the work reported in this paper.

Declaration of Generative AI and AI-assisted technologies in the


writing process
In the process of preparing this work, the authors utilized ChatGPT to make subtle refinements,

contributing to the overall polish of the text. After incorporating this tool, the authors conducted a

careful review and made necessary edits to ensure the publication's quality, taking full

responsibility for the final content.

37
Acknowledgements
Funding from the Natural Science and Engineering Research Council (NSERC) of Canada

under the project RGPIN-2019-06601.

6. References
Bai, X., Zhang, H., Wang, G., 2013. Improving prediction accuracy of thermal analysis for
weld-based additive manufacturing by calibrating input parameters using IR imaging.
The International Journal of Advanced Manufacturing Technology 69, 1087–1095.
Barua, S., Liou, F., Newkirk, J., Sparks, T., 2014. Vision-based defect detection in laser
metal deposition process. Rapid Prototyp J 20, 77–85.
Bontha, S., Klingbeil, N.W., Kobryn, P.A., Fraser, H.L., 2006. Thermal process maps for
predicting solidification microstructure in laser fabrication of thin-wall structures. J
Mater Process Technol 178, 135–142.
https://doi.org/https://doi.org/10.1016/j.jmatprotec.2006.03.155
Byrd, R.H., Lu, P., Nocedal, J., Zhu, C., 1995. A limited memory algorithm for bound
constrained optimization. SIAM Journal on scientific computing 16, 1190–1208.
Denlinger, E.R., Michaleris, P., 2016. Effect of stress relaxation on distortion in additive
manufacturing process modeling. Addit Manuf 12, 51–59.
Heigel, J.C., Michaleris, P., Reutzel, E.W., 2015. Thermo-mechanical model development
and validation of directed energy deposition additive manufacturing of Ti–6Al–4V.
Addit Manuf 5, 9–19.
Holman, J.P., 1986. Heat transfer. McGraw Hill, 162-168.
Hosseini, E., Gh Ghanbari, P., Müller, O., Molinaro, R., Mishra, S., 2023. Single-track
thermal analysis of laser powder bed fusion process: Parametric solution through
physics-informed neural networks. Comput Methods Appl Mech Eng 410.
https://doi.org/10.1016/j.cma.2023.116019
Irwin, J., Reutzel, E.W., Michaleris, P., Keist, J., Nassar, A.R., 2016. Predicting
microstructure from thermal history during additive manufacturing for Ti-6Al-4V. J
Manuf Sci Eng 138, 111007.
Jiang, F., Xia, M., Hu, Y., 2023. Physics-Informed Machine Learning for Accurate
Prediction of Temperature and Melt Pool Dimension in Metal Additive Manufacturing.
3D Print Addit Manuf. https://doi.org/10.1089/3dp.2022.0363

38
Jin, X., Cai, S., Li, H., Karniadakis, G.E., 2021. NSFnets (Navier-Stokes flow nets):
Physics-informed neural networks for the incompressible Navier-Stokes equations. J
Comput Phys 426, 109951. https://doi.org/https://doi.org/10.1016/j.jcp.2020.109951
Khairallah, S.A., Anderson, A.T., Rubenchik, A., King, W.E., 2016. Laser powder-bed
fusion additive manufacturing: Physics of complex melt flow and formation
mechanisms of pores, spatter, and denudation zones. Acta Mater 108, 36–45.
https://doi.org/https://doi.org/10.1016/j.actamat.2016.02.014
Kingma, D.P., Ba, J., 2014. Adam: A method for stochastic optimization. arXiv preprint
arXiv:1412.6980.
Kundakcioglu, E., Lazoglu, I., Rawal, S., 2016. Transient thermal modeling of laser-based
additive manufacturing for 3D freeform structures. The International Journal of
Advanced Manufacturing Technology 85, 493–501.
Li, S., Wang, G., Di, Y., Wang, L., Wang, H., Zhou, Q., 2023. A physics-informed neural
network framework to predict 3D temperature field without labeled data in process of
laser metal deposition. Eng Appl Artif Intell 120, 105908.
https://doi.org/10.1016/j.engappai.2023.105908
Li, X., Zhao, C., Sun, T., Tan, W., 2020. Revealing transient powder-gas interaction in laser
powder bed fusion process through multi-physics modeling and high-speed
synchrotron x-ray imaging. Addit Manuf 35, 101362.
Liao, S., Webster, S., Huang, D., Council, R., Ehmann, K., Cao, J., 2022a. Simulation-
guided variable laser power design for melt pool depth control in directed energy
deposition. Addit Manuf 56, 102912.
Liao, S., Xue, T., Jeong, J., Webster, S., Ehmann, K., Cao, J., 2022b. Hybrid thermal
modeling of additive manufacturing processes using physics-informed neural networks
for temperature prediction and parameter identification.
https://doi.org/10.1007/s00466-022-02257-9
Lippold, J.C., Kiser, S.D., DuPont, J.N., 2011. Welding metallurgy and weldability of
nickel-base alloys. John Wiley & Sons.
Marshall, G.J., Thompson, S.M., Shamsaei, N., 2016a. Data indicating temperature
response of Ti–6Al–4V thin-walled structure during its additive manufacture via Laser
Engineered Net Shaping. Data Brief 7, 697–703.
Marshall, G.J., Young, W.J., Thompson, S.M., Shamsaei, N., Daniewicz, S.R., Shao, S.,
2016b. Understanding the microstructure formation of Ti-6Al-4V during direct laser
deposition via in-situ thermal monitoring. Jom 68, 778–790.
Mozaffar, M., Paul, A., Al-Bahrani, R., Wolff, S., Choudhary, A., Agrawal, A., Ehmann,
K., Cao, J., 2018. Data-driven prediction of the high-dimensional thermal history in

39
directed energy deposition processes via recurrent neural networks. Manuf Lett 18,
35–39.
Neupane, D., Kim, Y., Seok, J., Hong, J., 2021. CNN-based fault detection for smart
manufacturing. Applied Sciences 11, 11732.
Noakoasteen, O., Wang, S., Peng, Z., Christodoulou, C., 2020. Physics-informed deep
neural networks for transient electromagnetic analysis. IEEE Open Journal of
Antennas and Propagation 1, 404–412.
Paul, A., Mozaffar, M., Yang, Z., Liao, W., Choudhary, A., Cao, J., Agrawal, A., 2019. A
real-time iterative machine learning approach for temperature profile prediction in
additive manufacturing processes, in: 2019 IEEE International Conference on Data
Science and Advanced Analytics (DSAA). IEEE, pp. 541–550.
Raissi, M., Perdikaris, P., Karniadakis, G.E., 2019. Physics-informed neural networks: A
deep learning framework for solving forward and inverse problems involving
nonlinear partial differential equations. J Comput Phys 378, 686–707.
Razavykia, A., Brusa, E., Delprete, C., Yavari, R., 2020. An overview of additive
manufacturing technologies—a review to technical synthesis in numerical study of
selective laser melting. Materials 13, 3895.
Ren, K., Chew, Y., Fuh, J.Y.H., Zhang, Y.F., Bi, G.J., 2019. Thermo-mechanical analyses
for optimized path planning in laser aided additive manufacturing processes. Mater
Des 162, 80–93. https://doi.org/https://doi.org/10.1016/j.matdes.2018.11.014
Ren, K., Chew, Y., Zhang, Y.F., Fuh, J.Y.H., Bi, G.J., 2020. Thermal field prediction for
laser scanning paths in laser aided additive manufacturing by physics-based machine
learning. Comput Methods Appl Mech Eng 362, 112734.
Ren, X., Chai, Z., Xu, J., Zhang, X., He, Y., Chen, H., Chen, X., 2020. A new method to
achieve dynamic heat input monitoring in robotic belt grinding of Inconel 718. J Manuf
Process 57, 575–588.
Roberts, I.A., Wang, C.J., Esterlein, R., Stanford, M., Mynors, D.J., 2009. A three-
dimensional finite element analysis of the temperature field during laser melting of
metal powders in additive layer manufacturing. Int J Mach Tools Manuf 49, 916–923.
Roy, M., Wodo, O., 2020. Data-driven modeling of thermal history in additive
manufacturing. Addit Manuf 32, 101017.
Shamsaei, N., Yadollahi, A., Bian, L., Thompson, S.M., 2015. An overview of Direct Laser
Deposition for additive manufacturing; Part II: Mechanical behavior, process
parameter optimization and control. Addit Manuf 8, 12–35.
https://doi.org/https://doi.org/10.1016/j.addma.2015.07.002
Sherstinsky, A., 2020. Fundamentals of recurrent neural network (RNN) and long short-
term memory (LSTM) network. Physica D 404, 132306.

40
Shi, X., Chen, Z., Wang, H., Yeung, D.-Y., Wong, W.-K., Woo, W., 2015. Convolutional
LSTM network: A machine learning approach for precipitation nowcasting. Adv
Neural Inf Process Syst 28.
Shukla, K., Di Leoni, P.C., Blackshire, J., Sparkman, D., Karniadakis, G.E., 2020. Physics-
informed neural network for ultrasound nondestructive quantification of surface
breaking cracks. J Nondestr Eval 39, 1–20.
Stathatos, E., Vosniakos, G.-C., 2019. Real-time simulation for long paths in laser-based
additive manufacturing: a machine learning approach. The International Journal of
Advanced Manufacturing Technology 104, 1967–1984.
Tang, Y., Dehaghani, M.R., Sajadi, P., Balani, S.B., Dhalpe, A., Panicker, S., Wu, D.,
Coatanea, E., Wang, G.G., 2023. Online thermal field prediction for metal additive
manufacturing of thin walls. J Manuf Process 108, 529–550.
Thompson, S.M., Bian, L., Shamsaei, N., Yadollahi, A., 2015. An overview of Direct Laser
Deposition for additive manufacturing; Part I: Transport phenomena, modeling and
diagnostics. Addit Manuf 8, 36–62.
https://doi.org/https://doi.org/10.1016/j.addma.2015.07.001
Wu, T.-W., Zhang, H., Peng, W., Lü, F., He, P.-J., 2023. Applications of convolutional
neural networks for intelligent waste identification and recycling: A review. Resour
Conserv Recycl 190, 106813.
Xie, J., Chai, Z., Xu, L., Ren, X., Liu, S., Chen, X., 2022. 3D temperature field prediction
in direct energy deposition of metals using physics informed neural network.
International Journal of Advanced Manufacturing Technology 119, 3449–3468.
https://doi.org/10.1007/s00170-021-08542-w
Yan, H., Shen, L., Wang, X., Tian, Z., Xu, G., Xie, D., Liang, H., 2018. Stress and
deformation evaluation of the subarea scanning effect in direct laser-deposited Ti-6Al-
4V. The International Journal of Advanced Manufacturing Technology 97, 915–926.
Yan, J., Yan, W., Lin, S., Wagner, G.J., 2018. A fully coupled finite element formulation
for liquid–solid–gas thermo-fluid flow with melting and solidification. Comput
Methods Appl Mech Eng 336, 444–470.
Yan, Z., Liu, W., Tang, Z., Liu, X., Zhang, N., Li, M., Zhang, H., 2018. Review on thermal
analysis in laser-based additive manufacturing. Opt Laser Technol 106, 427–441.
https://doi.org/https://doi.org/10.1016/j.optlastec.2018.04.034
Yu, Y., Si, X., Hu, C., Zhang, J., 2019. A review of recurrent neural networks: LSTM cells
and network architectures. Neural Comput 31, 1235–1270.
Zhang, L., Chen, X., Zhou, W., Cheng, T., Chen, L., Guo, Z., Han, B., Lu, L., 2020. Digital
twins for additive manufacturing: a state-of-the-art review. Applied Sciences 10, 8350.

41
Zheng, B., Zhou, Y., Smugeresky, J.E., Schoenung, J.M., Lavernia, E.J., 2008. Thermal
Behavior and Microstructural Evolution during Laser Deposition with Laser-
Engineered Net Shaping: Part I. Numerical Calculations. Metallurgical and Materials
Transactions A 39, 2228–2236. https://doi.org/10.1007/s11661-008-9557-7
Zhou, S.K., Greenspan, H., Davatzikos, C., Duncan, J.S., Van Ginneken, B., Madabhushi,
A., Prince, J.L., Rueckert, D., Summers, R.M., 2021. A review of deep learning in
medical imaging: Imaging traits, technology trends, case studies with progress
highlights, and future promises. Proceedings of the IEEE 109, 820–838.
Zhu, Q., Liu, Z., Yan, J., 2021. Machine learning for metal additive manufacturing:
predicting temperature and melt pool fluid dynamics using physics-informed neural
networks. Comput Mech 67, 619–635. https://doi.org/10.1007/s00466-020-01952-9

42

You might also like