**2. Governing Equations**

The starting point for the formulation of the energy equation with delays is the generalized Fourier law (1). To obtain the DPLE, the left and right sides of Equation (1) are developed into the Taylor series

$$\begin{cases} \mathbf{q}(\mathbf{x},t) + \pi\_q \frac{\partial \mathbf{q}(\mathbf{x},t)}{\partial t} + \frac{\pi\_q^2}{2} \frac{\partial^2 \mathbf{q}(\mathbf{x},t)}{\partial t^2} + \dots = \\ -\lambda \Big[ \nabla T(\mathbf{x},t) + \pi\_T \frac{\partial \cdot \nabla T(\mathbf{x},t)}{\partial t} + \frac{\pi\_T^2}{2} \frac{\partial^2 \nabla T(\mathbf{x},t)}{\partial t^2} + \dots \Big] \end{cases} \tag{2}$$

Let us apply the well-known diffusion equation, namely,

$$\mathbf{c}\frac{\partial \ T(\mathbf{x},t)}{\partial t} = -\nabla \cdot \mathbf{q}\left(\mathbf{x},t\right) + Q(\mathbf{x},t) \tag{3}$$

where *c* is a volumetric specific heat and *Q*(**x**, *t*) is a capacity of volumetric internal heat sources.

When the components containing the second derivatives (Equation (2)) are taken into account, after mathematical manipulations, Equation (3) takes the form

$$\begin{split} \mathbf{x} \in \Omega: & \varepsilon \Big[ \frac{\partial \operatorname{\boldsymbol{\vartheta}} \operatorname{\boldsymbol{\Gamma}} (\mathbf{x}, t)}{\operatorname{\boldsymbol{\vartheta}} t} + \tau\_{q} \frac{\partial^{2} \operatorname{\boldsymbol{\Gamma}} (\mathbf{x}, t)}{\operatorname{\boldsymbol{\vartheta}} \operatorname{\boldsymbol{\Gamma}}^{2}} + \frac{\tau\_{q}^{2}}{2} \frac{\partial^{3} \operatorname{\boldsymbol{\Gamma}} (\mathbf{x}, t)}{\operatorname{\boldsymbol{\vartheta}} t^{3}} \Big] = \operatorname{\boldsymbol{\Gamma}} [\boldsymbol{\lambda} \nabla \operatorname{\boldsymbol{\Gamma}} (\mathbf{x}, t)] + \\ & \tau\_{T} \frac{\partial \operatorname{\boldsymbol{\Gamma}} [\operatorname{\boldsymbol{\lambda}} \nabla \operatorname{\boldsymbol{\Gamma}} (\mathbf{x}, t)]}{\operatorname{\boldsymbol{\vartheta}} t} + \frac{\tau\_{T}^{2}}{2} \frac{\partial^{2} \operatorname{\boldsymbol{\Gamma}} [\operatorname{\boldsymbol{\lambda}} \nabla \operatorname{\boldsymbol{\Gamma}} (\mathbf{x}, t)]}{\operatorname{\boldsymbol{\vartheta}} t^{2}} \Big] + Q(\mathbf{x}, t) + \tau\_{q} \frac{\partial \operatorname{\boldsymbol{\Psi}} (\mathbf{x}, t)}{\operatorname{\boldsymbol{\vartheta}} t} + \frac{\tau\_{q}^{2}}{2} \frac{\partial^{2} \operatorname{\boldsymbol{\Psi}} (\mathbf{x}, t)}{\operatorname{\boldsymbol{\vartheta}} t^{2}} \end{split} \tag{4}$$

When the melting and resolidification problem is considered, the internal heat source in Equation (4) must contain the term controlling the phase change process. This appropriate source function *Qm* (**x**, *t*) can be defined as

$$Q\_m(\mathbf{x}, t) = -L \frac{\partial f\_L(\mathbf{x}, t)}{\partial t} - L \pi\_q \frac{\partial^2 f\_L(\mathbf{x}, t)}{\partial t^2} - L \frac{\pi\_q^2}{2} \frac{\partial^3 f\_L(\mathbf{x}, t)}{\partial t^3} \tag{5}$$

where *L* is the volumetric latent heat phase change and *fL*(**x**, *t*) is the volumetric molten state fraction at the neighborhood of the point considered. The last equation is a generalization of what is well known in the thermal theory of foundry processes definition of *Qm* (e.g., [38]). The function *fL*(**x**, *t*) is equal to zero at the beginning of the heating process until *T*<sup>1</sup> = *Tm* − Δ*T* and *fL*(**x**, t) = 1 for T2 > *Tm* + Δ*T* (*Tm* is the melting point). In the interval [*Tm* − Δ*T*, *Tm* + Δ*T*], the function *fL*(**x**, *t*) changes from 0 to 1 in a linear way (such an assumption is fully acceptable). Generally speaking, the volumetric liquid state fraction is given in the form of broken line, this means

