scieee AI-readable full text Open interactive document viewer

Mesh generation, sizing and convergence for onshore and offshore wind farm Atmospheric Boundary Layer flow simulation with actuator discs

Gargallo Peiró, Abel,Avila, Matias,Owen, Herbert,Prieto-Godino, Luis,Folch, Arnau

Abstract

A new mesh generation process for wind farm modeling is presented together with a mesh convergence and sizing analysis for wind farm flow simulations. The generated meshes are tailored to simulate Atmospheric Boundary Layer (ABL) flows on complex terrains modeling the wind turbines as actuator discs. The wind farm mesher is fully automatic and, given the topography and the turbine characteristics (location, diameter and hub height), it generates a hybrid mesh conformal with the actuator discs and refined upwind and downstream. Moreover, it presents smooth element size transitions across scales and avoids extending high-resolution areas to all the domain. We take advantage of our automatic and robust mesher to study the mesh convergence of our RANS solver with linear elements, obtaining quadratic mesh convergence for a quantity of interest in all the tested cases. In addition, we quantify the mesh resolution at the terrain surface and at the actuator discs required to achieve a given numerical error in simulations in onshore and offshore frameworks. Finally, we present the generated meshes and the simulation results for an offshore and an onshore wind farm. We analyze in detail one particular wind direction for both cases, and for the onshore wind farm we use our automatic framework to estimate the yearly production of energy and measuring the error against the actual produced one.

Full text

