Development of an Algorithm for Prediction of the Wind Speed in Renewable Energy Environments

: The aim of this work is to develop an algorithm that is able to provide predictions of wind speed statistics (WSS) in renewable energy environments. The subject is clearly interesting, as predictions of storms and extreme winds are important for decision makers and emergency response teams in renewable energy environments, e.g., in places where wind turbines could be located, including cities. The goal of the work is achieved through two phases: (a) During the preparation phase, the construction of a big WSS database based on computational ﬂuid dynamics (CFD) is carried out, which includes ﬂow ﬁelds of different wind directions in all grid numerical points; (b) In the second phase, the algorithm is used to ﬁnd the records in the WSS database with the closest meteorological conditions to the meteorological conditions of interest. The evaluation of the CFD model (including both RANS and LES turbulence methodologies) is performed using the experimental data of the MUST (Mock Urban Setting Test) wind tunnel experiment.


Introduction
The prediction of wind speed in renewable energy environments is a very interesting research field.During a short period (e.g., 15 min) and in all locations of the atmospheric surface layer, it is important to know the range of wind speed values as well as the probability that the wind speed will exceed a limit.These have, for example, practical applications in the design and operation of wind turbines (e.g., [1]).The reliable estimation of extreme wind speeds is important for wind energy applications, such as when the wind speed exceeds a limit then it is undesirable, because wind farms provide negligible power for wind values above their cut-off limits.Extreme wind speed values can also put in danger the mechanical safety of an installation [2].
The prediction of wind speed in the atmosphere can be performed with computer models that have developed in science to help researchers perform useful predictions.computational fluid dynamics (CFD) can be considered as one of the best numerical tools for predicting turbulent flow [3].When turbulence is modeled with direct numerical simulation (DNS) or large eddy simulation (LES), the prediction of wind speed can be performed through the predicted time series.The prerequisite for using DNS or LES is the use of an efficient code and many computing nodes/cores.These methods have high computational cost in terms of computing power and time.In addition, for DNS, the computational requirements are so high that simulations beyond a certain Reynolds number are not feasible (e.g., Reynolds = 4750-7000 [4]).In terms of emergency, where reliable conclusions are important (e.g., [5]) in short times (e.g., less than 5 min), the choice of RANS (Reynolds averaged Navier Stokes) and LES modeling can be considered attractive.
The duration of an individual RANS simulation can be from a few hours to a few days based on the desired accuracy.A higher accuracy of the results is usually achieved with a very dense grid (e.g., 20 million computational cells), advanced turbulent models and parameterizations, and high-order numerical schemes.On the other hand, an emergency situation requires answers in some minutes.For this reason, in the present work, an algorithm is developed to extract the information from a RANS database and to provide a reliable and fast wind speed prediction.It should be noted that there are two similar works in the literature.In [6], a cost-effective method was presented allowing to simulate the air flow and pollutant dispersion in a whole city over multiple years at the buildingresolving scale with hourly time resolution.The method relied on the pre-computation of a discrete set of possible weather situations and corresponding steady-state flow and dispersion patterns.The second work is the NRL-developed tool CT-Analyst [7,8] that provides accurate, instantaneous, 3D predictions of chemical, biological, and radiological (CBR) agent transport in urban settings.Both works are applied in urban environments.However, in the present study, the algorithm was developed to be applied in renewable energy environments, and based on the authors' knowledge this is the first effort in the literature.
The algorithm is described in Section 2. Section 3 then presents the governing equations for the RANS modeling used by the algorithm.Section 4 presents the test case where the algorithm was applied, and Section 5 presents the database, for the specific case, from which the algorithm extracts the appropriate information.The validation of the algorithm is presented in Section 6. Validation of the CFD model and description of the simulations are presented in Sections 7 and 8. Finally, Section 9 presents the conclusions.

