## 3 Finite Element Formulation
### Boundary Conditions of the System  
Figure 4 shows the boundary condition used in the model. It is worth mentioning that the heated block had a square base of 37.5 mm and a height of 12.7 mm. Similarly, the block containing the TPMS structure had the same dimensions. The inlet and the outlet cylinders had a diameter of 1 cm. The red arrows show where the heat flux was applied and had a constant value of 30,800 W/m\({}^{2}\). At the inlet, the fluid temperature as set as Tin; the applied inlet velocity was \(\mathrm{u}_{\rm in}\), and the calculated temperature was T\({}_{\rm out}\) at the outlet. All the model boundaries except where the heat flux was applied were insulated and adiabatic walls were assumed. Thus, the boundary condition in equation form is:  
1. The velocity u = u\({}_{\rm in}\) in the x direction is applied at the inlet.
2. At the inlet, the temperature of the fluid enters the test section at T = Tin.
3. At the outlet, an open boundary is applied where the stresses are equal to zero.
4. The bottom surface of the aluminum block is heated with a heat flux q\({}^{\prime\prime}\), as shown in red.
5. All external surfaces are assumed to be adiabatic, \(\frac{\partial\mathrm{T}_{\rm Stokes}}{\partial\mathrm{u}}=0\), and for the flow, no-slip boundary conditions are applied.  
Multiple parameters were evaluated to assess the importance of this structure in heat removal. The current model's porosity was set at 0.7 when this structure was designed. The permeability was not known but did not need to be investigated since, in the model, the TPMS was modelled physically as a solid structure. The first important parameter to evaluate was the heat convection coefficient, known as  
\[\mathrm{h}=\frac{\mathrm{q}^{\prime\prime}}{\left(\mathrm{T}-\mathrm{T}\mathrm{ }\mathrm{i}\mathrm{n}\right)} \tag{9}\]  
where the ratio of the applied flux is divided by the temperature difference between the calculated one and the inlet temperature. The calculated one was measured 1 mm below the interface in the solid aluminum block. The local Nusselt number was thus defined as  
\[\mathrm{N}\mathrm{u}=\frac{\mathrm{h}\mathrm{D}}{\mathrm{k}_{\rm f}} \tag{10}\]The pressure drop plays a crucial role in the design of a cooling system. This is represented by the friction factor, which is defined as:  
\[\text{f}=\frac{0.5\Delta\text{pD}}{\rho\text{Lu}_{\text{in}}^{2}} \tag{11}\]  
It is interesting to combine the thermal and the hydraulic effects by evaluating the performance evaluation criteria (PEC), defined as  
\[\text{PEC}=\frac{\text{local Nu}}{\text{f}^{\frac{1}{3}}} \tag{12}\]  
The above set of equations was obtained from [8]. These non-dimensional parameters were assessed during the analysis. A mesh sensitivity analysis was conducted to ensure the accuracy of the model. An average mesh level, which consisted of 1,338,201 elements, was adopted. These elements were composed of tetrahedral elements and boundary elements. This optimum mesh was obtained after multiple mesh size selections. The criteria for selecting the optimum mesh was evaluating the Nusselt number. When the Nusselt number between two consecutive mesh sizes is less than 1%, we assumed that the mesh is optimum.