A Steady-State Wind Farm Wake Model Implemented in OpenFAST

: Wake models play a fundamental role in finding optimized solutions in wind farm control. In fact, they allow assessing how wakes develop and interact with each other with the agility required for real-time applications. In this paper, a Gaussian Wake Model (GWM) is implemented in the OpenFAST framework in a way such that its fidelity is increased with respect to previously implemented models, while enhancing its compatibility with control purposes. The OpenFAST tool is coupled with Floris, NREL’s software based on the GWM, in order to simulate the wake effect on downstream machines (in the case where the downstream rotor is fully covered by the wake, only partially covered by the wake, of the wake is generated by the interaction of more than one turbine), while the rotor aerodynamics is calculated using the BEMT on the actual rotor flow field. We intend this work as a starting point for developing and testing open/closed-loop control logics that will work in real wind farms. To show the suitability of the implementation, the entire model is then compared to Floris.


Introduction
Wind energy installations are continuously growing, and the available sites where consistent wind is blowing are limited; this typically leads to grouping wind turbines into clusters. However, in order to minimize the rental cost, the owners of the farm will place the turbines very close to one another, promoting in this way the interaction of wakes from upstream machines that negatively affect the power extraction and the loads acting on the turbines placed downstream. This is the reason why, before placing the turbines, an accurate study of the wind blowing in the site is needed to correctly choose the best layout of the farm based on how the wakes could develop.
When the wind farm is in operation, a control-oriented wake model (capable of running in real time if needed for control purposes) could be used to optimize both the power extraction and the fatigue loads acting on the machines for all the possible environmental conditions found at the site. These topics, as indicated in van Kuik et al. [1], are active important research topics in the wind energy field. Currently, many studies are dedicated also to the development of wind plant models having different levels of complexity and fidelity, based on the purposes for which they are used. Among these models, there are on the one side high fidelity wake models. They are particularly suited for model validation since they are able to grasp the physics behind the phenomenon represented. On the other side, there are engineering and analytical models that give a more rough estimation of the flow field or turbine performance, but are still valuable for the evaluation of turbine performances.
As of today, the state-of-the-art of high fidelity methods is the coupling between OpenFAST [2] (an aero-elastic wind turbine simulator) and OpenFOAM/SOWFA [3,4] (an open-source CFD solver with an ad hoc library able to reproduce the atmospheric boundary layer) using an Actuator Line Model (ALM) [5]. By using this tool, it is possible to estimate the turbines' load and behavior in the closest way to what happens in reality. However, when dealing with control problems, we must renounce some of the complexity in order to save time and computational power. This is why low fidelity models are usually analytical ones.
An example of open-source control-oriented software is Floris [6], developed by NREL. It relies on the Bastankhah and Porté-Agel [7,8] GWM and is able to fully characterize the flow field developed in a wind farm, considering steady-state environmental conditions. To work, this tool requires only four parameters determined experimentally and some inputs from the user related mainly to the farm geometry and the free stream wind. There also exists a compromise. Some models are able to guarantee both good accuracy in the results and a fast execution of the simulations. Our intention with this work is to place ourselves in this area. Here, we can already find the Dynamic Wake Meandering (DWM) [9] model developed at DTU (Danmarks Tekniske Universitet) and the WindFarmSimulator (WFSim) developed at TU Delft. The first is derived from a simplified version of the Navier-Stokes equations and is able to reproduce the wake meandering phenomenon, which has a big impact as regards the power extraction and loads of the machines. The second one is based on the 2D Navier-Stokes equations and has been widely used, together with Floris, to investigate new control algorithms. These studies supported the concept of secondary steering and showed how wake steering methods could be used for multi-objective optimization in the wind farm context [10,11].
In this paper, a low fidelity model based on the GWM and Floris software is presented; it is more advanced, however, since the GWM will be embedded and working in the OpenFAST framework coupled to the BEMT aerodynamic model of the turbine. The main difference with Floris is the capability of this new tool to model the wake generated by the machines taking into account the C T and AIF developed on the whole plane of the rotor and calculated at runtime from the aero-elastic solver OpenFAST, not only at a single point (at hub-height) by means of pre-tabulated values like the C P − TSR or the C T − TSR table (like Floris does). This allows for a more accurate description of the wake. The proposed tool allows also for a characterization of the loads acting on the machines when they work in the complete or partial wake condition under the assumption of steady-state environmental conditions. In addition to this, the model can be used to develop and test new control logics at the wind farm level in order to maximize the power extraction under the hypothesis of the steady-state flow condition, but retaining the dynamics of the turbines (thanks to OpenFAST). It is also possible to investigate both the loads and the power extraction when the turbines are working in a yawed condition. Indeed, this new tool is particularly suited for research on wind farm control logics using wake steering methods, like the one proposed by van Dijk et al. [10] and Martinez et al. [11], axial-induction based methods, like the one presented by van Wingerden et al. [12], or a combination of them like in the work of Bossanyi et al. [13].
The paper is organized as follows. First, we give an overview of the GWM and the analytical changes that have been made to it. Then, the next section is dedicated to the implementation of the new GMW in the OpenFAST framework. Lastly, we present of a simulation carried out with the new developed tool and a discussion about the results and the future work.

