You are on page 1of 8

Modification of CFD code to model the atmospheric boundary layer

T. W. Koblitz a, A. Bechmann a, A. Sogachev a, N. N. Srensen a


a

Wind Energy Dep., Ris DTU National Laboratory, Roskilde, Denmark, tiko@risoe.dtu.dk

1 INTRODUCTION In contrast to typical 'wind engineering' flows, the wind flow within the atmospheric boundary layer (ABL) includes a huge range of spatial and temporal scales, and depends on a wide range of physical processes that should not be ignored in modeling. These are for example the Coriolis force, buoyancy forces and heat transport, but also vegetation, humidity and soil conditions affect the wind conditions. For wind resource assessment, the industry increasingly relies on Computational Fluid Dynamics (CFD) methodologies, based on the solution of the Reynolds-averaged Navier-Stokes (RANS) equations. The mentioned processes are, however, repeatedly ignored. The effect of thermal stratification is known to affect the wind resource significantly. To model the resulting neutral, stable and unstable flow conditions in the ABL, the effect of buoyancy has to be included into the CFD methodology. It represents a promising approach to reducing the uncertainties in wind resource assessment. The starting point for the present work is the existing in-house CFD code (Ris DTU) EllipSys3D (Michelsen 1992, 1994; Srensen, 1995). It was developed for simulating the near-ground surface-layer flow inside a neutrally stratified domain and has under these conditions been validated against large scale field experiments (Bechmann, 2010; Srensen et al., 2007). Within the present work, the EllipSys3D code is modified to get a more appropriate description of the whole ABL. First, the Coriolis forcing is considered, which enables us to reproduce neutral ABL flows with limited boundary-layer height. According to Zilitinkevich and Esau (2002) two types of neutral ABL flows have to be distinguished: truly neutral (neutrally stratified free flow), and conventionally neutral (flow developed against stable background stratification). Observed ABL flows are almost never truly neutral due to an existing temperature inversion on top. Within a second step, we therefore employ a length-scale-limited k- turbulence model proposed earlier by Apsley and Castro (1997). This accounts for the stable background stratification without modeling stratification. It limits the global maximum mixing length, while still being consistent with the logarithmic law in the surface-layer. Additionally, ambient floor values for the turbulence variables are imposed (Spalart and Rumsey, 2007). Computational tests prove the applicability of the modifications and the results are compared against previous simulations (Apsley and Castro, 1997; Mellor and Yamada, 1974; Sogachev and Panferov, 2006) and observations, including data from the famous Leipzig wind profile (Detering and Etling, 1985) and from the Cabauw site (Van Ulden and Holtslag, 1980). Having demonstrated the modifications necessary to model the conventionally neutral ABL without explicit buoyancy terms, finally the simulation of non-neutral ABL conditions is considered. Following previous works, the temperature equation and a k- turbulence model including buoyancy terms are implemented into the code (Koblitz et al., 2010; Sogachev, 2009). These modifications enable us to simulate diurnally varying non-neutral ABL conditions, as described in Mellor and Yamada (1974). The outline of the paper is as follows: section 2 presents the modeling approach and section 3 presents results of three test cases compared against previous simulations and measurements to prove the applicability of the modifications. Concluding remarks are given in section 4. 2 MODELING Within the paper we consider a horizontally homogeneous ABL over flat terrain. The flow variables are therefore functions of the height z alone. The flow is based on the solution of the RANS equations and the applied turbulence model to close the equations is presented in section 2.2.

2.1 Coriolis forcing The large-scale dynamics within the ABL are subjected to the Coriolis force. The Coriolis effect is caused by the rotation of the earth and the inertia of mass. The resulting force acts in a direction perpendicular to the rotation axis of the earth and to the velocity of the wind, when viewed from a rotating reference frame. This force causes the air to deflect from its path and causes the wind to veer with height. At the top of the ABL the wind speed equals the geostrophic wind (free stream atmosphere) and changes its direction and magnitude throughout the ABL, until reducing to zero at the ground, due to friction. The Coriolis force balances the pressure gradient force at the ABL top where friction by definition is zero. In the present simulations the flow is driven by a pressure gradient that gives the geostrophic wind velocity components (ug, vg) = 1/ f (- p/ y, p/ x) where is the air density, fc=2 sin is the Coriolos parameter (with the earths rotation rate and the latitude ) and p is the pressure. To include the Coriolis forcing into the EllipSys3D code, the Coriolis force is simply added explicitly to the momentum equations as an external force, FC,i = fcujm where uj denotes the velocity field and m is the mass. The Coriolis force in vertical direction is neglected. Within all subsequent simulations of the ABL, the flow is subjected to Coriolis forcing. 2.2 Modification of k- turbulence model The popular k- turbulence model is used as the basic model to close the RANS equations (Launder and Spalding, 1974). Two differential transport equations are solved for the turbulent kinetic energy k and the dissipation rate : , , (1) (2)

