The growing number and growing size of wind energy projects coupled with the rapid growth in high-performance computing technology are driving researchers toward conducting large-scale simulations of the flow field surrounding entire wind farms. This requires highly parallel-efficient tools, given the large number of degrees of freedom involved in such simulations, and yields valuable insights into farm-scale physical phenomena, such as gravity wave interaction with the wind farm and farm–farm wake interactions. In the current study, we introduce the open-source, finite-volume, large-eddy simulation (LES) code TOSCA (Toolbox fOr Stratified Convective Atmospheres) and demonstrate its capabilities by simulating the flow around a finite-size wind farm immersed in a shallow, conventionally neutral boundary layer (CNBL), ultimately assessing gravity-wave-induced blockage effects. Turbulent inflow conditions are generated using a new hybrid off-line–concurrent-precursor method. Velocity is forced with a novel pressure controller that allows us to prescribe a desired average hub-height wind speed while avoiding inertial oscillations above the atmospheric boundary layer (ABL) caused by the Coriolis force, a known problem in wind farm LES studies. Moreover, to eliminate the dependency of the potential-temperature profile evolution on the code architecture observed in previous studies, we introduce a method that allows us to maintain the mean potential-temperature profile constant throughout the precursor simulation. Furthermore, we highlight that different codes do not predict the same velocity inside the boundary layer under geostrophic forcing owing to their intrinsically different numerical dissipation. The proposed methodology allows us to reduce such spread by ensuring that inflow conditions produced from different codes feature the same hub wind and thermal stratification, regardless of the adopted precursor run time. Finally, validation of actuator line and disk models, CNBL evolution, and velocity profiles inside a periodic wind farm is also presented to assess TOSCA’s ability to model large-scale wind farm flows accurately and with high parallel efficiency.

In 2018, Ørsted, a leading company in developing, constructing and operating offshore and onshore wind farms, concluded a project aimed at understanding the limits of models and processes used for wind energy forecasts. The investigation pointed out that blockage and wake effects are currently neglected and underestimated, respectively, when performing wind power predictions