GWM Overview
The GWM model proposed by Basthakhah and Porté-Agel [7,8] relies on the hypothesis of the self-similarity of the wakes, meaning that the wake velocity deficit profile shows always the same characteristics if properly normalized. The entire model, however, is derived from a budget study of the Navier-Stokes equations in their RANS formulation.
For the profile of the wake deficit, a Gaussian shape is proposed. This hypothesis is valid, as demonstrated by the authors, for a relative yaw angle of the turbine rotor, with respect to the free-stream wind direction, up to 30 degrees; after this limit value, the wake profile starts to differ significantly from the Gaussian shape. In addition to a complete characterization of the wake deficit, the authors also proposed an analytical description of the wake deflection when the turbine is operating in the yawed condition. Specifically, the analytical formulation for the wake's deficit and deflection in the far wake zone is: whereū represents a time averaged velocity in a downstream location with respect to the considered turbine, C(x) represents the normalized velocity deficit at the wake center in various downstream positions, δ represents the wake center deflection, z h represents the hub height of the considered wind turbine, σ y and σ z represent the wake width in the y and z directions, u ∞ represents the undisturbed fluid velocity, and θ c represents the wake skew angle of the wake center as a function of the downstream distance.
As regards the wake width, σ y and σ z , a linear formulation dependent on the downstream distance is proposed: k y = k z = k a I + k b and k a = 0.38371, k b = 0.003678 (5) where d represents the turbine's diameter, x 0 the downstream distance at which there is the onset of the far wake zone, σ y0 and σ z0 represent the wake width at the onset of the far wake zone, k z and k y are two constants hypothesized as linearly dependent from the wind turbulence intensity I, k z and k y are two constants determined experimentally, and γ is the yaw angle of the turbine relative to the free-stream wind direction. Then, applying two conditions directly derived from the budgeting operation carried out on the RANS equations, in the stream-wise and span-wise direction on the expressions in Equations (1) and (2) (which is also integrated in the stream-wise direction), it is possible to state that: where , C 0 is the wake deficit speed at the onset of the far wake region, δ 0 is the wake deflection with respect to the turbine's rotor axis at the onset of the far wake region, and θ c0 is the wake skew angle of the wake center at the onset of the far wake region. Now, to close the model, it is necessary to characterize all the parameters referring to the onset of the far wake region, which are: C 0 , x 0 , δ 0 , σ y0 , σ z0 , and θ c0 .