Journal of Computational Physics 375 (2018) 209–227 Contents lists available at ScienceDirect Journal of Computational Physics www.elsevier.com/locate/jcp Mesh generation, sizing and convergence for onshore and offshore wind farm Atmospheric Boundary Layer flow simulation with actuator discs Abel Gargallo-Peiró a,∗, Matias Avila a, Herbert Owen a, Luis Prieto-Godino b, Arnau Folch a aComputer Applications in Science and Engineering Dpt., Barcelona Supercomputing Center-Centro Nacional de Supercomputación, C/ Jordi Girona 29, 08034 Barcelona, Spain bEnergy Resource Dpt., Iberdrola Renovables Energía, C/ Tomás Redondo 1, 28033 Madrid, Spain a r t i c l e i n f o a b s t r a c t Article history: Received 26 February 2018 Received in revised form 20 August 2018 Accepted 20 August 2018 Available online 28 August 2018 Keywords: Mesh generation Hybrid mesh Mesh optimization Wind farms Actuator disc Topography A new mesh generation process for wind farm modeling is presented together with a mesh convergence and sizing analysis for wind farm flow simulations. The generated meshes are tailored to simulate Atmospheric Boundary Layer (ABL) flows on complex terrains modeling the wind turbines as actuator discs. The wind farm mesher is fully automatic and, given the topography and the turbine characteristics (location, diameter and hub height), it generates a hybrid mesh conformal with the actuator discs and refined upwind and downstream. Moreover, it presents smooth element size transitions across scales and avoids extending high-resolution areas to all the domain. We take advantage of our automatic and robust mesher to study the mesh convergence of our RANS solver with linear elements, obtaining quadratic mesh convergence for a quantity of interest in all the tested cases. In addition, we quantify the mesh resolution at the terrain surface and at the actuator discs required to achieve a given numerical error in simulations in onshore and offshore frameworks. Finally, we present the generated meshes and the simulation results for an offshore and an onshore wind farm. We analyze in detail one particular wind direction for both cases, and for the onshore wind farm we use our automatic framework to estimate the yearly production of energy and measuring the error against the actual produced one. ©2018 The Authors. Published by Elsevier Inc. This is an open access article under the CC BY license (http://creativecommons.org/licenses/by/4.0/). 1. Introduction Advances in Computational Fluid Dynamics (CFD) techniques during the last two decades have widened the spectrum of engineering and industrial applications involving numerical analysis. In wind energy, numerical modeling has become a key tool for industry at several stages, from early wind resource assessment and wind farm design to final management and exploitation. During a wind farm design stage, numerical modeling allows improving the emplacement of wind turbines by optimizing relevant parameters such as expected wind power production, turbulence intensity or wind loads. During a production stage, operational power forecasts based on local-scale wind flow simulations is emerging as an alternative to current methodologies based on time series of observations and statistical downscaling. In parallel with the advances in *Corresponding author. E-mail address: [email protected] (A. Gargallo-Peiró). https://doi.org/10.1016/j.jcp.2018.08.031 0021-9991/©2018 The Authors. Published by Elsevier Inc. This is an open access article under the CC BY license (http://creativecommons.org/licenses/by/4.0/). 210 A. Gargallo-Peiró et al. / Journal of Computational Physics 375 (2018) 209–227 CFD techniques, the exponential growth on computing power has allowed to increase the number of computational cells and therefore to increase the extent and/or the resolution of the simulations. This aspect is relevant when modeling wind farms because, typically, the computational domains involved are large (scale of kilometers) and, at the same time, the local wind dynamics have to be captured around turbines (scale of meters). Such a combination of large domains and small spatial scales can result in space discretizations leading to a large number of elements/nodes and, consequently, on large computational solver requirements, particularly if structured meshes are considered. There are several aspects that hamper and slow the transferring of numerical improvements from research to industry. One aspect regards the complexity of modeling wake effects combined with the simulation of Atmospheric Boundary Layer (ABL) flows in complex terrains. Wind resource assessment at on-shore wind farms requires to solve wind flow over a complex terrain, typically considering computational domains extending over tens of kilometers and containing from tens to few hundreds of wind turbines. In this context, existing modeling strategies span from Large Eddy Simulation (LES) to Reynolds Averaged Navier–Stokes (RANS) models. LES models for rotor wakes in complex terrains have been introduced recently with promising results [1,2], but they are still costly at wind farm scales and difficult to converge to a statistical steady state solution, particularly when accounting for Coriolis effects. In contrast, RANS-based approaches [3–5]involving actuator discs [6]provide a steady-state solution and are widely used in research and industry given its compromise between accuracy and computational cost. The actuator disc model [7–13]treats wind turbines as a sink of momentum by imposing a uniform force that depends on the thrust coefficient and disc-averaged inflow velocity [7,8]. Several studies have shown that, at distances exceeding two rotor diameters downwind from the disc, the actuator disc approach gives accurate velocity and turbulence kinetic energy results for both single rotor and large wind farms [3–5,14,15,9,16]. A second bottleneck in wind farm simulations is the complexity to discretize in an automatic and robust manner the multi-scale computational domains involved. Ideally, target meshes should preserve topographic features, resolve the terrain ABL and, simultaneously, be fine enough downstream and around turbines to capture the relevant wake scales. This paper focuses on the second aspect, i.e. on the generation of computational meshes for ABL flow simulations in wind farms modeling the turbines using the actuator disc theory. Each of these aspects has geometrical requirements that must be transcribed into the computational mesh. First, it is necessary to discretize the underlying topography. Second, the need to capture ABL flow gradients poses mesh resolution and stretching requirements to the CFD solvers and, therefore, a boundary layer mesh is required close to the ground. Third, the actuator discs that emulate the effects of wind turbines on the flow must be discretized during the mesh generation procedure and embedded in the mesh. Finally, the computational mesh requires of a higher resolution upstream and downstream of a turbine in order to capture the wake effects that cause wind speed deficits and interactions among different turbines within a farm. All these meshing features impact on the simulation accuracy and computational requirements of the solver since they affect the mesh quality and increase the element count of the mesh. In this work, we propose a new mesh generation approach for onshore and offshore wind farms. The method is devoted for the case in which the turbines are modeled using the actuator disc theory. We first generate a semi-structured mesh without turbines that dicretizes the topography. This mesh resolves the ABL and is generated using a sweeping (extruding) approach combined with a quality optimization procedure to deliver high-quality meshes. Next, the mesh around the turbines is removed and the actuator disc are discretized using hexahedra. The mesh around the turbines is generated with the desired mesh sizing upstream, downstream and radially from the turbines. Finally, the ABL and disc meshes are coupled taking advantage of the flexibility of tetrahedra and using different tetrahedral/pyramid templates to generate a conformal hex-dominant hybrid mesh. The resulting meshes are used to solve the Reynolds Averaged Navier–Stokes (RANS) equations with a k-εturbulence model adapted to the Atmospheric Boundary Layer [17]. The model was developed by Avila et al. [18,19] and implemented in the finite-element multi-physics parallel solver Alya [20,21]. However, the meshing code has been implemented as an external model-independent pre-process program. As a result, meshes generated with this utility can be used to simulate both with steady-state RANS or Large-Eddy Simulation (LES) turbulence models and, in addition, are also valid for solvers based on other numerical methods such as Finite Volumes. In addition to presenting the mesh generation method, several convergence analyses of the solver with respect to different meshing parameters are performed. These analyses are used to determine the different mesh sizing parameters to perform the simulations with an error below the desired tolerance. The rest of the paper is organized as follows. Section 2details the existent works related to topography and wind farm meshing, highlighting the main differences and contributions of the current work. Section 3states the problem, defines the relevant input data, and describes the main steps of the meshing approach. Section 4describes our optimization-based approach to generate semi-structured hexahedral meshes conformal with the topography to perform ABL flow simulations. Following, Section 5proposes a new methodology to embed the wind turbines as actuator discs and adapt the mesh to add the required resolution around them, leading to an hybrid mesh conformal with the discs. Section 6presents a mesh convergence study of the Alya solver, which is used to determine an optimal topography and disc element size. Finally, Section 7shows simulation results for real onshore and offshore wind farms in order to illustrate the applicability of the methodology. A. Gargallo-Peiró et al. / Journal of Computational Physics 375 (2018) 209–227 211 2. Related work The first step of this work is the generation of topography meshes resolving the ABL, into which we will insert a mesh adapted to the actuator discs. The generation of topography meshes resolving the ABL is approached in the literature from two main perspectives. First, structured grids have been classically used in Finite Volumes or Differences, where the effect of the topography is introduced through a change of coordinates inside the formulation [22,23] and not explicitly in the mesh generation procedure. Second, hexahedral elements have been used to exploit their natural structure and prescribe the boundary layer. In particular, [24,25]solve a system of hyperbolic Partial Differential Equations (PDEs) to impose orthogonality and the desired cell volume. In a similar approach, [26]solves an elliptic system of PDEs to determine the vertical configuration of a semi-structured mesh. Alternatively, a third different approach using unstructured meshes exists for topography applications that require higher geometrical flexibility but without boundary layer, both with tetrahedra [27–30] in several flow applications, or with hexahedra [31]in underground seismic applications. Among the stated approaches, this work can be classified in the second perspective. We generate an hexahedral mesh conformal with the terrain and featuring the desired boundary layer. However, in contrast with previous approaches, we use mesh quality optimization techniques [32–34]to obtain valid final meshes with the desired orthogonality and anisotropy. The second and main contribution of this work is the generation of the wind farm mesh. The vast majority of bibliography regarding the generation of meshes for wind farm simulations with actuator discs constrains to offshore cases. In particular, several works [7,11,12,9,13]build on structured meshes that have higher resolution areas around turbines. Given the structured nature of these hexahedral meshes, the higher resolution areas have to be extended in a cross-like manner across the domain. This inconvenient is circumvented in [35]by using a background structured hexahedral mesh to discretize the domain and a local 2D mesh for the actuator disc, interpolating between both meshes in a non-conformal way (using hanging nodes). Another alternative, presented in [36], is to use a domain composition method based on coupling, also in a non-conformal manner, a background mesh of the ABL with a finer mesh around each actuator disc. Alternatively, we propose a third option based on generating conformal hybrid meshes. To this purpose, we first generate an ABL hexahedral structured mesh conformal with the topography. Then, we remove some hexahedra in the upwind and near-wake regions of the turbines filling the resulting void space with a finer unstructured mesh conformal with the disc. This approach presents several advantages. First of all it avoids extending the higher resolution zones around the disc across the domain, a strategy that results on unnecessarily large element count. Second, and in opposition to the previous non-conformal alternatives, it also avoids solver numerical errors derived from interpolation between meshes. Finally, a smooth element size transition can be imposed between the higher-resolution inner disc and the much coarser background mesh, avoiding the penalties on the solver from having abrupt changes of element size. 3. Problem statement The final objective of this work is to generate meshes that allow performing Atmospheric Boundary Layer simulations using the actuator disc theory to model the effect of wind turbines in a wind farm. The required input data for the mesher are: •the terrain description (topography and roughness), •the wind inflow direction and, •the turbine characteristics (location, diameter and hub height). Herein, the wind turbine effects are modeled following the actuator disc theory, which models the turbine as a disc and introduces a sink in the momentum equations. Following the analysis of the actuator disc model performed in Cabezon et al. [9], we set the width of the actuator disc to a 6% of its diameter. From the meshing point of view, the actuator disc model considers the geometry of the wind turbine as a disc that has to be inserted at the hub height facing the inflow wind direction. In addition, the mesh around discs has to be finer than the outer background mesh in order to capture the smaller wind flow scales. This demands an accurate mesh transition to conform in a smooth manner the sizes of the elements in the background and actuator disc meshes. The mesh generation procedure presented in this work is fully automatic and requires only to set four mesh parameters: •ground surface element size hs(horizontal resolution), •height of the first element (cell) of the ABL, •vertical growing factor and, •element size at the actuator discs hd. Actually, other meshing parameters may be required in order to obtain a valid mesh, but these are automatically set during the process so that user tuning is minimized. Mesh parameters such as growing factor downstream/upwind of the turbines, tetrahedral size to conform the background and disc meshes or the extension of the refined region around each turbine are automatically computed to guarantee smooth element transitions between the background and disc meshes and a valid final mesh. 212 A. Gargallo-Peiró et al. / Journal of Computational Physics 375 (2018) 209–227 The output of the mesh generation procedure is an hybrid mesh that preserves several features. First, it is conformal with the input topography and it resolves the Atmospheric Boundary Layer. Second, it is conformal with the actuator discs and it is finer around the disc to capture the upwind and wake effects. Finally, it is composed by valid elements that have been optimized in terms of the quality measure described in Section 4. The proposed mesh generation procedure is composed by the following 3 steps: 1. Topography surface mesh. Generate a quadrilateral surface mesh of the topography with the desired element size. In Section 4.1, we discretize the surface into quadrilaterals with the nodes on the exact topography, and we optimize the surface mesh maximizing the elemental quality. We highlight that the topography can be given in different formats, which are all translated into a triangle mesh that defines our target geometry. 2. Background Atmospheric Boundary Layer mesh. Generate an ABL hexahedral mesh that captures the topography and reproduces the boundary layer. In Section 4.2, we use a sweeping (extruding) method to extrude the surface mesh into layers using the desired grow ratio. In particular, each sweeping step is combined with a non-linear optimization of the mesh nodes to ensure the validity of the mesh when high-gradients of the topography are present, and a final global optimization is performed to obtain an optimal mesh quality. 3. Wind farm mesh. Given the ABL mesh and the location and characteristics of the turbines of a wind farm, we generate an hybrid mesh with the necessary resolution to capture the flow features induced by the turbines. For each turbine, in Section 5we generate an hexahedral mesh that discretizes the actuator disc and that is finer in the upstream and downstream directions. This mesh is generated taking into account the direction of the wind and the mesh sizing of the ABL mesh at the insertion point. In addition, the mesh around each disc is generated to ensure a smooth transition of the element size at the disc and the element size of the ABL mesh. We remove the elements of the background ABL mesh that intersect with the fine disc and wake meshes and we insert the fine disc mesh into the background mesh. To obtain a final conformal mesh, we subdivide the hexahedral elements that define the boundary of both meshes into pyramids and tetrahedra. Following, we take advantage of the flexibility of tetrahedra to match the ABL and disc meshes, obtaining a final conformal hybrid mesh that is hex-dominant by construction. 4. Background Atmospheric Boundary Layer mesh generation In this section, we present an optimization-based approach to generate Atmospheric Boundary Layer meshes conformal with the topography. The volume mesh is generated by means of a sweeping (extrusion) process of the surface mesh. We first generate a surface mesh of the topography and we sweep this surface mesh to a planar ceiling mesh at the desired height. Herein, we set the ceiling at a default height of 2000 meters over the highest topography point. We divide the process to generate the ABL mesh into two main steps: the generation of the surface mesh (Section 4.1), and the generation of the volume mesh (Section 4.2). To generate the ABL mesh we have chosen a mesh generation procedure that provides a semi-structured hexahedral mesh aligned with the wind direction. We have taken into consideration different advantages that hexahedra deliver to the final mesh. First, since we are going to define a semistructured mesh, the hexahedra are by construction aligned with the wind direction. Second, using a sweeping procedure the final hexahedral mesh is also by construction defining the desired boundary layer, since we can extrude each layer using the corresponding growing ratio. Finally, to simulate a complete wind farm we have to deal with a large domain and an important feature of hexahedra is that they fill the space with less elements, which reduces the element count of the final mesh to reproduce the required boundary layer. The procedure presented in this section is specifically oriented to generate valid onshore wind farm meshes. For the offshore case, the process to generate the background ABL mesh is simplified by the fact that the ground surface is planar and no mesh optimization is required. 4.1. Surface mesh generation: topography The generation of the topography mesh is composed by the following four steps: 1. Set the topography geometry. The underlying topography can be given in many formats, such as contour topography maps, Cartesian grids or point clouds. We unify all the input frameworks by converting them into a triangle mesh that is used as a geometry representation. In addition, since we are dealing with real data, it can be perturbed by noise that can be either originally in the topography or generated during the extraction procedure. Therefore, if necessary, we remove this noise by performing a signal process smoothing [37,38], see Figs. 1(a) and 1(b). Following, we define a parameterization of the target surface (topography). This parameterization maps a point in the plane to a point in the topography. In our case, it is a discrete parameterization that finds the surface triangle to which the point belongs, and computes the exact location of this point in the topography. In particular, let Ube the parametric plane, and let be the physical surface. We denote by ϕ:U⊂R2−→ ⊂R3 u−→ x(1) A. Gargallo-Peiró et al. / Journal of Computational Physics 375 (2018) 209–227 213 Fig. 1. Meshing process for the Bolund hill: (a) topography, (b) filtered topography, (c) domain regions, (d) quadrilateral surface mesh, and (e) vertical cut showing the hexahedral ABL mesh. the surface parameterization, and we use it to be able to relocate surface mesh nodes on the exact topography by means of relocating them on the parametric plane and mapping them back to the topography. 2. Generate a planar semi-structured quadrilateral mesh. We generate an initial planar semi-structured quadrilateral mesh of the planar domain U. In particular, we set three levels of resolution (see Fig. 1(c)): the interest wind farm area (higher resolution, white color), a transition area (grey), and an elliptical buffer area to impose the boundary conditions (lower resolution, dark grey). The mesh size at the farm and buffer areas are the two user input parameters that determine the surface mesh size. We first mesh the farm area, generating a structured quadrilateral mesh on the plane aligned the input direction. This process results in a quadrilateral domain composed by quadrilateral elements of the size imposed to discretize the desired topography features (fine mesh). Since the resolution of the farm and buffer areas may vary, we next generate a transition area that smoothly matches the element size of the farm and buffer areas. To simplify the imposition of boundary conditions, we want to obtain an elliptical domain to avoid the discontinuities that the corners of the struc- 214 A. Gargallo-Peiró et al. / Journal of Computational Physics 375 (2018) 209–227 tured mesh can induce and to impose in a continuous manner the input/output flow conditions. Hence, in the buffer zone we transform our quadrilateral (parallelepiped) domain in an elliptical one. In this manner, a semi-structured quadrilateral planar mesh is obtained. 3. Generate an initial topography surface mesh. Once we have a planar configuration, the nodes are mapped to the exact topography by means of ϕ, Eq. (1), obtaining a surface mesh. We highlight that the resulting surface mesh can be composed by distorted elements. This may be caused by the fact that quadrilaterals that were square in the plane can be mapped to almost invalid configurations in areas of the topography where there are high terrain gradients, as it can be observed in Fig. 2(a). Therefore, it is mandatory to check the validity of the elements and, if necessary, modify the obtained mesh to obtain a valid configuration. To measure if an element is valid, and to quantify how much it differs from the desired configuration, we use a distortion measure (see Knupp [32]for a review of measures). A distortion measure quantifies in the range [1, ∞)the deviation of an element with respect to an ideal configuration (for instance, the square with the desired size for quadrilaterals). In this work, we denote the distortion of an element with nodes x1, ..., xnpas η(x1, ..., xnp). The distortion takes value 1 when the element presents the desired configuration, and tends to infinity when the element degenerates. The distortion measure [34,39]used in this work can be written for any given element with nodes x1, ..., xnpas: η(x1,...,xnp):=     Dφ2 F d·|det Dφ|2/dEI     · 1−1 EI(2) where φ(x1, ..., xnp)is the mapping between the ideal and physical elements, Dφis its Jacobian, · Fis the Frobenius norm, · EIis the L2norm on the ideal element, 1EIis the measure of the ideal element, and dis the dimension of the space (d =2for planar and surface meshes, and d =3for volumetric meshes). In particular, the quality of an element is the inverse of the distortion: q:= 1 η∈[0,1],(3) which gives us a value in [0, 1], being 0 an invalid configuration, and 1the desired one. In Fig. 2(a) we show the initial surface mesh, coloring the elements with respect to their quality. We observe that non-regular lower quality elements are present in areas with high gradients of the topography. 4. Optimize surface mesh. The final step of the generation of the surface mesh is an optimization of the location of the mesh nodes on the exact topography to obtain a mesh which minimizes the elemental distortion (maximizes the quality). For each element on the surface, we consider as its ideal an orthogonal quadrilateral of the desired size. We target that each surface element reassembles its ideal as much as possible, taking into account that a surface element has the nodes constrained to the topography. To optimize the nodes on the exact topography, we use the surface parameterization presented in Eq. (1)to rewrite the distortion in Eq. (2)for an element Ewith nodes x1, ..., xnp, in terms of the parametric coordinates of the nodes u1, ..., unpas: ηϕ(u1,...,unp):= η(ϕ(u1),...,ϕ(unp)) =η(x1,...,xnp). (4) We want to find the node location on the parametric plane Usuch that provide minimal elemental distortion (maximum quality) of the surface elements in the least squares sense. We seek {u∗ 1, ..., u∗ nNs} ⊂Usuch that: {u∗ 1,...,u∗ nNs}= argmin u1,...,unNs∈U nEs  e=1 ηϕ e(ue1,...,uenp)2 ,(5) where nNsis the number of surface nodes, nEsis the number of surface elements, eidenotes the global node id of the ith node of element e, and ηϕ edenotes the distortion of element e. We highlight that to deal with inverted elements (detDφ≤0), and specially to untangle meshes in the optimization procedure, we use the regularization [40,41]of the determinant det Dφ. In particular, we replace det Dφin Eq. (2)by r(det Dφ), where r(x)=1 2x+x2+4δ2,(6) where δis a numerical parameter that we determine following the approach presented in reference [42]. Once we obtain the optimal location in the parametric space {u∗ 1, ..., u∗ nNs}, we map the nodes back to the topography by means of the parameterization as {x∗ 1, ..., x∗ nNs} ={ϕ(u∗ 1), ..., ϕ(u∗ nNs)}. The topography mesh generation process for the Bolund hill is shown in Fig. 2. In addition, in Table 1, we illustrate the mesh quality statistics resulting from the detailed procedure. Fig. 2(a) shows the initial distorted surface mesh, which has a minimum quality of 0.38. In contrast, Fig. 2(b) shows the optimized mesh, with a minimum quality that has been increased A. Gargallo-Peiró et al. / Journal of Computational Physics 375 (2018) 209–227 215 Fig. 2. Topography mesh generation for the Bolund hill: (a) initial distorted surface mesh, and (b) optimized high-quality surface mesh. The surface elements are colored according to their quality, Eq. (3). (For interpretation of the colors in the figure(s), the reader is referred to the web version of this article.) Table 1 Shape quality statistics for the quadrilateral meshes presented in Fig. 2. Mesh Minimum quality Maximum quality Mean quality Standard deviation Fig. 2(a) 0.38 1.00 0.99 0.02 Fig. 2(b) 0.64 1.00 0.99 0.01 to 0.64, and where we can see that the distorted elements from the initial mesh have become almost regular all over the domain. We highlight that the quality of the surface mesh is of the major importance for the volume mesh. The surface mesh defines the boundary of the volume mesh, and therefore, an invalid (or low-quality) surface mesh will derive in a low-quality (or invalid) volume mesh. 4.2. Volume mesh generation: Atmospheric Boundary Layer in complex topographies The Atmospheric Boundary Layer mesh is generated by sweeping (extruding) the quadrilateral surface mesh of the topography. Regarding the mesh generation procedure for wind farms, we will denote this mesh as background mesh, since it is the starting point to generate an adapted mesh to the turbines (discs) of the wind farm in Section 5. Herein, we choose the growth factor of the boundary layer in the interval [1.05, 1.25], and we set an anisotropy in the first layer of the order of 1/100 or 1/1000, depending on the case and the region of the domain. Given the initial quadrilateral surface mesh, the volume mesh is generated by means of an iterative sweeping procedure that requires two main steps to compute each new sweeping layer: 1. Compute new layer maximizing projected area. Given the previous layer, we generate a new layer of hexahedra by means of sweeping each node using an extruding length and an extruding direction. We calculate the current extrusion length in a standard manner using a geometrical law of the desired growing ratio. Regarding the extruding direction, we use the pseudo-normal of the nodes adjacent to each node presented in [43,44]to compute a new direction that maximizes the orthogonality of the new generated layer. In particular, given a node xwith nLneighboring nodes {x1, ..., xnL}, the pseudo-normal nxis defined as nx:= nL i=1xi×xi+1 nL i=1xi×xi+1=nL i=1(xi−x)×(xi+1−x) nL i=1(xi−x)×(xi+1−x),(7) where we consider xnL+1≡x1. The main property of extruding with the pseudo-normal nxis that is proved [43,44] that it defines the plane that maximizes the area of the projection of the polygon defined by {x1, ..., xnL}. We highlight that we blend the pseudo-normal with the vertical direction in order to enforce that the mesh grows towards the ceiling and that it gets to the top orthogonally to the planar ceiling. To define an optimization-based approach, we require to set an ideal element for each generated physical element. Similarly to the case for the surface mesh, we set the ideal of each hexahedron in terms of the best hexahedron that we would get if no topography was present. That, is we consider that the ideal element of a given physical hexahedron is the ideal of the corresponding surface element extruded orthogonally with the computed extrusion length at the current layer. This is indeed the element that we would desire to generate, since it is orthogonal and has the desired size both on the XY-plane and on the vertical direction. Once we have set the ideal hexahedron, we use Eq. (2)to compute the distortion of the elements and assess its validity. 216 A. Gargallo-Peiró et al. / Journal of Computational Physics 375 (2018) 209–227 2. Optimize the new layer to improve the mesh quality. Once a new layer is generated, we optimize it in terms of the ideal elements that we have set. Recall that although we have extruded them using the best projection plane, the constraint of coming from a topography mesh prevents the mesh from being optimal. Therefore, before generating a new layer of elements, we optimize the current one. In particular, to derive a process that is it computationally efficient but that allows generating valid meshes, we do not optimize all the previously generated elements but just the new low-quality elements generated in the new layer. That is, we find the elements in the new layer with quality lower than a threshold (by default 0.2), and we optimize several layers of nodes around them (by default, 2 layers of adjacent nodes). The rest of nodes are kept fixed and are not optimized. In particular, following a Gauss–Seidel approach, we solve for each free node the non-linear minimization problem: xi=argmin xi∈R3 ni E  e=1 η2 ˆ e(xe1,...,xenp), (8) where {ˆ e}e=1,...,ni Edenotes the set of adjacent elements to node xi, ˆ edenotes the global id of the e-th neighbor element of node xi, ηˆ eis the distortion of the e-th element, and eicorresponds to the global node id of the ith node of element e. Once the sweeping process is finalized, the mesh has been only optimized locally to ensure that the previous swept layers where defining a valid configuration for the new layer to be generated. Therefore, the mesh is still not globally optimal in terms of the defined quality (distortion) measure. Thus, after the topology of the final mesh has been set, we perform a final mesh optimization to compute the coordinates of the mesh nodes that deliver minimal distortion. To do so, we optimize all the nodes except the topography surface ones. We keep fixed the nodes on the topography since they are already optimal in the parameterized topography geometry. The volume nodes are free to move in R3, whereas the rest of boundary nodes are allowed to move on their boundary surfaces. In particular, we find the coordinates of the nodes that do not belong to the topography that minimize the mesh distortion in the least-squares sense [34], by optimizing in a Gauss–Seidel approach the objective function f(x1,...,xn)= nE  e=1 η2 e(xe1,...,xenp), (9) where nNis the number of nodes of the mesh, nEis the number of elements in the mesh, ηeis the distortion of the e-th element, and eicorresponds to the global node id of the ith node of element e. Fig. 3(a) compares the result obtained with the proposed mesh optimization approach with respect to the result obtained without using the proposed optimization steps (standard sweeping algorithm). In particular, Fig. 3(a) illustrates the mesh generated with the approach presented in this section. In contrast, Fig. 3(b) illustrates the mesh generated by means of extruding vertically the optimized topography mesh. As detailed in Table 2, whereas the minimum quality of the mesh generated with the proposed approach is 0.49, the quality without volume optimization is 0.18. In addition, this minimal quality is even further worsened to 0.09 if no optimization (surface or volume) is performed during the meshing procedure, see Fig. 3(c). The improvement in the mesh quality is significant and, in particular, we can observe that the obtained volume elements are closer to an orthogonal configuration with the desired shape and anisotropy if we use the proposed approach. In addition, there is a clear improvement of the approximation of the geometry derived the fact that the optimization aims for a regular element size in the mesh and locates more elements on high topography gradients. Nevertheless, we have performed studies in three different topographical landscapes to check the influence of this mesh improvement in the solver. As previously introduced, we use the Alya solver [20,21], using Finite Elements to solve the RANS equations with a k-εturbulence model [18,19]. Comparing the results obtained with and without the mesh optimization, we reduced in all the tested topographic examples the number of solver iterations and also the number of time step iterations to achieve a stationary solution. In those tested scenarios, featuring real complex topographies, this improvement is reflected by reducing the number of time steps up to one half of the time steps required without the optimization process. Although this improvement can not be in general guaranteed for any topography, this result is in agreement with the fact that well shaped elements (without small/large angles) improve the matrix conditioning in Finite Elements, as detailed by Babuška and Aziz [45] and Shewchuk [46]. Finally, it is important to highlight that the background mesh is the input for the wind farm mesh, adapting it to conform the turbines (actuator discs) and to acquire the necessary resolution to capture the upwind/wake effects. This second mesh will have more geometrical constraints and, moreover, it will be limited by the quality of the background mesh. Hence, it is mandatory to obtain a good-quality background mesh to add the turbine meshes and still obtain a valid mesh conformal with the discs, since this insertion process will probably lower the minimum quality of the mesh. 5. Mesh generation for onshore and offshore wind farms After generating a background mesh conformal with the topography and that resolves the Atmospheric Boundary Layer, we modify this mesh to obtain a new mesh adapted to the turbines and a given wind direction. The turbines are modeled A. Gargallo-Peiró et al. / Journal of Computational Physics 375 (2018) 209–227 217 Fig. 3. Atmospheric Boundary Layer meshes for the Bolund hill. (a) Mesh generated using the proposed approach. (b) Mesh generated extruding along the vertical direction an optimized surface mesh. (c) Mesh generated extruding along the vertical direction with no optimization. The hexahedral elements are colored according to their quality, and the quadrilateral surface elements are colored according to the quality of their adjacent hexahedron. Table 2 Shape quality statistics for the hexahedral meshes presented in Fig. 3. Mesh Minimum quality Maximum quality Mean quality Standard deviation Fig. 3(c) 0.09 1.00 0.99 0.04 Fig. 3(b) 0.18 1.00 0.99 0.03 Fig. 3(a) 0.49 1.00 0.99 0.03 following the actuator disc theory [10,7,8,11,12,9,13]as a force over a disc of the diameter of the turbine and herein a width of the 6% of the diameter, see Cabezon et al. [9]. We propose a mesh generation procedure composed by four main steps, which are illustrated in Fig. 4for a turbine of the Sexbierum wind farm: 1. Generate background mesh and empty the area surrounding the wind turbines. First, we generate an hexahedral background mesh that resolves the Atmospheric Boundary Layer and that it is conformal with the terrain. Herein, we use the quality-based sweeping procedure presented in Section 4. Following, knowing the location of the turbines, we a priori calculate the region that will cover the adapted mesh for each disc and we detect and remove the hexahedra that intersect with this region. In Fig. 4(a) we illustrate a section of the background ABL mesh and the region of elements to be removed. 2. Generate adapted mesh to the actuator disc. To generate the disc meshes, the program first meshes with the desired element size a planar disc having the diameter of the wind turbine using the quadrilateral mesher developed by Sarrate et al. [47,48]. Next, it generates a volume mesh by extruding the 2D quadrilateral mesh with the desired number of layers (one single layer of hexahedra by default) and inserts the disc at the hub height with an orientation perpendicular to 224 A. Gargallo-Peiró et al. / Journal of Computational Physics 375 (2018) 209–227 Fig. 9. (a,b) Hybrid mesh for the offshore wind farm on the Irish sea. Elements are colored according to their type (light grey for hexahedra, grey for tetrahedra, and dark grey for pyramids). (c) Speedup at the turbine hub height. Fig. 10. Convergence analysis to the topography shown in Fig. 11(a). The blue line indicates error values depending on the surface mesh size h ≡hs. For reference, the red line indicates the approximated slope (quadratic). accuracy in the simulation, we perform a new mesh convergence analysis to the complete topography, see Table 8. The obtained optimal value for the farm topography surface mesh size is hs=25 meters, slightly finer than the a priori assessed using an idealized synthetic terrain. In addition, despite dealing with a real topographic example, the convergence is still quadratic, see Fig. 10. The generated mesh with hs=25 m and hd=11.6m is composed by 25.8Melements, from which 21.5Mare hexahedra, 3.6Mare tetrahedra, and 0.8Mare pyramids. Similarly to the previous offshore case, we have obtained an hex-dominant mesh that is conformal with the topography and the actuator discs, and has finer resolution to capture the upwind and A. Gargallo-Peiró et al. / Journal of Computational Physics 375 (2018) 209–227 225 Table 8 Mesh convergence analysis for the topography presented in Fig. 11(a) without turbines. #nodes #elements hs(meters) Relative error (%) 30.737.016 30.207.776 20 – 21.755.700 21.371.108 25 0.0429 16.449.462 16.151.768 30 0.0806 10.805.607 10.602.288 40 0.1682 7.953.975 7.799.600 50 0.4107 Table 9 Shape quality statistics for the hybrid mesh of the onshore farm presented in Fig. 11. Mesh #elements Minimum quality Maximum quality Mean quality Standard deviation Fig. 11 25.863.957 0.07 1.00 0.94 0.07 Hexahedra 21.452.247 0.62 1.00 0.95 0.03 Tetrahedra 3.588.766 0.07 1.00 0.80 0.15 Pyramids 822.944 0.32 1.00 0.99 0.01 Fig. 11. Onshore wind farm in Spain. (a) Topography and turbine location. (b) Hybrid mesh with contour plot of the speedup. (c) Speedup at an isosurface at the hub height (80 meters) over the topography. wake effects (Fig. 11(b)). Table 9gives the mesh quality statistics, with a mean quality of 0.94 and minimum value of 0.07, which indicate that the mesh is valid for computational purposes. The mesh was generated in 244 seconds, including all the steps of the procedure. We use this onshore case to validate the generated meshes using them to simulate with our in-house CFD framework [18,19]for ABL flows. In particular, the company that owns and manages this wind farm, Iberdrola Renovables [55], has lend us the wind farm energy production and a rose of winds with the yearly wind in each direction. We simulate four wind intensities for the 16 different input wind directions and weight the estimated energy production in each direction/intensity 226 A. Gargallo-Peiró et al. / Journal of Computational Physics 375 (2018) 209–227 with the frequency of this direction/intensity in the yearly rose of winds. In particular, regarding the scope of this paper on the generation of the mesh, we automatically generate 16 meshes with the same surface and disc resolution, but changing the inflow wind direction. This wind farm is still on production and thus, we only detail the relative error of this yearly energy production. With the presented approach, we are able to estimate the production of the wind farm with a relative error of 3%. It must be highlighted that this wind farm involves topographic effects and also interaction between the turbine wakes. There is an error when we discretize the number of simulated directions, since each one of the experimental bins of wind collects a range of 22.5 degrees. We only simulate one direction/intensity of the bin of velocities/intensities, although the data measured for that range collects all the directions of the bin. Thus, predicting the produced energy with a 3% of error is below the tolerance of the data collected on the bins (standard deviation of the data of approximately 3.5%), and although it can not validate the generation of the mesh, it ensures that the error in the mesh generation regarding the produced energy is not the dominant error of the energy resource assessment process. 8. Concluding remarks We have presented a new mesh generation procedure for simulation of ABL flows in wind farms. The process is fully automatic and, given an inflow angle, the characteristics of the turbines (location, diameter and hub height) and the topography, a mesh adapted to the wind direction at hub height and conformal with the actuator discs is generated. Starting from a background mesh, the mesher removes the necessary hexahedra around each turbine and inserts the actuator discs. For each turbine, a finer mesh upstream and downstream is generated in order to capture the wake effects. The mesh generation procedure is specifically tailored for wind farms and allows generating in an automatic manner a mesh that is oriented with the inflow direction. The obtained hybrid mesh is hex-dominant, which is optimal to define the boundary layer for the ABL flow and to align the mesh with the wind inflow direction. In particular, the use of hybrid elements has been exploited to impose smooth cell size transitions across scales and to avoid the propagation of higher resolution areas through the domain. The mesher is a model-independent pre-process program that, among other formats, it also outputs all the necessary files to automatically simulate using Alya [21,20], an in-house multi-physics parallel finite element solver. In particular, we have used Alya to solve the RANS equations adapted to the Atmospheric Boundary Layer including the effect of wind turbines trough an actuator disc model. However, the delivered meshes could also be used for different formulations (such as LES) and methods (such as Finite Volumes), extending the advantages of the proposed mesh generation procedure to other physical models and solvers. The mesh resolution necessary to achieve a given numerical error has been assessed, studying the (quadratic) mesh convergence for surface and disc mesh sizes. In this way, the mesher is able to prescribe the resolution required by the solver depending on the size at the actuator disc. Finally the procedure has been tested for offshore and onshore real wind farms and validated against the energy data collected in the onshore wind farm. Future developments will extend the approach for any input background mesh (either composed by tetrahedra or hexahedra) and study the possibility of obtaining an all-tetrahedral mesh that would avoid using different element types in the same mesh, widening the spectrum of solvers that could use the generated meshes. Acknowledgements This work has been partially funded by the EU H2020 Energy oriented Center of Excellence (EoCoE) for computer applications, the New European Wind Atlas (NEWA) and the High Performance Computing for Energy (HPC4E) projects. We thank Iberdrola Renovables for their collaboration and for providing wind farm data to validate the developed techniques. References [1] J. Berg, N. Troldborg, N.N. Sørensen, E. Patton, P.P. Sullivan, Large-eddy simulation of turbine wake in complex terrain, J. Phys. Conf. Ser. 854 (2017) 012003, IOP Publishing. [2] S. Shamsoddin, F. Porté-Agel, Large-eddy simulation of atmospheric boundary-layer flow through a wind farm sited on topography, Bound.-Layer Meteorol. 163 (2017) 1–17. [3] M.P. van der Laan, N.N. Sørensen, P.-E. Réthoré, J. Mann, M.C. Kelly, N. Troldborg, The k-ε-fp model applied to double wind turbine wakes using different actuator disk force methods, Wind Energy 18 (2015) 2223–2240. [4] G.P.N. Diaz, M. Avila, A. Folch, An annual energy production estimation methodology for onshore wind farms over complex terrain using a rans model with actuator discs, J. Phys. Conf. Ser. 1037 (2018) 072018, IOP Publishing. [5] E.S. Politis, J. Prospathopoulos, D. Cabezon, K.S. Hansen, P. Chaviaropoulos, R.J. Barthelmie, Modeling wake effects in large wind farms in complex terrain: the problem, the methods and the issues, Wind Energy 15 (2012) 161–182. [6] R. Mikkelsen, et al., Actuator Disc Methods Applied to Wind Turbines, Technical University of Denmark, 2003. [7] G. Crasto, A. Gravdahl, F. Castellani, E. Piccioni, Wake modeling with the actuator disc concept, in: Selected Papers from Deep Sea Offshore Wind R&D, Energy Proc. 24 (2012) 385–392. [8] N. Troldborg, F. Zahle, P.-E. Réthoré, N.N. Sørensen, Comparison of wind turbine wake properties in non-sheared inflow predicted by different computational fluid dynamics rotor models, Wind Energy 18 (2015) 1239–1250. [9] D. Cabezón, E. Migoya, A. Crespo, Comparison of turbulence models for the computational fluid dynamics simulation of wind turbine wakes in the atmospheric boundary layer, Wind Energy 14 (2011) 909–921. [10] B. Sanderse, S.P. van der Pijl, B. Koren, Review of computational fluid dynamics for wind turbine wake aerodynamics, Wind Energy 14 (2011) 799–819. [11] A. El Kasmi, C. Masson, An extended k −model for turbulent flow through horizontal-axis wind turbines, J. Wind Eng. Ind. Aerodyn. 96 (2008) 103–122. A. Gargallo-Peiró et al. / Journal of Computational Physics 375 (2018) 209–227 227 [12] J.M. Prospathopoulos, E.S. Politis, K.G. Rados, P.K. Chaviaropoulos, Evaluation of the effects of turbulence model enhancements on wind turbine wake predictions, Wind Energy 14 (2011) 285–300. [13] M.P. van der Laan, N.N. Sørensen, P.-E. Réthoré, J. Mann, M.C. Kelly, N. Troldborg, J.G. Schepers, E. Machefaux, An improved k −model applied to a wind turbine wake in atmospheric turbulence, Wind Energy 18 (2015) 889–907. [14] M.P. van der Laan, N.N. Sørensen, J. Réthoré Mann, M.C. Kelly, N. Troldborg, K.S. Hansen, J.P. Murcia, The k-ε-fp model applied to wind farms, Wind Energy 18 (2014) 2065–2084. [15] M.P. van der Laan, N.N. Sørensen, P.-E. Réthoré, J. Mann, M.C. Kelly, N. Troldborg, J.G. Schepers, E. Machefaux, An improved k-εmodel applied to a wind turbine wake in atmospheric turbulence, Wind Energy 18 (2015) 889–907. [16] P.-E.M. Réthoré, Wind Turbine Wake in Atmospheric Turbulence, Ph.D. thesis, Risø National Laboratory for Sustainable Energy, 2009. [17] D. Apsley, I. Casrto, A limited-length-scale k-εmodel for the neutral and stably-stratified atmospheric boundary layer, Bound.-Layer Meteorol. 83 (1997) 75–98. [18] M. Avila, A. Folch, G. Houzeaux, B. Eguzkitza, L. Prieto, D. Cabezón, A parallel CFD model for wind farms, in: 2013 International Conference on Computational Science, Proc. Comput. Sci. 18 (2013) 2157–2166. [19] M. Avila, A. Gargallo-Peiró, A. Folch, A cfd framework for offshore and onshore wind farm simulation, J. Phys. Conf. Ser. 854 (2017) 012002. [20] G. Houzeaux, M. Vázquez, R. Aubry, J. Cela, A massively parallel fractional step solver for incompressible flows, J. Comput. Phys. 228 (2009) 6316–6332. [21] G. Houzeaux, B. Eguzkitza, M. Vázquez, A variational multiscale model for the advection–diffusion–reaction equation, Commun. Numer. Methods Eng. 25 (2009) 787–809. [22] G.J. Haltiner, R.T. Williams, Numerical Prediction and Dynamic Meteorology, Wiley, 1980. [23] A. Arakawa, C.S. Konor, Vertical differencing of the primitive equations based on the Charney–Phillips grid in hybrid σ-p vertical coordinates, Mon. Weather Rev. 124 (1996) 511–528. [24] J.A. Michelsen, Block Structured Multigrid Solution of 2D and 3D Elliptic PDE’s, Department of Fluid Mechanics, Technical University of Denmark, 1994. [25] N.N. Sørensen, HypGrid2D a 2-D Mesh Generator, Technical Report, Risoe-Rvol. No. 1035(EN), No. 1035(EN), Forskningscenter Risoe, Denmark, 1998. [26] S. Marras, Variational Multiscale Stabilization of Finite and Spectral Elements for Dry and Moist Atmospheric Problems, Ph.D. thesis, Universitat Politècnica de Catalunya, 2012. [27] R. Montenegro, G. Montero, J.M. Escobar, E. Rodríguez, J.M. González-Yuste, Tetrahedral mesh generation for environmental problems over complex terrains, in: P. Sloot, A. Hoekstra, C. Tan, J. Dongarra (Eds.), Computational Science — ICCS, in: Lecture Notes in Computer Science, vol. 2329, Springer, Berlin, Heidelberg, 2002, 2002, pp. 335–344. [28] J. Behrens, N. Rakowsky, W. Hiller, D. Handorf, M. Läuter, J. Päpke, K. Dethloff, amatos: parallel adaptive mesh generator for atmospheric and oceanic simulation, Ocean Model. 10 (2005) 171–183. [29] A. Oliver, E. Rodríguez, J. Escobar, G. Montero, M. Hortal, J. Calvo, J. Cascón, R. Montenegro, Wind forecasting based on the harmonie model and adaptive finite elements, Pure Appl. Geophys. 172 (2015) 109–120. [30] A. Gargallo-Peiró, A. Folch, X. Roca, Representing urban geometries for unstructured mesh generation, in: 25th International Meshing Roundtable, Proc. Eng. 163 (2016) 175–185. [31] M.L. Staten, R.A. Kerr, S.J. Owen, T.D. Blacker, M. Stupazzini, K. Shimada, Unconstrained plastering—hexahedral mesh generation via advancing-front geometry decomposition, Int. J. Numer. Methods Eng. 81 (2010) 135–171. [32] P.M. Knupp, Algebraic mesh quality metrics for unstructured initial meshes, Finite Elem. Anal. Des. 39 (2003) 217–241. [33] A. Gargallo-Peiró, X. Roca, J. Peraire, J. Sarrate, A distortion measure to validate and generate curved high-order meshes on CAD surfaces with independence of parameterization, Int. J. Numer. Methods Eng. 106 (2015) 1100–1130. [34] A. Gargallo-Peiró, X. Roca, J. Peraire, J. Sarrate, Optimization of a regularized distortion measure to generate curved high-order unstructured tetrahedral meshes, Int. J. Numer. Methods Eng. 103 (2015) 342–363. [35] I. Stefan, R. Mikkelsen, N.N. Sørensen, D. Henningson, Validation of Methods Using EllipSys3D, Technical Report, Engelska, 2008. [36] B. Eguzkitza, HERMESH: a Geometrical Domain Composition Method in Computational Mechanics, Ph.D. thesis, Universitat Politècnica de Catalunya, 2014. [37] G. Taubin, Curve and surface smoothing without shrinkage, in: Proc. 5th International Conference on Computer Vision, ICCV ’95, IEEE Computer Society, Washington, DC, USA, 1995, pp. 852–857. [38] G. Taubin, A signal processing approach to fair surface design, in: Proc. 22nd Annual Conference on Computer Graphics and Interactive Techniques, SIGGRAPH ’95, ACM, New York, NY, USA, 1995, pp. 351–358. [39] A. Gargallo-Peiró, X. Roca, J. Peraire, J. Sarrate, Distortion and quality measures for validating and generating high-order tetrahedral meshes, Eng. Comput. 31 (2015) 423–437. [40] L. Branets, V. Garanzha, Distortion measure of trilinear mapping. Application to 3-d grid generation, Numer. Linear Algebra Appl. 9 (2002) 511–526. [41] J.M. Escobar, E. Rodríguez, R. Montenegro, G. Montero, J.M. González-Yuste, Simultaneous untangling and smoothing of tetrahedral meshes, Comput. Methods Appl. Mech. Eng. 192 (2003) 2775–2787. [42] A. Gargallo-Peiró, X. Roca, J. Sarrate, A surface mesh smoothing and untangling method independent of the CAD parameterization, Comput. Mech. 53 (2014) 587–609. [43] X. Roca, Paving the Path Towards Automatic Hexahedral Mesh Generation, Ph.D. thesis, Universitat Politècnica de Catalunya, 2009. [44] X. Roca, J. Sarrate, An automatic and general least-squares projection procedure for sweep meshing, Eng. Comput. 26 (2010) 391–406. [45] I. Babuška, A. Aziz, On the angle condition in the finite element analysis, SIAM J. Numer. Anal. (1976) 214–226. [46] J. Shewchuk, What is a good linear finite element? Interpolation, conditioning, anisotropy, and quality measures, Preprint, 2002. [47] X. Roca, E. Ruiz-Gironés, J. Sarrate, EZ4U: mesh generation environment, www-lacan .upc .edu /ez4u .htm, 2010. [48] J. Sarrate, A. Huerta, Efficient unstructured quadrilateral mesh generation, Int. J. Numer. Methods Eng. 49 (2000). [49] S.J. Owen, S. Saigal, Formation of pyramid elements for hexahedra to tetrahedra transitions, Comput. Methods Appl. Math. 190 (2001) 4505–4518. [50] S. Yamakawa, I. Gentilini, K. Shimada, Subdivision templates for converting a non-conformal hex-dominant mesh to a conformal hex-dominant mesh without pyramid elements, Eng. Comput. 27 (2011) 51–65. [51] N. Kowalski, F. Ledoux, M.L. Staten, S.J. Owen, Fun sheet matching: towards automatic block decomposition for hexahedral meshes, Eng. Comput. 28 (2012) 241–253. [52] H. Si, Tetgen, a Delaunay-based quality tetrahedral mesh generator, ACM Trans. Math. Softw. 41 (2015) 11:1–11:36. [53] H. Si, K. Gärtner, Meshing piecewise linear complexes by constrained Delaunay tetrahedralizations, in: B.W. Hanks (Ed.), Proceedings of the 14th International Meshing Roundtable, Springer, Berlin, Heidelberg, 2005, pp. 147–163. [54] Barcelona Supercomputing Center, MareNostrum 3, https://www.bsc .es /marenostrum /marenostrum /mn3, 2017. [55] E.R. Dpt., Iberdrola renovables, http://www.iberdrolarenovablesenergia .com /home, 2001.