$$f\_L(\mathbf{x}, t) = \begin{cases} 1 & T(\mathbf{x}, t) > T\_m + \Delta T \\ \frac{T(\mathbf{x}, t) - T\_m + \Delta T}{2\Delta T} & T\_m - \Delta T \le T(\mathbf{x}, t) \le T\_m + \Delta T \\ 0 & T(\mathbf{x}, t) < T\_m - \Delta T \end{cases} \tag{6}$$

The derivative of *fL*(**x**, *t*) with respect to the temperature is equal to 0 for *T*(**x**, *t*) < *Tm* − Δ*T* and *T*(**x**, *t*) > *Tm* + Δ*T,* while between the border temperatures d*fL*(**x**, *t*)/d*T* = 1/2Δ*T.* Thus, the source term *Qm*(**x**, *t*) acts only for *T*(**x**, *t*) from the interval [*Tm* − Δ*T, Tm* + Δ*T*], and then

$$Q\_{\rm H}(\mathbf{x},t) = -\frac{L}{2\Delta} \left[ \frac{\partial}{\partial t} \frac{T(\mathbf{x},t)}{t} + \tau\_{\rm q} \frac{\partial^2 T^2(\mathbf{x},t)}{\partial t^2} + \frac{\tau\_{\rm q}^2}{2} \frac{\partial^3 T^3(\mathbf{x},t)}{\partial t^3} \right], \quad T(\mathbf{x},t) \in \left[T\_{\rm H} - \Delta T, T\_{\rm H} + \Delta T\right] \tag{7}$$

Let us introduce the piece-vise constant function *C*(*T*)

$$\mathbf{C}(T) = \begin{cases} c\_2 & T(\mathbf{x}, t) > T\_m + \Delta T \\ 0.5(c\_1 + c\_2) + \frac{L}{2\Delta T} & T\_m - \Delta T \le T(\mathbf{x}, t) \le T\_m + \Delta T \\ c\_1 & T(\mathbf{x}, t) < T\_m - \Delta T \end{cases} \tag{8}$$

where *c*<sup>1</sup> and *c*<sup>2</sup> are the volumetric specific heats of the solid and liquid states, respectively. Then, Equation (4) can be written as follows

$$\begin{split} \mathbf{x} \in \Omega: \quad & \mathbb{C}(T) \Big[ \frac{\partial}{\partial \boldsymbol{t}} \frac{\mathbf{T}(\mathbf{x},t)}{\partial \boldsymbol{t}} + \boldsymbol{\tau}\_{q} \frac{\partial^{2}}{\partial \boldsymbol{t}^{2}} \frac{T(\mathbf{x},t)}{\partial \boldsymbol{t}^{2}} + \frac{\boldsymbol{\tau}\_{q}^{2}}{2} \frac{\partial^{3} T(\mathbf{x},t)}{\partial \boldsymbol{t}^{3}} \Big] = \quad \cdot \quad \mathbb{V}[\lambda \nabla \, T(\mathbf{x},t)] + \\ & \tau\_{T} \frac{\partial}{\partial \boldsymbol{t}} \frac{\{\mathbb{V}[\lambda \nabla \, T(\mathbf{x},t)]\}}{\partial \boldsymbol{t}} + \frac{\tau\_{T}^{2}}{2} \frac{\partial^{2} \{\mathbb{V}[\lambda \nabla \, T(\mathbf{x},t)]\}}{\partial \boldsymbol{t}^{2}} \ + Q\_{l}(\mathbf{x},t) + \tau\_{q} \frac{\partial}{\partial \boldsymbol{t}} \frac{Q\_{l}(\mathbf{x},t)}{\partial \boldsymbol{t}} + \frac{\tau\_{q}^{2}}{2} \frac{\partial^{2}}{\partial \boldsymbol{t}^{2}} \frac{Q\_{l}(\mathbf{x},t)}{\partial \boldsymbol{t}^{2}} \end{split} \tag{9}$$

Thermal conductivity λ in Equation (9) is defined just like the parameter *C*(*T*).

The mathematical formula determining the intensity of the internal heat source *Ql* (*x*, *t*) resulting from the laser action can be taken in the form [39]

$$Q\_l(\mathbf{x}, t) = (1 - R) \left. \frac{I\_0}{\delta} \right|\_p \exp\left[ -\frac{\mathbf{x}\_1^2 + \mathbf{x}\_2^2}{r\_D^2} - \frac{\mathbf{x}\_3}{\delta} - 4 \ln 2 \frac{(t - 2t\_p)^2}{t\_p^2} \right], \mathbf{x} = \langle \mathbf{x}\_1, \mathbf{x}\_2, \mathbf{x}\_3 \rangle \tag{10}$$

where *I*<sup>0</sup> [J/m2] is the laser intensity, *tp* [s] is the characteristic time of laser pulse, δ [m] is the optical penetration depth, *R* is the reflectivity of the irradiated surface, *rD* [m] is the laser beam radius, and x3 is a vertical axis. The derivatives of *Ql* with respect to time can be found analytically.