Determining the Parameters in the Far Wake Region
A relationship between the C T and the a (AIF) of the turbine is needed; the authors of the GWM proposed a simplified formulation: This analytical formulation, as will be seen in Section 2.4, is fundamental in the formulation of the modified GWM model to be implemented in OpenFAST, since now, the aero-elastic code will directly provide the C T and AIF. In the Floris software, to run the model, a C T − TSR and a C P − TSR table are required as input parameters. Thanks to them, the AIFs of the simulated turbines are derived by means of Equation (8), using the input wind speed to define the TSRs at which the machines are operating (TSR → C T → AIF).
Continuing with the Bastankhah and Porté-Agel [7,8] model, applying the definition of AIF, it can be stated that: where u R is the wind speed at the turbine's rotor plane. Applying the Bernoulli equation between an upstream (free-stream wind) section and the rotor section of the turbine and between the rotor section and a downstream section, it is possible to find exactly that: From this considerations, the theoretical value of the deficit at the rotor plane section C 0 can be expressed as: Now, assuming that the "potential core" of the wake (the near wake zone) has a constant velocity equal to u 0 , it is possible to find, applying the budgeted RANS conditions at section x = x 0 (thus equating the expression of the potential core and the Gaussian shape at the section in which there is the onset of the far wake region), that: and applying Equations (9) and (10): Passing to the wake deflection and using Burton's approximation [14] to describe the flow skew angle with respect to the rotor's axis χ: and by substituting the AIF with Equation (8): The θ angle should be used to estimate the flow angle at the rotor disk, but it also proves to be a good prediction for the flow skew angle up to a few rotors' diameters downstream; this is why Equation (15) is used to define the parameter θ c0 (the flow skew angle at the onset of the far wake region, where x = x 0 ). From this consideration, it is easy to see how the wake deflection δ 0 at x = x 0 can be expressed as: The last expression to be determined is x 0 , the downstream distance at which there is the onset of the far wake region; to determine this unknown, the authors adopted a model from Lee and Chu [15]. The model suggests a proportionality between the change in width of the shear layer σ y0 to the velocity difference between the potential core of the wake and the unperturbed surroundings. They also recognized a proportionality of σ y0 with the incoming turbulence I that enhances flow entrainment and the growth of the shear layer. Therefore, by integrating the following expression: and applying the proper substitutions, they were able to define x 0 as:

Additional Considerations
The GWM model described above is used to reproduce the wake generated by a single turbine; in the case of a wind farm, it has to be considered that an interaction between wakes may happen.
In the simple case of three turbines aligned in the wind direction and positioned one downstream of the other (like in the simulation proposed in this paper), for example, it is easy to see that it is not only the wake of the second machine having an effect on the wind velocity felt by the last one, but also the wake developed from the first. This is why a method that accounts for this phenomenon and the added turbulence generated by the wakes is necessary. In this subsection, the methods used are exactly the ones proposed in the open-source Floris software developed by NREL. The correction used for the wind velocity was developed by Katic et al. [16] and proposes a superimposition of the local wakes to estimate the wake deficit on the n + 1 downstream turbine: Crespo et al. [17] proposed a correction for the added turbulence due to the wake generation and mixing with the free-stream velocity: where I 0 is the ambient turbulence intensity referred to the free stream condition and C I and e 1 , e 2 , and e 3 are parameters to be determined experimentally that in Floris were set to C I = 0.8, e 1 = 0.73, e 2 = 0.1, and e 3 = −0.275. This last relation was derived experimentally, while the first one is linked to dynamic pressure and to the thrust force exerted by the upstream turbines. The A ol,% term appearing in the I + equation represents the ratio of overlapping area between the rotor diameter of a turbine and the wake area generated by upstream machines, while D i , a i and I 0 represent respectively the rotor diameter, the Axial Induction Factor (AIF), and the incoming turbulence intensity on the i-th considered machine. Furthermore, for the turbulence intensity I, due to the wake's superposition, a correction by Niayifar et al. [18] was implemented: In Floris, when evaluating the power extracted from a turbine in a yawed configuration, another correction is used; considering that the C P (power coefficient) of the machine is proportional to the cube of the incoming undisturbed flow speed, yawing the turbine directly reduces the useful wind component from which power is extracted by the cosine of the misalignment angle: The same is valid for C T : Both p p and p t need to be experimentally derived. These corrections aim at adjusting the characteristic coefficients of the turbine when working in yawed conditions in a simple and effective way. However, with the implementation of the GWM in OpenFAST, the p p and p t coefficients will not be needed anymore since the aero-elastic code is perfectly capable of evaluating the C P,yaw and C T,yaw directly, without any need for corrections.

