## 2 Methods
### U-Net for Global Corrections  
As mentioned in Section 2.3.1, establishing a physical relationship between the correction field and the selected inputs is not guaranteed. This can lead to instability during numerical transients which cannot be suppressed even reducing the CFL value. For example, we had good results in the SD7003 test case, but for the NACA0021, the same architecture and choice of inputs did not yield satisfactory outcomes. These results will be discussed in Sections 3.2.2 and 3.3.1. Therefore, we explored a different approach to mitigate this problem. Staying within the neural network framework, we decided to use a different structure, specifically a convolutional neural network. We opted for the U-Net model due to its ability to handle complex spatial relationships effectively. The U-Net model is a type of convolutional neural network designed for image segmentation tasks. It consists of a contracting path to capture context and a symmetric expanding path that enables precise localization. The contracting path follows the typical architecture of a CNN, where repeated applications of convolutions and max-pooling operations reduce the spatial dimensions. The expanding path consists of upsampling operations and concatenations with corresponding feature maps from the contracting path, followed by convolutions. This structure allows the network to combine high-resolution features with context information from larger regions, making it particularly suitable for tasks where precise localization is required. A schematic of the architecture used in this work is shown in Figure 2.  
Figure 2: U-Net model architecture. Inspired by the work of [PERSON] et al. [51], we similarly use the U-Net model. The authors used a U-Net-based model to predict the velocity and pressure fields around airfoils. Their model took as input the airfoil mask and the initial velocity field, and it predicted the steady-state velocity and pressure fields for various airfoil shapes and flow conditions. In this work, starting from a converged solution of the original SA model, we use the streamwise and spanwise velocity, pressure, temperature, and turbulent viscosity as inputs to our model with the objective of predicting the corrected turbulent viscosity field. This approach avoids the need to find a local function for the correction field. Instead, we predict the turbulent viscosity field directly, which is the field of interest. With this approach, we no longer need to alter the SA equation. Instead, we delegate the task to the U-Net model. First of all, a RANS simulation with the original SA model is performed. Then the steady solution is provided to the U-net to compute the corrected eddy viscosity field. This corrected field is imposed as a frozen field in a second simulation in which only the other conservative variables are integrated until a new steady state is reached. Since convolutional layers typically operate on structured uniform grids, but turbulent CFD simulations are often based on unstructured grids, a preprocessing step is necessary. We extract the fields of interest within a defined region around the airfoil and interpolate these values onto a new structured grid with lower resolution using linear interpolation. This preprocessing step ensures the data are in a suitable format for the U-Net model while managing computational costs. If the U-Net model accurately predicts the optimal turbulent viscosity, the solver will quickly converge to the correct steady-state solution with minimal iterations, replicating the field inversion results. There are some disadvantages to this approach. For example, the need to interpolate results onto a structured grid introduces errors in the dataset used for training the model. This step, although necessary for compatibility with convolutional layers, can affect the overall accuracy of the predictions. According to our initial tests, this approach shows promising results. However, the model's ability to generalize across different airfoil shapes remains untested.