where xi (x1 = x, x2 = y, x3 = z) are the longitudinal, lateral and vertical directions. Ui is the mean velocity component along xi, k and are the Prandtl numbers for and , respectively and P is the production of k by shear. The resulting eddy viscosity, K, and the mixing length, l, are expressed as (3) (4) where C 1, C 2 and C are model constants. Unless stated otherwise, all presented calculations use the following set of consistent closure coefficients that has originally been proposed by Jones and Launder (1972): C 1 = 1.44, C 2 = 1.92, C = 0.09, k = 1.0, = 1.3. 2.2.1 Limited-length-scale model In a previous study Apsley and Castro (1997) argue that the maximum size of turbulent eddies in the ABL is limited by the finite boundary layer depth or by stratification (see also Zilitinkevich and Esau, 2002). If this is not modeled, the standard k- model gives a length scale that grows continuously with height and yields a very deep ABL (Detering and Etling, 1985). In the present study the length-scalelimited k- turbulence model presented by Apsley and Castro (1997) is therefore employed for cases where stratification is not modeled. Their proposed modification limits the global maximum mixing length. An expression that adjusted the difference between production and destruction in the lengthscale determining dissipation equation allowed for the desired length scale limitation, while still being consistent with the standard model in the surface-layer close to the ground: . (5)

C* 1 represents a modified value replacing C 1. This expression prevents the mixing length to exceed a predefined maximum mixing length lmax while still being consistent with the standard model close to the ground, where l << lmax. Apart from lmax this modification only depends on the standard closure coefficients C 1 and C 2. It can be applied to any flow to account for a temperature inversion without simulating temperature. Different approaches exist to determine lmax (Apsley and Castro, 1997; Blackadar, 1962; Weng and Taylor, 2006). The values chosen in the present work are described in section 3. 2.2.2 Ambient values for k and In order to improve convergence for small mixing lengths, and to avoid length scale variations due to turbulence values close to zero, ambient floor values for the turbulence variables are imposed. In the study of Spalart and Rumsey (2007) it is argued that it is physically justified to impose non-negative floor values for the turbulence variables within the standard equations of the k- model. The concept is simple: k and are not allowed to drop below a predefined limit. The ambient values kamb and amb are defined a priori and the terms F amb and F amb2/ kamb are added to the k- and -equations respectively. Adding them throughout the whole domain would distort the wall boundary condition, and therefore a blending function F = min(1, kamb/k, amb/ ) is introduced. In our simulations this formulation has proven applicable and ensures that the modification is only active in the upper part of the ABL where the turbulence variables approach the predefined ambient levels. Note that the ambient values have to be chosen carefully, such that the flow in the lower part of the domain is not influenced by the constrained turbulence variables in the upper parts. Using the aforementioned length-scale limiter simultaneous with the ambient floor values adds another constraint for choosing the right set of ambient values: setting k and to predefined values also fixes the mixing length in the upper part of the ABL, according to (4). Still, there is a wide range of possible values that satisfy the given constraints. Specific values are presented in section 3.1. 2.2.3 Buoyancy The k- model in its standard form is not capable of representing non-neutral conditions. To take buoyancy effects into account we employ a modified version (Pope, 2000; Sogachev and Panferov, 2006). A buoyancy term B is added to the two transport equations (1) and (2): , , , (6) (7) (8)