Changes to the GWM
As specified in Section 2.2, to implement the GWM and the necessary corrections due to the wakes' interaction in the OpenFAST software, some changes were necessary to the GWM proposed by Bastankhah and Porté-Agel [7,8]. The major change is that both the C T and AIF can be retrieved directly from the program as outputs of the aerodynamics calculations of the BEMT, running on each simulated turbine. We can treat OpenFAST as a black box that, given certain inputs as the wind speed acting on the rotor plane, the lift and drag coefficients of the blades, etc., outputs certain quantities like the C T and AIF, needed to run the GWM model. Therefore, the analytical formulation in Equation (8) and all the mathematical steps deriving from it should be discarded when using OpenFAST; this means that Equation (9) has to be changed into: since OpenFAST directly outputs the a value and Equation (13) has to be rewritten as: while Equation (15) is changed into: and finally, Equation (19) is written as: After applying these corrections to the GWM, the model is finally ready to be embedded in the OpenFAST framework.

Implementing the GWM in OpenFAST
OpenFAST allows customizing some functions based on specific needs: one of them is the wind model. It is possible to write in the InflowWind Module of OpenFAST, responsible for modeling the wind acting on the machine, a user-defined routine in a specific file called IfW_UserWind.f90, in Fortran language. OpenFAST, like the above-mentioned routine, is completely written in Fortran due to its speed in executing calculations, except for its API, which is written in C++. The API enables the software to be coupled with OpenFOAM and SOWFA to simulate a turbine, or a complete wind farm immersed in the ABL, or to simply simulate more than one machine at the same time (in a serial fashion, not parallel). This is the reason why this API will be used when performing a complete simulation of a wind farm with the user-specified GWM model. The implemented function basically executes this task: given as input an array of positions near the rotor of each turbine (needed to solve the aerodynamics (BEMT) of the machine), the routine returns as output a matrix of values containing the wind speed in the three directions x, y, and z for the selected positions.
A brief description of the implemented routine is reported in Appendix A.
In the main function, in addition to the GWM implementation, it was necessary to describe the free-stream wind acting on the first upstream turbine; to do so, the model chosen was the logarithmic profile of wind described in the EUROCODE [19]. The wind speed and the ambient turbulence intensity acting at a given height z are given by the following equations: where z 0 is the surface roughness, V b is the basic wind velocity, z min ∈ [1 − 10] m is the minimum height at which the hypothesis of logarithmic profile is verified, and k r is the terrain factor. In Figure 1, a schematic representation of how the main routine is intended to work, when coupled with the OpenFAST framework, is presented. For a generic time step, starting from the most upstream turbine simulated by the first instance of OpenFAST, the user-specified InflowWind routine evaluates the free-stream wind speed acting on the positions required by OpenFAST; then, the array containing the wind velocities is passed to the AeroDyn Module to solve the aerodynamics of the machine (using the BEMT model). After this passage, AeroDyn produces as output the C T,i value for the current turbine together with the AIF values at specific blades' section a local,i (r) specified in the input file of AeroDyn (for a maximum of nine specific sections per blade). Then, the current OpenFAST instance (that is simulating the first turbine) continues doing its calculations for the specific time step; once finished, the second instance of OpenFAST, simulating the first downstream turbine, is called to perform all its tasks. This can be performed because the hypothesis is that the turbine is not affecting the upstream wind field, but only the wake is driven downstream. Once again, the user-specified InflowWind routine evaluates the wind speed acting on the positions required by OpenFAST that, this time, are affected by a certain wake deficit defined according to the model; to perform such a task, the C T,i−1 and AIF a i−1 averaged on the rotor plane of the first turbine are needed. As before, the obtained values will be passed to the AeroDyn Module of the current OpenFAST instance to obtain the C T,i and a local,i (r). This procedure is carried out for every turbine in the farm at every time step of the simulation. The routine as written gives also the possibility to linearly interpolate the wind input parameters of the simulated wind farm (like the wind speed, direction, surface roughness, etc.).

