<<

Conference Paper Energy-Related Atmospheric NREL/CP-500-48905 Boundary Layer Large-Eddy August 2010 Simulation Using OpenFOAM Preprint M.J. Churchfield and P.J. Moriarty National Renewable Energy Laboratory G. Vijayakumar and J.G. Brasseur The Pennsylvania State University

Presented at 19th Symposium on Boundary Layers and Turbulence Keystone, Colorado August 2-6, 2010

NOTICE

The submitted manuscript has been offered by an employee of the Alliance for Sustainable Energy, LLC (ASE), a contractor of the US Government under Contract No. DE-AC36-08-GO28308. Accordingly, the US Government and ASE retain a nonexclusive royalty-free license to publish or reproduce the published form of this contribution, or allow others to do so, for US Government purposes. This report was prepared as an account of work sponsored by an agency of the United States government. Neither the United States government nor any agency thereof, nor any of their employees, makes any warranty, express or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately owned rights. Reference herein to any specific commercial product, process, or service by trade name, trademark, manufacturer, or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States government or any agency thereof. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States government or any agency thereof.

Available electronically at http://www.osti.gov/bridge

Available for a processing fee to U.S. Department of Energy and its contractors, in paper, from: U.S. Department of Energy Office of Scientific and Technical Information P.O. Box 62 Oak Ridge, TN 37831-0062 phone: 865.576.8401 fax: 865.576.5728 email: mailto:[email protected]

Available for sale to the public, in paper, from: U.S. Department of Commerce National Technical Information Service 5285 Port Royal Road Springfield, VA 22161 phone: 800.553.6847 fax: 703.605.6900 email: [email protected] online ordering: http://www.ntis.gov/ordering.htm

Printed on paper containing at least 50% wastepaper, including 20% postconsumer waste 1B.6 WIND ENERGY-RELATED ATMOSPHERIC BOUNDARY LAYER LARGE-EDDY SIMULATION USING OpenFOAM

Matthew J. Churchfield∗ National Wind Technology Center, National Renewable Energy Laboratory, Golden, Colorado

Ganesh Vijayakumar Department of Mechanical and Nuclear Engineering, The Pennsylvania State University, University Park, Pennsylvania

James G. Brasseur Department of Mechanical and Nuclear Engineering, The Pennsylvania State University, University Park, Pennsylvania

Patrick J. Moriarty National Wind Technology Center, National Renewable Energy Laboratory, Golden, Colorado

1. INTRODUCTION pare energy spectra and isosurfaces depicting ABL structure to the LESs of Khanna and Brasseur (1998), The purpose of the current work is to develop and which were also computed using the algorithm of Mo- evaluate the performance of a large-eddy simulation eng (1984). In developing and testing our LES code, (LES) solver in computing the atmospheric boundary we will make use of a recent analysis (Brasseur and layer (ABL) over flat terrain under a variety of sta- Wei 2010) that explains the well-known inability for bility conditions, ranging from shear driven (neutral LES to properly predict law-of-the-wall scaling and pro- stratification) to moderately convective (unstable strat- vides a design methodology to avoid this pathology. ification). This colocated, unstructured, finite-volume solver is developed using the OpenFOAM framework. Only a few researchers have performed LESs of Although, to our knowledge, OpenFOAM has never wind farm flows. Examples include the work of Ivanell been used to perform LESs, its flexible, open source, (2009), Calaf et al. (2010), and Stovall et al. (2010) and parallel nature combined with its availability at no (Stovall used an OpenFOAM-based solver), but all of cost, make it an ideal choice for this application. Data these works are limited to neutrally-stratified condi- from our ABL simulations, like those presented in this tions. The wind farm LES framework of Porté-Angel work, will be used in our future work as precursors for et al. (Porté-Agel et al. 2010; Conzemius et al. 2010) LESs of flow through wind farms consisting of multi- is clearly capable of simulation in a variety of stability megawatt wind turbines. conditions, though. Over the past four decades, the atmospheric com- The eventual goal of our work is to perform wind- munity has done much work using LES (in many cases farm LESs that will provide a better understanding of with a pseudo-spectral solver) to accurately simulate both the interactions of wind turbine wakes with one the ABL. A few examples include the work of Dear- another and with the surrounding ABL. Current utility- dorff (1972), Moeng and Sullivan (1994), Mason and scale wind turbines have tower heights of 80 m to Brown (1999), Khanna and Brasseur (1998), and Cui- 100 m and rotor diameters of 70 m to 120 m. At jpers and Duynkerke (1993). An objective of our work these tower heights and with such large rotor diam- is to use that knowledge to create an OpenFOAM- eters, utility-scale wind turbine blades can often cover based solver that can perform simulations with the the entire atmospheric surface layer, which contains same accuracy as that achieved by the atmospheric the highest levels of shear in the mean wind. This community. To assess our solvers’ performance, we means that turbine rotor blades experience substan- mainly compared our results to the LESs performed by tial cyclic loading as they rotate. Additionally, each Moeng and Sullivan (1994) because their LES code, turbine in a wind farm creates a wake that can affect which is outlined by Moeng (1984), is well proven, their the performance and mechanical loads of the wind tur- simulations are of a smaller grid size that is ideal for bines downstream. Turbine wakes interact with each this initial validation study, and the simulations are all other and are significantly affected by the stability con- windy while ranging from neutral to unstable, which dition of the surrounding ABL. For example, according is of interest in wind-farm modeling. We also com- to Jensen (2007), power output data from the Horns Rev Offshore Wind Farm, which is an 8 by 10 array of 2-MW turbines in the North Sea 14 km off the Danish ∗Corresponding author address: Matthew J. Churchfield, National coast, shows that in a stable ABL, the farm’s efficiency Renewable Energy Laboratory, 1617 Cole Boulevard, Golden, Col- is 61%; in an unstable ABL, the farm’s efficiency dra- orado 80401; e-mail: matt.churchfi[email protected]. matically increases to 74%. This is because an un-

1 stable ABL contains more turbulent kinetic energy that specified mean geostrophic wind, ¯ is the resolved vir- has a greater potential to replace the low-momentum tual potential temperature, ¯0 is the reference virtual air within a turbine’s wake with higher-momentum sur- potential temperature, ijk is the alternating symbol, rounding air through turbulent mixing. Consequently, f c is the Coriolis parameter, and the subscripts 1, 2, in the unstable condition, the downstream rows of tur- and 3 refer to the x-, y-, and z-directions, respectively. bines are fed higher-momentum air than in the sta- ¯0 is set to the initial virtual potential temperature be- ble condition, resulting in increased wind farm perfor- low the capping inversion of 300 K, gravity is set to 2 mance. However, according to Wharton and Lundquist gi = ( 9.81, 0, 0) m/s , and the Coriolis parameter (2010), in the absence of wakes, turbines perform is set to− a typical mid-latitude value of 1.028 10−4 more efficiently in stable conditions. s−1. The Boussinesq approximation for buoyancy× is Many aerodynamic and atmospheric phenomena included through the fifth term on the right-hand side occur within large wind farms that are not well under- of Equation 1. stood. This lack of understanding is reflected by the The filtered continuity equation is fact that wind farm developers consistently overpredict the performance of large modern wind farms by 5% or ∂u¯ j = 0, (2) more (Johnson 2008). This lower performance can re- ∂xj sult in millions of dollars less revenue generated than expected over the farm’s lifetime. Poor wake and at- and the filtered transport equation for virtual potential mospheric modeling is cited as one of the reasons for temperature is this overprediction. Developers currently use tools de- ¯ veloped in the 1980s and early 1990s, like that of Katic ∂ ∂ ∂Rj = u¯j ¯ , (3) et al. (1986) when wind turbines were much smaller, ∂t −∂xj − ∂xj that are simpler and less computationally-expensive  than computational fluid dynamics (CFD). A clearer where Rj is the SGS potential temperature flux vec- understanding of the and atmospheric tor. physics within large wind farms would allow for the cre- ation of more accurate, lower-order wind farm planning 2.2 SUB-GRID-SCALE MODELING and design tools. LES has the potential to provide an accurate, highly-resolved description of the flow field The deviatoric SGS stress tensor found in the mo- through a wind farm. However, much work remains to mentum equation (Equation 1) is modeled using be done to establish a set of “best practices” for per- D SGS ¯ forming wind-farm-scale LES. This involves the ability Rij =  Sij , (4) − to perform accurate LESs of canonical ABL flows, the subject of this paper. where SGS is the SGS viscosity, and