The Algorithm
The algorithm that has been developed is a computer software system and is presented schematically in Figure 1.The wind speeds are precalculated in the algorithm in the entire computational field and for a range of possible wind directions.These calculations can be very fast because they are independent of each other and can therefore be performed in parallel, with the appropriate, available hardware infrastructure.
with a very dense grid (e.g., 20 million computational cells), advanced turbulent models and parameterizations, and high-order numerical schemes.On the other hand, an emergency situation requires answers in some minutes.For this reason, in the present work, an algorithm is developed to extract the information from a RANS database and to provide a reliable and fast wind speed prediction.It should be noted that there are two similar works in the literature.In [6], a cost-effective method was presented allowing to simulate the air flow and pollutant dispersion in a whole city over multiple years at the buildingresolving scale with hourly time resolution.The method relied on the pre-computation of a discrete set of possible weather situations and corresponding steady-state flow and dispersion patterns.The second work is the NRL-developed tool CT-Analyst [7,8] that provides accurate, instantaneous, 3D predictions of chemical, biological, and radiological (CBR) agent transport in urban settings.Both works are applied in urban environments.However, in the present study, the algorithm was developed to be applied in renewable energy environments, and based on the authors' knowledge this is the first effort in the literature.
The algorithm is described in Section 2. Section 3 then presents the governing equations for the RANS modeling used by the algorithm.Section 4 presents the test case where the algorithm was applied, and Section 5 presents the database, for the specific case, from which the algorithm extracts the appropriate information.The validation of the algorithm is presented in Section 6. Validation of the CFD model and description of the simulations are presented in Sections 7 and 8. Finally, Section 9 presents the conclusions.

The Algorithm
The algorithm that has been developed is a computer software system and is presented schematically in Figure 1.The wind speeds are precalculated in the algorithm in the entire computational field and for a range of possible wind directions.These calculations can be very fast because they are independent of each other and can therefore be performed in parallel, with the appropriate, available hardware infrastructure.The algorithm consists of the following steps: The algorithm consists of the following steps: 1.
The wind speeds are calculated and archived for a specific computational field, for a number of distinct incoming wind directions (in the present test, 8 incoming wind directions have been considered to cover the entire 360 • range).

2.
The user provides as input data the actual incoming wind direction.

3.
If the incoming wind direction coincides with one of the directions for which the wind speeds have been calculated, the algorithm selects the corresponding wind result file from the database.If not, then the two wind direction results files on both sides of the actual direction are retrieved and linear interpolation is applied to calculate the appropriate wind results file.It should be noted that linear interpolation is the simplest possible way to construct the intermediate wind field between two successive wind directions.Importantly, linear interpolation should work ideally when the distance between two successive wind directions is too small.More advanced methods based on, e.g., big data science and machine learning, will increase the efficiency of the present idea.These are concepts that will be examined by the authors in the future.

Governing Equations
The first step of the algorithm is to calculate and archive the wind speeds.In the present study, this step has been performed using RANS modeling.In RANS, the governing equations that are solved are: ∂ρ ∂t where ρ is the density, t is the time, u i are the velocity components, x i is the distance, P is the pressure, K is the eddy viscosity, ν is the kinematic viscosity of the fluid, g i are the components of gravity acceleration, r is the gas constant, and T is the absolute temperature.
The bar represents time-averaged values.
A considerable amount of work exists in the open literature concerning eddy viscosity modelling, especially in closed systems.The most advanced models in this area are those utilizing the turbulent kinetic energy k and the turbulent energy dissipation ε, obtained through transport equations or/and semi-empirical relations (e.g., [9]).The so-called standard k-ε model that has been extensively applied is based on the following transport equations for k and ε, ∂ρk ∂t ∂ρε ∂t 44, and C ε2 = 0.48.

The Pilot Test Case
In order to evaluate the algorithm, a computational field comprising a part of the atmospheric surface layer was selected.Figure 2 presents the selected field.The 3568 sensors of the MUST experiment (described below) were placed for this exercise to cover the area as much as possible (yellow circles).The height of the sensors ranged from 0.45 to 13.5 m.

The Pilot Test Case
In order to evaluate the algorithm, a computational field comprising a part of the atmospheric surface layer was selected.Figure 2 presents the selected field.The 3568 sensors of the MUST experiment (described below) were placed for this exercise to cover the area as much as possible (yellow circles).The height of the sensors ranged from 0.45 to 13.5 m.