Numerical Setup
In this section, the numerical setup of the OpenFAST simulation, using the implemented model, is proposed; it is extracted from a broader work where the proposed version of the GWM was used to maximize the power extraction of a wind farm by means of a genetic algorithm acting on the yaw angle of the machines (wake-steering optimization method).

Wind Farm Layout
For the simulation, the reference layout chosen is a 3 × 1 arrangement of NREL 5MW model turbines, meaning that, having the wind blowing from west, the three turbines are all aligned in that specific direction. These turbines have a diameter D = 126.0 m and a hub height z h = 90.0 m. For the coordinates of the hub center point of the turbines, refer to Table 1 or to Figure 2 to graphically visualize the farm and the wake produced by the machines.

Wind Model Input
The input parameters of the free-stream logarithmic profile described in the EUROCODE [19], keeping the same notation adopted in Section 2.1, see Table 2: Table 2. Wind magnitude input for the OpenFAST simulation.

Wind Magnitude Parameters
The wind speed is kept constant during the whole simulation, while the wind direction θ w changes linearly as described in Table 3: Table 3. Wind direction input for the OpenFAST simulation.  Table 4.

OpenFAST Settings
For the purposes of the current simulation, the modules of OpenFAST that are used are: • ElastoDyn, simulating the structural behavior of the machine • InflowWind, simulating the flow field surrounding the machine • AeroDyn v15, simulating the aerodynamics of the machine • ServoDyn, simulating the control part of the machine On the ElastoDyn input file, the only remark to be made is that all the turbines will start with the low speed rotor spinning atθ r = 12.1 rpm, that is the rated angular speed of the machine; in this case, u ∞ (z = z h ) < u ∞,rated = 11.4 m/s, where u ∞,rated is the rated wind speed at which the turbines produce the rated power output, and in the first phase of the simulation, a slow-down of the rotors has to be expected. This means that, even if the wind is taken from a steady-state model, both the structural and aerodynamic part (especially the C T and the AIF that are the most important part of the current model) of the turbine will need a certain amount of time to reach the equilibrium condition; so, to obtain accurate results for a given simulation, about 50.0 s are required when the wind conditions are changed.
Moreover, in the ElastoDyn Module, the yaw DOF was activated; it was used to apply wake steering in order to increase the power extraction of the wind farm. The change of the yaw angle of turbines T1 and T2 is the reason why, in the wind speed graphs shown in Figures 3-5, the wind magnitude in the x-axis direction of the reference wind farm layout is continuously changing. However, this particular optimization method shows in a complete way how the proposed wake model works in the wind farm.
In the InflowWind Module, the model of wind used was the user-specified routine presented in Section 2.4, the one given by the Bastankhah and Porté-Agel [7,8] GWM model.
In the AeroDyn v15 Input File, it was necessary to set some parameters for the aerodynamic simulation of the machine (BEMT model). Since the wind model employed is stationary, a classic BEMT model was used. The maximum number of iterations allowed for the convergence of the AIF and TIF (activated in the simulation) was fixed to n it = 10,000, in order to be sure to reach convergence with the tolerance set to the OpenFAST "default" value. Glauert's tip loss and hub loss corrections were used in the simulation. For the blades airfoil aerodynamics, the unsteady Beddoes-Leishman model with the Minnema-Pierce variant was used. Finally, to take into account the effect that the skewed wake has on the yawed turbine, the Pitt and Peters BEMT correction was activated.