1 ∂u¯i ∂u¯j S¯ij = + (5) 2. FLOW PHYSICS EQUATIONS AND MODELING 2 ∂xj ∂xi  2.1 FILTERED GOVERNING EQUATIONS is the resolved strain-rate tensor. The SGS temper- ature flux vector found in the temperature equation The filtered incompressible Navier-Stokes equations (Equation 3) is modeled using within a rotating frame of reference are used to per- form these simulations. The momentum equation is SGS ∂¯ Rj = t , (6) D − ÈÖ ∂xj ∂u¯i ∂ ∂Rij ∂p˜ = (¯uj u¯i) (1) t ∂t −∂xj − ∂xj − ∂xi where ÈÖ is the turbulent Prandtl number. In this case, t d ¯ ÈÖ = 1/3, although this should be modified in the fu- ∂p˜  c + 1 gi + ij3f u¯j , ture to follow the approach of Moeng (1984) in which ∂x ¯0 t −  i   −   ÈÖ is generally 1/3 but adjusted based on the sur- rounding temperature stratification. where, u¯i is the resolved Cartesian velocity field, D SGS viscosity is modeled using the Smagorinsky Rij = Rij Rkkij /3 is the deviatoric part of the − (1963) model sub-grid-scale (SGS) stress tensor and Rij is the SGS 0 stress tensor, p˜ =p/ ¯ + Rkk/3 giℎ is the deviation 1 − SGS 2 2 of the resolved pressure from hydrostatic plus the con-  = (CsΔ) 2S¯ij S¯ij , (7) tribution from the SGS energy all normalized by the 1  0 3 density,  is the density, gi is the gravity vector, ℎ is where Δ = (ΔxΔyΔz) is the grid scale and Cs is d height above the surface, (∂p/∂x˜ i) is a spatially con- the model constant, which is set to OpenFOAM’s de- stant driving pressure gradient term used to achieve a fault value of 0.168.

2 2.3 BOUNDARY CONDITIONS 3. NUMERICAL METHOD

The conditions on the upper boundary are as fol- 3.1 THE OpenFOAM FRAMEWORK lows: the temperature gradient is specified to be that of the initial capping inversion profile; the velocity nor- OpenFOAM (Ope 2009b,a), an acronym for Open- mal to the boundary and the gradient of the velocity source Field Operations And Manipulations, is a col- parallel to the boundary are zero; the pressure gradi- lection of C++ libraries for solving complex physics ent is obtained from the momentum equation normal problems using the unstructured, colocated, finite- to the boundary; and the gradient of SGS viscosity is volume formulation. It is not a dedicated CFD solver, zero (a boundary condition on SGS viscosity is used but rather a finite-volume toolbox or framework from to indirectly specify the boundary condition of stress which one can more easily create a solver and bound- for the reasons discussed in Section 3.3). ary conditions than if starting from scratch. It is this versatility that led us to use OpenFOAM. We have At the lower boundary, the temperature flux is pre- used version 1.6 in this work. scribed, the pressure gradient is again obtained from the momentum equation normal to the boundary, and OpenFOAM volume integrates the equations it the boundary normal velocity is zero. In the more com- solves and makes use of Gauss’ theorem wherever monly seen ABL codes in which the variables are stag- possible to convert volume integrals to surface inte- gered, there is no need to specify velocity parallel to grals. It therefore requires not only cell-centered val- the lower boundary. However, in this colocated code, a ues of quantities, but also face-centered values. The horizontal velocity at the lower boundary is necessary values of quantities on faces are approximated as con- solely to compute velocity gradients at the cell centers stant over the face, which limits the solver to second- immediately adjacent to this boundary. This velocity order spatial accuracy. OpenFOAM included many gradient is necessary for computing the SGS stress methods for interpolation of quantities from cell centers tensor and SGS viscosity. The Monin-Obukhov sim- to cell faces, ranging from simple upwind and linear in- ilarity law (Etling 1996, 400–402) involving the mean terpolation to more sophisticated total variation dimin- velocity gradient is applied locally at each of these ishing (TVD) schemes. In this work, all interpolation to cell centers to calculate local values of desired veloc- cell faces is linear, which is equivalent to second-order ity gradient. Then, a velocity is applied at the lower central differencing on uniform meshes. Gradients of boundary face of each of these cells so that the numer- quantities, though, should be directly computed on cell ical gradient operation recovers the desired cell center faces, which is crucial in implementing the method of Rhie and Chow (1983) used to compute velocity fluxes velocity gradient. In this study, friction velocity, u∗, is specified. It is much more common, though, to spec- through cell faces to avoid the pressure-velocity de- coupling that occurs with incompressible flow solvers ify surface roughness, z0, as in Paulson (1970). We using colocated variables. specified u∗ rather than z0 since Moeng and Sullivan (1994) did not list the value of z0 specified in their sim- Although OpenFOAM is a toolbox, its source distri- ulations to which we compared our results, but they bution includes a variety of solvers for various types of did give the value of u∗ characteristic of each of their flow, including incompressible flow. OpenFOAM runs simulations at the final time. In this way, we achieve in a Linux environment and is parallelized using the the same values of u∗ as Moeng and Sullivan (1994) Message Passing Interface (MPI). Because it is an un- without iterating on a value of z0 that recovers the de- structured solver, the solution matrices resulting from sired u∗. (In future simulations, though, we desire to implicit discretization are sparse, but not necessarily specify z0 as did Moeng and Sullivan (1994)). organized, so conjugate-gradient Krylov-subspace or multigrid solvers with the option for preconditioning are At the surface, z = 0, we apply the model of Schu- included in OpenFOAM. mann (1975) to compute the total wall surface shear stress vector 3.2 THE PISO SOLUTION ALGORITHM D 2 u¯1(x, y, z1) R13w = u∗ (8) Many of the incompressible solvers included with − S(z1) the OpenFOAM distribution are based on the PISO D 2 u¯2(x, y, z1) (Pressure-Implicit with Splitting of Operations) algo- R23w = u∗ , (9) − S(z1) rithm (Issa 1985). We used these solvers as a guide to create our LES solver for ABL flows. The basic idea where the subscript w refers to quantities at the of this algorithm is to solve the momentum equation lower boundary and S(z1) is the magnitude of the (Equation 1) such that the velocity vector and pres- horizontally-averaged velocity vector (mean wind) at sure are treated implicitly in time to make the numerical the first grid level. Section 3.3 explains how this sur- scheme more stable. However, in our solver, the buoy- face stress is applied within our solver. ant term, the SGS viscosity, and the Coriolis terms The boundary conditions for all quantities are peri- are treated explicitly. Following the other OpenFOAM odic in the horizontal directions. PISO solvers, we numerically formulated the convec-

3 tive term of the momentum equation (the first term on vergence operator used in the continuity equation to the right-hand side of Equation 1) by making the ve- Equation 14 results in a Poisson equation for the first

locity flux, f = Sjf u¯j f , explicit in time, where the corrected pressure subscript f denotes linear∣ interpolation of a quantity   − ∗∗  − ∗ to cell face f from the cell center, and Sjf is cell face 1 1 A p˜ = A Hi . (15) f’s surface normal vector. In the finite-volume formu- xi xi  xi lation, the convective term is numerically integrated as  follows, The second velocity corrector is

