## 2 Methods
### Surrogate Model Testing  
Mechanical properties were varied to discover how PINNs can approximate PDEs compared to numerical methods. Prior to these experiments, preliminary testing was carried out using an analytic solution to the one-dimensional diffusion equation [20], and both the PINN model and the PAC1D solver approximated well before moving on. The following tests were divided into two categories, those with a source term and those without, and each experiment had its own data set generated using PAC1D. Table 1 contains some of the simulation details. Activation functions were also compared in these experiments, as a simultaneous test for the best performing combination.  
Each PINN requires a set architecture, and the number of hidden layers and nodes per layer must be defined at the outset. For the non-source insulated and convective boundary condition tests, the PINN architecture was defined to have 10 hidden layers, each of which contained 32 nodes. For the source experiment, the number of hidden layers was 6, where each of these contained 64 nodes. Model architectures were determined through trial and error, and neither architecture was suitable to solve the other problem.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Case** & **Boundary** & **Number of** & **Depth** & **Source** & **Irradiance** \\  & **Condition** & **Materials** & **Resolution** & **Term** & \(\frac{W}{m^{2}}\) \\ \hline Exp. 1 & Insulated & 1 & 125 & No & N/A \\ Exp. 2 & Convection & 1 & 125 & No & N/A \\ Exp. 3 & Insulated & 3 & 250 & Yes & \(5\times 10^{6}\) \\ \hline \hline \end{tabular}
\end{table}
Table 1: Experiments carried out and their differing data generation parameters.  
The equation used for the optimizable PDE is the same for each test. Applying the details of the data generated, and considering the properties of the materials, which can vary by depth,  
\[\alpha(x) = \frac{\kappa(x)}{\rho(x)\cdot c_{p}(x)},\] \[Q(x) = \frac{1}{\rho(x)\cdot c_{p}(x)}I(x).\]  
And if we allow \(U\) to be represented by \(T\) to denote temperature, then Equation (5) transforms into,  
\[\frac{\partial T}{\partial t}-\frac{\kappa}{\rho c_{p}}\frac{\partial^{2}T}{ \partial x^{2}}-\frac{1}{\rho c_{p}}I=0=f(x), \tag{11}\]  
where \(I\) denotes the dose values and, of the material properties, \(\kappa\) is the thermal conductivity, \(\rho\) is the density, and \(c_{p}\) is the specific heat capacity.  
Testing was performed using Python due to its access to open-source libraries in the language, particularly those with automatic differentiation and DNN construction features, like PyTorch [21] and Tensorflow [22]. PyTorch version 1.10.0 was used to construct the PINN model in experiments carried out in this paper. The optimizer used for the source and non-source models was the L-BFGS optimization method [23], which is memory intensive, and ideal for small data sets. Stop criteria for training the models were determined by either a tolerance on first order optimality, being \(1\times 10^{-5}\), or a tolerance on the model parameter changes, being \(1\times 10^{-9}\), whichever criterion was met first, as defined by the PyTorch implementation of the L-BFGS optimizer [21]. Collocation points were kept to 25,000 in number and initial condition data points were restricted to 125 in all tests. The number of boundary condition points sampled was 175 in all cases except the convection boundary conditions test, which was 1075.  
Materials used in each of the experiments vary in material properties, ranging from a custom-made mystery material to more representative skin properties, all of which are listed in Table 2. Mystery 1 was used for the non-source experiments, and epidermis, dermis, and fat for the insulated boundary conditions with source test.