## 2 Methods
### Regression for Local Model Corrections
#### 2.3.1 Input Selection  
The use of the FFNN aims to find a relation between some local flow features and the local correction, which ideally can be used in any CFD code to solve the modified SA equation over time. This is a critical step, as the choice of input variables greatly influences the results. General rules suggest selecting local variables that are Galilean-invariant and based on RANS simulations. However, the final selection of input variables is up to the researcher, who must consider the specific needs and objectives of the study.  
A disadvantage of this approach is that an exact relation might not exist, or the right inputs to describe the correction field might not be found. Even worse, the FFNN might find a relation that does not represent physical behavior, leading to problems during simulations, such as numerical instability during the transient phase.  
Different researchers have chosen various sets of input variables depending on their specific needs and objectives. The choice often depends on the particular flow characteristics being studied and the aspects of the turbulence model that require correction. In this work, we choose the following five input variables:  
* Modified turbulent viscosity ratio: \[\
u/(\bar{\
u}+\
u)\] (33)
* Reynolds thickness number: \[Re_{\theta}=Re_{\bar{\
u}}/2.193\] (34) where \[Re_{\bar{\
u}}=\frac{\rho d^{2}}{\mu}S\] (35)
* Streamwise pressure gradient: \[\frac{(\
abla p\mathbf{u})d}{|\mathbf{u}|p}\] (36)
* Magnitude of the turbulent viscosity gradient: \[\frac{|\
abla\bar{\
u}|d}{(\
u+\bar{\
u})}\] (37)
* Modified shield function: \[fd^{{}^{\prime}}\] (38)  
Since we use non-dimensional variables as input, in Equations (36) and (37), the streamwise pressure gradient and the magnitude of the turbulent viscosity gradient are non-dimensionalized using, respectively, the distance function, the pressure, and the sum of the kinematic viscosity and the turbulent viscosity.  
The first input is an index of the intensity of the turbulent viscosity, as also used in [22]. The second input was chosen because it appears in a variant of the SA model called SA-BCM [50]. In this version, the authors use an algebraic function to evaluate an intermittency multiplier for the production term. Since the correction field acts similarly to an intermittency value, we include the Reynolds thickness number as an input to our FFNN.  
The third input is the streamwise pressure gradient, which is crucial as it directly affects boundary layer behavior. In regions with an adverse pressure gradient, the flow is more prone to separation from the surface. This separation is a key factor in the transition from laminar to turbulent flow. Including the streamwise pressure gradient helps the model predict and correct for regions prone to separation, thus enhancing the turbulence model's accuracy. It could be argued that the use of the streamwise pressure gradient introducesa violation of the Galilean invariance: this problem can be avoided by substituting the absolute velocity in Equation (36) with the velocity relative to the closest solid wall. Since in this work, all the bodies are at rest with respect to the chosen frame of reference, the two velocities coincide.  
The fourth input is the non-dimensional magnitude of the turbulent viscosity gradient, reflecting changes in turbulent viscosity and providing information on the spatial variation in turbulence.  
Finally, we include the modified shield function, which was used to select the region for constructing the dataset. Including this in the inputs allows us to leverage variations within the boundary layer to establish a meaningful relationship with the correction field.