where is the air thermal volumetric expansion coefficient, gz is the gravitational acceleration, and T is the turbulent Prandtl number. In unstable conditions B is positive and appears as a source term in the k-equation, while B turns negative in stable conditions and acts as a sink term. B also appears in the dissipation equation together with the coefficient C 3. This additional coefficient has to be quantified a priori, and an optimal value is unknown (Sogachev, 2009). In the present case we use the expression C 3 = C 1 - C 2 proposed by Sogachev (2009). This approach avoids the introduction of additional coefficients and is generally applicable, without trying to fit C 3 to single observations. 3 RESULTS To validate the modifications made to the EllipSys3D code we simulate the neutrally and non-neutrally stratified ABL over flat terrain, and compare our results against measurements (Detering and Etling, 1985; Ulden and Holtslag, 1980) and previous simulations (Apsley and Castro, 1997; Mellor and Yamada, 1974; Sogachev and Panferov, 2006). The computational domain is 3 km high using a grid of 256 vertically stretched cells (0.03 m cell height at wall; 50 m cell height at top boundary). In horizontal directions the domain is 12 x 12 km long with a grid of 64 evenly distributed cells. However, as the

modeled flow is horizontally homogeneous, the horizontal grid structure is irrelevant. We use rough wall boundary conditions at the bottom of the domain (Srensen et al., 2007), and a symmetry condition (no-gradient) on top. All vertical boundaries are cyclic. 3.1 Neutral ABL simulation - Cabauw site First we simulate the neutral ABL over flat terrain, and compare our results against measurements from the Cabauw site and previous simulations from Sogachev and Panferov (2006). The modified coefficient (5) to limit the length scale is employed, and ambient turbulence values are imposed (see sections 2.1, 2.2.1 and 2.2.2). According to Sogachev and Panferov (2006) we use the roughness length 0.15 m, the Coriolis parameter f = 1.1510-4 s-1 (according to 51o54N at the Cabauw site, Netherlands), and the geostrophic wind components ug = 8.6 m/s and vg = -5.16 m/s. The friction velocity was u* = 0.43 m/s and the maximum length scale is set to lmax = 24.15 m (based on the formulation by Blackadar, 1962). Additionally, this case was used to determine specific ambient floor values for the turbulence constants. The motivation to introduce ambient values in the present case was mainly due to length scale variations in the upper part of the domain: both turbulent kinetic energy and dissipation drop to values close to zero and the resulting length scale (4) is very sensitive to variations. The ambient values have to be chosen such that the resulting eddy viscosity does not exceed certain values. This ensures that the influence on the lower part of the domain is negligible (see section 2.2.2). The set of ambient values was chosen to be kamb = 110-4 and amb = 6.810-9. This value pair is consistent with lmax (4) and leads to a moderate eddy viscosity (3) on top. Choosing ambient values of higher magnitude (e.g. kamb >> 110-3) results in a too high eddy viscosity in the upper part of the domain and affects the flow in the lower part. Using too low values (e.g. kamb << 110-5) did not affect the flow in the lower part, but gives mixing length variations in the upper part of the domain, due turbulence values close to zero. The results from our simulation are shown in figure 1 and agree well with both measurements and simulations and the chosen modifications prove applicable.
a)
10E-1
10E-1

b)
10E-1

c)

10E-2 zf/u*
zf/u*

10E-2

10E-2

10E-3

10E-3

10E-3

10E-4

10E-4

10E-4

10E-5 -20 -10 0 u,v dimensionless 10

10E-5

10E-5 10 l [m] 20 30

0.4 W1/2 [ms-1] tke [m2s-2]

0.8

Figure 1. All graphs are plotted on top of figure 1 from Sogachev and Panferov (2006). Results of the present study are shown with a solid line and triangles (with and without length-scale limiter): (a) Dimensionless wind vector as a function of dimensionless height. Symbols denote annual averages of the Cabauw site, 1973 (Van Ulden and Holstag 1980). Bars denote standard deviations. (b) Mixing lengths, (c) square root of absolute value of shear stress and turbulent kinetic energy as functions of the dimensionless height derived by different models.

