The transient temperature field is governed by
\[
\rho c \frac{\partial T}{\partial t}
=
k\left(
\frac{\partial^2 T}{\partial x^2}
+
\frac{\partial^2 T}{\partial y^2}
\right)
+
Q(x,y,t),
\]
where \(T(x,y,t)\) is the temperature field, \(\rho\) is the density, \(c\) is the specific heat, \(k\) is the thermal conductivity, and \(Q(x,y,t)\) is the applied heat source.
The rectangular domain is discretized on a uniform Cartesian grid,
\[
x_i = i\Delta x, \qquad
y_j = j\Delta y, \qquad
t^n = n\Delta t,
\]
with nodal temperatures defined by
\[
T_{i,j}^n \approx T(x_i,y_j,t^n).
\]
Using forward Euler in time and second-order central differences in space gives
\[
\frac{\partial T}{\partial t}\Big|_{i,j}^n
\approx
\frac{T_{i,j}^{n+1}-T_{i,j}^n}{\Delta t},
\]
\[
\frac{\partial^2 T}{\partial x^2}\Big|_{i,j}^n
\approx
\frac{T_{i+1,j}^n-2T_{i,j}^n+T_{i-1,j}^n}{\Delta x^2},
\]
\[
\frac{\partial^2 T}{\partial y^2}\Big|_{i,j}^n
\approx
\frac{T_{i,j+1}^n-2T_{i,j}^n+T_{i,j-1}^n}{\Delta y^2}.
\]
Substituting these approximations into the PDE yields the explicit interior-node update
\[
T_{i,j}^{n+1}
=
T_{i,j}^n
+
\frac{\Delta t}{\rho c}
\left[
k\left(
\frac{T_{i+1,j}^n-2T_{i,j}^n+T_{i-1,j}^n}{\Delta x^2}
+
\frac{T_{i,j+1}^n-2T_{i,j}^n+T_{i,j-1}^n}{\Delta y^2}
\right)
+
Q_{i,j}^n
\right].
\]
It is convenient to define the diffusion numbers
\[
r_x = \frac{k\Delta t}{\rho c\,\Delta x^2},
\qquad
r_y = \frac{k\Delta t}{\rho c\,\Delta y^2},
\]
so that the update becomes
\[
T_{i,j}^{n+1}
=
T_{i,j}^n
+
r_x\left(T_{i+1,j}^n-2T_{i,j}^n+T_{i-1,j}^n\right)
+
r_y\left(T_{i,j+1}^n-2T_{i,j}^n+T_{i,j-1}^n\right)
+
\frac{\Delta t}{\rho c}Q_{i,j}^n.
\]
Heat loss on the left, right, and top boundaries is modeled with a nonlinear radiative boundary condition,
\[
k\frac{\partial T}{\partial n}
=
-\sigma\epsilon\left(T^4-T_\infty^4\right).
\]
Using a one-sided difference at a boundary node gives the nonlinear residual
\[
f(T_b)
=
k\frac{T_b-T_{\mathrm{in}}}{\Delta}
+
\sigma\epsilon\left(T_b^4-T_\infty^4\right)
=
0,
\]
with derivative
\[
f'(T_b)
=
\frac{k}{\Delta}
+
4\sigma\epsilon T_b^3.
\]
The boundary temperature is therefore updated iteratively at each time step using Newton--Raphson,
\[
T_b^{(m+1)}
=
T_b^{(m)}
-
\frac{f\!\left(T_b^{(m)}\right)}{f'\!\left(T_b^{(m)}\right)}.
\]
For the stationary-laser case, the volumetric source is modeled as
\[
Q(x,y,t)
=
\left(\frac{P}{w^2\sqrt{2\pi}}\right)
\exp\left(-\frac{(x-x_L)^2}{2w^2}\right)f(y),
\]
where \(x_L\) is fixed and \(f(y)\) describes depth attenuation. For a traversing laser,
\[
x_L(t) = x_{L,0} + v_L t,
\]
so the source center moves in time while the update scheme remains unchanged.
This formulation preserves the dominant physics of surface heating, radiation loss, and moving-source behavior while remaining computationally efficient.