Results and Discussion
In this section, the results obtained from the simulation will be presented, focusing mainly on the wind model, together with a validation of the OpenFAST/Floris code against NREL's Floris.

OpenFAST/Floris Validation Results
The modified model was validated against the Floris software to be sure of a correct implementation. The standard Floris version was slightly changed in order to allow for the evaluation of the added turbulence I + using an AIF specified as an added input from the user. This was possible since the AIF value is never explicitly used in the calculations of the wake deficit and deflection except when it comes to the added turbulence intensity (the AIF value is obtained as a function of the C T as in Equation (8)). This change allows for inserting the AIF obtained from the OpenFAST simulation to perform a correct validation.
The validation was performed using the same numerical setup of the presented simulation, but converting the parameters of the EUROCODE [19] logarithmic profile into an equivalent power law (since Floris uses this model of free wind). The wind values presented in Table 5 make reference to the hub position and height of the three turbines, while the C T and C P are synthetic parameters referring to the whole rotor plane.
The difference between the codes is: The slight deviation from the Floris software results is limited and is expected due to the proposed changes. A proper consideration of rotor aerodynamics increases the wind speed at the hub height for the turbines in the wake for the considered case, increasing the performance of the wind farm.

Simulation Results
Making reference to Figures 3-5, it is possible to understand how the GWM proposed by Bastankhah and Porté-Agel [7,8], together with the additional changes described in Section 2.3, affects the inflow wind felt by each downstream turbine (T2 and T3, named as in Figure 2). The various fluctuations in the graphs of the wind speed acting on the hub of the various turbines are justified by the fact that, during the simulation, the machines are continuously yawing (in particular, T1 and T2), changing in this way the wake propagated downstream.
To better understand this effect, the yaw angles of T1 and T2 are reported in Figure 6. For the upstream turbine T1, the wind felt is always constant, while the downstream ones feel a different wind when the yaw angles of T1 and T2 are changed according to the wind farm control logic used in the simulation. The yaw angle of turbine T3 is always aligned in the wind direction, since this is the only position that maximizes the total power extraction. For example, referring to Figures 4 and 6, respectively the wind speed felt at turbine T2's hub and the yaw angle of T1 during the simulation, it can be noted that for t sim ∈ [1000 − 1150] s, the yaw angle of T1 is passing from −25 degrees to −10 degrees and finally to 0 degrees. At the same time, the wind speed of T2, due to the steered wake of T1, is passing from 9 m/s (γ T1 = −25 deg) to 7 m/s (γ T1 = −10 deg) to 6 m/s (γ T1 = 0 deg), because the wake produced by T1 is gradually overlapping T2's rotor plane.  The same analysis can be done for other time periods of the simulation and considering different combinations of turbines, like T2 and T3, but paying attention to the fact that in this case, also T1's wake is contributing to the definition of the wind speed felt at T3's hub. As reported in Sections 2.1 and 2.4, the model is strongly dependent on the thrust coefficient C T and on the rotor averaged AIF a. From the graphs in Figures 7 and 8, it is possible to see the trend of the C T and a of the various turbines and understand how the wind velocities reflect them.