∂ ∗∗∗  ∗∗∗ ∗∗ (16) (¯uj u¯i) dV Sjf u¯j f u¯i f = f u¯i f , Au¯i = p˜ + Hi , Z ∂xj ≈ ∣ ∣ ∣ −xi V Xf Xf (10) and the second pressure corrector is and is treated in time as   −1 ∗∗∗  −1 ∗∗ n n+1 A p˜ = A H . (17)  u¯i , (11) i f ∣f xi xi  xi Xf  Crank-Nicholson time advancement is used for where n and n + 1 are the old and new time levels, re- the implicit velocity predictor, shown in Equation 13, spectively. The PISO algorithm then attempts to solve which is solved using a diagonal incomplete LU- the linear system preconditioned bi-conjugate gradient solver. The pressure Poisson corrector shown in Equa- n+1  n+1 Cu¯i + p˜ = ri, (12) tion 15 is then solved. Here, a method like that xi used by Rhie and Chow (1983) to compute velocity where C is the resulting left-hand side matrix result- fluxes at cell faces (as opposed to simply interpolat- ing cell centered values of velocity to the faces) and ing from implicit time treatment, the /xi operator denotes the numerical approximation for the gradi- a compact Laplacian stencil are necessary to avoid pressure-velocity decoupling as seen with pressure- ent, and ri are any explicit right-hand side terms. Of course, the solution of Equation 12 would require the bases solvers in which the variables are colocated on simultaneous solution of the momentum equation and the mesh. Rhie-Chow interpolation is implemented by −1 ∗ pressure equation, which enforces continuity, presum- first computing the quantity A Hi , and then linearly ably by some iterative method. The PISO algorithm re- interpolating it to the cell faces. In effect, the velocity moves the need for iteration by first predicting the mo- flux without the influence of the pressure gradient has been computed, which we will call −˜ . mentum equation with velocity treated implicitly in time p∣f but with pressure treated explicitly. Then, a series of The discrete divergence operator of the continuity corrector steps occur in which the pressure equation equation applied on the right-hand side of Equation −1 ∗ is solved and the velocity is corrected explicitly. The 15 uses the face values of A Hi which is the quan- original implicit momentum equation is then satisfied tity −p˜ f that has just been computed. The discrete ∣ to second-order accuracy after two corrector steps. divergence operator of the continuity equation is also applied to the discrete gradient operator acting on the The predictor step solves the following implicit linear pressure found in left-hand side of Equation 15. This system successive application of discrete operators would first compute the pressure gradient at the cell centers and ∗ ∗ ′ ∗  n Cu¯ = Au¯ + H u¯ = p˜ + ri, (13) interpolate them to the cell faces, and then difference i i i −x i those cell face gradients. As a result, the stencil where A is a matrix containing the diagonal terms of only includes every other cell center value of pressure, C, H′ is the matrix containing the off-diagonal terms which aides in the pressure-velocity decoupling pro- of C, and denotes the predicted quantity. cess. ∗ To circumvent this problem, the left-hand side term The first corrector step solves the explicit linear sys- of Equation 15 is evaluated by finding the pressure tem gradient at the cell faces directly using the cell cen- ∗∗  ∗∗ ′ ∗  ∗∗ ∗ ter values of pressure, rather than interpolating the cell Au¯i = p˜ +ri H u¯i = p˜ +Hi , (14) center values of gradient of pressure. This introduces −xi − −xi an inconsistency in the treatment of the gradient op- ∗ ′ ∗ where Hi = ri H u¯i and denotes the first cor- erators in the momentum and pressure equations, but rected quantities.− To correct∗∗ the velocity field, the according to Ferziger and Peric´ (2002, p. 200), the er- first corrected pressure field must be solved first us- ror introduced is of the same magnitude of the basic ing the discrete continuity equation, which states that discretization and does not add significantly to the dis- ∗∗ /xi (¯ui ) = 0. Applying the same numerical di- cretization error. However, the scheme is not able to

4 conserve energy that may cause instabilities, though dient at cell faces directly, rather than evaluating them we have not observed instabilities of this sort. at cell centers and interpolating to the faces, and then Once Equation 15 for the pressure corrector is iter- applying the divergence operator directly to them. This atively solved using a diagonal incomplete Cholesky- discretization method results in a stencil of Δx rather preconditioned conjugate gradient solver, the contribu- than 2Δx and eliminates the checker-board instabili- tion to the velocity flux by the surface normal pres- ties; however, it limits the solver to SGS stress models

sure gradient, +˜p f = (p/x˜ i) Sif , which is di- based on the relationship in Equation 4. rectly computed at∣ the cell faces, is subtracted from As discussed in Section 2.3, we use the model of −˜ resulting in the actual velocity flux at the face, Schumann (1975) to compute surface shear stress p∣f f = −p˜ f +˜p f . This completes the Rhie-Chow vector, but as Equation 19 shows, stress does not di- interpolation.∣ − ∣ rectly enter the equations that are solved numerically. The cell-centered p/x˜ i is then reconstructed from By transforming (at each cell adjacent to the lower the surface normal pressure gradient using boundary) into a coordinate system that lies in the bot- tom boundary plane and that is aligned with the local −1 2 resolved velocity at the cell-center height, z1, and then  Sif Sif p˜ = +˜p f ⎛ ⎞ , (18) equating the right-hand sides of Equations 4 and 9, xi ∣ Si ⋅ Si Xf ∣ f ∣ Xf ∣ f ∣ the following results: ⎝ ⎠ ¯ ¯ where S2 is an element-wise squaring of the cell face SGS ∂U 2 U(x, y, z1) if  = u∗ , (20)  ∂z  S(z1) normal vectors. w

Last, the cell-centered velocity is computed using ∗ −1 ∗ −1 where U¯ = u¯i is the magnitude of the resolved ve- u¯i = A Hi A p/x˜ i. Issa (1985) states that ∣ ∣ two∗ corrector steps− are necessary to approximate the locity vector. Because we have to apply a bound- solution of Equation 12 to second-order accuracy in ary condition on velocity at the lower surface as dis- time, which is the same as the order of accuracy of cussed in Section 2.3, a one-sided difference can be used to compute a value for ∂U/∂z¯ (x, y) at each the Crank-Nicholson time advancement used in that ∣w equation. cell face adjacent to the lower boundary. Then a value SGS At this point, Equations 3 and 7 for resolved poten- of w (x, y) can be chosen such that the product of SGS ¯ tial temperature and SGS viscosity, respectively, are w (x, y) and ∂U/∂z(x, y) is as specified by Schu- mann’s surface stress model as formulated in Equa- solved. The convective term of the temperature equa- SGS tion 20. It is not important that the values of w tion is now linear because the velocity at time step n+1 ¯ is already known, and the equation is solved implic- and ∂U/∂z w(x, y) be accurate on their own, but their product must∣ equal the surface stress of Schumann’s itly with Crank-Nicholson time advancement. The re- SGS model. In this way, w (x, y) is used as a lower sulting system of equations is iteratively solved using SGS a diagonal incomplete LU-preconditioned bi-conjugate boundary condition for  such that, indirectly, our gradient solver. stress term, given on the right-hand side of Equation 19, recovers the desired surface stress. Consistent 3.3 IMPLEMENTATION OF THE STRESS TERM with staggered grid boundary layer methods (Moeng 1984), we do not apply no slip to u¯i at the surface. The SGS stress term in Equation 1 (the second term Instead, we have derived an equation for (¯ui)w con- on right-hand side) should not be differenced using the sistent with the staggered grid formulation. D numerical operation /xj Rij . The resulting stencil uses the velocity at every other cell on a uniform mesh, which causes an undesirable “checker-board” velocity 4. CASES SIMULATED instability to arise. Instead, the SGS stress term can be recast by inserting the linear relationship between The four cases simulated range from completely the SGS viscosity and the resolved strain-rate of Equa- shear driven to moderately convective, and corre- tion 4 resulting in spond to those simulated by Moeng and Sullivan (1994) (which we will refer to as MS94 from this point ∂ D ∂ SGS ∂u¯i Rij =  (19) forward). All cases are windy (no completely buoy- ∂xj −∂xj  ∂xj  ant cases), which are of interest in wind-farm model- ∂ SGS ∂u¯j 2 ∂u¯k ing. Differences between our simulations and those  ij , − ∂xj   ∂xi − 3 ∂xk  of MS94 include the use of a finite-volume solver ver- sus their pseudo-spectral one, use of the Smagorinsky where ij is the Kronecker delta. The dominant term model instead of their one-equation SGS model, use of this formulation is the first one on the right-hand of the surface stress model of Schumann (1975) ver- side. It is differenced much like the Laplacian in the sus that of Moeng (1984), a less sophisticated formu- pressure equation by first evaluating the velocity gra- lation of Prt, and a different number of computational

5 Table 1. A description of the cases simulated.

Dx(Dy) Dz Qs u∗ Ug Tnom Name (km) (km) (K m/s) (m/s) (m/s) (s) ⋅ B 5 2 0.24 0.56 10.0 9000 S 3 1 0.00 0.50 15.0 15225 SB1 3 1 0.05 0.59 15.0 9300 SB2 3 1 0.03 0.56 15.0 10000