On the outer surface of the system, the adiabatic conditions are assumed (the external heat flux is taken into account in the appropriate source function). The mathematical form of the Neumann boundary condition for the second-order DPLE is as follows [36]

$$\begin{split} \mathbf{x} \in \Gamma: \quad & -\lambda \Big[ \mathbf{n} \cdot \nabla T(\mathbf{x}, t) + \tau\_T \frac{\partial \left[ \mathbf{n} \cdot \nabla T(\mathbf{x}, t) \right]}{\partial t} + \frac{\pi\_T^2}{2} \frac{\partial^2 \left[ \mathbf{n} \cdot \nabla T(\mathbf{x}, t) \right]}{\partial t^2} \Big] = \\ & q\_\mathbb{b}(\mathbf{x}, t) + \tau\_q \frac{\partial q(\mathbf{x}, t)}{\partial t} + \frac{\tau\_q^2}{2} \frac{\partial^2 q(\mathbf{x}, t)}{\partial t^2} \end{split} \tag{11}$$

where **n** is a normal outward vector and (in the case considered) *qb* (*x*, *t*) = 0, of course.

The mathematical model is also supplemented by the initial conditions

$$t = 0: \quad T(\mathbf{x}, 0) = T\_{\mathbb{P}^\star} \left. \frac{\partial T(\mathbf{x}, t)}{\partial t} \right|\_{t=0} = \frac{Q(\mathbf{x}, 0)}{c\_1}, \\ \left. \frac{\partial^2 T(\mathbf{x}, t)}{\partial t^2} \right|\_{t=0} = \frac{1}{c\_1} \left. \frac{\partial Q(\mathbf{x}, t)}{\partial t} \right|\_{t=0} \tag{12}$$

where *Tp* is an initial temperature.

### **3. Mathematical Description of 1D Problem**

At the stage of numerical modeling, the 1D problem was considered and the basis for the construction of the FDM algorithm is the following system of equations and conditions:


$$\begin{aligned} \mathbf{C}(T) \Big[ \frac{\partial}{\partial \mathbf{t}} \frac{T(\mathbf{x}, t)}{\partial t} + \tau\_q \frac{\partial^2}{\partial t^2} \frac{T(\mathbf{x}, t)}{\partial t^2} + \frac{\tau\_q^2}{2} \frac{\partial^3 T(\mathbf{x}, t)}{\partial t^3} \Big] = \\ \frac{\partial}{\partial \mathbf{x}} \Big[ \lambda \frac{\partial^3 T(\mathbf{x}, t)}{\partial \mathbf{x}} \Big] + \tau \tau \frac{\partial^2}{\partial t \partial \mathbf{x}} \Big[ \lambda \frac{\partial^3 T(\mathbf{x}, t)}{\partial \mathbf{x}} \Big] + \frac{\tau\_T^2}{2} \frac{\partial^3}{\partial t^2 \partial \mathbf{x}} \Big[ \lambda \frac{\partial^3 T(\mathbf{x}, t)}{\partial \mathbf{x}} \Big] + Z(\mathbf{x}, t) \end{aligned} \tag{13}$$

where

$$Z(\mathbf{x},t) = Q\_l(\mathbf{x},t) + \pi\_q \frac{\partial \, Q\_l(\mathbf{x},t)}{\partial \, t} + \frac{\pi\_q^2}{2} \frac{\partial^2}{\partial \, t^2} Q\_l(\mathbf{x},t) \tag{14}$$


$$Q\_l(\mathbf{x}, t) = (1 - R) \frac{I\_0}{\delta \ t\_p} \exp\left[ -\frac{\mathbf{x}}{\delta} - 4 \ln 2 \frac{\left(t - 2t\_p\right)^2}{t\_p^2} \right] \tag{15}$$

adiabatic boundary conditions

$$\mathbf{x} = \mathbf{0} \cup \mathbf{G}: \qquad \nabla T(\mathbf{x}, t) + \tau\_T \frac{\partial \left[\frac{\partial^2 T(\mathbf{x}, t)}{\partial \mathbf{x}}\right]}{\partial t} + \frac{\tau\_T^2}{2} \frac{\partial^2 \left[\frac{\partial^2 T(\mathbf{x}, t)}{\partial \mathbf{x}}\right]}{\partial t^2} = \mathbf{0} \tag{16}$$


$$t = 0: \quad T(\mathbf{x}, 0) = T\_{p\prime} \left. \frac{\partial T(\mathbf{x}, t)}{\partial t} \right|\_{t=0} = \frac{Q(\mathbf{x}, 0)}{c\_1}, \\ \left. \frac{\partial^2 T(\mathbf{x}, t)}{\partial t^2} \right|\_{t=0} = \frac{1}{c\_1} \left. \frac{\partial Q(\mathbf{x}, t)}{\partial t} \right|\_{t=0} \tag{17}$$