Discussion
The implementation in the OpenFAST framework of the Bastankhah and Porté-Agel [7,8] GWM, together with the additional models reported in Section 2.3 allow using the OpenFAST software not only as a single turbine aero-elastic simulator, but also as a complete, standalone simulator for an entire wind farm with the hypothesis of steady-state environmental conditions. The simulation speed of this new tool could further be increased if all the OpenFAST instances (each one representing a single turbine) were run in parallel fashion; however, this would mean rethinking and rewriting the whole InflowWind user-specified routine.
Since the implemented model is a steady-state model, this new tool could not be used in order to simulate dynamic or transient conditions, and thus to study wind farm control techniques relying on wake dynamics. This is the major drawback of the model, together with the impossibility of reproducing adequately the wake meandering phenomenon that has quite a big effect on the flow field developed inside a wind farm. In the future, it could be possible to add wake meandering to the model by using the superposition principle. Another limitation of the present model is the need to set up the four parameters k a , k b , α, and β according to how the wakes develop in the wind farm under consideration. Estimating these parameters requires an ad hoc study campaign that could be useful also to validate the presented model with field data.

Conclusions and Future Work
In this paper, some changes made to the Bastankhah and Porté-Agel [7,8] GWM, in order to implement it in the OpenFAST framework, are presented. Moreover, the organization and the use of the InflowWind routine is explained. After this, in order to verify how the model behaves, a simulation is carried out using a reference 3 × 1 wind farm layout; the results show that the wake model works as intended (since the results obtained are validated also using the same wind inputs and wind farm layout on the Floris software). Finally, Section 5.3 shows the purposes for which the model could be used and the pros and cons that this tool carries with it when compared to other simulation methods.
In the future, to enhance the capabilities of the OpenFAST/GWM coupling, a wake transport model has to be added in order to correctly reproduce the downstream propagation of the wave. This is the last fundamental step for the creation of an advanced tool able to analyze the behavior of a wind farm (both in terms of loads and power extraction) under a mean flux condition. With a further refinement of the code, the developed software could be used as an advanced Floris (control-oriented model) able to perform calculations in real time. Introducing these two changes, it is possible to obtain the accuracy of a medium fidelity model with the computational speed of a low fidelity control-oriented model. From an industrial standpoint, refining the code introducing newer features like a wake transport and a turbulence model could lead to the creation of a tool that wind farm managers can use to perform real-time multi-objective optimization tasks (i.e., maximize the power extraction of the farm while keeping the loads acting on the blade as low as possible) or as an observer able to estimate what is happening in real time in the farm using only a few measurements from the turbines.
In the next months, a custom and open-source version of OpenFAST containing the presented model will be released.  Acknowledgments: Thanks to the National Renewable Energy Laboratory (NREL) for the open-source software that was used in this work.

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript:

Appendix A. InflowWind Routine Description
The main routine called IfW_UserWind_CalcOutputis divided into sub-functions, each performing a smaller task: • WindCalc, responsible for the evaluation of the wind speedū(x, y, z) and the wake deflection δ at a given point (x, y, z) asked from OpenFAST; • IntersectArea, responsible for the evaluation of the intersection area between two given turbines (it determines the A ol,% term appearing in Equation (21)); • RotoTransPoint, responsible for performing rotations and translations of a point from one S.o.R. to another (i.e., from a non-yawed rotor plane to a yawed rotor plane); • AddedTurb, responsible for the evaluation of the added turbulence intensity generated in a wake (the I + term appearing in Equation (21)); • RotLayoutAndSort, responsible for performing rotations and translations of the layout of the wind farm to align the turbines in wind direction (in order to perform the calculations needed to obtain the wind speed and deflection at a given point) and to sort the turbines from the most upstream one to the last downstream one along the stream-wise direction; • RotAvgAxInd, responsible for the evaluation of the rotor averaged AIF (from the local values a local (r) on the blades, obtaining only one averaged value of a).
To pass from a local (r) to a, a weighted averaged based on the distance from the rotor's hub is performed, like in the following equation: a local,j,i r j,i where the j index represents the number of blades for the considered turbine, the i index represents the number of points considered for the blade, and r j,i represents the distance from the hub for the section to which a local,j,i makes reference. All these subroutines are used in IfW_UserWind_CalcOutput to fully characterize the wind speed acting on a given point of the rotor of each turbine simulated in the wind farm at every time step.