## 2 Tools of the Trade  
T-WorkFlow is a tool written in Python3 [13] that takes advantage of the open-source parametric 3D modeler FreeCAD (version 0.19 or later) [14] and the open-source CFD solver OpenFOAM10 [5]. We opted for the Python programming language as it readily provides access to many libraries. These are powerful and versatile tools that greatly accelerate development, minimize code duplication, and provide numerous advanced features without having to implement them from scratch. The main libraries employed by T-WorkFlow are as follows: (i) kinter [15], available through the PSF License and used for developing a simple graphical interface for user interaction; (ii) numpy-stl [16], available through the BSD License and used to handle the.stl files provided as input to the tool, especially during the pre-processing phase; (iii) matplotlib [17], available through the Matplotlib license agreement and used to produce the summary plots provided as output by the tools. Once the execution of T-WorkFlow is started, the first operation performed is the creation of a subdirectory within the working directory dedicated to the execution of the OpenFOAM simulation, named by default Radiator_cascenumber. The \"cascenumber\" token is simply an incremental index that starts at 0 and is updated each time the program is run to prevent the unintentional overwriting of previously run simulations. Within the case folder, the directory structure shown in Figure 3 is created, consisting of  
* the subfolder **log**, where the log files generated during the simulation are saved;
* the subfolder **run_sh**, where the shell scripts (.sh) generated by the tool and needed for its execution are saved;
* the subfolder **InputLocation**, where some text files needed for the workflow execution, as shown in Section 3, are saved;
* the subfolder **flowRateVisualization**, where the plots showing the volumetric flow rate distribution over the radiant channels at different iterations of the CFD solver are stored as images in.png format;
* the basic folders for an OpenFOAM case, i.e. :  
Figure 3: Structure of the folders generated by T-WorkFlow. the subfolder **0**, containing the initial and boundary conditions;
* the subfolder **constant** contains files related to the computational grid, physical properties of the fluid (such as viscosity), and the turbulence model used for the simulation;
* the subfolder **system**, where all the dictionary files needed for the CFD solver set-up are saved. In order to extract specific geometric information from the CAD model of the radiator, cf. Section 3.1, which is essential to ensure the correct functionality and flexibility of the workflow, we chose to use the FreeCAD modeler during the development of T-WorkFlow. FreeCAD comes with its own Python console, allowing for some direct CAD operations on the virtual model via the command line. The execution of a specific set of operations can also be coded in Python language in dedicated files called macro. T-WorkFlow takes advantage of this feature by generating the InputExtraction.FCMacro file, which contains the instructions for extracting all the relevant geometric information from the model. For this purpose, T-WorkFlow directly opens the FreeCAD graphical interface to load the radiator.stp model and allow the user to execute the generated macro. The extracted data, which are discussed in detail in Section 3.1, are then automatically saved in the InputLocation folder. The mesh can be either imported from external software, e.g., STAR-CCM+ [18], ANSYS [19], or Gmsh [20] or it can be generated using OpenFOAM internal tolls like _blockMesh_ and _snappyHexMesh_. Although the first option may make it easier to obtain a high-quality computational mesh, in order to achieve a fully automated process based on open-source tools, the second approach was followed for meshing. The grid generation strategy used in T-WorkFlow, which relies on a proper combination of _blockMesh_ and _snappyHexMesh_, is detailed in Section 3.3.