## 3 Workflow Description
### User Input Through FreeCAD and Graphical Interface  
To allow T-WorkFlow to handle any configuration of the radiator, geometrical information related to the particular case under analysis is required before generating the mesh. To monitor the flow rate distribution in the radiant ducts during the simulation, cf. Section 3.4, it is necessary to generate a control surface for each duct cross-section, an operation that can be accomplished using the OpenFOAM command _topoSet_. To achieve this, the corresponding OpenFOAM dictionary file must specify a point on each control surface to be generated, along with its normal vector. Therefore, it is at least necessary to know the direction of the axis of the channels and the coordinates of two points corresponding to the outermost channels. It is important to note that in this type of application, the radiator geometry is typically provided according to the car's reference system, as presented in Figure 4. This prevents making any assumptions about its positioning and orientation in space beforehand. Therefore, this information must be directly extracted from the CAD model of the specific configuration being analyzed. This operation is performed using the open-source FreeCAD [14] software, which is automatically launched when T-WorkFlow is executed and after the generation of the InputExtraction.FCMacro file. This macro contains all the Python commands necessary to extract and store the specific inputs required by the workflow. Figure 4: CAD model of a car from Tatuus Racing S.p.a.—Example of the radiator positioning within the vehicle, colored in red. Images courtesy of Tatuus Racing S.p.a. The _getSelectionEx()_ method [21] from the FreeCAD's _Selection_ module is here used to extract the various geometric details from the surfaces interactively selected by the user via the software graphical interface. Once the.stp file is loaded, the user only needs to perform the following two operations before running the macro: (i) select a surface from each of the outermost radiant channels; and (ii) one of the two surfaces at the base of all channels, whose normal vector is aligned with the axis of the ducts. An example of this operation is reported in Figure 5.  
From selection (i), the software computes the barycenter coordinates of the two outermost radiant channels, while from selection (ii), it extracts the normal vector and barycenter coordinates of the corresponding base surface. In addition, T-WorkFlow automatically identifies two opposite vertices on the base surface of the radiant ducts as the pair of points on the surface with the maximum Euclidean distance among all possible combinations of points. These geometric details are also essential for the pre-processing operations related to mesh generation, as is discussed later in Section 3.2. The last instructions within the macro are dedicated to determining the number of channels of the radiator and calculating the cross-sectional area of each radiant duct. These metrics are then used to (i) roughly estimate the expected Reynolds number within the channels, thereby automating the definition of prism layer extension through simple fluid dynamics correlations, cf. Section 3.3.2; (ii) compute the ratio between the channel cross-sectional area represented by the computational grid and the actual cross-sectional area defined in the CAD model to estimate the discretization error; and (iii) define a \"detection grid\" to be used to establish the control surfaces for monitoring the flow rate within the channels. For this purpose, a cutting plane is automatically defined such that its normal is aligned with the axis of the ducts, and the barycenters of the two outermost channels lie on it. The number of ducts in the radiator is then determined by the number of distinct surfaces on this plane, and the cross-sectional area of each of them is extracted using the _getSelectionEx()_[21] method. Upon execution of the macro, the relevant geometrical information extracted from the CAD model is saved in the InputLocation folder.