3.2 Neutral ABL simulation - Leipzig wind profile In this case the famous Leipzig wind profile is modeled and compared to measurement data and a simulation from Apsley and Castro (1997). The simulations consider Coriolis forcing, and are carried out with and without the modified coefficient (5) to limit the length scale. According to Apsley and Castro (1997) we use a roughness length of 0.3 m, the Coriolis parameter f = 1.1110-4 s-1, the geostrophic wind components ug = 17.5 m/s and vg = 0 m/s, and the coefficient = 1.11 is used in the k- model instead of the standard coefficient. The maximum length scale lmax = 36m is estimated using the formulation by Blackadar (1962). The reason for using lmax in neutral conditions to limit the maximum size of

turbulent eddies is discussed in section 1 and 3.1. It is also generally accepted that the Leipzig experiment was actually conducted in slightly stable conditions which supports the use of the length-scale limiter. The results are shown in figure 2 and agree well with both observations and simulations and the chosen modifications prove applicable. Imposing a maximum length scale limits the height of the boundary-layer, and the surface-layer wind direction is closer to the observed value. The turbulent kinetic energy drops to smaller values, induced by the limiting of the maximum mixing length, shown in figure 2c.
a) b)
800 600 400 200 0 10 20 D geo [deg] 30 0 0.5 1 1.5 2 2.5 3 tke [m2s-2]

2500 height [m] 2000 1500 1000 500 0

2500 2000 1500 1000 500 5 10 15 u,v [m/s] 20 0

c)
800 600 400 200 0

d)

0.5

1 l [m]

1.5

Figure 2. All graphs are plotted on top of figure 1 from Apsley and Castro (2007). Solid dots represent the Leipzig wind profile. Results of the present study with and without length-scale limiter are shown (solid line and triangles): (a) Mean wind speed profile, (b) turning of wind with height, (c) turbulent kinetic energy profile, (d) mixing length profile

3.3 Non-neutral ABL simulation Ellipsys2D has been shown to solve the governing equations including temperature correctly within a two-dimensional domain (Koblitz et al., 2010). This section focuses on including the effect of buoyancy into the CFD code EllipSys3D in order to account for non-neutral conditions in the ABL. Therefore the temperature equation is solved together with a k- model that includes buoyancy terms (section 2.2.3). In the present case a temporally varying ground temperature is considered, representing a diurnal cycle within the ABL. The temperature variation is taken from the study of Mellor and Yamada (1974) where such a simulation of the atmospheric boundary layer is analyzed. In the atmosphere, this process occurs during the diurnal cycle of heating and cooling of the ground surface due to solar radiation. Simulating this cycle helps to get a better understanding of the influences of the different stability classes on the resulting boundary-layer flow. According to Mellor and Yamada (1974) we use the following values as input for our simulation: the roughness length is set to 0.05 m, the value of the Coriolis parameter f is 0.8810-4 s-1, and the components of the geostrophic wind vector are ug = 18 m/s and vg = 0 m/s. The wall boundary condition for the temperature is unsteady and varies temporally. The initial conditions for the simulation of the diurnal cycle are computed by a steady simulation of a neutrally stratified ABL where the potential temperature field is initialized and kept constant at = 285 K throughout the whole domain. The simulation is continued for 7 days, repeating the temperature variation every 24 hours. After simulating 3 consecutive days an approximately cyclic variation is obtained. In contrast to the computation from Mellor & Yamada (1974) we are not using a length-scale limiter or imposing a stable temperature gradient on top of the domain. The main focus is on analyzing the computed flow field without using modifications that constrain the development of the flow. The plots on the left-hand side of figure 3 show the evolution of the computed velocity components, the potential temperature, the turbulent kinetic energy and the length scale and they are compared against results from Mellor & Yamada (1974), shown in the center. In the lower part of the domain similar flow patterns are visible: the top plot, showing the velocity component parallel to the geostrophic wind, shows the same distribution of minima and maxima. During stable conditions at night and early morning velocity maxima exist well below 500 m corresponding to a low-level jet. At about 7:00 the low-level jet reaches its minimum height, which agrees well with the simulations from Mellor & Yamada (1974). Also the potential temperature in the lower part of the domain evolves similar.

Figure 3. Evolution of velocity components, potential temperature, turbulent kinetic energy and mixing length plotted over the domain height (3 km). left/right: results for initial temperature = 285 K / = 288 K showing 24 hours; center: simulations from Mellor and Yamada (1974) showing 48 hours.