The Database
All the wind field calculations were performed with the CFD model ADREA-HF ( [10]).The ADREA-HF model is a Eulerian model for the solution of the RANS and LES equations.
The database for the case under consideration includes the calculated flow fields from the ADREA-HF code for 8 incoming wind directions (0°, 45°, 90°, 135°, 180°, 225°, 270°, 315°) and a file with information about the computer grid.The size of the database for all wind directions is about 2 GB.The reference wind speed for all wind directions is equal to 8.3 m/s at a height of 10 m.It should be noted that in the present work the algorithm and the database are not designed to take into account different reference speeds, but there are thoughts in the future to use some kind of similarity in the speed distributions.Finally, neutral atmospheric conditions were applied and there is no effect on the results.Stable and unstable atmospheric conditions will be examined in the future.
Table 1 presents in detail the discretization of the computational field where almost 22.5 million cells have been used.The selection of the grid was performed on the one hand to be computationally manageable and on the other to be close to the grid of the MUST experiment presented in the work [11].Recall that in the MUST experiment the horizontal dimensions of the field were approximately as in the present case (≈270 m) with a minimum cell size equal to 0.25 m in the horizontal and vertical direction.Moreover, regarding the ground boundary conditions, the lateral planes (inlet-outlet) for each of the 8 wind directions and the numerical methods, a similar strategy has been adopted as in the work [11].

The Database
All the wind field calculations were performed with the CFD model ADREA-HF ( [10]).The ADREA-HF model is a Eulerian model for the solution of the RANS and LES equations.
The database for the case under consideration includes the calculated flow fields from the ADREA-HF code for 8 incoming wind directions (0 • , 45  , 315 • ) and a file with information about the computer grid.The size of the database for all wind directions is about 2 GB.The reference wind speed for all wind directions is equal to 8.3 m/s at a height of 10 m.It should be noted that in the present work the algorithm and the database are not designed to take into account different reference speeds, but there are thoughts in the future to use some kind of similarity in the speed distributions.Finally, neutral atmospheric conditions were applied and there is no effect on the results.Stable and unstable atmospheric conditions will be examined in the future.
Table 1 presents in detail the discretization of the computational field where almost 22.5 million cells have been used.The selection of the grid was performed on the one hand to be computationally manageable and on the other to be close to the grid of the MUST experiment presented in the work [11].Recall that in the MUST experiment the horizontal dimensions of the field were approximately as in the present case (≈270 m) with a minimum cell size equal to 0.25 m in the horizontal and vertical direction.Moreover, regarding the ground boundary conditions, the lateral planes (inlet-outlet) for each of the 8 wind directions and the numerical methods, a similar strategy has been adopted as in the work [11].

Validation of the Algorithm
The algorithm was validated for the present case for an incoming wind direction equal to 22.5 • (non-existent in the database).The algorithm constructed the flow field using linear interpolation based on the flow fields of 0 • and 45 • .As we are dealing with hypothetical scenarios and there are no real measurements, an additional simulation for 22.5 • was performed to generate synthetic flow data.
The performance of the algorithm for the 22.5 • is presented in Figure 3 where, on the horizontal axis, the measurements of the synthetic simulation have been placed and, on the vertical axis, the values of the interpolation have been placed at the same measurement locations of the flow field (the velocity components u, v, w are presented).All data follow the ideal line 1 to 1, a fact that strengthens the good performance of the algorithm.

Validation of the Algorithm
The algorithm was validated for the present case for an incoming wind direction equal to 22.5° (non-existent in the database).The algorithm constructed the flow field using linear interpolation based on the flow fields of 0° and 45°.As we are dealing with hypothetical scenarios and there are no real measurements, an additional simulation for 22.5° was performed to generate synthetic flow data.
The performance of the algorithm for the 22.5° is presented in Figure 3 where, on the horizontal axis, the measurements of the synthetic simulation have been placed and, on the vertical axis, the values of the interpolation have been placed at the same measurement locations of the flow field (the velocity components u, v, w are presented).All data follow the ideal line 1 to 1, a fact that strengthens the good performance of the algorithm.The execution time of the algorithm for the case of 22.5° (includes the reading time of the two files from the database and the interpolation time in the desired degrees) was calculated equal to be 3.06 min.
Given the duration of the 22.5° simulation is approximately equal to 15 h in 160 computing cores, it is obvious that the present methodology can be applied efficiently for emergency situations.

