## 2 Methodology
### Constraint Enforcement Method  
In order to solve the optimization problem presented in Equations (7)-(9), proper constraints should be enforced to guarantee the ICs and BCs in Equation (9). As previously mentioned, there are two ways to enforce the constraints in PINN modeling, i.e., the soft constraint method and the hard constraint method.  
In the soft constraint method, the original constrained optimization problem is transformed into an unconstrained one by adding penalty terms of ICs and BCs [23], i.e.,  
\[\mathbf{W}^{*},\mathbf{b}^{*}\in\argmin_{\mathbf{W},\mathbf{b}}(\xi+w_{\text{ bc}}\xi_{\text{bc}}+w_{\text{ic}}\xi_{\text{ic}}) \tag{10}\]  
\[\xi_{\text{bc}}=\left\|B(\overline{u}(\mathbf{x},t,\mathbf{W},\mathbf{b}),\ \overline{p}(\mathbf{x},t,\mathbf{W},\mathbf{b}))-g(\mathbf{x},t)\right\| \mathbf{x}\in\partial\Omega,\ t\in[0,T] \tag{11}\]  
\[\xi_{\text{ic}}=\left\|\mathcal{L}(\overline{u}(\mathbf{x},0,\mathbf{W}, \mathbf{b}),\ \overline{p}(\mathbf{x},t,\mathbf{W},\mathbf{b}))-d(\mathbf{x})\right\| \mathbf{x}\in\Omega \tag{12}\]  
where \(\xi_{\text{bc}}\) and \(\xi_{\text{ic}}\) represent the loss of network output in BC and IC, respectively, while \(w_{\text{bc}}\) and \(w_{\text{ic}}\) are the related penalty coefficients and are usually determined by experience or trial and error.  
To avoid difficulties for the soft constraint method in guaranteeing definite conditions and determining penalty coefficients, the hard constraint method is employed in the present work. In this method, a particular solution and a smooth function are introduced to modify the network output, enabling the ICs and BCs to be mandatorily satisfied, i.e.,  
\[\hat{\mathbf{u}}(\mathbf{x},t,\mathbf{W},\mathbf{b}) = \mathbf{u}_{\text{par}}(\mathbf{x},t)+D(\mathbf{x},t)\overline{u} (\mathbf{x},t,\mathbf{W},\mathbf{b}) \tag{13}\] \[\hat{p}(\mathbf{x},t,\mathbf{W},\mathbf{b}) = p_{\text{par}}(\mathbf{x},t)+D(\mathbf{x},t)\overline{p}(\mathbf{ x},t,\mathbf{W},\mathbf{b})\] (14) \[\mathcal{B}\big{(}\mathbf{u}_{\text{par}}(\mathbf{x},t),\ p_{\text{ par}}(\mathbf{x},t)\big{)}=g(\mathbf{x},t)\] (15) \[\mathcal{L}\big{(}\mathbf{u}_{\text{par}}(\mathbf{x},0),\ p_{\text{ par}}(\mathbf{x},t)\big{)}=d(\mathbf{x}) \tag{16}\]  
where \(\hat{\mathbf{u}}\) and \(\hat{p}\) denote the PINN-predicted results of velocity and pressure; \(\mathbf{u}_{\text{par}}\) and \(p_{\text{par}}\) are referred to as the particular solution that solely satisfies IC and BC; \(D(\mathbf{x},t)\) is defined as the smooth function from internal points to the boundary, which is equal to 0 on \(\partial\Omega\times[0,T]\) and \(\Omega\times[0]\) while being non-zero continuous values in other regions. Accordingly, the final result will not fail to satisfy the boundary condition due to the change in \(\overline{u}(\mathbf{x},t,\mathbf{W},\mathbf{b})\) or \(\overline{p}(\mathbf{x},t,\mathbf{W},\mathbf{b})\). Hence, the original optimization problem described in Equations (7)-(9) can be transformed into the following unconstrained one, i.e.,  
\[\mathbf{W}^{*},\mathbf{b}^{*}\in\argmin_{\mathbf{W},\mathbf{b}}\!\!\!\!\!\!\! \!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!derivatives of the outputs with respect to the network inputs are calculated by the automatic differentiation (AD) [24], which is based on the chain rule. The AD tool has been widely used to calculate partial derivative terms of physical quantities in studies of PINN methods [17; 18; 19; 20; 21; 22; 23].