## 3 Results
### Two-Dimensional Wave Equation
It is worth noting that since HWPINN adds physical constraints in a different way than traditional residual neural networks, the loss function has a certain scale difference, which explains the different intervals of the loss curve values. The loss curves reveal the fast convergence property of HWPINN. Figure 13 illustrates the FDM results for the 2D wave equation, presented in the form of three time-slices in the computational time domain. Figure 14 shows the predictions for HWPINN, HPINN, SPINN, and SWPINN at time slices \(t=0\), \(t=0.1\), and \(t=1\). The absolute errors of the prediction results for these four models are shown in Figure 15 to give a more visual indication of the performance when solving the 2D wave equation. Figure 11: The initialization of the 2D wave equation (\(t=0\)). Figure 12: Comparison of the training loss curves of 2D wave equation for HWPINN, HPINN, SWPINN, and SPINN. The comparison shows that HWPINN has the best performance in terms of absolute error, which does not exceed 0.02 over the entire time space of the computational domain. SPINN predicts the worst absolute error, which demonstrates the improvement in the prediction stability provided by HWPINN with respect to the conventional PINN. Figure 15a-c show the absolute errors of the HPINN prediction results, and Figure 15d-f show the absolute errors of the HWPINN prediction results. We conclude from the comparison that the HWPINN provides more accurate predictions and the stability is improved relative to those of the HPINN. The error evaluation is provided in Table 4. The data in Table 4 show that HWPINN performs optimally and SPINN performs the worst under the set conditions, which reflects the fact that SPINN is difficult to debug although it can flexibly adapt to various boundary conditions. The comparison of the relative L\({}_{2}\) errors of HWPINN and HPINN demonstrates that HWPINN is a more accurate predictor than HPINN, improving the accuracy by a factor of about three. Changing from 1D PDEs to 2D PDEs significantly increases the complexity of the computation and the computation time. In particular, in this case, HWPINN and HPINN have a significant advantage in computation time over conventional PINN due to the hard-constraint-specific properties, which can increase the speed. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Model** & \(t\) **(s)** & **MSE (\%)** & **RMSE (\%)** & **R2 (\%)** & **Relative L\({}_{2}\) Error (\%)** & **Computational Time (s)** \\ \hline \multirow{3}{*}{HPINN} & 0 & 0.00\% & 0.00\% & 99.99\% & 0.00\% & \multirow{3}{*}{2587} \\  & 0.1 & 0.00\% & 0.03\% & 99.99\% & 0.14\% & & \\  & 1.0 & 0.03\% & 0.55\% & 99.63\% & 4.41\% & & \\ \hline \multirow{3}{*}{HWPINN} & 0 & 0.00\% & 0.00\% & 99.99\% & 0.00\% & \multirow{3}{*}{2593} \\  & 0.1 & 0.00\% & 0.00\% & 99.99\% & 0.00\% & & \\  & 1 & 0.01\% & 0.22\% & 99.93\% & 1.81\% & & \\ \hline \multirow{3}{*}{SPINN} & 0 & 0.00\% & 0.03\% & 99.96\% & 1.67\% & \multirow{3}{*}{2723} \\  & 0.1 & 0.43\% & 0.66\% & 99.87\% & 3.22\% & & \\  & 1 & 31.36\% & 56.43\% & 79.23\% & 65.78\% & & \\ \hline \multirow{3}{*}{SWPINN} & 0 & 0.00\% & 0.34\% & 99.96\% & 1.67\% & \multirow{3}{*}{2811} \\  & 0.1 & 0.00\% & 0.66\% & 99.87\% & 3.22\% & & \\ \cline{1-1}  & 1 & 0.01\% & 0.44\% & 99.76\% & 3.56\% & & \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Error evaluation for HWPINN, HPINN, SPINN, and SWPINN models for the prediction results of 2D wave equation. Figure 13: Results of 2D wave equation calculated using FDM. Figure 14: Comparison of results predicted using HPINN, HWPINN, SPINN, and SWPINN for 2D wave equation. Figure 15: Comparison of the absolute error predicted using HPINN, HWPINN, SPINN, and SWPINN for 2D wave equation.