Between 18:00 and 7:00 the flow below 500 m is stably stratified due to buoyancy forces that suppress vertical motion. After 7:00 the surface temperature increases until about 14:00 accounting for solar radiation. The stable layer is eroded which leads to near neutral conditions between 15:00 and 18:00. This is when the boundary layer height starts to grow, accompanied by velocity gradients that lead to a growth of turbulent kinetic energy, resulting in a mixed turbulent layer with an excessively growing length scale. The boundary layer height is overestimated and reaches the top of the domain at around 17:00. In the upper 1 km the results show a constant temperature distribution rather than an inversion. This is due to our boundary condition on top (zero gradient) and due to the fact that the flow is not initialized with an inversion layer. The mean temperature difference between our computations and the results from Mellor and Yamada (1974) in the middle of the domain is 1.5 K. It is found that the mean temperature in the domain has a significant effect on the resulting flow field: higher mean temperatures yield smaller temperature gradients during daytime, and therefore suppress the turbulent kinetic energy production and the growth of the boundary layer during daytime. This is shown in the second case (plots on the right-hand side of figure 3) where the temperature field is initialized with = 288 K instead of = 285 K, which is closer to the mean temperature presented in Mellor and Yamada (1974). Now the turbulent kinetic energy production and the boundary layer height seem to be limited and show more reasonable values. The length scale variations at the top of the domain are due to turbulence values close to zero. Note that we are not using an explicit length-scale limiter, in contrast to Mellor and Yamada (1974). In our simulation the length scale is determined by the k- model including buoyancy terms alone (section 2.2.3). 4 CONCLUSIONS The present work presents modifications to the EllipSys3D code to model the wind flow within the ABL more appropriately. For neutral ABL flow the Coriolis forcing, a length-scale limited k- turbulence model and ambient floor values for the turbulence variables are implemented and successfully validated. Specific values for the ambient values are determined. Finally, a diurnal simulation of nonneutral conditions is presented, using a k- model including buoyancy terms. Three cases are considered: two neutral ABL flows over flat terrain and a non-neutral case modeling the diurnally varying surface temperature. For the first case a length scale limited k- model together with ambient values for the turbulence variables is used. The limited length scale is used to reflect the fact that the boundary layer height is limited or that observed ABL flows are almost never truly neutral (Apsley and Castro, 1997; Zilitinkevich and Esau, 2002). The ambient values avoid turbulence values close to zero, which would otherwise lead to length scale variations in the upper part of the domain. The computed profiles for the velocity components, the turbulence variables and the length scale agree well with both measurements from the Cabauw site (Van Ulden and Holtslag, 1980) and simulations (Sogachev and Panferov, 2006) and the chosen modifications prove applicable. The neutral ABL flow in the second case is similar and the computed profiles agree well with measurements (Detering and Etling, 1985) and simulations (Apsley and Castro, 1997). In the latter case no ambient floor values are imposed on the turbulence variables because the roughness length is twice as high as in the first case and results in higher values for the turbulent kinetic energy throughout the domain, so that the resulting length scale does not show the aforementioned variations. The third case simulates ABL flow subjected to a diurnally varying surface temperature and employs a modified k- turbulence model that accounts for buoyancy effects. In contrast to the first cases, no explicit length-scale limiter is used. The advantage of the used formulation of the buoyancy terms is its general applicability as no new model coefficients are necessary. The resulting vertical distributions of velocity, potential temperature and turbulence values show similar general pattern as the results from Mellor & Yamada (1974), but deviate significantly during daytime: the boundary layer height, the turbulence and the length scale are overestimated. Adjusting the mean temperature to the value of Mellor and Yamada (1974) changes the flow: turbulent kinetic energy production and the boundary layer height are now limited. Note that the mixing length is determined by the turbulence model alone (section 2.2.3). To improve models for non-neutral conditions previous studies suggested different ap-