mesh volumes. We also do not include dealiasing by and averaged in time. Instantaneous slices or isocon- truncation as done in pseudo-spectral codes. Eventu- tours, however, were taken only at the stated end time. ally, changes can be made to our code to make a more direct comparison. 5.1 STATISTICS Table 1 outlines the four cases run. D , D , and x y Various statistics for each of our simulations are pre- Dz are the streamwise, spanwise, and vertical dimen- sions of the domains, Q is the specified surface po- sented in Table 2 along with the statistics of MS94’s s simulations. The percent difference between our tential temperature flux, u∗ is the friction velocity, Ug is the geostrophic wind at the top of the domain, and statistics and those of MS94 are shown at the bot- tom of the table. The statistics shown are the convec- Tnom is the time at which we begin to save data for our analysis. The geostrophic wind is maintained through tive velocity, w∗; the ABL height defined as the height the adjustment of the driving pressure gradient of the of the maximum negative temperature flux due to the momentum equation (Equation 1). In all cases, we use capping inversion, zi; the stability parameter, zi/L, where L is the Obukov length; the large-eddy turnover− a mesh of Nx Ny Nz = 160 160 128, whereas MS94 used 96× grid points× in all directions× × for all cases. time, ∗; the virtual potential temperature flux at the top of the ABL, ′ ′ ; the horizontally-averaged As discussed in Section 2.3, because MS94 did not w  zi wind speed at the⟨ height⟩ of MS94’s first grid level, list the roughness height, z0, prescribed in their simu- S(z1); the horizontally-averaged difference in temper- lations but do give the resulting values of u∗ at the end of their simulations, we directly prescribe these values ature between the surface and the height of MS94’s first grid level, Δ(z1); and the turbulent kinetic energy of u∗ listed for each of MS94’s corresponding cases. at a standard turbine hub height of = 80 m, . All cases have an initial temperature field contain- z k(z80) The convective velocity is defined as ing a capping inversion. The virtual potential tempera- ture is 300 K up to an initial capping inversion height, g 1/3 w∗ = Q z , (21) zi0 , and then it increases linearly by 8 K over the next ¯0 s i 83 m (or 167 m in case B) followed by an increase of   0.003 K/m to the top of the domain. The initial capping where g is the magnitude of the gravity vector. The inversion height is 468 m (937 m in case B). The ini- Obuhkov length is tial velocity field is perturbed in a divergence-free way 0 3 (de Villiers 2006, p. 163) only near the lower bound- ¯ u∗ L = , (22) ary in order to initiate turbulence in the solution. In all −gQs cases, the time step is 0.25 s, which corresponds to a maximum Courant-Friedrichs-Lewy (CFL) number of where  is the von Kármán constant, which is taken roughly 0.23 except for case B in which the maximum as 0.4. For the shear-driven case, ∗ = zi/u∗, but for CFL number is 0.10. all other cases in which convection is present, ∗ = zi/w∗. Table 2 shows that our shear-driven simulation S 5. RESULTS has the largest percent difference between that of MS94. Interestingly, the ABL height predicted in this To compare our work with that of MS94, we saved work is much lower than that predicted by MS94 for data beginning at MS94’s stated simulation end times simulation S. This occurs because, in our simulation S, for the next 1000 s every 200 s. These end times are the fairly sharp transition in the initial temperature pro- 9300 s, 15225 s, 9000 s, and 10000 s for cases B, file at the start of the capping inversion is smoothed S, SB1, and SB2, respectively. For example, in case with time as shown in Figure 1. In effect, the height SB2, data were saved at 10 000 s, 10 200 s, 10 400 of the start of the capping inversion is decreased with s, 10600 s, 10800 s, and 11000 s. Using these time, which lowers the top of the ABL with time and data, we created vertical profiles from both horizontal causes a 33.8% difference between our simulation’s averages and time averages. We also created two- height and that of MS94. This, in effect, causes a dimensional variance spectra at various vertical levels large difference in predicted large-eddy turnover time.

6 Table 2. Internal parameters of the current simulations and those of Moeng and Sullivan (1994) at the final simulation times stated by Moeng and Sullivan. Also included are the percent differences between our data and Moeng and Sullivan’s data. ′ ′ ¯ w∗ zi zi/L ∗ w  zi S(z1)Δ(z1) k(z80) Name (m/s) (m)− (m) (s) (K⟨ - m/s)⟩ (m/s) (K) (m/s)2 B 1.99 1008 18 506 -0.036 6.2 0.30 2.99 Current S 0 324.2 0 633 -0.014 4.5 0 0.77 Work SB1 0.88 425.8 1.3 475 -0.020 5.7 0.06 1.07 SB2 0.73 371.1 0.9 541 -0.014 5.5 0.04 0.94 B 2.02 1030 18 510 -0.040 5.1 2.8 Moengand S 0 478 0 956 -0.007 8.7 0 Sullivan(1994) SB1 0.94 498 1.6 530 -0.020 8.1 0.5 SB2 0.79 493 1.4 624 -0.016 8.2 0.3 B 1.36 2.1 0.1 1 8.400 21.7 89.2 Percent S 0 33.8 0 34 93.714 48.0 0 Difference SB1 6.29 16.1 16.8 10 0.950 29.4 87.8 SB2 7.75 20.0 37.0 13 12.313 33.1 87.0

This significant difference between our simulation and theirs may be linked to the fact that we set the turbulent Prandtl number, Prt, to 1/3, whereas MS94 use a Prt that is sensitized to positive temperature stratification to account for the small mixing length in stable regions, as occurs in the capping inversion. Our value of the turbulent Prandtl number, which is part of the poten- tial temperature equation’s diffusion term coefficient 1000 (see Equations 3 and 6), seems to cause too much sub-grid-scale mixing of temperature in the inversion 900 possibly causing the strong smoothing of the temper- ature profile. One would then suspect that MS94’s 800 LES code maintains the capping inversion profile bet- ter than our current code. Possibly related is the fact 700 that the potential temperature flux predicted at the in- 600 version height in simulation S is about twice as great as that predicted by MS94. 500

The statistics predicted for the buoyant simulation z (m) B compare best overall to the corresponding statistics 400 predicted by MS94. The degree to which the com- 300 bined shear- and buoyancy-driven simulations’ statis- tics compare to MS94’s statistics lie somewhere in be- 200 tween those for simulations S and B. In fact, simula- tion SB2, which is more similar to the poorly perform- 100 ing simulation S, has a larger percent difference from 0 MS94 than does simulation SB1. 295 300 305 310 Interestingly, our predicted values of S(z1) do not 〈θ〉 (K) compare well to those of MS94. S(z1) for simulation Fig. 1. Vertical profiles of horizontally-averaged potential temper- B is higher than that predicted by MS94, and S(z1) for ¯ the other cases was predicted to be lower than those ature, ⟨⟩, at various times. The arrows indicate the direction of evolution of the profile with time. of MS94. This discrepancy may be caused by the fact that we used the stress model of Schumann (1975) at the lower boundary, but MS94 used the nonlinear model of Moeng (1984). Also of concern is that our predicted differences in temperature between the sur- face and the height of MS94’s first grid level are about an order of magnitude smaller than those predicted by MS94 for an unknown reason.