Turbine-level induction has been researched for many years (

In industry, annual energy captures are made using low-cost but fast, often analytical, reduced-order wake models (

Reduced-order models need to be thoroughly validated, but comprehensive observation datasets are difficult to obtain. Numerical analyses, in particular large-eddy simulations (LESs), are able to provide such data, together with valuable insight into the physical processes. LES resolves the largest and most energetic turbulent eddies, while the smallest ones are modeled. Nevertheless, LES of large wind farms in the atmospheric boundary layer (ABL) is extremely challenging, given the breadth of scales involved, spanning from resolved turbulence eddies of a few meters to gravity waves characterized by wavelengths of several kilometers. To successfully tackle these problems, LES solvers must possess good parallel efficiency and an optimized code input–output (I/O), allowing them to operate on modern high-performance computing (HPC) architectures. Additionally, many numerical aspects have to be carefully treated, such as the coupling with mesoscale models

Several LES codes have been developed by the research community so far (see

For the aforementioned reasons, we have developed an open-source, finite-volume framework that is tailored for large-scale studies of wind-farm-induced gravity waves and cluster wake–atmosphere interaction, with the objective of

The present paper is organized as follows. First, in Sect.

TOSCA is a finite-volume code, formulated in generalized curvilinear coordinates, allowing it to also take as input non-Cartesian structured meshes. The present section is organized as follows. The governing equations in Cartesian coordinates are reported in Sect.

To provide a better flow of the paper, the numerical method, the governing equations in curvilinear coordinates actually solved in TOSCA and a brief overview of generalized curvilinear coordinates are reported in Appendix

An overview of TOSCA's parallel efficiency is given in Appendix

In order to run ABL simulations, we developed a novel methodology, described in Sect.

Governing equations correspond to mass and momentum conservation for an incompressible flow with Coriolis forces and Boussinesq approximation for the buoyancy term. The latter is calculated using the modified density

To represent wind turbines, different models have been implemented. In TOSCA, they are referred to as the actuator line model (ALM), actuator disk model (ADM) and uniform actuator disk (UAD) model. Following

The definition of the turbine point mesh and the evaluation of the point force are different depending on the specific model. In the ALM, each rotor blade is represented by a line of points, which are physically rotated at each iteration, making it an unsteady model. In the ADM and UAD model, the number of points in the azimuthal (tangential) direction is not equal to the number of blades, and it is usually set to a high value. For both the ALM and ADM, the point force is calculated exploiting the blade element momentum theory (BEM; see

This section reviews the current state of the art for velocity controllers in precursor simulations and presents a novel technique, which we refer to as geostrophic damping, which allows control of the hub-height velocity while avoiding inertial oscillations generated by the Coriolis force. Moreover, a simple temperature controller is also presented that maintains a constant average potential-temperature profile throughout the precursor simulation.

In the precursor simulation, the flow is usually driven by a uniform horizontal pressure gradient, which is related to the geostrophic wind components by the geostrophic balance at equilibrium:

On one hand, the pressure controller is more convenient for wind turbine simulations, as hub wind and direction can be directly specified. However, unlike the geostrophic controller, it does not provide knowledge of the geostrophic wind a priori, making it impossible to initialize the flow such that Eq. (

Nevertheless, being able to exactly define the wind speed and direction at a specified height is a desirable property of the pressure controller. For this reason, we developed a new methodology that allows us to remove these inertial oscillations, also enabling the use of the pressure controller in those cases where a steady-state geostrophic wind is preferred. First, we note that the system of Eq. (

We observed that the presence of these terms enhances the damping action, halving the exponent of the decay rate, characterized by an

When running precursor CNBL simulations, the predicted ABL height, as well as the final value of potential temperature at the ground, depends on the mixing history experienced inside the boundary layer. This is in turn affected by the specific LES setup and the type of discretization used. Moreover, the impact of such code details is made even more noticeable by the fact that these simulations usually run for a very long time (of the order of

Sketch of the hybrid off-line–concurrent-precursor method, including definition of boundary conditions (BCs).

In the present work, we propose to apply a potential-temperature controller in the precursor simulation so that the successor can be exactly run with the intended temperature profile. This could be beneficial for example when making comparisons between different codes, as it ensures that the successor background potential-temperature profile matches the precursor initial condition. In particular, we apply the following height-dependent source term on the right-hand side of Eq. (

Wind turbine wake recovery and thus power production are greatly influenced by background atmospheric turbulence. As a consequence, prescribing a physical turbulent inflow is necessary if real wind turbine operation is to be simulated. A commonly used approach is the so-called precursor–successor method

In order to spin up the wind farm simulation, we developed a three-step procedure (see Fig.

In TOSCA, we exploit the flexibility of the finite-volume formulation by combining the two techniques. In particular, we initialize the ABL on what we refer to as the off-line precursor domain, which can be arbitrarily defined in both the streamwise and the vertical directions. The only requirement is that the spanwise size of the successor is an exact multiple of the off-line precursor domain. When turbulence has reached a statistically steady state, we save flow slices of velocity and potential temperature from this domain into a so-called inflow database. After this first phase, the concurrent-precursor and successor simulations are started, and streamwise inflow–outflow boundary conditions are used in the former for one flow-through time. Inflow slices from the inflow database are periodized in the spanwise direction, while extrapolation is performed in the vertical direction. We note that it is extremely important that the flow above the inversion layer does not contain any periodic variations in time, as this would be noticed in the successor, at streamwise intervals equal to the concurrent-precursor domain length. For this reason, we average the off-line precursor data at the 10 highest cells and slowly merge the instantaneous data to this average across such an interval. This removes even the smallest periodic content in the flow above the boundary layer, which is now characterized by a truly constant geostrophic wind. For instance, we weight the average and instantaneous velocities using two hyperbolic weighting functions (Eq.

After the concurrent precursor has run for one flow-through time, the turbulent inflow has reached the outlet, and streamwise boundary conditions are switched to periodic. At this point, the simulation is self-sustained, and we run the precursor and successor simultaneously for one successor flow-through time so that gravity waves and wind turbine wakes are formed. For the simulation presented in Sect.

The drawback of such a method is that a spanwise periodicity is introduced into the concurrent-precursor and successor domains. If the Coriolis force is active, this can be broken everywhere except at hub height, where the flow is aligned with the

Nevertheless, the proposed hybrid method, sketched in Fig.

In this section, we validate the developed solver using three different benchmark cases. In Sect.

In this validation case, we perform two simulations of the NREL 5 MW reference wind turbine

Normalized wind speed deficit 1 D and 4 D behind a wind turbine represented by

For this case, the standard Smagorinsky model was used, where we set the

Wind turbine power as predicted by TOSCA and OpenFOAM for the ADM and ALM model. OpenFOAM data correspond to

The ADM matches well with results from

In this section, we validate TOSCA's ability to perform CNBL simulations by running two cases of a neutral boundary layer, developing against a stable background stratification with lapse rate of 1 and 10 K km

Vertical profiles averaged over the last simulation hour of, from top to bottom, velocity magnitude, wind angle, potential temperature and heat flux. The initial lapse rate is (left) 1 K km

Velocity and temperature fields are initialized with a constant and linear profile equal to the geostrophic velocity and background stratification, respectively. Furthermore, sinusoidal perturbations are added to the velocity profile, below 100 m, with an amplitude of

In Table

Quantitative ABL results from the two ABL simulations performed with different codes.

In addition, we note that simulations performed using SP-Wind consistently predict less mixing than other codes, which is confirmed by the lower absolute value of the minimum kinematic heat flux

In this section, we run the same infinite wind farm simulation as has been conducted in

The wind tunnel model used in the experiment by

The precursor is run for 100 s (corresponding to

In Fig.

Velocity profiles made non-dimensional with the hub-height velocity for rows 1, 4, 7 and 10, averaged over the three columns. For each row, the wake evolution is reported at 1, 2, 3 and 4 diameters downstream.

Profiles of streamwise fluctuations non-dimensionalized with hub-height velocity for rows 1, 4, 7 and 10, averaged over the three columns. For each row, the wake evolution is reported at 1, 2, 3 and 4 diameters downstream.

In Fig.

In this section, we present CNBL results obtained using the different velocity and temperature controllers described in Sect.

Velocity and potential-temperature controlling strategies for the cases presented in this section. Case S2 corresponds to

Following

Inputs for the

The model parameter

Comparison of results extracted from cases G, P and PT against data from

For this reason,

All three simulations are carried out for

As shown before in Sect.

ABL parameters obtained by fitting the

Figure

Figure

In this section, we present results from the simulation of a finite-size wind farm consisting of 100 NREL 5 MW wind turbines, aligned in 20 rows and 5 columns, with streamwise and spanwise spacing of 5 and 4.76 rotor diameters, respectively. We include thermal stratification to assess the effects of gravity wave blockage for a lapse rate of

Figure

Contours of instantaneous velocity

Regarding the instantaneous velocity field, streamwise streaks generated by elongated turbulence structures can be appreciated. The large size of these structures is related to the high value of the prescribed equivalent roughness height

At any given location, we define the perturbation value of a quantity as the difference between its successor time average and the precursor time average, evaluated at the same height. Figure

For instance, the two trains of waves generated by the positive and negative inversion layer displacements, at the wind farm entrance and exit, respectively, have a spanwise offset, resulting in a much more complex interaction. Moreover, spurious wave interactions with their periodic images can also be noticed, but the spanwise size of the domain ensures that they happen far from and downstream of the wind farm. Nevertheless, we are developing a lateral fringe region, which is aimed at removing this effect, where the instantaneous desired flow is reconstructed from the concurrent precursor, allowing for a smaller spanwise domain size. At this time, we do not believe wave interactions from periodic images alter the gravity wave pattern in the region near and upstream of the wind farm, which is of primary interest in order to assess wind farm blockage.

Figure

Overall, these results indicate that the developed framework and methodology allow for conducting finite-size wind farm simulations, capturing gravity wave effects unaltered by spurious wave reflections from the fringe region or interaction from periodic images.

In the present paper, we introduced TOSCA, a new open-source LES framework for the simulation of large wind farms interacting with thermally stratified boundary layers. We validated TOSCA's wind turbine models and its ability to simulate the evolution of conventionally neutral boundary layers and to accurately predict the flow around infinite wind farms in neutral conditions. We presented a new controlling methodology for ABL precursors that allows us to prescribe a desired wind speed at a reference height – located inside the boundary layer – while at the same time avoiding velocity oscillations produced by the Coriolis force in the geostrophic region above the inversion height. This approach, if combined with a potential-temperature controller, allows different codes to obtain CNBL inflow profiles that are characterized by the same potential-temperature profile and hub-height wind speed. Conversely, using geostrophic forcing makes the hub-height velocity dependent on the amount of numerical dissipation specific to the adopted code, while the final temperature profile depends on both numerical dissipation and precursor simulated time. We also described a new methodology for simulating finite-size wind farms under atmospheric gravity wave effects. In particular, we introduced the hybrid off-line precursor–concurrent-precursor method, where the off-line technique is used on a small domain, in order to spin up ABL turbulence, while the concurrent method is adopted for the turbine simulation. In fact, we found that the concurrent precursor, combined with a fringe region, is a crucial element to simultaneously avoid spurious gravity wave reflections and provide a time-resolved turbulent inflow. The off-line precursor data are used to start up the flow field in the concurrent precursor by means of spanwise periodization. The concurrent-precursor domain is usually bigger than required, as its size is determined by the successor domain that runs concurrently. Hence, being able to reach steady-state turbulent statistics on a smaller domain is indeed convenient, as it makes finite wind farm simulations less computationally intensive.

Finally, we demonstrated that TOSCA is able to simulate wind farm gravity wave interactions and large-scale blockage effects. Specifically, for the CNBL simulated herein, we measured a velocity reduction of 5.80 % at 2.5 diameters upstream of the first row.

In the future, we will implement shifted periodic boundary conditions to obtain field statistics which are less dependent on the spanwise location, and we will address the heat flux mismatch above the inversion layer.

The adoption of generalized curvilinear coordinates allows for the computational mesh to follow terrain coordinates if required or to be stretched and deformed with the only condition that the indexing remains structured. We denote a set of generalized curvilinear coordinates as

The use of generalized curvilinear coordinates allows differential operators on any structured mesh to be expressed using a Cartesian-like discretization along the curvilinear directions, which are chosen to be the local structured grid lines. Moreover, the quantities

Contravariant components of any vector field

Pressure–velocity coupling is provided using a second-order fractional step method similar to that of

To model the sub-grid stresses, TOSCA uses the dynamic Smagorinsky model

Regarding the potential-temperature equation, sub-grid fluxes are evaluated following the approach of

In this section, we describe in detail the setup of the finite wind farm case presented in Sect.

Mesh information for the finite wind farm case.

The size of the successor domain is 40 km

The wind farm has a rectangular planform, with 20 rows and 5 columns. The first row is located at

The concurrent-precursor mesh coincides with the portion of the successor domain which is located inside the fringe region. In particular, it is

In order to save computational resources, we do not run the whole precursor simulation on the concurrent-precursor mesh, whose size is determined by the wind farm and gravity wave parameters. Instead, we perform the spin-up phase on a

The off-line precursor simulation uses the pressure and temperature controllers described in Sect.

CNBL parameters used for the off-line precursor are summarized in Table

In Fig.

ABL parameters used for the finite wind farm simulation presented in this section.

Precursor inflow data, averaged from the concurrent-precursor domain from

Regarding the successor case, we followed the approach of

Fringe and advection damping region information.

We used the same damping functions as

In this section, we show TOSCA's strong and weak parallel performance by running CNBL simulations with an increasing number of Niagara nodes for three different mesh sizes. The simulation setup corresponds to the off-line precursor described in Appendix

Tests have been performed on Compute Canada's

We also highlight that the time per iteration does not reflect the actual speed at which the simulation advances in time, as the time step size depends on the numerical method. In implicit methods like the Newton–Krylov solvers employed by TOSCA, the computational cost of each time step depends on the time step size, whereas these quantities are unrelated in explicit methods. Nevertheless, implicit methods are able to advance in time with a Courant–Friedrichs–Lewy (CFL) number greater than 1 (we used 0.9 for these analyses), while explicit methods are usually limited to a value close to 0.5.

Regarding actuator models, their solution and I/O operations are also parallelized in TOSCA. Specifically, we define a sphere of cells, for each wind turbine, that contains all cells that the rotor can possibly intersect when yawing. Processors owning mesh cells belonging to the sphere are then grouped into turbine-specific sub-communicators, which are used to solve wind turbines simultaneously. Hence, provided that a sufficiently high core count is used, the wind turbine update time in TOSCA is independent of the number of wind turbines in the simulation, and each communicator can write turbine data to file simultaneously.

Scaling tests performed on the Niagara Compute Canada cluster, each node consists of 40 CPUs.

TOSCA strong scaling performance on Compute Canada's Niagara cluster. All simulations share the same setup and only differ in the number of mesh elements.

For the finite wind farm simulation presented in Sect.

TOSCA is available at

The dataset can be made available from the authors upon request.

Conceptualization: SS, DA, JB; methodology: SS; software: SS, AA; validation: SS; formal analysis: SS; investigation: SS; computational resources: JB; data curation: SS; writing – original draft preparation: SS; writing – review and editing: JB, DA; visualization: SS; supervision: JB, DA; project administration: JB; funding acquisition: JB. All authors have read and agreed to the published version of the paper.

The contact author has declared that none of the authors has any competing interests.

Publisher’s note: Copernicus Publications remains neutral with regard to jurisdictional claims made in the text, published maps, institutional affiliations, or any other geographical representation in this paper. While Copernicus Publications makes every effort to include appropriate place names, the final responsibility lies with the authors.

Computational resources provided by the Digital Research Alliance of Canada and Advanced Research Computing at the University of British Columbia are gratefully acknowledged.

This research has been supported by the Natural Sciences and Engineering Research Council of Canada (grant no. 556326).

This paper was edited by Sukanta Basu and reviewed by two anonymous referees.