The MUST Wind Tunnel Experiment
The correct operation of the algorithm presupposes that the computational fluid dynamics code accurately predicts the reality.For this reason, the code was validated with the data of the MUST wind tunnel experiment [12] given on a scale of the corresponding field experiment [13].
In the MUST experiment, the obstacles were placed in 12 rows, each consisting of 10 obstacles.The obstacles were almost similar and had length, width, and height equal to 12.2 m, 2.42 m, and 2.54 m respectively.The wind speeds were measured by the 3568 sensors presented in Section 3. It is noted that only the measurement data that were available to the authors (via the COST Action 732 database) are taken into account.The website The execution time of the algorithm for the case of 22.5 • (includes the reading time of the two files from the database and the interpolation time in the desired degrees) was calculated equal to be 3.06 min.
Given the duration of the 22.5 • simulation is approximately equal to 15 h in 160 computing cores, it is obvious that the present methodology can be applied efficiently for emergency situations.

The MUST Wind Tunnel Experiment
The correct operation of the algorithm presupposes that the computational fluid dynamics code accurately predicts the reality.For this reason, the code was validated with the data of the MUST wind tunnel experiment [12] given on a scale of the corresponding field experiment [13].
In the MUST experiment, the obstacles were placed in 12 rows, each consisting of 10 obstacles.The obstacles were almost similar and had length, width, and height equal to 12.2 m, 2.42 m, and 2.54 m respectively.The wind speeds were measured by the 3568 sensors presented in Section 3. It is noted that only the measurement data that were available to the authors (via the COST Action 732 database) are taken into account.The website for the COST Action 732 database is: https://mi-pub.cen.uni-hamburg.de/index.php?id=484 (accessed on 16 August 2021).
The wind tunnel measurements of the velocity components u, v and w were used to validate the numerical results of the hydrodynamic problem.Four sets of sensors were used corresponding to measurements in a coarse network, dense network, vertical profiles, and uw levels (Figure 4).
The wind tunnel measurements of the velocity components u, v and w were used to validate the numerical results of the hydrodynamic problem.Four sets of sensors were used corresponding to measurements in a coarse network, dense network, vertical profiles, and uw levels (Figure 4).

The Numerical Simulations
The size of the computational field is equal to 242.75 × 233.23 × 21.06 m on the x, y, and z axis respectively.The distance of the western boundary (left side of the field) from the first obstacle and the lateral boundaries from the obstacles is equal to 17.55 m (i.e., 5Hmax where Hmax = 3.51m is the height of the tallest building) and the distance of the eastern boundary from the last obstacle is equal to 52.65 m (15Hmax).The height of the field corresponds to 6 times the maximum height of the buildings.These dimensions agree with the proposals of COST Action 732 [14].
The same grid presented in Table 1 was used to discretize the field.The height of the cells near the ground satisfies the minimum grid analysis proposed in the work [15], i.e., 1/10 of the height of the building of 2.54 m (Figure 5).Therefore, the field among the buildings has cubic cells and then continuously expands with a factor of 1.1.In the horizontal directions, the dx and dy are kept constant (Figure 5) in the field of obstacles covering an area of 172.55 m × 198.13 m.Outside the obstacle area, the dx and dy extend by a factor of 1.1.

