## 3 Workflow Description
### Mesh Generation
#### 3.3.2 Automated Configuration of the _snappyHexMeshDict_
During this phase, the vertices of the existing mesh are translated towards the target surface to align the hexahedral cells with the geometric interface. This operation is guided by minimizing the distance between the mesh points and the surface, with particular attention given to maintaining mesh quality by limiting cell distortion. This process is iterative and continues until the mesh quality parameters satisfy those specified in the meshQualityControls section. Both the snapControls and meshQualityControls parameters are rather standard and are taken according to the guidelines provided in the various OpenFOAM tutorials. The final step in the grid generation process is the generation of a layer of prism at the walls to solve the boundary layer region accurately. For the automatic generation of this layer, T-WorkFlow, using the inputs from Section 3.1 and simple fluid dynamics relationships, estimates the boundary layer thickness within the radiator channels and consequently generates an appropriate clustering of the prisms layer by setting the parameters firstLayerThickness and nSurfaceLayers within the addLayersControls section. The thickness of the first layer of cells is given as a dimensional value obtained by means of the simplified assumptions discussed below, thus allowing for the complete automation of this process. To obtain a representative value of the fluid velocity in a radiator channel and, consequently, the \"local\" Reynolds number, it is assumed that the volumetric flow rate at the inlet is uniformly distributed across the radiating ducts. \[Q_{in}=\sum_{i=1}^{N}Q_{i}=N\;Q_{i}=N\;U_{i}\;A_{i}\;\;\Longleftrightarrow\;\;U _{i}=\frac{Q_{in}}{NA_{i}}; \tag{1}\]  
where \(Q_{in}\) is the volumetric flow rate at the inlet, \(N\) is the number of radiator channels, \(U_{i}\) is the velocity component in the direction of the channel axis, and \(A_{i}\) is the cross-sectional area of a single duct. The cross-sectional area of the channels and their number have been automatically provided by the FreeCAD macro execution, cf. Section 3.1, while the inlet volumetric flow rate is given as input by the user, cf. Section 3.1. Once the velocity in the single channel is estimated, it is possible to compute the \"local\" Reynolds number, as follows:  
\[Re=\frac{\rho DU_{i}}{\mu}, \tag{2}\]  
where \(D\) is the reference dimension of a single duct here, defined as \(D=\sqrt{A_{i}}\), \(\rho\) is the fluid density, and \(\mu\) is the dynamic viscosity. Thus, following the correlation provided in [25] for the turbulent flat plate, it is possible to estimate  
\[C_{f}=\big{[}2\log_{10}(Re)-0.65\big{]}^{2.3}, \tag{3}\]  
\[\tau_{w}=\frac{1}{2}\rho U^{2}C_{f}, \tag{4}\]  
\[u_{\tau}=\sqrt{\frac{\tau_{w}}{\rho}}, \tag{5}\]  
where \(C_{f}\) is the skin friction coefficient, \(\tau_{w}\) is the shear stress in the tangential direction to the wall, and \(u_{\tau}\) is the friction velocity. The desired height of the first wall prism is usually expressed in terms of wall units, \(y^{+}=y\mu_{\tau}/\
u\), depending on the turbulence model and the possible use of wall functions, e.g., \(y^{+}\approx 3\) for \(k-\omega\) following [26]. By imposing the \(y^{+}\) value it results in  
\[y_{H}=2\frac{y^{+}\mu}{u_{\tau}\rho}, \tag{6}\]  
where \(y_{H}\) is the dimensional height of the first prism, while \(\frac{y^{+}\mu}{u_{\tau}\rho}\) is the height of the wall adjacent cell centroid. The boundary layer thickness is then estimated as a function of the Reynolds number, following [27]. \[\delta_{99}=\left\{ \begin{array}{ll}\frac{4.91D}{\sqrt{Re}}&\text{if }Re<5 \times 10^{5}\\ \frac{0.38D}{Re^{1/5}}&\text{if }Re>5\times 10^{5}\end{array} \right.. \tag{7}\]  
At this point, to properly define the prism layer, it remains to determine their number in order to ensure that their thickness is greater or equal to the boundary layer thickness estimated through Equation (7). To this end, an expansion ratio, which is defined as the ratio between the heights of two consecutive prism layers, is first set.