7 One can see that as the amount of surface temper- Figure 4 shows plots of resolved vertical momentum ature flux is increased, the amount of turbulent kinetic fluxes and comparison to MS94 is provided for simula- energy that a turbine will encounter also increases. tions S and B. The MS94 data are of total vertical mo- Furthermore, the increased turbulent kinetic energy mentum flux; therefore, their profiles do not approach will greatly affect the recovery length of the wind tur- zero near the ground, whereas our profiles do because bines’ wakes and, therefore, the overall wind farm per- we do not include the sub-grid-scale contribution to the formance. momentum flux. Again, both cases agree qualitatively well, but there are some discrepancies in magnitude, 5.2 VERTICAL PROFILES which are more prevalent in case S. This may be be- cause we are comparing resolved and total fluxes. The Figure 2 compares horizontally-averaged velocity momentum flux profiles from simulation B best match profiles normalized by the geostrophic wind speed those of MS94. for all simulations. These plots clearly show that Figure 5 shows plots of resolved vertical flux of ve- the shear-driven simulation S exhibits the horizon- locity variance. Comparisons to MS94’s data are pro- tal velocity, U 2 + V 2, with greatest shear. The vided for simulations S and B. In this case, MS94 ⟨ ⟩ ⟨ ⟩ buoyancy-drivenp simulation B has a velocity profile did not include the sub-grid-scale component because with much less shear as a result of the enhanced ver- LES does not provide this, so equal comparisons be- tical mixing. The velocity profile predicted for simula- tween our data and theirs may be made. The profile for tion B compares well to that predicted by MS94 (de- simulation B better matches MS94’s profile than does noted with circle symbols). The profile from simulation that of simulation S. In simulation B, we predicted that S does not compare as well, and we attribute the dif- w′3 is greater than the other variance fluxes, and that ference to the much reduced ABL height experienced the⟨ ⟩w′u′2 and w′v′2 fluxes are nearly identical, sim- in our simulation. The profiles from simulations SB1 ilar⟨ to what⟩ MS94⟨ predicted.⟩ In simulation S, though, and SB2 are similar, but, as expected, the increased we predicted that w′u′2 and w′v′2 are nearly iden- amount of surface temperature flux in case SB1 leads tical, which does⟨ not agree⟩ with⟨ the⟩ predictions by to more vertical mixing and a profile with less shear. MS94. Our simulation shows that w′3 has the small- From a wind-energy perspective, velocity profiles with est values, which agrees with MS94.⟨ ⟩ The profiles for greater shear across the rotor disk, as seen in simula- simulations SB1 and SB2 are similar to one another, tion S, cause cyclic loading on the turbine blades that those of simulation SB1 being smaller in magnitude, periodically rotate through regions of slower and faster and resemble the profiles for MS94’s simulation S. moving air. 2 Next, resolved velocity variances normalized by u∗ 5.3 INSTANTANEOUS x-y CONTOURS 2 in the shear-driven case or w∗ in all other cases are ′ shown in Figure 3. Comparison to the total (resolved Figures 6 and 7 show x-y contours of u for simula- tions S and SB1, respectively, and Figure 8 shows the plus sub-filter-scale) variances of MS94 are shown for ′ simulations S and B. It is important to note that a di- contours of w for simulation B. These contours are rect comparison between our resolved variance pro- shown at z/zi of 0.1, 0.2, 0.3, 0.5, and 0.8. files and the total variance profiles of MS94 cannot be In the shear-driven simulation S, shown in Figure 6, made because their profiles include the sub-filter-scale streak-like structures in the horizontal velocity fluctua- contribution; however, some general observations can tions are observed near the surface and are aligned be made. Although the predicted variances share with the mean flow at that height. Because of the Cori- ∘ the same general trends as those of MS94 for cases olis force, the mean flow is directed at a roughly 45 S and B, there are slight differences in magnitude. angle to the x-direction. At z/zi = 0.5, however, the As in MS94, our simulations predicted that for case structures are no longer apparent. This agrees well S, the profile of u′u′ is greater than that of v′v′ , with MS94’s simulation S, both in the characteristics which is greater⟨ than⟩ that of w′w′ . All of the⟨ pro-⟩ of the structures and the magnitude of the fluctuations. files have greatest magnitude⟨ near⟩ the lower surface Our grid is finer than that used by MS94, therefore it around z/zi = 0.1. In contrast, the profiles for sim- captured smaller-scale structures. ′ ′ ulation B show that w w peaks around z/zi = 0.3 In simulation SB1, a moderate level of surface tem- and those of u′u′ and⟨ v′⟩v′ peak both very near the perature flux is present, which gives rise to flow- lower surface⟨ and⟩ at the⟨ base⟩ of the capping inversion. oriented roll cells. Evidence of these cells is present In simulation B, u′u′ and v′v′ are similar in magni- in Figure 7. In the range 0.1 z/z 0.3, low-speed ⟨ ⟩ ⟨ ⟩ ≤ i ≤ tude. The profiles for simulations SB1 and SB2 are a streaks of horizontal velocity are spaced by 2zi-3zi, blend between those of simulations S and B. The pro- which is the experimentally observed spacing of the files of the more convective case SB1 are more similar roll cells (LeMone 1973). Although not shown here, to those of simulation B, whereas the profiles for the these low-speed streaks of horizontal velocity corre- more shear-driven simulation SB2 are more similar to late well with streaks of positive vertical fluctuations, those of simulation S. providing more evidence that the roll cells are present.

8 2 2 〈U〉 〈U〉 1.8 〈V〉 1.8 〈V〉 2 2 1/2 2 2 1/2 1.6 (〈U〉 + 〈V〉 ) 1.6 (〈U〉 + 〈V〉 ) MS94 MS94 1.4 1.4

1.2 1.2 i i 1 1 z/z z/z 0.8 0.8

0.6 0.6

0.4 0.4

0.2 0.2

0 0 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 mean wind / U mean wind / U G G (a) (b)

2 2 〈U〉 〈U〉 1.8 〈V〉 1.8 〈V〉 2 2 1/2 2 2 1/2 1.6 (〈U〉 + 〈V〉 ) 1.6 (〈U〉 + 〈V〉 )

1.4 1.4

1.2 1.2 i i 1 1 z/z z/z 0.8 0.8

0.6 0.6

0.4 0.4

0.2 0.2

0 0 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 mean wind / U mean wind / U G G (c) (d)

Fig. 2. Vertical profiles of horizontally-averaged resolved velocity for (a) simulation S, (b) simulation B, (c) simulation SB1, and (d) simulation SB2.

9

〈u’2〉/u2 1 * 1 〈v’2〉/u2 * 〈u’2〉/w2 0.8 〈w’2〉/u2 * * 0.8 〈v’2〉/w2 〈u’2〉/u2 MS94 * i

* i 〈w’2〉/w2 0.6 2 2 0.6 * z/z 〈 〉 v’ /u MS94 z/z * 〈u’2〉/w2 MS94 〈w’2〉/u2 MS94 * * 0.4 0.4 〈v’2〉/w2 MS94 * 〈w’2〉/w2 MS94 * 0.2 0.2

0 0 0 2 4 6 8 0 0.2 0.4 0.6 0.8 1 velocity variances velocity variances (a) (b)

1 〈u’2〉/w2 1 〈u’2〉/w2 * * 〈v’2〉/w2 〈v’2〉/w2 * * 0.8 2 2 0.8 〈w’ 〉/w 〈w’2〉/w2 * * i i 0.6 0.6 z/z z/z

0.4 0.4

0.2 0.2

0 0 0 1 2 3 0 1 2 3 velocity variances velocity variances (c) (d)

Fig. 3. Vertical profiles of horizontally-averaged resolved velocity variance for (a) simulation S, (b) simulation B, (c) simulation SB1, and (d) simulation SB2.

10

〈u’w’〉/u2 〈u’w’〉/w2 1 * 1 * 〈v’w’〉/u2 〈v’w’〉/w2 * * 〈u’w’〉/u2 MS94 〈u’w’〉/w2 MS94 0.8 * 0.8 * 〈v’w’〉/u2 MS94 〈v’w’〉/w2 MS94 * * i i 0.6 0.6 z/z z/z

0.4 0.4

0.2 0.2

0 0 −1 −0.8 −0.6 −0.4 −0.2 0 −0.1 −0.08 −0.06 −0.04 −0.02 0 momentum fluxes momentum fluxes (a) (b)

〈u’w’〉/w2 〈u’w’〉/w2 1 * 1 * 〈v’w’〉/w2 〈v’w’〉/w2 * * 0.8 0.8 i i 0.6 0.6 z/z z/z

0.4 0.4

0.2 0.2

0 0 −0.4 −0.3 −0.2 −0.1 0 −0.5 −0.4 −0.3 −0.2 −0.1 0 momentum fluxes momentum fluxes (c) (d)

Fig. 4. Vertical profiles of horizontally-averaged resolved momentum fluxes for (a) simulation S, (b) simulation B, (c) simulation SB1, and (d) simulation SB2.

11

〈w’u’2〉/u3 1 * 1 〈w’v’2〉/u3 * 〈w’u’2〉/w3 0.8 〈w’3〉/u3 0.8 * * 〈w’v’2〉/w3 〈w’u’2〉/u3 MS94 * i i * 〈w’3〉/w3 0.6 2 3 0.6 * z/z z/z 〈w’v’ 〉/u MS94 * 〈w’u’2〉/w3 MS94 〈w’3〉/u3 MS94 * 0.4 * 0.4 〈w’v’2〉/w3 MS94 * 〈w’3〉/w3 MS94 * 0.2 0.2

0 0 0 0.5 1 0 0.2 0.4 0.6 0.8 1 velocity variance fluxes velocity variance fluxes (a) (b)

1 〈w’u’2〉/w3 1 〈w’u’2〉/w3 * * 〈w’v’2〉/w3 〈w’v’2〉/w3 * * 0.8 0.8 〈w’3〉/w3 〈w’3〉/w3 * * i i 0.6 0.6 z/z z/z

0.4 0.4

0.2 0.2

0 0 −0.1 0 0.1 0.2 0.3 0.4 −0.1 0 0.1 0.2 0.3 0.4 velocity variance fluxes velocity variance fluxes (c) (d)