The Numerical Simulations
The size of the computational field is equal to 242.75 × 233.23 × 21.06 m on the x, y, and z axis respectively.The distance of the western boundary (left side of the field) from the first obstacle and the lateral boundaries from the obstacles is equal to 17.55 m (i.e., 5H max where H max = 3.51 m is the height of the tallest building) and the distance of the eastern boundary from the last obstacle is equal to 52.65 m (15H max ).The height of the field corresponds to 6 times the maximum height of the buildings.These dimensions agree with the proposals of COST Action 732 [14].
The same grid presented in Table 1 was used to discretize the field.The height of the cells near the ground satisfies the minimum grid analysis proposed in the work [15], i.e., 1/10 of the height of the building of 2.54 m (Figure 5).Therefore, the field among the buildings has cubic cells and then continuously expands with a factor of 1.1.In the horizontal directions, the dx and dy are kept constant (Figure 5) in the field of obstacles covering an area of 172.55 m × 198.13 m.Outside the obstacle area, the dx and dy extend by a factor of 1.1.For the LES simulations at the output of the flow a non-reflective boundary condition for the vertical velocity component was used as well as a zero-gradient boundary condition for the other velocity components.Wall functions for a rough wall were used on the surfaces of the buildings and the ground with a roughness length z0 equal to 10 −5 m.At the inlet and top plane, a zero value was used as the boundary condition for the velocity components v and w while the Langevin type boundary condition was used for the velocity component u.Finally, as initial conditions, the vertical profile of the velocity of the mean flow imposed on the inlet was used throughout the field.For the RANS simulations, the same boundary conditions were used as in the work [11].

Validation of the Hydrodynamic Problem
The validation metrics (VMs) provide a quantitative way of comparing model predictions and measurements.The VMs are very useful for validating a model especially in the case of a large amount of data.Various VMs are available and each one has its advantages and disadvantages [14].
In the present study, the hit rate (HR) was used.The use of HR for the validation of microclimatic models was proposed by COST Action 732 [14].The HR determines the fraction of the predictions that differ from the observations within an acceptable range given by the relative error D. The experimental uncertainty is taken into account with the parameter W, which expresses a "low value" limit.
The HR is calculated from the following equation: where n is the total number of data, P is the model predictions, and O is the corresponding experimental observations.The minimum value of HR is 0 and the maximum is 1, which corresponds to a perfect agreement with the experiment.The parameter W is equal to 0.064 for the velocity component u and 0.056 for the velocity components v and w.Table 2 presents the HR for the sensor groups presented in Figure 4.The number of sensors for each group is displayed in the parentheses.It is obvious that the results of RANS are similar to those of LES and except for component w the results of LES are slightly better.Moreover, the results of the component u which is the main component of the wind are better than the components v and w.Then the component v follows and finally the component w.According to COST Action 732, the acceptance criterion of HR is HR ≥ 0.66.It is observed that this criterion is satisfied for the horizontal components u and v for both methodologies (RANS and LES) and is not satisfied for the vertical component w.For the LES simulations at the output of the flow a non-reflective boundary condition for the vertical velocity component was used as well as a zero-gradient boundary condition for the other velocity components.Wall functions for a rough wall were used on the surfaces of the buildings and the ground with a roughness length z 0 equal to 10 −5 m.At the inlet and top plane, a zero value was used as the boundary condition for the velocity components v and w while the Langevin type boundary condition was used for the velocity component u.Finally, as initial conditions, the vertical profile of the velocity of the mean flow imposed on the inlet was used throughout the field.For the RANS simulations, the same boundary conditions were used as in the work [11].