proaches: to limit the length scale (Apsley and Castro, 1997; Blackadar, 1962; Weng and Taylor, 2006) or to introduce a temperature relaxation (Sogachev, 2009) to maintain the inversion on top. A disadvantage in setting lmax lies in the introduction of a new coefficient. Especially when simulating flow in complex terrain lmax is ambiguous to determine. In summary our results show that the implemented modifications are applicable and reproduce the main flow characteristics. They are generally applicable and no additional constants need to be specified. It presents a promising approach to also applying the model to complex topography. However, additional investigations have to be carried out to evaluate further modifications, in order to improve the models performance in non-neutral conditions. 5 ACKNOWLEDGEMENTS This work has been carried within the WAUDIT project. This Initial Training Network is a Marie Curie action, funded under the Seventh Framework Program (FP7) of the European Comission. Computations were made possible by the use of the PC-cluster Thyra provided by DCSC and the Ris-DTU central computing facility. 6 REFERENCES
Apsley, D.D., Castro I.P., 1997. A limited-length-scale k model for the neutral and stably-stratified atmospheric boundary layer. Boundary-Layer Meteorol, 83:7598. Bechmann, A., 2010. Presentations from The Bolund experiment: Workshop 3-4th December 2009. Technical Report Ris-R-1745(EN), Ris National Lab., Roskilde, Denmark. Bechmann, A., 2006. Large-Eddy Simulation of Atmospheric Flow over Complex Terrain. Technical Report Ris. RisPhD-28(EN), Ris National Lab., Roskilde, Denmark. Blackadar, A.K., 1962. The Vertical Distribution of Wind and Turbulent Exchange in a Neutral Atmosphere. J. Geophys. Res, 97: 30953102. Detering, H.W., Etling, D., 1985. Application of the E- Turbulence Model to the Atmospheric Boundary Layer. Boundary-Layer Meteorol., 33, 113133. Jones, W.P., Launder, B.E., 1972.The Prediction of Laminarization with a Two-Equation Model of Turbulence. Int. J. Heat Mass Transfer, 15: 301314. Koblitz, T.W., Bechmann, A., Srensen, N.N., 2010. The 2D lid-driven cavity Validation of CFD code to model nonNeutral Atmospheric Boundary Layer Conditions. Proceedings 6th PhD Seminar on Wind Energy in Europe: 157-160. Launder, B.E., Spalding, D.B., 1974. The Numerical Computation of Turbulent Flows. Comp. Meth. Appl. Mech. Engineer. 3: 269289. Michelsen, J.A., 1992. Basis3d-a platform for development of multiblock PDE solvers. Technical report AFM 92-05, Technical University of Denmark. Michelsen, J.A., 1994. Block structured multigrid solution of 2D and 3D elliptic PDE solvers. Technical report AFM 94-06, Technical University of Denmark. Mellor, G.L., Yamada, T., 1974. A hierarchy of turbulence closure models for planetary boundary layers. J Atmos Sci, 31:17911806. Pope, S.B., 2000. Turbulent flows. Cambridge University Press, UK 771 pp. Sogachev, A., Panferov O., 2006. Modification of two-equation models to account for plant drag. Boundary- Layer Meteorol., 121:229266. Sogachev, A., 2009. A note on two-equation closure modelling of canopy flow. Bound.-Lay. Meteorol., 130: 423435. Srensen, N.N., Bechmann, A., Johansen, J., Myllerup, L., Botha, P., Vinther, S., Nielsen, B.S., 2007. Identification of severe wind conditions using a Reynolds-averaged Navier-Stokes solver. The Science of Making Torque from Wind, Lyngby, Denmark, 28-31 August 2007. Srensen, N.N., 1995. General purpose flow solver applied to flow over hills. Technical Report Ris-R-827(EN), Ris National Lab., Roskilde, Denmark. Spalart, P.R., Rumsey, C.L., 2007. Effective Inflow Conditions for Turbulence Models in Aerodynamic Calculations. AIAA Journal, Vol. 45, No. 10, pp. 2544-2553. Van Ulden, A.P., Holtslag, A.A.M., 1980. The wind at heights between 10m and 200m in comparison with the geostrophic wind. J Proc Sem Radioactive Releases, Vol 1, Riso, Denmark, C.E.C. Luxemburg, pp 8392. Weng, W., Taylor, P.A., 2006. Modelling the one-dimensional stable boundary layer with an E- turbulence closure scheme. Boundary-Layer Meteorology. Zilitinkevich, S.S., Esau, I., 2002. On integral measures of the neutral barotropic planetary boundary layers. Boundary Layer Meteorology, 104(3): 371-379.