Fig. 5. Vertical profiles of horizontally-averaged resolved velocity variance fluxes for (a) simulation S, (b) simulation B, (c) simulation SB1, and (d) simulation SB2.

12 0.1zi 0.2zi

0.3zi 0.5zi

0.8zi

Fig. 6. Contours of x-directed horizontal velocity fluctuation, u′ (m/s), at various heights in x-y planes from simulation S. The entire x-y domain extents of 3 km × 3 km are shown.

13 0.1zi 0.2zi

0.3zi 0.5zi

0.8zi

Fig. 7. Contours of x-directed horizontal velocity fluctuation, u′ (m/s), at various heights in x-y planes from simulation SB1. The entire x-y domain extents of 3 km × 3 km are shown.

14 0.1zi 0.2zi

0.3zi 0.5zi

0.8zi

Fig. 8. Contours of vertical velocity fluctuation, w′ (m/s), at various heights in x-y planes from simulation B. The entire x-y domain extents of 5 km × 5 km are shown.

15 At greater heights within the ABL, the low-speed re- 18, the amount of low wavenumber energy contained gions of the horizontal velocity become fairly equal in within the vertical velocity fluctuations increases in the width to the high-speed regions. range 0.1 z/z 0.3 and then remains fairly con- ≤ i ≤ Figure 8 shows contours of vertical velocity fluc- stant, which is consistent with the spectra of Khanna tuations for the buoyancy-driven simulation B. Here, and Brasseur (1998, p. 731) in which zi/L = 8. − there are concentrated regions of positive vertical ve- This increase with height is, again, due to proximity locity fluctuations and less dense regions of nega- to the surface and the size of vertical velocity length- tive vertical fluctuations. The positive fluctuations are scales that the surface permits. Unlike in simulation S, larger in magnitude than the negative fluctuations, there is no significant increase with height of the low which agrees well with the simulations of MS94. With wavenumber energy contained in the horizontal veloc- increasing height, the concentrated positive regions ity and potential temperature fluctuations, which is also change in character from long structures to clump-like consistent with the spectra of Khanna and Brasseur structures, similar to that observed in the correspond- (1998) for their zi/L = 8 case. Also unlike in simu- − ing simulation of MS94. lation S, the overall amount of energy contained within the potential temperature fluctuations increases up to 5.4 SPECTRA z/zi = 0.2, and then remains fairly constant. This may be due to the fact that the boundary layer in simulation Figures 9 and 10 show spectra of energy con- B is more well mixed, so the energy contained within tained within the horizontal velocity fluctuations, ver- the horizontal velocity and potential temperature fluc- tical velocity fluctuations, and virtual potential temper- tuations is more well mixed. Our spectra from sim- ature fluctuations for cases S and B, respectively, at ulation B more closely follow the -5/3 line, especially heights of z/zi = 0.1, 0.2, 0.3, 0.5, and 0.8. As above z/zi =0.3, than in simulation S. However, they was done by Khanna and Brasseur (1998), a two- do not follow the -5/3 line as well as the spectra of dimensional fast Fourier transform is used to produce Khanna and Brasseur (1998). a two-dimensional energy spectrum at a given height The fact than our spectra for both simulations S and in the flow field. Then, the spectral energy contained B do not have a clear inertial range that follows the within shells of constant wavenumber magnitude, k = -5/3 slope line is of concern. We do not currently √k1 + k2, is computed to produce these logarithmic have an understanding as to why this is so, but will plots of spectral energy versus wavenumber. Shown explore this problem in the near future. One possibility −5 3 in gray on each plot is the k / line. This line is is that, because we are using a finite-volume solver, shown to compare our spectra to the Kolmogorov -5/3 which is inherently more numerically diffusive than a spectrum (Pope 2001, p. 200) for the inertial range of pseudo-spectral solver, our simulations are reaching turbulence scales. the grid cut-off before the inertial range can be appre- Figure 9 shows that in the shear-driven simulation S, ciably represented. Performing simulations on a finer in which zi/L = 0, the amount of low wavenumber grid would help validate this idea. The spectra for both (larger lengthscale)− energy contained within the verti- simulations S and B, show that the energy cut-off con- cal velocity fluctuations gradually increases with height sistently begins around a wavenumber of 0.06, which because the lengthscale of such fluctuations increase corresponds to a wavelength of about 6Δx = 6Δy. with height above the surface. The same occurs, but to a much lesser degree, with the low wavenumber 5.5 ABL STRUCTURE energy contained within the horizontal velocity fluctua- tions. This behavior is seen in the spectra of the shear- Figure 11 shows flow visualizations that highlight driven flow ( zi/L = 0.44) computed by Khanna and some of the structure present in these ABL flows. Fig- Brasseur (1998,− p. 722). The overall energy contained ure 11 (a) is a visualization from case S. The blue in the potential temperature fluctuations increases with isosurfaces represent horizontal velocity fluctuation, ′ height above the surface. This could be a result of u = 3u∗ = 1.5 m/s, and the red isosurfaces ′ the mixing of cooler fluid with warmer fluid from the in- represent− vertical− velocity fluctuation, w = 0.6 m/s. version, which causes larger temperature fluctuations This visualization clearly shows the organized streak- near the capping inversion than near the surface. A like, flow-aligned, horizontal structure within the low- major difference between our spectra for simulation est region of the surface layer. Because this flow is S and those of Khanna and Brasseur (1998) for their not buoyancy-driven, the vertical velocity fluctuations shear-driven simulation is that above z/zi = 0.25, the do not follow an orderly structure; however, the larger spectra of Khanna and Brasseur (1998) show a clear of these isosurfaces seems to emanate from regions inertial range of -5/3 slope for both velocity and tem- where there are horizontal velocity deficits (where the perature. Our shear-driven spectra do not follow a -5/3 blue isosurfaces lie). This compares well to that ob- slope at any height. served in the LES of Khanna and Brasseur (1998). Figure 10 shows that in the case with greatest sur- Figure 11 (b) is a visualization from case SB1 in face temperature flux, simulation B, in which z /L = which there is moderate surface heating. This visu- − i

16 0.1zi 0.2zi

0 0 10 10

−2 −2 10 10 θ θ −4 10 −4

(2) h,w, 10 (2) h,w, E E

−6 −6 10 10 h w θ −8 −8 10 10 −3 −2 −1 −3 −2 −1 10 10 10 10 10 10 −1 k (m ) k (m−1)

0.3zi 0.5zi

0 0 10 10

−2 −2 10 10 θ θ −4 −4 10 10 (2) h,w, (2) h,w, E E

−6 −6 10 10

−8 −8 10 10 −3 −2 −1 −3 −2 −1 10 10 10 10 10 10 k (m−1) k (m−1)

0.8zi

0 10

−2 10 θ −4 10 (2) h,w, E

−6 10

−8 10 −3 −2 −1 10 10 10 k (m−1)

Fig. 9. Two-dimensional spectra of the energy contained in the horizontal velocity fluctuations, ℎ, the vertical velocity fluctuations, w, and the virtual potential temperature fluctuations, , taken at various heights in x-y planes from simulation S. 17 0.1zi 0.2zi

0 0 10 10

−1 −1 10 10

−2 −2 10 10 θ θ (2) h,w, (2) h,w, E −3 E −3 10 10

−4 10 −4 h 10 w θ

−3 −2 −1 −3 −2 −1 10 10 10 10 10 10 −1 k (m ) k (m−1)

0.3zi 0.5zi

0 0 10 10

−1 −1 10 10

−2 −2 10 10 θ θ (2) h,w, (2) h,w,

E −3 E −3 10 10

−4 −4 10 10

−3 −2 −1 −3 −2 −1 10 10 10 10 10 10 k (m−1) k (m−1)

0.8zi

0 10

−1 10

−2 10 θ (2) h,w,

E −3 10

−4 10

−3 −2 −1 10 10 10 k (m−1)