Validation of the Hydrodynamic Problem
The validation metrics (VMs) provide a quantitative way of comparing model predictions and measurements.The VMs are very useful for validating a model especially in the case of a large amount of data.Various VMs are available and each one has its advantages and disadvantages [14].
In the present study, the hit rate (HR) was used.The use of HR for the validation of microclimatic models was proposed by COST Action 732 [14].The HR determines the fraction of the predictions that differ from the observations within an acceptable range given by the relative error D. The experimental uncertainty is taken into account with the parameter W, which expresses a "low value" limit.
The HR is calculated from the following equation: where n is the total number of data, P is the model predictions, and O is the corresponding experimental observations.The minimum value of HR is 0 and the maximum is 1, which corresponds to a perfect agreement with the experiment.The parameter W is equal to 0.064 for the velocity component u and 0.056 for the velocity components v and w.Table 2 presents the HR for the sensor groups presented in Figure 4.The number of sensors for each group is displayed in the parentheses.It is obvious that the results of RANS are similar to those of LES and except for component w the results of LES are slightly better.Moreover, the results of the component u which is the main component of the wind are better than the components v and w.Then the component v follows and finally the component w.According to COST Action 732, the acceptance criterion of HR is HR ≥ 0.66.It is observed that this criterion is satisfied for the horizontal components u and v for both methodologies (RANS and LES) and is not satisfied for the vertical component w.In the literature, various models have been compared using the MUST wind tunnel experiment.For example, in the work [16], the HR of eight models, for 498 points (xz level), for the velocity component u ranged from 0.63 to 0.91 while for the velocity component w ranged from 0.12 to 0.26.The HR of the same velocity components of the simulations of the present work is within or even better than these ranges, indicating consistency with the results obtained from the work [16] and the corresponding one of COST 732 [14].

Conclusions
In this work, an algorithm was developed to predict the wind speed in renewable energy environments.The algorithm is based on CFD model results while at the same time it is fast enough to be applied in emergency situations.A wind speed database is calculated and stored in the preparation phase using a CFD model for the desired computational field and for a number of incoming wind directions.In a real event, the algorithm either selects the appropriate wind fields from the database, if the incoming wind direction coincides with one of the existing ones in the database, or calculates the wind field by interpolating from the nearest wind directions in the database.The above procedure performed in the case of an event (i.e., acquisition of the wind field from the database, possible interpolation) is fast and suitable for application in emergency situations.
The test case used in this work to evaluate the algorithm is a computational field that includes part of the atmospheric surface layer.The wind fields were calculated for eight incoming wind directions covering the entire 360 • range.The CFD code ADREA-HF was used in this study to calculate the flow fields and the synthetic flow field of 22.5 • (not included in the precalculated database) as we treat hypothetical scenarios.The algorithm showed satisfactory operation.The solution was obtained in a short execution time (less than 5 min), which indicates the suitability of the algorithm for critical response.It should be noted that the present algorithm is new and is applied in this paper for the first time.Future efforts will be performed to achieve further results of applications of the algorithm in renewable energy environments.
Finally, the suitability of the CFD code was evaluated with additional simulations of the MUST wind tunnel experiment.The numerical results of two turbulence methodologies (RANS and LES) were compared with the respective experimental measurements of the velocity components u, v, and w.The validation metric HR is good and is satisfied in the case of components u and v.For the velocity w, the HR is better than the results of the literature.

Figure 1 .
Figure 1.Schematic representation of the algorithm for the prediction of the wind speeds.

Figure 1 .
Figure 1.Schematic representation of the algorithm for the prediction of the wind speeds.

Figure 2 .
Figure 2. The computational field that includes part of the atmospheric surface layer.The 3568 sensors are presented (yellow circles).

Figure 2 .
Figure 2. The computational field that includes part of the atmospheric surface layer.The 3568 sensors are presented (yellow circles).

Figure 3 .
Figure 3. Validation of the algorithm.

Figure 3 .
Figure 3. Validation of the algorithm.

Figure 4 .
Figure 4.The wind speed sensors (yellow circles) of the MUST wind tunnel experiment: (a) coarse network, (b) dense network, (c) vertical profiles, (d) uw levels.The 120 obstacles are also presented.

Figure 4 .
Figure 4.The wind speed sensors (yellow circles) of the MUST wind tunnel experiment: (a) coarse network, (b) dense network, (c) vertical profiles, (d) uw levels.The 120 obstacles are also presented.

Figure 5 .
Figure 5. Details of the grid: near the walls (left) and among the buildings (right).

Figure 5 .
Figure 5. Details of the grid: near the walls (left) and among the buildings (right).

Table 1 .
Size of the selected computer field and numerical grid.

Table 1 .
Size of the selected computer field and numerical grid.

Table 2 .
HR results for the sensor groups of Figure4for the velocity components u, v, w.