The flow solvers OpenFOAM and EllipSys3D are compared in the case of neutral
atmospheric flow over terrain using the test cases of Askervein and Bolund
hills. Both solvers are run using the steady-state Reynolds-averaged
Navier–Stokes

One of the main modeling differences between the two solvers is the wall-function approach. The OpenFOAM v.1.7.1 uses a Nikuradse's sand roughness model, while EllipSys3D uses a model based on the atmospheric roughness length. It is found that Nikuradse's model introduces an error dependent on the near-wall cell height. To mitigate this error the near-wall cells should be at least 10 times larger than the surface roughness. It is nonetheless possible to obtain very similar results between EllipSys3D and OpenFOAM v.1.7.1. The more recent OpenFOAM v.2.2.1, which includes the atmospheric roughness length wall-function approach, has also been tested and compared to the results of OpenFOAM v.1.7.1 and EllipSys3D.

The numerical results obtained using the same wall-modeling approach in both EllipSys3D and OpenFOAM v.2.1.1 proved to be almost identical.

Two meshing strategies are investigated using HypGrid and SnappyHexMesh. The performance of OpenFOAM on SnappyHexMesh-based low-aspect-ratio unstructured meshes is found to be almost an order of magnitude faster than on HypGrid-based structured and high-aspect-ratio meshes. However, proper control of boundary layer resolution is found to be very difficult when the SnappyHexMesh tool is utilized for grid generation purposes.

The OpenFOAM is generally found to be 2–6 times slower than EllipSys3D in achieving numerical results of the same order of accuracy on similar or identical computational meshes, when utilization of EllipSys3D default grid sequencing procedures is included.

Wind resource assessment is of major importance to assess the economic
viability of a wind farm project. The traditional tools used by the wind
industry rely on linearized flow models and do not perform accurately in
complex terrain

Several CFD solvers are currently available to the industry. Among them,
OpenFOAM

Using a non-default,

Two questions are, however, unanswered: how easily and how fast OpenFOAM can
produce accurate results. These two questions are of course relative to other
flow solvers, but they are relevant and important for the wind industry, as
they can represent substantial costs in terms of both necessary hardware and
manpower required, due to potentially extensive meshing and computational
times. In order to address these questions, OpenFOAM is compared with
EllipSys3D