Fig. 10. Two-dimensional spectra of the energy contained in the horizontal velocity fluctuations, ℎ, the vertical velocity fluctuations, w, and the virtual potential temperature fluctuations, , taken at various heights18 in x-y planes from simulation B. ∗ ∗ alization well illustrates the roll cells present in this is restated as Nzi > Nzi where Nzi and Nzi are simulation. The red isosurfaces represent vertical ve- the actual and critical number of grid levels within the ′ locity fluctuations, w = w∗ = 0.88 m/s. The loca- boundary layer, respectively. Brasseur and Wei state tion of these isosurfaces corresponds to the upwelling that in performing LESs of the neutral ABL with the motion caused by two adjacent roll cells. Below the Smagorinsky eddy viscosity closure, reasonable esti- ∗ ∗ isosurfaces is a contour plot of temperature. Darker mates for , ReLES, and Nzi are 1, 350, and 45-50, colors correspond to cooler temperatures, and lighter respectively.ℜ Moving an LES into the high-accuracy colors correspond to warmer temperatures. There is a zone by satisfaction of these criteria can be achieved clear correlation between regions of warmer tempera- by adjusting the sub-grid-scale closure constant and ture and positive vertical velocity fluctuations. vertical resolution of the grid. The subject of this section is to show how far the 5.6 THE HIGH ACCURACY ZONE current simulations are from the high-accuracy zone. Because Brasseur and Wei (2010) only focused on the Brasseur and Wei (2010) discuss the systematic neutral case, we do the same here. Because the ABL overshoot in continues to develop past the final time that MS94 sim- z ∂U ulated, we ran our simulation S until it reached a state Φm(z) =  , (23) u∗ ∂z of better quasi-equilibrium, which is around 46 000 s. which commonly occurs in LESs of turbulent boundary Figure 12 is a plot of the Φm function (using  = 0.4), layers (here  is the von Kármán constant). In order and it shows that our simulation contains a prominent to capture law-of-the-wall (LOTW) scaling, this over- overshoot in the profile at z/zi = 0.06; the simulation shoot must be removed. Brasseur and Wei state that is clearly not in the high-accuracy zone. For this sim- ulation, = 0.09, Re = 100, and N = 45. The the “negative consequences of the overshoot — spuri- ℜ LES zi ous stream-wise coherence, large-eddy structure and only criterion that has been met is the one for vertical vertical transport — are enhanced by buoyancy.” They grid resolution. also provide three criteria, in terms of nondimensional In these simulations, we use a Smagorinsky con- parameters, that are necessary to remove the over- stant of Cs = 0.168, so it can be reduced to move toward the high-accuracy zone. It will be interesting shoot and provide Φm(z) that is constant through the surface layer. The three criteria and their associated to see how much the friction resulting from the finite- nondimensional variables form a parameter space that volume formulation (as opposed to a less dissipative can be used to move LES into a “high-accuracy zone” pseudo-spectral scheme) contributes to the overshoot in which LOTW is captured. and failure to capture LOTW scaling. The first criterion is that the resolved stress main- tains dominance over the sub-grid-scale stress at the first grid level, which can be stated mathematically as 6. CONCLUSIONS AND FUTURE WORK

′ ′ 2 ′ ′ 2 This work shows that the ABL simulations per- T (z1) u w + v w = R = ⟨ ⟩ ⟨ ⟩ O(1), (24) formed with a second-order accurate, colocated, finite- p 2 2 ℜ TS(z1) R13 + R23 ∼ volume solver compare fairly well with those per- p formed by Moeng and Sullivan (1994) and Khanna and where is the ratio of resolved to sub-grid-scale ℜ Brasseur (1998) with their pseudo-spectral solvers. stresses at the first grid level, T (z1) and T (z1) R S However, there are some important differences that are the resolved and sub-grid-scale horizontal shear must be reconciled in our solver before using it for stresses, respectively, at the first grid level; ′ ′ and u w wind energy applications. One of the most important ′ ′ are the resolved horizontal momentum⟨ fluxes⟩ v w differences is the fact that the energy spectra from our ⟨at the⟩ first grid level; and and are the sub- R13 R23 simulations do not show the -5/3 cascade of energy in grid-scale momentum fluxes at the first grid level. The the inertial range that is clearly seen in the spectra of second criterion is that inertia in the discretized LES Khanna and Brasseur (1998). Also, our shear-driven governing equation dominates friction caused by the simulation S does not compare to the corresponding sub-grid-scale viscosity (and by the numerical algo- simulation of Moeng and Sullivan (1994) as well as rithm, which is impossible to completely quantify). This does the more buoyant-driven cases. is restated mathematically as This work highlights the fact that there are significant zi u∗ ∗ rates of change occurring in vertical profiles of velocity, ReLES = > ReLES, (25) SGS(z1) variance, and fluxes of momentum and variance in the vertical band where turbine rotors lie. It also highlights ∗ where ReLES and ReLES are the actual and critical the large differences between completely shear-driven LES Reynolds numbers, respectively. The third crite- and shear-buoyancy-driven flow. Wind farms operate rion is that the number of grid levels within the bound- in a variety of ABL stability conditions, so it is impor- ary layer provide a minimum vertical resolution, which tant to be able to accurately model all of these cases.

19 (a)

(b)

′ ′ Fig. 11. (a) Isosurfaces of x-directed velocity fluctuations for u = −3u∗ = −1.5 m/s (blue) and of vertical velocity fluctuations for w = 0.6 ′ m/s from the shear-driven case S. (b) Isosurfaces of vertical velocity fluctuations for w = w∗ = 0.88 m/s (red) and a contour of temperature  in which black denotes cooler temperature and white denotes warmer temperature from the shear-buoyancy-driven case SB1.

20 0.4 like the ones performed here, will be used as precur- sors to wind farm LESs using this solver. The turbine 0.35 model under consideration is the actuator line model of Sørensen and Shen (2002). 0.3

0.25 Acknowledgments. The authors would like to ac-

i knowledge Peter Sullivan and Ned Patton of the Na- 0.2

z/z tional Center for Atmospheric Research (NCAR) for their help in resolving solvers problems during the 0.15 course of this work. Also acknowledged are Branko Kosovic, Bill Mahoney, and Andrezej Wyszogrodzki, 0.1 of NCAR for their help in determining the important 0.05 features of an LES solver for this application. Many contributors to the OpenFOAM forum have also helped 0 in answering questions that arose during the creation 0 1 2 3 Φ of the solver and boundary conditions. NREL’s High m Performance Computing Center provided the compute time necessary to perform these simulations along Φ Fig. 12. The non-dimensional velocity gradient function m from with help in creating flow field visualizations. simulation S at time 46 000 s. The Alliance for Sustainable Energy, LLC (Alliance), is the manager and operator of the National Renew- Importantly, this work has demonstrated the high-level able Energy Laboratory (NREL). Employees of the Al- of flexibility provided by the OpenFOAM framework in liance for Sustainable Energy, LLC, under Contract creating solvers, boundary conditions, and closures No. DE-AC36-08GO28308 with the U.S. Dept. of En- with relative ease compared to modifying an existing ergy, have authored this work. The United States Gov- code or writing one’s own code. ernment retains and the publisher, by accepting the article for publication, acknowledges that the United A next step in this work is to incorporate changes States Government retains a non-exclusive, paid-up, to our code to make it more versatile and as simi- irrevocable, worldwide license to publish or reproduce lar as possible to the code used by Moeng and Sul- the published form of this work, or allow others to do livan (1994) such that a better comparison can be so, for United States Government purposes. made. This means that our code will need to incorpo- rate the one-equation sub-grid-scale closure and sur- face stress model described in Moeng (1984). Further- more, validation against high quality field data taken References over fairly flat terrain should also be performed. It may also be beneficial to create a solver that uses explicit 2009a: OpenFOAM – The Open Source CFD Toolbox, time advancement; that would make for a simpler al- Programmer’s Guide, Version 1.6. OpenCFD Ltd., 9 gorithm that may be easier to troubleshoot. Such an Albert Road, Caversham, Reading, Berkshire RG4 explicit algorithm is used by Sullivan et al. (1996, 2000) 7AN, UK. in their colocated pseudo-spectral code. It is clear that these simulations are far from the 2009b: OpenFOAM – The Open Source CFD Toolbox, “high accuracy zone” described by Brasseur and Wei User’s Manual, Version 1.6. OpenCFD Ltd., 9 Albert (2010) and that law-of-the-wall scaling is not being Road, Caversham, Reading, Berkshire RG4 7AN, maintained throughout the surface layer as evidenced UK. by the overshoot in the Φm parameter observed in these simulations. Work must be done to move these Brasseur, J. G. and T. Wei, 2010: Designing large- simulations to the high accuracy zone and to investi- eddy simulation of the turbulent boundary layer to gate how large a role numerical friction plays in keep- capture law-of-the-wall scaling. Physics of Fluids, ing the simulation from producing law-of-the-wall scal- 22, 021303, doi:10.1063/1.3319073. ing. Because this work is being done within a finite- volume setting as it allows more flexibility for wind en- Calaf, M., C. Meneveau, and J. Meyers, 2010: Large ergy applications (i.e. nonperiodic boundaries), work eddy simulation study of fully developed wind- must be done to understand the grid resolution neces- turbine array boundary layers. Physics of Fluids, 22, sary in the finite-volume setting relative to the pseudo- 015110, doi:10.1063/1.3291077. spectral setting to obtain similar results. Last, a model for turbines will be added to this solver Conzemius, B., H. Lu, L. Chamorro, Y.-T. Wu, and to perform wind-farm-scale LESs. ABL simulations, F. Porte-Agel, 2010: Development and testing of a

21 wind farm simulator at an operating wind farm. Pre- Mason, P. J. and A. R. Brown, 1999: On subgrid mod- sentation from AWEA 2010 WindPower Conference els and filter operations in large eddy simulations. and Exhibition, Dallas, Texas. Journal of the Atmospheric Sciences, 56, 2101– 2114. Cuijpers, J. W. M. and P. G. Duynkerke, 1993: Large eddy simulation of trade wind cumulus clouds. Jour- Moeng, C.-H., 1984: A large-eddy-simulation model nal of the Atmospheric Sciences, 50, 3894–3908. for the study of planetary boundary-layer turbu- lence. Journal of the Atmospheric Sciences, 41, de Villiers, E., 2006: The Potential of Large Eddy 2052–2062. Simulation for Modeling of Wall Bounded Flow. Ph.D. thesis, Department of Mechanical Engineer- Moeng, C.-H. and P. Sullivan, 1994: A comparison ing, Imperial College of Science, Technology, and of shear- and buoyancy-driven planetary boundary Medicine, London, United Kingdom. layer flows. Journal of the Atmospheric Sciences, 51, 999–1022. Deardorff, J. W., 1972: Numerical investigation of neu- tral and unstable . Journal Paulson, C. A., 1970: The mathematical representa- of the Atmospheric Sciences, 29, 91–115. tion of wind speed and temperature profiles in the unstable atmospheric surface layer. Journal of Ap- Etling, D., 1996: Modelling the vertical abl structure. plied , 9, 857–861. Modelling of Atmposheric Flow Fields, D. P. Lalas and C. F. Ratto, eds., World Scientific Publishing Pope, S. B., 2001: Turbulent Flows. Cambridge Uni- Company, chapter 3, 400–402. versity Press. ´ Ferziger, J. H. and M. Peric, 2002: Computational Porté-Agel, F., H. Lu, and Y.-T. Wu, 2010: A large- Methods for . Springer-Verlag, 3rd, eddy simulation framework for wind energy applica- revised edition. tions. The Fifth International Symposium on Compu- tational Wind Engineering (CWE2010), Chapel Hill, Issa, R. I., 1985: Solution of the implicitly discretized NC, May 23-27. fluid flow equations by operator-splitting. Journal of Computational Physics, 62, 40–65. Rhie, C. M. and W. L. Chow, 1983: Numerical study of the turbulent flow past an airfoil with trailing edge Ivanell, S. S. A., 2009: Numerical Computations of separation. AIAA Journal, 21, 1525–1532. Wind Turbine Wakes. Ph.D. thesis, Gotland Univer- sity, Stockholm, Sweden. Schumann, U., 1975: Subgrid-scale model for fi- Jensen, L. E., 2007: Analysis of array efficiency at nite difference simulation of turbulenct flows in Horns Rev and the effect of atmospheric stability. plane channels and annuli. Journal of Computa- 2007 EWEC Conference, Milan, Italy. tional Physics, 18, 376–404.

Johnson, C., 2008: Summary of actual versus pre- Smagorinsky, J., 1963: General circulation experi- dicted wind farm performance - a recap of wind- ments with the primitive equations: I. the basic power 2008. Presentation from 2008 AWEA Wind equations. Monthly Weather Review, 91, 99–164. Resource Assessment Workshop, Portland, Ore- gon. Sørensen, J. N. and W. Z. Shen, 2002: Numerical modeling of wind turbine wakes. Journal of Fluids Katic, I., J. Højstrup, and N. O. Jensen, 1986: A Engineering, 124, 393–399. simple model for cluster efficiency. Proceedings of EWEC’86, Rome, Italy, W. Palz and E. Sesto, eds., Stovall, T. D., G. Pawlas, and P. J. Moriarty, 2010: 407–410. Wind farm wake simualtions in OpenFOAM. AIAA Paper 2010-0825. Khanna, S. and J. G. Brasseur, 1998: Three- dimensional buoyancy- and shear-induced structure Sullivan, P. P., J. C. McWilliams, and C.-H. Moeng, of the atmospheric boundary layer. Journal of the 1996: A grid nesting method for large-eddy simu- Atmospheric Sciences, 55, 710–743. lation of planetary boundary-layer flows. Boundary Layer Meteorology, 80, 167–202. LeMone, M. A., 1973: The structure and dynamics of horizontal roll vortices in the planetary bound- — 2000: Simulation of turbulent flow over idealized ary layer. Journal of the Atmospheric Sciences, 30, water waves. Journal of Fluid Mechanics, 404, 47– 1077–1091. 85.

22 Wharton, S. and J. K. Lundquist, 2010: Atmospheric stability impacts on power curves of tall wind tur- bines — an analysis of a west coast north amer- ican wind farm. Technical report, Lawrence Liver- more National Laboratory (LLNL), lLNL-TR-424425, https://e-reports-ext.llnl.gov/pdf/387609.pdf.

23 Form Approved REPORT DOCUMENTATION PAGE OMB No. 0704-0188 The public reporting burden for this collection of information is estimated to average 1 hour per response, including the time for reviewing instructions, searching existing data sources, gathering and maintaining the data needed, and completing and reviewing the collection of information. Send comments regarding this burden estimate or any other aspect of this collection of information, including suggestions for reducing the burden, to Department of Defense, Executive Services and Communications Directorate (0704-0188). Respondents should be aware that notwithstanding any other provision of law, no person shall be subject to any penalty for failing to comply with a collection of information if it does not display a currently valid OMB control number. PLEASE DO NOT RETURN YOUR FORM TO THE ABOVE ORGANIZATION. 1. REPORT DATE (DD-MM-YYYY) 2. REPORT TYPE 3. DATES COVERED (From - To) August 2010 Conference Paper August 2-6, 2010 4. TITLE AND SUBTITLE 5a. CONTRACT NUMBER Wind Energy-Related Atmospheric Boundary Layer Large-Eddy DE-AC36-08-GO28308 Simulation Using OpenFOAM: Preprint 5b. GRANT NUMBER

5c. PROGRAM ELEMENT NUMBER

6. AUTHOR(S) 5d. PROJECT NUMBER M.J. Churchfield, G. Vijayakumar; J.G. Brasseur, and P.J. Moriarty NREL/CP-500-48905

5e. TASK NUMBER WE10.3122

5f. WORK UNIT NUMBER

7. PERFORMING ORGANIZATION NAME(S) AND ADDRESS(ES) 8. PERFORMING ORGANIZATION National Renewable Energy Laboratory REPORT NUMBER 1617 Cole Blvd. NREL/CP-500-48905 Golden, CO 80401-3393

9. SPONSORING/MONITORING AGENCY NAME(S) AND ADDRESS(ES) 10. SPONSOR/MONITOR'S ACRONYM(S) NREL

11. SPONSORING/MONITORING AGENCY REPORT NUMBER

12. DISTRIBUTION AVAILABILITY STATEMENT National Technical Information Service U.S. Department of Commerce 5285 Port Royal Road Springfield, VA 22161 13. SUPPLEMENTARY NOTES

14. ABSTRACT (Maximum 200 Words) This paper develops and evaluates the performance of a large-eddy simulation (LES) solver in computing the atmospheric boundary layer (ABL) over flat terrain under a variety of stability conditions, ranging from shear driven (neutral stratification) to moderately convective (unstable stratification).

15. SUBJECT TERMS atmospheric boundary layer; wind energy; OpenFOAM; large-eddy simulation; wind turbine; ABL; stability conditions

16. SECURITY CLASSIFICATION OF: 17. LIMITATION 18. NUMBER 19a. NAME OF RESPONSIBLE PERSON OF ABSTRACT OF PAGES a. REPORT b. ABSTRACT c. THIS PAGE UL Unclassified Unclassified Unclassified 19b. TELEPHONE NUMBER (Include area code)

Standard Form 298 (Rev. 8/98) Prescribed by ANSI Std. Z39.18

F1147-E(10/2008)