The comparison presented here is focused on the mesh requirements of OpenFOAM
relative to EllipSys3D and how this can affect the accuracy of the results.
Furthermore, the two CFD codes are benchmarked in speed on the computer
cluster at DTU Wind Energy, utilizing two Intel Xeon^{®}
nodes (2

In order to keep the comparison as close as possible, the two flow solvers are
run, to the best possible extent, using the same models and parameters. The main
model difference between the two flow solvers is the wall function applied
for modeling the effect of the ground roughness on the flow. EllipSys3D

Both EllipSys3D and OpenFOAM are based on the finite-volume solution of the
Reynolds-averaged Navier–Stokes (RANS) equations. If molecular viscosity is
neglected due to the high Reynolds number and the eddy-viscosity hypothesis
of

The classical two-equation high Reynolds number

In order to model the effect of surface roughness and avoid resolving the laminar sublayer, it is common practice to use the wall function for atmospheric flows. One of the major differences between EllipSys3D and OpenFOAM v.1.7.1 is related to how the wall function is implemented. In the more recent OpenFOAM v.2.1.1 the same wall function as the one in EllipSys3D is included in the official release.

In EllipSys3D the traditional high Reynolds number equilibrium assumptions
are used to derive the wall function (see

As seen from Eq. (

In order not to abandon the momentum equation in the near-wall cell by simply
fixing the velocity according to log law (Eq.

The wall function available in OpenFOAM v.1.7.1 is based on Nikuradse's
equivalent sand roughness length,

Assuming

Comparing with Eq. (

Using the built-in routine (

The model is identical to the model implemented in EllipSys3D. Regarding the OpenFOAM implementation, the only difference compared to Nikuradse's roughness length model is in the way turbulent viscosity is determined.

Using the built-in routine (

Askervein Hill: surface grid generated with

In the simulations carried out in this work, in both flow solvers, the RANS
equations are discretized using the QUICK scheme

EllipSys3D uses the mesh generator HypGrid

SnappyHexMesh is a hexahedral unstructured mesh generation tool included in the distribution of OpenFOAM. SnappyHexMesh can use a 3-D terrain surface and iteratively build a mesh upon it. Some options allow construction of several cell layers of a controllable height above the terrain surface. This feature makes it possible to have a refined mesh in the region of high velocity gradients, close to the ground. Several regions can be selected to be refined to a desired level, and this method is creating a mesh of a cell aspect ratio close to 1. This is done in order to ensure that OpenFOAM can solve the numerical problems with the highest efficiency and accuracy using meshes generated with SnappyHexMesh. The meshing tool SnappyHexMesh can be run in parallel on a computer cluster or a PC.

The inputs used to simulate Askervein Hill are fitted based on the upstream mast measurements.

The complete set of all simulation inputs, in accordance with

Set of atmospheric parameters used for Askervein, as described in

The Askervein map is used as input to the in-house tool “surfgrid”. The
surfgrid tool generated a circular (32.5 km in diameter) surface mesh, with a
refined region of 2 km

Askervein Hill: volume grid generated with

Askervein Hill: cross section of the grid created by SnappyHexMesh.
Three refinement boxes together with variations in number of surface layers
indicated in the figure are used as a basis for generation of the grids
described in Table

Askervein Hill: speedup along the line A.

Askervein Hill: turbulent kinetic energy along the line A.

Two meshes are created with this method, one with a first cell center height
of 0.4 m

The surfgrid-generated surface grid used for HypGrid meshing is converted to
STL file format and utilized to generate a ground boundary surface suitable
for the SnappyHexMesh OpenFOAM utility. The SnappyHexMesh-generated surface
mesh close-up view is shown in Fig.

Askervein Hill: overview of different
control parameters used to generate the SnappyHexMesh-created grids.
The “blockMesh” column shows the number of grid points in the

As can be seen in Table

The main results of the Askervein test case are presented in
Figs.

Overall, the results of all simulations are very similar to the measurements in the region upstream of the hilltop, both in terms of speedup and turbulent kinetic energy (TKE).

After the hill-top however, results of the simulations start to differ from
each other significantly, in terms of speedup and to a lesser extend in
terms of TKE. In comparison with the measurements, the speedup results are
relatively close to the EllipSys3D simulation, using the mesh with a first
cell height equal to the surface roughness (HG2 grid – dotted magenta
line – Fig.

One should also note the very good agreement between OpenFOAM v.2.1.1 and
EllipSys3D (the dashed black and blue curves), based on an identical
wall-function model

Default values (i.e., from

The computational process in EllipSys3D has been done both with the standard
five-level grid sequencing

A built-in EllipSys3D function. It can easily be used to directly perform, for example, a grid dependency study.

and without it. In the OpenFOAM case the direct grid sequencing procedure does not exist. Here, two grids – the first consisting of 32The obtained computational times are presented in Table

In the comparison of EllipSys3D to OpenFOAM runs (Table

Askervein Hill: simulation times for EllipSys3D and OpenFOAM codes.
For information about different grids utilized in the computations, see
Table

The inputs used to simulate Bolund Hill test case are based on quantities
proposed by

Set of atmospheric parameters used for Bolund Hill test case.

Bolund Hill: surface grid generated by

Bolund Hill: volume grid generated with

A Bolund map used in connection with the blind comparison test presented in

It turned out that a very limited number of cells very close to the Bolund Hill front edge needed to be rearranged. This was done by still keeping the fixed surface projection, ensuring that the created grid had the same qualitative Bolund Hill surface representation.

. A close-up view of the generated surface grid is presented in Fig.Bolund Hill: overview of different control parameters used to generate
the SnappyHexMesh-created grids. For the definition of different parameters in the
table, see Table

Bolund Hill: cross section of the grid created by SnappyHexMesh.
Three refinement boxes together with variations in the number of surface layers
indicated in the figure are used as a basis for generation of the grids
described in Table

As can be seen, some compromises on the position of the first grid point
in the surface normal direction (especially in the OpenFOAM cases) had to be
made due to the change in the surface roughness length throughout the
computational domain. Even though no formal model-based restriction exists regarding
the position of the first cell center height in the

Bolund Hill: speedup along line B. Uppermost panel: 5 m a.g.l. (above ground level); middle panel: 2 m a.g.l. Measurements are denoted as circles with corresponding uncertainties denoted by an error bar.

A similar procedure to that in the Askervein Hill test case, regarding the re-use
of the surfgrid-created ground surface mesh utilized in the HypGrid meshing
tool, is conducted in the Bolund Hill case. Upon the surface grid conversion
to STL file format, a rectangular domain of 2.3

Bolund Hill: turbulent kinetic energy along line B. Uppermost panel: 5 m a.g.l.; middle panel: 2 m a.g.l.

The results of the Bolund test case are presented in Figs.

The obtained results are compared to the results submitted by other participants of the Bolund blind comparison (not shown here) and found to be in close agreement with the submitted numerical results attained utilizing two-equation turbulence models.

As a roughness change characterizes the Bolund Hill test case, some
considerations regarding the position of the first grid point in the surface
normal direction do exist. The wall-function closure used in EllipSys3D flow
solver does not restrict the position of the first grid point in the surface
normal direction, so the position chosen here corresponds to 3

For this reason two different 2-D flat terrain computations involving the
grids where the position of the first grid point in the surface normal
direction was varied from

Bolund Hill: mast position 7, speedup and turbulent kinetic energy.

From Figs.

Bolund Hill: simulation times for EllipSys3D and OpenFOAM codes. For
information about different grids utilized in the computations, see Table

The solver inputs, apart from the Bolund Hill-specific ones presented in
Table

Specifically, div(phi,U) Gauss linearUpwindV cellMDLimited Gauss linear 1.

scheme was used in those cases. Computations on the HypGrid-based HG1 grid in OpenFOAM were redone using theThe obtained computational times are shown in Table

Comparing EllipSys3D to fastest OpenFOAM runs on grids of similar size
(Table

Firstly, it should be pointed out that several simulations using the
Nikuradse's equivalent sand roughness length wall model have been rerun in
the more recent OpenFOAM v.2.1.1. Also, OpenFOAM v.2.1.1 has been
compiled using the optimized Intel icc compiler for the
Intel Xeon^{®} (enclosed in the DTU Wind Energy cluster
facility) CPU platform, and selected simulations were rerun in this
environment as well. In both cases no noticeable differences in the
computational times, compared to the ones presented here, were observed.

OpenFOAM's own SnappyHexMesh meshing tool seems to have reasonable grid generation applicability and flexibility for the investigated neutral atmospheric boundary layer (ABL) flow over complex terrain, although a number of problems were encountered during the meshing process.

In the Askervein Hill case it was possible to create several grids with good
general and boundary layer resolution capabilities using it. Dedicated grids
for both Nikuradse's equivalent sand roughness length wall model and the
atmospheric roughness length wall-function approach could be made directly.
Generating the surface layer, crucial for appropriate boundary layer
description in the ABL simulations, was a quite difficult task. Only usable
results were obtained by splitting the

In the Bolund Hill case, some of the mentioned surface layer generation
problems were even more emphasized. The abrupt change in surface structure at
the Bolund Hill front side created severe problems in the generation of the
surface layers, so extending, for example, the

In contrast, HypGrid, a meshing tool developed deliberately to create low-skewness hyperbolic 3-D meshes based on complex surface topologies, appears to
be able to cope with both investigated geometries without significant
problems. EllipSys3D could easily handle all grids created by HypGrid, but
some adjustments, described in Sect.

The results obtained with OpenFOAM for the Askervein Hill case show very
good general agreement with EllipSys3D and cup anemometer measurements in
terms of speedup curves presented in Fig.

Practically the only difference can
be seen for horizontal distance from HT

Regarding the TKE plots presented in Fig.

The general deviations between numerical results on the lee side of the hill
are much larger, but the differences between all computations and measurements
here appear much more significant (numerical findings underpredict
measurements by more than 50 %) and dominant than the differences between
the computations. In the obtained steady state solutions occurrence of the
flow separation has not been detected. As intermittent flow separation seemed
to occur during the observational period, and as separation increases the
general turbulence levels, this can be a possible reason why currently used
RANS turbulence model cannot predict levels of turbulent kinetic energy on
the lee side of the hill accurately

Considering OpenFOAM results from both Figs.

The first observation regarding the Bolund Hill results presented in
Figs.

The differences in wall-modeling approach appear to play a dominant role in flow predictions in the recirculation zone on the lee side of the hill. Here, the OpenFOAM v.1.7.1-based calculations (HG1 (HG1 LU) and SHM2) seem to collapse to a single curve, while OpenFOAM v.2.1.1-based calculations (HG2, SHM(1,3) grids and EllipSys3D HG3 grid) seem to collapse to another curve at both 2 and 5 m a.g.l. Only the OpenFOAM v.1.7.1 SHM1 grid-based calculation follows the EllipSys3D and OpenFOAM v.2.1.1 results rather than the rest of the OpenFOAM v.1.7.1 computations.

Regarding the TKE plots in Fig.

The behavior of computed results on SHM1 grid therefore appears more to
reflect the ability of the grid to “snap” the correct Bolund ground
surface (

Comparison of OpenFOAM v.1.7.1-based (HG1 and HG1 LU) results which use identical
settings and grid, with the only difference being in the discretization scheme used
(

Computational times from Table

Focusing now on SnappyHexMesh-based results, it can be seen that a speed
increase close to a factor of 2 is gained by using the grid sequencing
procedure. The same is almost true in the HypGrid-based cases: there is slightly
lower speed gain in the OpenFOAM v.1.7.1 case and slightly higher gain in the
OpenFOAM v.2.1.1 case. In the SnappyHexMesh SHM3 case the speed differences
between OpenFOAM v.2.1.1 and OpenFOAM v.1.7.1 computations are almost
negligible, indicating that differences in the wall-modeling approach used in
the two calculations do not seem to affect the convergence speed process
significantly. Also, considering the increase in the number of grid points – following
cases SHM(1,3,4) OpenFOAM v.1.7.1 and SHM(2,3,4) OpenFOAM v.2.1.1 – a
proportional reflection in the computational times from
Table

Compared to the Bolund Hill test case, the grid sequencing procedure in the EllipSys3D computations does not appear to influence the computational time considerably. The reasons for this probably lie in the general flow complexity (or rather lack of the same) of the Askervein Hill case, as it apparently prevents the solver from fully utilizing the advantage of a solution on the coarser grid level, compared to using the standard start guess in the solution procedure on the fine grid. Placing the first near-wall cell very close to the ground (the HG2 grid) is seen to have a slight influence on the computational times also (relative to the HG1 grid).

In comparison of the EllipSys3D and OpenFOAM runs, best done on grids of similar size and position of the first cell center above ground level (i.e., the HG1 and SHM3 grids), it is seen that EllipSys3D is approximately 1.9 (grid sequencing on) and 2.5 (grid sequencing off) times faster in obtaining the converged solution.

In the Bolund Hill case

A residual convergence level of 10

Furthermore, Table

Grid sequencing procedures seem to have a smaller positive influence on the
SnappyHexMesh-based calculations in the Bolund Hill case (speedup factor of

The EllipSys3D code seems to benefit considerably from its automatic grid sequencing procedure, as it speeds up the computations by more than a factor of 10.

From comparison of the EllipSys3D run with best directly comparable OpenFOAM run
(v.2.1.1 SHM3 smallest

In this work, the unstructured OpenFOAM flow solver is compared to the structured EllipSys3D flow solver on two test cases calculating neutral atmospheric boundary layer flow over complex terrain.

Two meshing tools are considered: the structured hyperbolic 3-D mesh generator HypGrid and OpenFOAM's own hexahedral mesh generator SnappyHexMesh. OpenFOAM was found to be able to successfully perform calculations on the HypGrid-created meshes in both considered test cases. SnappyHexMesh was also able to produce reasonable grids in both the Askervein Hill and Bolund Hill test cases. A very important parameter for computational grids in ABL flows – height of the first near-ground cell – proved to be very difficult to directly control using the SnappyHexMesh tool reflected in its (in)ability to create surface layers. This issue makes it quite difficult to use SnappyHexMesh consistently in relation to grid generation processes relevant for ABL flows, so a tool with more direct user control over this crucial part of the grid generation process can be recommended.

In terms of accuracy, both flow solvers are found to perform equally well on
the two test cases, regarding both the mean flow velocity and turbulence
quantities. In particular, OpenFOAM v.2.1.1 and EllipSys3D calculations,
performed on identical (Askervein Hill case) and very similar (Bolund Hill
case) computational grids, using the same approach to wall-function modeling
of ABL flows

However, a large discrepancy in the speed performance is found. A very large difference in calculation times is obtained between HypGrid- and SnappyHexMesh-based OpenFOAM calculations, indicating that a structured meshing tool, typically creating grids with high-aspect-ratio cells in ABL flows, causes the OpenFOAM solver to perform inefficiently. Results of the present work show that this performance issue can be partially addressed by introducing a grid sequencing procedure in the OpenFOAM runs. Generally, the grid sequencing procedure had a very positive effect on almost all OpenFOAM computations and can be highly recommended.

In the comparison of EllipSys3D, which utilizes the grid sequencing procedure by default, and OpenFOAM SnappyHexMesh-based calculation times, the structured EllipSys3D solver is found to perform approximately 2–6 times faster on grids with similar properties.

Using a combination of hexahedral and polyhedral cells the SnappyHexMesh tool can produce suitable grids in many relevant ABL flow cases and bring the computational times close to the level of the structured EllipSys3D code, but the inability to fully control ground surface approximation and associated surface layer creation, as in the Bolund Hill case, can potentially impair the quality of the obtained SnappyHexMesh-based results. On the other hand, use of the structured HypGrid solver, where terrain description and surface layer creation can be fully controlled, proved to be accompanied with a high speed performance penalty in the OpenFOAM runs. Thus, an unstructured mesh generation tool where both surface approximation and accompanied surface layer creation is better controlled might be an optimal meshing tool for ABL flow calculations using the OpenFOAM solver.

This work is supported by the Center for Computational Wind Turbine Aerodynamics and Atmospheric Turbulence, funded by the Danish Council for Strategic Research, grant number 09-067216. Partial support from the ERANET Plus project called the New European Wind Atlas is appreciated. Edited by: S. Aubrun