SlideShare une entreprise Scribd logo
1  sur  66
Télécharger pour lire hors ligne
CTA-WT
Complex Terrain Analysis - Wind Turbine
An Open Source Alternative
Christopher Thomas Hall
MEng (Hons) Aerospace Engineering
University of the West of England
Abstract:
This paper addresses the current availability shortfall in open source wind and turbine analysis tools
and adds in the ability to quantify the affects of complex terrain. This was accomplished using a
combination of analytical and computational methods. The latter using Freefem++ a finite element
methods solver which runs an incompressible Navier-Stokes projection algorithm which has been
validated against the flat plate case and the Gaussian hill model. This paper produces an early stage
methodology and workflow, which can be used to aid understanding of the terrain on the
performance of the turbine.
2
I would like to thank the academic staff at the University of the West of England for their
unwavering support over the past year, particularly Dr. Chris Toomer, Prof. Yufeng Yao & Dr.
Steve Wright. Each has made a significant contribution not just to the progression of the project but
also to my development as an engineer.
Thank you for your time, experience and dedication.
3
TABLE OF CONTENTS
INTRODUCTION ...............................................................................................................................................6
AIMS & OBJECTIVES.......................................................................................................................................7
PART I – RESEARCH & PLANNING........................................................................................................8
CURRENT TURBINE & WIND ANALYSIS SOFTWARE ......................................................................................9
WaSP..........................................................................................................................................................9
Wind PRO...................................................................................................................................................9
TERRAIN MODELLING...................................................................................................................................10
MESHING.......................................................................................................................................................10
SOLVER.........................................................................................................................................................11
Open Foam...............................................................................................................................................12
FreeFEM++.............................................................................................................................................12
ATMOSPHERIC CONSIDERATIONS.................................................................................................................12
ROUGHNESS & WIND SHEAR........................................................................................................................13
TURBINE ANALYSIS/SIMULATION OPTIONS.................................................................................................15
Actuator Disk Theory ...............................................................................................................................15
Blade Element Momentum Theory...........................................................................................................15
Modelling Wakes......................................................................................................................................16
WIND ANALYSIS ...........................................................................................................................................18
OPTIMISATION METHODS .............................................................................................................................19
VALIDATION METHODS................................................................................................................................20
PROJECT PLANNING......................................................................................................................................20
PART II – SOFTWARE DEVELOPMENT ................................................................................................22
SYSTEM MAP ................................................................................................................................................23
TERRAIN – SECTION A..................................................................................................................................24
Analytical Terrain ....................................................................................................................................24
Real World Terrain - Polyline Fitting.....................................................................................................24
Fully Topographic maps to 2 ½ D - Multi Plane.....................................................................................26
WIND DATA – SECTION A ............................................................................................................................27
Basic Wind Analysis Tools using MATLAB .............................................................................................27
FILE CREATION [.EDP] – SECTION B.............................................................................................................30
Constructing & Meshing Terrain.............................................................................................................30
Simulating Roughness Features in the Domain.......................................................................................32
FF++ SCRIPT – SECTION B ...........................................................................................................................33
SOLVER – SECTION B....................................................................................................................................34
Solver 1 – Steady Incompressible Navier-Stokes.....................................................................................34
Solver 2 – Projection Method for Navier-Stokes Equations ....................................................................37
Solver Validation......................................................................................................................................41
POST PROCESSING – SECTION C ...................................................................................................................50
OPTIMAL TURBINE PLACEMENT -- SECTION C.............................................................................................51
Sectored Energy Seeking Function ..........................................................................................................51
Wind Turbine Model ................................................................................................................................53
Analytical Wakes......................................................................................................................................53
PART III – CONCLUDING DISCUSSION & FURTHER WORK .....................................................57
CONCLUSIONS...............................................................................................................................................58
FURTHER WORK ...........................................................................................................................................59
Computational Wake Models...................................................................................................................59
Wake Interaction ......................................................................................................................................60
4
Discrete Optimisation ..............................................................................................................................61
Progressing from 2D – 2 ½D Case Considerations ...............................................................................63
APPENDIX A..................................................................................................................................................64
WORKS CITED .............................................................................................................................................65
TABLE OF FIGURES & CODES
FIGURE 1 - RESEARCH ACTIVITY & INSTALLED WIND ENERGY (INTERNATIONAL ENERGY AGENCY, 2010) ......................6
FIGURE 2 – DIST MESH POLYGON GEOMETRY (PERSSON & STRANG, 2010) .......................................................................10
FIGURE 3 - ROUGHNESS PROFILES (USGS, 2006)................................................................................................................13
FIGURE 4 - JENSEN MODEL (RENKEMA, 2007)....................................................................................................................16
FIGURE 5 - LARSEN MODEL (RENKEMA, 2007)...................................................................................................................17
FIGURE 6 - WAKE INTERACTION GENERATED USING THE ACTUATOR DISC METHOD STREAMWISE VELOCITY PLOTTED ON
ISO-CONTOURS OF VORTICITY....................................................................................................................................18
FIGURE 7 - BRANCH AND BOUND TREE (CHACHUAT, 2008) ...............................................................................................20
FIGURE 8 - SYSTEM MAP.....................................................................................................................................................23
FIGURE 9 - ANALYTICAL TERRAIN EXAMPLE......................................................................................................................24
FIGURE 10 - TOPOGRAPHIC MAP WITH ELEVATION (GOOGLE EARTH, 2015) .....................................................................26
FIGURE 11 - WIND ROSE .....................................................................................................................................................27
FIGURE 12 - WIND ANALYSIS CHARTS................................................................................................................................28
FIGURE 13 - TABLE OF DEFAULT WIND TURBINES .............................................................................................................29
FIGURE 14 - COMPUTATIONAL DOMAIN EXAMPLE ..............................................................................................................30
FIGURE 15 - SEMI CIRCLE MESH (HECHT F. , 2012).............................................................................................................30
FIGURE 16 – POLYLINE TERRAIN ........................................................................................................................................31
FIGURE 18 - STEADY STOKES SCRIPT..................................................................................................................................35
FIGURE 19 – EXAMPLE [U,V] PLOT W. ERROR SHEAR LAYER. ............................................................................................36
FIGURE 20 - EXAMPLE OF ACTUATOR DISC POROSITY .......................................................................................................40
FIGURE 21 – UNSTRUCTURED MESH. FLAT PLATE. 1M CHORD. .........................................................................................42
FIGURE 22 - U VEL. U = 6 M/S. RE = 200.........................................................................................................................42
FIGURE 23 - EXPERIMENTAL VS. NUMERICAL FOR FLAT PLATE. INVALID SOLUTION. .......................................................42
FIGURE 24 - REFINED MESH................................................................................................................................................43
FIGURE 25 - BOUNDARY LAYER HEIGHT @ 1C W. MARKER AT U/U TRANSITION ...............................................................43
FIGURE 26 - FINAL SOLUTION .............................................................................................................................................44
FIGURE 27 - GAUSSIAN HILL CASE .....................................................................................................................................45
FIGURE 28 - GAUSSIAN HILL [U] RECIRCULATION ON LEE SIDE [RED – HIGH, GREEN – LOW]...........................................48
FIGURE 29 - AVERAGED [X U] SAMPLE VELOCITY DEFICIT @ HUB HEIGHT [100M].........................................................49
FIGURE 30 - NORMALISED SPEED UP LES ELLIPSIS 3D SOLVER (J FENG, 2014)................................................................49
FIGURE 31-MATLAB SCRIPT EXECUTION SUMMARY........................................................................................................52
FIGURE 32 - BOOLEAN CAPTURE OF POINTS WITHIN WAKE AREA.....................................................................................53
FIGURE 33 - JENSEN WAKE MODEL, OUTPUT VISUALISATION .............................................................................................54
FIGURE 35 - POWER GENERATION VS. OPTIMAL .................................................................................................................55
FIGURE 36 - WAKE TERRAIN INTERACTION ........................................................................................................................56
CODE 1 - ADAPTIVE MESH CODE EXAMPLE........................................................................................................................39
CODE 2 - MAPPING FUNCTION.............................................................................................................................................46
CODE 3 - SEARCH WITH 2 DIMENSIONAL CRITERIA ............................................................................................................46
CODE 4 - DATA SORT AND ANALYSIS .................................................................................................................................47
CODE 5 - FIND FUNCTION, ‘FEADATAIMPORT.M’..........................................................................................................50
CODE 6 – SECTIONER.M X POSITION SEARCH.......................................................................................................................51
CODE 7 – SECTIONER.M Y POSITION SEARCH AND STORAGE ...............................................................................................52
5
NOMENCLATURE
CTA Compex Terrain Analysis
FF++ Free Fem ++ FEM Code
Re Reynolds Number
∇ Del – vector differential operator
HH Hub Height
6
Introduction
The wind energy industry is young and has significant political and industry support fuelling the
development of resources ranging from analytics to material development. Research activity has
flourished in the past decade expanding at a similar rate to the number of new installations as seen
in Figure 1. As industry continually increases it’s analytical capabilities with the development of
new methods, there is the possibility that techniques will become too complex and alienate all but
the experts within.
The development of a numerical code paired with a simple interface that can be operated by a basic
user to discover the opportunities of a potential wind project could serve a niche market within
industry.
Figure'1')'Research'Activity'&'Installed'Wind'Energy'(International'Energy'Agency,'2010)'
This work seeks to construct a method of fulfilling the identified niche through the use of open
source software and publicly available knowledge to produce a workflow and methodology for the
analysis of the flow over complex terrain and its impact on wind turbines.
Three sections: research & planning; software development; conclusions & further work each
documenting a different aspect of the work undertaken are presented. CTA has been supplied on
USB and includes all the code, solver files and work undertaken which is documented accordingly.
The first section discusses the aspects of wind turbine placement in complex terrain and touches on
important principles that must be considered to produce an effective solution such as solver types,
validation methods and wind analysis theory. Additionally, the project required a good level of
understanding of the MATLAB and C++ programming languages due to most open source solvers
using C++ idiom languages.
Software development ranges from: initial terrain data importing; wind analysis; turbine
specifications to computational solver mechanics and data manipulation. The solver; FreeFem++ a
finite element method solver and Gmsh a mesh compilation tool are used to generate computational
flow estimations of the effects of complex terrain on wind turbine performance. An incompressible
Navier-Stokes projection method is used as the solver algorithm and has been validated against two
empirical cases. The scripts which have been designed to aid in the manipulation and analysis of
7
data have been written in MATLAB and are interoperable with each other due to global parameter
assignments.
The final section discusses project results and proposes further works, such as the implementation
of new solver algorithms and graphic user interfaces; also highlighting several aspects which could
contribute to the advancement of CTA when moving from the current 2D to a 2 ½ D planar
analysis.§
Aims & Objectives
Key aims and objectives for this project include:
• Develop a code which is operable by low end personal computers with minimal
computational cost
• A full methodology for the analysis of wind turbine power generation in complex terrain
• 2D and 2 ½ D analysis of terrain
• Computational analysis of fluid flow over terrain
• Analytical/Computational Turbine wakes
• Post processing and manipulation of data to facilitate placement optimisation (discrete
optimisation)
§
A planar analysis is one which simplifies a 3D model it multiple 2D slices which can be anlaysed with reduced
8
PART I – RESEARCH & PLANNING
9
Current Turbine & Wind Analysis Software
Current software used commercially and in the open source domain allow the modelling of complex
wind resource sites coupled with infrastructure analysis, cost modelling climate estimation siting of
turbines and more. Each of these tools facilitates the low computational cost model, which the paper
is targeting and the abilities of the most prolifically used are discussed below.
WaSP
“Wind Atlas Analysis and Application Program (WAsP) was introduced in 1987 by the Wind
Energy and Atmospheric Physics Department at Risø National Laboratory, Denmark. It can be used
for wind data analysis, wind atlas generation, wind climate estimation and siting of wind turbines.
The program extrapolates wind climate statistics both vertically and horizontally based on
measurements. A simple wake model, based on the model by Jensen is implemented as well in
order to be able to calculate wake losses. “ (Renkema, 2007)
WAsP is available as commercial packages and is simple to operate and only requires an input of
wind speed, direction and time series at a single location. The solutions can be run quickly
(~minutes) and is most accurate in the analysis of offshore cases. It has tools, which can analyse
wind farm wake models and uses the Jensen linear wake model with interaction. WaSP does not
factor in global terrain into the analysis at any point, merely relying on analytical flow assumptions
dependent on the hill gradient, thus delivering an unsatisfactory result in more complex terrain
regimes. Additionally there is limited thermal variability analysis, which gives poor “spatial
variability once roughness effects on wind speed are at equilibrium” (Barthlmie, Pryor, Frandsen, &
Larsen, 2005).
Wind PRO
“WindPRO is an integrated software package developed by the Danish company EMD for the
design and planning of wind energy projects. Since it is a modular based software, it can be
accustomed to the needs of the user. It is also capable of processing data from other software
packages like WAsP and WindSIM, a simulator developed by WindSim AS for optimizing the
energy production from wind turbines based on CFD, making it suitable for more complex terrain.
The most important module from the perspective of wake modeling is the PARK module. This
module handles wind farm energy calculations and array losses. For a complete overview of the
software, see the website of EMD.” (Renkema, 2007)
Wind PRO is essentially a CFD post processor, which can optimally place turbines due to complex
terrain. It is decoupled however and is part of a chain of software products required to reach a
solution. There are several similar programmes, which accomplish similar goals such as
WindFarmer [Garrad Hassan] and Wind – Farm [ReSoft].
Review:
While it is clear that several viable and respected software solutions which can accomplish this
terrain analysis exist, none do so in a fully streamlined manner and all require significant
computational time to output even a basic model. The above represent the current cutting edge in
terms of computational wind farm analysis and as such there is significant expense associated with
these tools.
10
Terrain Modelling
An effective method of plotting terrain in both 2 and 3 dimensions is required. Industry practice is
to either obtain this data using LIDAR [Light Detection and Radar] fly over to get accurate mapping
data which includes foliage, and also to use ordinance survey data, these methods are perfectly
legitimate however both are costly. The use of readily accessible mapping data drawn from an open
source mapping solution would be an effective solution that would be openly available to non-
commercial users.
Google Maps API - An open source code, which has 5min elevation data. A tool using this code
could be designed to work within MATLAB with set long lat coordinates for a grid, so that surface
terrain data can be exported.
Z Terrain Online – This tool is useful for extracting, at relatively high resolution, the local
topography.
Open DEM- An open source XYZ data source which is under a free license from the University of
Heidelberg. http://www.opendem.info/download_xyz.html
Meshing
An effective meshing tool was needed to model the fine details present over complex terrain. This
tool must be capable of dealing with 2D/3D elements, be open source and be capable of dealing
with large domains.
Dist Mesh
Dist Mesh, an open source triangular and tetrahedron meshing software, which is integrated into the
MATLAB/Octave suites. It can compute 2D/3D meshes and output unstructured domains of
variable resolution and complexity, however the software is numerically based which can cause
anomalies and resolution issues on domain formation. Figure 2 shows a polygon function based
geometry, which was used to build a smooth terrain. The geometries are specified by signed
distance functions, for actual mesh generation
“DistMesh uses the Delaunay triangulation routine in MATLAB and tries to optimise the node
locations by a force-based smoothing procedure” (Persson & Strang, 2010)
Ultimately the code was discounted after simple experimentation for its solving time on large
domains and its lack of mesh control functions. An additional problem with the usage of this code is
the ability to build in additional complexities and control boundary and domain conditions.
Figure 2 – Dist Mesh polygon geometry (Persson & Strang, 2010)
11
IFISS
The IFISS toolbox features a meshing code for finite element discretisation. The software has
several example cases dealing with common PDE equations including NS equations; however the
meshing tool is inadequate in dealing with the style of data inputs and specifically lacks the ability
to mesh curved non-linear boundaries. Contact was made with one of the creators of the software at
the University of Manchester and it was confirmed that while new tools are being constructed they
will not be functional for the foreseeable future. Experimental research was conducted to create a
small stepped semi-circle linear solution however the steps could not be made small enough to
constitute continued work.
Gmsh
“Gmsh is a 3D finite element grid generator with a built-in CAD engine and post-processor. Its
design goal is to provide a fast, light and user-friendly meshing tool with parametric input and
advanced visualization capabilities. Gmsh is built around four modules: geometry; mesh; solver and
post-processing. The specification of any input to these modules is done either interactively using
the graphical user interface or in ASCII text files using Gmsh's own scripting language.” (Gmsh)
Gmsh is a very capable generator, compatible with both OpenFoam and SU2, which are open
source solvers.
FreeFEM++ (BAMG)
FreeFem++ is distributed with a 2D computational meshing tool, called the Bidimensional
Anisotropic Mesh Generator. It can deal with complex domains shapes and features adaptive
meshing for mesh enhancement as a function of element error. Testing has shown that this software
is capable of fulfilling the above requirements; however it is not explicitly compatible with
MATLAB so an import procedure will have to be built into the software.
Solver
There are several open source FEM solvers available, which have been developed by an active
community of enthusiasts, universities, and not for profit companies. This project is looking to find
a solver with low computational expense that can deliver on all aspects of flow modelling from
basic models to advanced turbulence modelling for when the software jumps from 2D to 3D
applications.
SU2
“SU2 is a suite of open-source software tools written in C++ for the numerical solution of partial
differential equations (PDE) and performing PDE constrained optimization. The primary
applications are computational fluid dynamics and aerodynamic shape optimization, but has been
extended to treat more general equations such as electrodynamics and chemically reacting flows.”
(Francisco Palacios∗, 2013)
The SU2 solver can deal with compressible and incompressible Euler, Navier-Stokes and RANS
based solvers. The latter would be very useful for the modelling of turbulence occurring in the
12
wakes on a 3D case. It also has: multi-grid; preconditioning tools; adaptive goal orientated mesh
refinement and deformation tools.
From research on CFD-Online, SU2 is a highly capable code and runs compressible cases very well
however in the low RE incompressible cases this results in a slow code that has problems in highly
resolved boundary layers.
Open Foam
“The OpenFOAM® (Open Field Operation and Manipulation) CFD Toolbox is a free, open source
CFD software package which has a large user base across most areas of engineering and science,
from both commercial and academic organisations. OpenFOAM has an extensive range of features
to solve anything from complex fluid flows involving chemical reactions, turbulence and heat
transfer, to solid dynamics and electromagnetics. It includes tools for meshing,
notably snappyHexMesh, a parallelised mesher for complex CAD geometries, and for pre- and
post-processing. Almost everything (including meshing, and pre- and post-processing) runs in
parallel as standard, enabling users to take full advantage of computer hardware at their disposal.”
(Open Foam)
Research from CFD-Online has shown that while OpenFoam has a wide range of applications and
models ready to use, there is a very steep learning curve if you are needed to write new applications
or add functionality in terms of integration with external programmes or new internal operations.
FreeFEM++
“FreeFem++ is a partial differential equation solver. It has its own language. Freefem scripts can
solve multiphysics non-linear systems in 2D and 3D.
Problems involving PDE (2d, 3d) from several branches of physics such as fluid-structure
interactions, require interpolations of data on several meshes and their manipulation within one
program. FreeFem++ includes a fast 2^d-tree-based interpolation algorithm and a language for the
manipulation of data on multiple meshes (as a follow up of bamg (now a part of FreeFem++ ).
FreeFem++ is written in C++ and the FreeFem++ language is a C++ idiom. It runs on Macs,
Windows, Unix machines. FreeFem++ replaces the olderfreefem and freefem+.” (Hecht F. , 2012)
Due to the integration of the meshing tool, solver and post processing visualisation the FF++ tool
was selected, as it is a unified system, selection will involve the learning of basic C++ scripting in
order to access the functionality of the tool. FF++ can run RANS based turbulence models.
By selecting software, which is standalone and has been built to interact well it is hoped this will
save time during development and minimise the chance for error.
Atmospheric Considerations
“Winds are driven by the sun. The solar radiation heats parts of Earth’s surface differently because
of its round shape, rotation around its axis, surface material etc. causing temperature differences
that in turn cause atmospheric pressure differences. Winds are the movements of air that tend to
equalize these pressure differences. The air mass movements are a combination of five different
forces; gravitational force; pressure gradient force; Coriolis force; centrifugal force and friction
force.” (Ackerman & J.A.Knox, 2003)
When analysing a large fluid problem it is important to understand all of the different variables that
are interacting within the model. Certainly the most dominant forces in this localised complex
13
terrain evaluation will be the effect on the shear layer due to the complex terrain. However it is still
important to consider other aspects such as the diurnal profile, which looks at the change in
temperature throughout the day, which can alter the vertical velocity profile and cause buoyancy
effects.
“Nested models that handle real-time meteorological data from the synoptic scale down to the
micro-scale, including buoyancy effects on the micro-scale flow, have also been developed and
tested. Such models still require weeks of computational efforts on today’s most powerful
computers, in order to generate a wind resource map for a wind farm. Thus the temporal and
economical costs of such models may still be too high for practical applications.” (Eidsvik, 2005)
Cleary this type of model is not necessary for the aims and objectives of this terrain analysis tool.
Looking towards improvements however it is realistic to consider implementation of basic
turbulence models such as Spalart-Allmaras (Spalart, 1992,) or k-e. The former, a single equation
turbulence model solves a transport equation for a viscous variable and has been shown to give
good results for boundary layers. There are however concerns as “it cannot be relied on to predict
the decay of homogeneous, isotropic turbulence. Furthermore, one-equation models are often
criticized for their inability to rapidly accommodate changes in length scale, such as might be
necessary when the flow changes abruptly from a wall-bounded to a free shear flow.” (Fluent)
An additional consideration is the effect of having a coarsely resolved boundary layer due to the
global mesh size, considering that these effects are macro and there is already an overriding vertical
shear layer as a function of global terrain, it is not critical to have a small Y+
value. This will have
to be re evaluated when the turbulence model is included.
Roughness & Wind Shear
High above the earth at heights greater than 1km the wind is considered free of the effects of the
surface. The ability to accurately model the vertical wind profile in the lower 100-200m is critically
important to an accurate simulation. The orography and flora of the area is directly linked with
tunnel, hill and roughness effects. In the wind industry specific classes have been developed to
define roughness lengths, which are then used to evaluate wind conditions in a landscape. A table
defining the roughness classes can be found in appendices.
.
Figure'3')'Roughness'profiles'(USGS,'2006)'
14
Several numerical methods exist which model different types of scenarios to different levels of
accuracy. In reality the dynamic nature of this atmospheric boundary layer means that a single
profile is not going to provide a consistently reliable extrapolation of wind speed from one height to
another. Each of the below methods requires knowledge of the wind speed at a reference height.
Power Law
This law is the most basic way of estimating wind speed at a specific height from reference
measurements, with the power being a complex function of local climate, terrain, roughness and
environmental conditions.
!!
!!
!
=!
!!
!!
Where V and Z are velocity and elevation variables respectively and ! is the exponent of the power
law. “Provided there are wind speed records at two or more elevations, the above arithmetic
solution provides an objective solution.” (Zekai Şen) “The power law is generally favoured by the
wind industry and consultants, as the wind shear coefficient is a dynamic value that varies
according to a large number of factors, including time of day, season, atmospheric stability and
regional topography.” (Gipe, 2004)
Log Law
In flat terrain and with a neutrally stratified atmosphere, the logarithmic wind profile is a good
estimation for the vertical wind shear. The reference wind speed v1 is measured at height h1, v2 is
the wind speed at height h2, z0 is the roughness length.
!! = !!
!"
!!
!!
!"
!!
!!
ln ! ≠ 0
The log law on the other hand is only valid under certain assumptions, regarding atmospheric
stability, and actual profiles may deviate from the log law. In the wind industry the two methods are
generally checked where possible to ensure that they provide similar results. (L. Wheatley, 2010)
Met Tower Data
A meteorological tower will typically feature several anemometers, which gather wind speed data at
different heights. This data is then computed and a more accurate value of the wind shear at that
location is generated using statistical averaging techniques.
Typically the data uses a Weibull distribution to fit the data with a k value, which conforms with the
European Wind Turbine Standards II requirements. However in the case of this complex terrain
analysis one must consider that the shear profile along the terrain will vary and therefore it is
important to input a global inflow which is then refined by the computational solver to conform to
the terrain at that localised position.
15
Turbine Analysis/Simulation Options
There are several techniques available for the aerodynamic analysis of the wind turbine rotor. Each
model has advantages/disadvantages. Models, which are investigated, include: Actuator Disk
Theory; Blade Element Momentum Theory.
Actuator Disk Theory
This theory represents the turbine rotor with an equal area disk that is idealised as an infinitely thin
disk, which is of a set permeability that fluid can pass through. The fluid flow within the simulation
is considered to be incompressible, homogenous and steady. No viscous effects are taken into
account. This type of model only analyses the axial momentum balance while pressures far up and
downstream are considered ambient. A local pressure difference is given between the two sides of
the disc as shown in 1.
“The flow is slowed down, and from the conservations of mass, momentum and energy, the forces
can be calculated giving an indication of the rotor forces. “ (Geurts, 2009)
The actuator disc theory only gives integrated values of the actuator disc flow parameters. Meaning
it will only give average flow velocity through the disc as a function of the thrust coefficient. For
the requirements of this software this model could be used for the 2D analysis, however it does not
model any wake behaviour.
1 2
Blade Element Momentum Theory
BEM theory is a widely applied technique as it provides fast results with an acceptable level of
accuracy. The rotor disc is discretised into radial stream-tube elements and from the forces on the
blade element at a radial position the induced flow velocity can be calculated. Using the induced
velocity with the blade and free stream velocities the local velocity and angle of attack can yield
new values for the forces on the blade element. Empirical 2D aerofoil data is then used to calculate
the forces on the blade elements, this is an iterative process and is repeated until a steady solution is
found.
Hansen et al. (H.O.L. Hansen, 2006) highlighted the errors that can occur due to the accuracy of the
2D aerofoil data applied to a 3D application. BEM theory can only deal with steady solutions,
which is not so much a limitation at this stage however BEM does deal more with 3D analysis and
the initial development of this software will focus on a 2D simulation.
1
Actuator Disc Model of a Wind Turbine (Manwell, McGowan, & Rogers, 2009)
2
Axial Velocity and Pressure across the Rotor Disk (Geurts, 2009)
16
Modelling Wakes
Wakes can be modelled both computationally and analytically, differing in their model from a basic
linear wake projection to fully developed computational solution. The wakes generated by a turbine
can impact the flow up to 7.4 rotor diameters downstream and as such are a critical element of
accurately predicting the effect of upstream turbines.
Analytical Approach
Kinematic models only use the momentum equations to model the velocity profile of wakes behind
the turbine. They do not compute turbulence changes so the addition of a turbulence model must be
considered if this is required.
Jensen Model
This model developed by G.C. Jensen assumes a linearly expanding wake with a velocity deficit as
a function of downstream rotor distance. Figure 4 shows the wake model of a turbine in 2D plane.
The wake diameter is given by:
!! = !(1 + 2!") ! = !/!
Velocity in the fully developed flow:
! =!!! 1 −
1 − 1 − !!
1 + 2!" !
!
3
Both of the above depend on the variable !, !ℎ!"ℎ is the relative distance behind the rotor. The
value k, which represents the wake decay constant for an onshore case is 0.075.
Figure'4')'Jensen'Model'(Renkema,'2007)
3
(Renkema, 2007)
17
EWTSII/Larsen Model
Based on the Prandlt turbulent boundary layer equations and currently one of the recommended
analysis methods from the European Wind Turbine Standards II manual, the Larsen model has
closed form solutions for both the wake width and mean wake velocity profile. Obtaining the closed
form solutions is done using a self-similar velocity profile as well as Prandlt’s mixing length theory.
Simplifications used in this model include: incompressible and stationary flow; no wind shear and
symmetric axial flow.
This model is capable of resolving the characteristic double dip velocity profile in the near wake
field in its second-order variant. This feature would better compliment a more critical wind farm
placement algorithm.
“"
!! ! =
35
2!
!
!
3!!
!
!
!(!!! ! + !! )
!
!
Axial velocity deficit in wake (∆!)!.
Constant !!& position of the rotor with respect to the applied coordinate system:
“ (Renkema, 2007)
Figure'5')'Larsen'Model'(Renkema,'2007)'
18
Computational Approach
Computational methods give very fine detail in the near wake and as a result are computationally
expensive. The modelling of wakes requires a turbulence model, traditionally k-ε, however as
computers speed up RANS and LES methods are being used more commonly. There will be a
significantly improved result with the concession of a much longer solve time.
“The wake behind a wind turbine is divided into the near wake region and the far wake region. The
near wake is the region close to the rotor, where the wake features are directly linked to the rotor
geometry and aerodynamics as well as to the inflow conditions.” (Nilsson, 2012) For this research
the far wake region is of the most interest, the near wake can be ignored as “ the far wake is more
influenced by the surrounding environment such as wakes from other turbines and the topography”
(Vermeer, Sørensen, & A.)
Generally in computational wake modelling an actuator disc is positioned where the rotor would be,
which has porous properties directly linked to thrust coefficient data, which adjusts porosity based
on power extraction from the fluid. This model has been validated and is used in the Ansys Wind
modeller software and produces results similar to those seen in Figure 6.
For the required application of this software computational wake modelling is not accurate unless a
3D model is available coupled with the insertion of a capable turbulence model. However research
should be conducted as to the feasibility of building a 2 ½ D wake analysis theory.
Figure'6')'Wake'interaction'generated'using'the'actuator'disc'method'streamwise'velocity'plotted'on'
iso)contours'of'vorticity'
Wind Analysis
During the analysis of a potential wind resource site, meteorological towers are used to understand
wind patterns and the mean amount of wind energy that can be generated.
Typical wind analysis software compiles transient wind, direction, temperature and pressure data
from which it applies numerical processes to determine estimations of average wind speed and
extreme wind speed. Results are used to determine the class of turbine required to tolerate the
specific conditions present at the site. Tools such as data cleaners, which remove iced conditions,
need to be considered as well as looking at the wind data frequency.
19
From initial research there are several open source wind analysis tools such as Open Wind, which
could work well with the CTA code in terms of large data analysis. Wind analysis is a statistical
genre of problem relying on complex curve fitting and probably distribution, which requires
additional toolboxes not available on the educational license. Therefore basic functionality such as
analysis of maximum speed and directional data should be considered, however more complex
calculations such as maximum lifetime wind speed is not a priority.
Optimisation Methods
An optimisation problem consists of maximising or minimising an objective function by altering the
input values from an allowed set of variables and computing the value of the function. By
optimising a problem it will have the best available values for the objective function in a defined
domain. These objective functions can comprise best generation efficiency, turbulence
minimisation, minimum costs, minimising wakes acting on other turbines in a farm, minimum
distance spacing etc.
The type of optimisation required depends on the problem; as such several different aspects of
optimisation methods are discussed from a selection of research literature.
Evolutionary algorithms are nature-inspired, metaheuristic-based, optimisation algorithms, meaning
it samples a set of solutions they are particularly useful with incomplete or imperfect information or
limited computation capacity. They have been successfully used in wind farm layout optimisation
problems, and can be thought of as genetic mutation method relying on a Darwinistic selection
model. The mutations are facilitated using a random change in the prior layout, for example a
specific random change can be made such as axial position change, hub height or rotor diameter.
A paper which successfully uses an evolutionary based search algorithm is “A fast and effective
local search algorithm for optimizing the placement of wind turbines” by Wagner & Neumann. This
paper produces an effective optimisation algorithm, which takes into account wakes on a flat
idealised farm. It significantly improves on existing results from software such as OpenWind the
minimisation of wake effects using a new problem-specific local search algorithm, which solves in
~12 hours. Of note are the constraints that are used which “enforce an upper bound on the area of
the farm. This constraint ensures that we can only place a turbine i within a certain area” (Wagner,
Day, & Neumann, 2012)
“The second constraint regulates the spatial proximity, as it dictates the minimal distance within
which two turbines can be set up. It is satisfied:
!"" (!! − !!)! + (!! − !!)! !≥ !", ∀!∀!
where R is the rotor radius and M is a proximity factor usually decided ahead of the optimization
based on the make and model of the turbines used. We use M 1⁄4 8 based on the industry standard.”
(Wagner, Day, & Neumann, 2012)
In addition they also implemented a constant power curve across all the turbines. This assumption
would not coincide with the complex terrain model, as each turbine would have a changing ulocal.
Another style of optimisation is Branch and Bound, commonly known as mixed integer
programming, which has close origins with the above evolutionary type. However this type of
optimisation uses a sequence of related simpler sub problems, the solutions of which converge to
the original solution. The sub problems should be easier to solve than the original and each sub
problem should yield a bound on the original optimal solution value. For example in Figure 7 each
node represents a partial solution with the numbers indicating the sequence in which notes are
investigated, with the edge of the tree specifying how variables are fixed.
20
This type of method could be used in the instance of the complex terrain domain by partitioning the
domains, which would allow the turbine placement problem to be modelled as a branch and bound
problem. The existence of turbines would be signified by a Boolean value. These functions are
highly adaptable and allow the user more control of branching strategies.
Figure'7')'Branch'and'Bound'Tree'(Chachuat,'2008)'
Validation Methods
The validation of the chosen solver method must be compared to an empirical solution to avoid
systematic error, which can occur when results from a computational method are compared to one
another. While Ansys CFX/Fluent are recognised as being accurate it does not represent good
experimental technique. The CTA solver algorithm will be compared against the flat plate case,
which is an empirical solution, and additionally use model Gaussian hills to investigate effects such
as speed up and separation positions along the hill.
Project Planning
From the above research it is clear that the project will require a rounded analysis with suitable
application of each section. This represents a significantly complex task, as building a code which
incorporates all aspects in an intelligent manner will require significant planning not just due to
implementation of the code but also in creating a system structure. It is clear that the most time will
need to be spent on the solver mechanics and validation. Initial planning and investigations will take
significant time, as two programming languages MATLAB and C++ will have to be learnt to an
acceptable level as well as basic programming techniques.
Methods of acquiring assistance with regard to troubleshooting code have been identified and
include the Math Works forum, Git Hub, previous research papers (Science Direct) and solver
forums. Additionally there is a plethora of experience present at the university if needed. Specific
members of staff, which have relevant experience include: Dr. Chris Toomer for her experience in
atmospheric flow modelling; Prof. Yufeng Yao for his experience in solver mechanics and Dr.
Steve Wright with several years in industry and is familiar with a multitude of programing
languages.
21
With the time constraints of the masters year an outline of possible bottlenecks and risks has been
drafted to help visualise the problem and flag any areas of concern.
Terrain Development of methodologies to obtain terrain through open source means
3D elevation and topographic data is difficult to obtain and may require clearance
from Google to access their mapping tool
Development of MATLAB scripts which will allow import of differing types and
scales, possible limitations of poor qualtiy data
Turbine Data Source manufacturer turbine data to add to the default selectable in - house types
Obtain class data for future use of turbulence intensity
Manufactuers usually do not freely distribute their data so some may have to be
made up if they cannot be found
Wind Data Find some freely available wind data
Develop basic wind analysis tools such as transient wind, wind speed distribution
temperature data.
This tool has not set out to be a capable wind analysis tool. An open source tool
FreeWind should be used for more advanced analyis
Computational
Solver
Highest risk is the ability to build and work with an open source solver
Develop the ability to mesh and run simulations using a valid method to obtain
reliable results
Bottleneck: Development of CFD code and research, errors may take time to
troubleshoot as only peer to peer support is available
Post
Processing
Development of the ability to import the data from the solver into MATLAB
Risks in compatiblity with MATLAB, could take substantial time to understand the
theory behind dealing with scattered nodal data
Optimisation Develop the ability to optimise the positioning of turbines based on optimal energy
Build in the ability to compute analytical wakes
Risks: Fully discrete optimisation could be a black hole in terms of solver time and
state space explosion
22
PART II – SOFTWARE DEVELOPMENT
The following showcases the development of all aspects of the complex terrain analysis
code, a flow chart detailing the system design and layout can be found overleaf.
23
System Map
Figure'8')'System'Map'
24
Terrain – Section A
The terrain input standardises several input types into the parametric format required by FF++. By
selecting the type of terrain import the code determines the correct formatting and data methods to
apply. Two input tools are available; analytical and a real world X,Y polynomial fitter. An
additional tool was considered and will be discussed in detail however the level of programming
needed to complete it was very technical. It is important that the terrain functions are built within
MATLAB as they are used for post processing after the simulation has finished.
Analytical Terrain
This tool allows the creation of any type of terrain by user construction. Due to the nature of
creation the terrain can easily be inserted within the ff++ .edp script with only minor changes to the
parametric function for the X,Y positions. The analytical terrain example in Figure 9 demonstrates
the correct method of specifying terrain.
Figure'9')'Analytical'Terrain'Example'
Real World Terrain - Polyline Fitting
A solution to converting the often-complex shapes that terrain can form was to use a best-fit
polynomial. This method has benefits and limitations. If the supplied terrain data is of low
resolution it will essentially have a smoothing factor applied, while if the data has badly discretised
sections the poly function will remedy bad segments. The downside of this method is the potential
to miss critical features in the terrain like sudden cliff drops, which could be inadvertently smoothed
over.
There is a basic fitting tool within MATLAB that allows visualisation of up to a 10th
order
polynomial and also allows the display of the generated polynomial function. Within this tool are
residual plots that can display to the operator the quality of the fit. The tool is accessed from the
plotting window Tools > Basic Fitting.
Relatively accurate 2D plane data can be obtained using the Zonum Solutions World Terrain
Mapper software at ‘http://www.zonums.com/gmaps/terrain.php?action=sample’. The tool features
a clear layout and allows .csv x y z point extraction for direct input into the CTA script.
25
Once this data has been fitted using the tool the equations can be extracted and then constructed as
demonstrated in Figure 9 in the Analytical Terrain section.
Zonum Terrain Elevation Mapper
The Zonum Solutions terrain mapper is a free open source mapper using the Google Maps API. It
allows a maximum sample of 500 points however if each sample is taken over a small range the full
resolution of Google Maps of 10m can be utilised. Below is an example of how to use the tool.
1. Enter min/max of lat/long coordinates required. Use Get Elevations >> button.
2. The mapping tool will plot along the selected coordinates, simply change the format to comma
separated values type and elevation in metres and click 'create report’ button. This will output the
data in a text box.
26
Fully Topographic maps to 2 ½ D - Multi Plane
A tool, which allows the selective extraction of planar data using the Google Earth software utility,
could add considerable adaptability to CTA. It was envisioned that 2D planar slices are taken of the
geometry dependent on the wind directions so that a more valid solution could be obtained. This
would allow the solution to build up a 2 ½ dimensional flow profile over the terrain and potentially
identify flow effects that only occur on certain features. It would do this based on the directional
wind data and use the top frequency directions or directions of concern as indicated by the user to
grab sectional profiles at those bearings.
This additional input method was seen as a replacement for LiDAR imagery data and would have
provided fully 3D topographic maps due to the recent high-resolution mapping completed by
Google Imaging. This too relies on open source tools and an approval by Google Maps for an API
key, which was not obtainable at the time of writing. Figure 10 shows a topographic map that was
exported from the Google Earth mapping tool.
The proposed applications used were Google Earth, Sketch-Up and QGIS to allow full topographic
mapping. Unfortunately during development it was found that a data manipulation tool was needed
to convert the meshes into readable NURBS data. NURBS (Non-Uniform Rational B-Splines) are a
geometry type you can use to create 3D curves and surfaces.
Therefore it was deemed that this aspect of the project was not crucial for the overall
accomplishment of the objectives and was therefore put on hold.
This tool could fundamentally improve the ability of the software and should be considered for
future work as the only real industrially used software ‘Global Mapper’ has a substantial cost basis
to do effectively the same thing.
Figure'10')'Topographic'Map'with'Elevation'(Google'Earth,'2015)'
27
Wind Data – Section A
The selection and intelligent usage of wind data is an important aspect of any analysis and
simulation. The wind rose in Figure 11 depicts the outcome of data gathered using a coupling of
anemometers (wind speed) and a wind vane (directional). The directional element of this data is
difficult to implement into a realistic 2D analysis of specific terrain profiles as it is not always true
that the most troublesome flow condition is associated with the highest directional frequency and
speed. Ultimately this requires some user experience and the use of multiple samples to reliably
conclude that no other detrimental flow conditions exist. New software developed by Sandia
“Simulator for Wind Farm Applications or SOWFA” is attempting to target this phenomenon.
Which is where the previously mentioned multi-plane section tool would have had a significant
contribution. For the following complex terrain analysis the directional bearing with the highest
‘extreme’ speed is used.
Figure'11')'Wind'Rose'
Basic Wind Analysis Tools using MATLAB
This section demonstrates some basic MATLAB methods of importing wind data and processing
with wind data sets. Including removing icing conditions, visualisation of wind speeds using plots,
defining turbine power curves if full manufacturer data is not available and calculating average
turbine power and capacity factors.
Sample wind and temperature data set was acquired from FINO, who supplied a 12-month sample
of hourly averaged wind samples.
Importing Time Averaged Wind Data
A code was built which can import time averaged data sets and plot them with respect to time,
additionally some cleaning techniques were implied such as removing of points that occur during
icing conditions. This is important as while the turbine may well have been spinning during these
icing periods the energy generation will be minimal due to the lack of effectiveness of the aerofoil.
The below import code draws from a basic example supplied by a MATLAB Resource Assessment
seminar.
The methodology for using the time averaged wind data tool is as follows:
1) Navigate to Basic_Import_Functions in the software folder
2) Run ‘ImportTimeaveragedwinddata.m’ – Imports Data in correct format from .txt
3) Run ‘WindAnalysis.m’ – Runs all basic data imports, saves data and plots for visualisation.
28
By default up to 5 met towers can be analysed however more can be added by simply increasing the
sample size on line 43 of ‘ImportTimeaveragedwinddata.m’.
‘WindAnalysis.m’ Output Charts: Wind Data; Power Curve; Wind Density Distribution;
Temperature Profile and Temperature Profile w/ Icing exclusion.
Figure'12')'Wind'Analysis'Charts'
Baseline Energy Estimation
The available power generation available at a specific point of a wind energy site is a function of
blade length [L], wind speed [v], air density [!] and the power coefficient [!!].
!!"!#$ =!
1
2
!!!!!!!
!!!
29
The equation relies on having accurate power coefficient data, which is dependent on the wind
speed that the turbine is operating in. This is typically supplied by the manufacturer and is unique to
each turbine type. It is worth mentioning at this stage one of the caveats on wind energy generation,
Betz’ Law. This ‘limit’ stipulates that the “theoretical maximum power efficiency of any design of
wind turbine is 0.59 of the energy carried by the wind can be extracted by a wind turbine” (RWE
npower Renewables, 2009).
For the above wind energy equation a function must lookup the corresponding power coefficient
value according to the average velocity at the turbine and the turbine type. Accurate and legitimate
power coefficient data is not freely available therefore only four example sets could be sourced. The
coefficient data can be found in: CTA ¬ TurbineData. Figure 13details default turbines available
with CTA.
'
'
Figure 13 - Table of Default Wind Turbines
'
The files stored in the TurbineData folder can be queried using the function ‘loadturbinedata.m’, the
data has a .pow extension, which is an ASCII format. A secondary function was built for the
querying of specific coefficient values dependent on wind speed. The data is interpolated to find the
!!!!"!!! value; ‘findCp.m’ uses the assigned numbers to specify each model.
Turb No. Model Power Hub Height [m] Rotor Diameter [m]
1 Bonus 2MW 60 76
2 Fiktional 700KW 43 39
3 Vestas V63 1.5MW 60 63
4 NEG-Micon NM 2MW 68 72
30
File Creation [.edp] – Section B
Constructing & Meshing Terrain
As a result of a lengthy learning process spanning a month of investigations into developing an
understanding of Delaunay triangular meshes, using Distmesh, IFISS and MATLAB the methods to
construct computational domains was realised and implemented.
Figure 14 demonstrates the correct construction of a domain Ω with four defined boundaries
Γ!! − !Γ! which have been defined in a counter clockwise orientation. This is fundamentally
important as when building the case, the boundaries must always be drawn with the domain on their
left. Dirichlet boundary conditions can be “imposed on an ordinary or partial differential equation
which specifies the values that a solution needs to take on along the boundary of the domain”
(Cheng & Cheng, 2005), it is often referred to as a fixed boundary condition.
'
Figure'14')'Computational'domain'example'
Research into the use of scalar values in the FF++ meshing tool has shown that terrain [x y] values
are not suitable for use as boundaries due to errors occurring at the max/min coincident points. As a
result a fully computational input method was devised using MATLAB to fit a variable order
polynomial to the data set.
Figure'15')'Semi'circle'mesh'(Hecht'F.','2012)'
Initial development used the example code found in Section 3.14 (Hecht F. , 2012) as it
demonstrates the construction of a curved domain. It is important to note that all the real values
31
remain outside of the boundary definitions, while the shape is defined by parametric values. When
defining a boundary the term ‘border’ must be used followed by the name. Example 1 demonstrates
the use of parametric and real values. The real values are the offset X0 and radius rr.
Example 1: border circle(t=pi,0){ x=x0+rr*cos(t); y=y0+rr*sin(t);}
Using Example 1 as a guide the computational parametric polynomial solution was implemented,
with the resultant domain in Figure 16. The resulting geometry is satisfactory however the points at
the start and end of the terrain need to be optimised as to not cause undesirable flow effects. The
drop off at the end of the terrain will be constrained as determined by the user with three different
functions [Cap, Extend and Shallow Gradient]. The Cap constraint can be seen within Figure 16, the
Extend condition simply extends the terrain with a flat section to the end of the domain, while the
shallow gradient gradually reduces the height based on a user-defined value.
''
Figure'16'–'Polyline'Terrain'
To generate a mesh for this domain the function:
mesh Th = buildmesh(border1(n)+border2(n)+…. is used with the variable n standing for the
resolution of nodes on each boundary condition.
Mesh output data is defined and exported using the Medit toolbox within FF++ using the function:
savemesh(Th,"TDomain.mesh");
This outputs the corresponding [TDomain.mesh] format plain txt file. It can also be plotted using
the Medit toolbox for visualisation within FF++.
Figure'17')'Meshed'Domain'with'Terrain'
32
Simulating Roughness Features in the Domain
A manual way of applying roughness features to the simulation has been developed, which adds
features to the domain to better simulate the shear profile experienced in the real world site. These
features are built into the input file and can be positioned along the bottom boundary at any
position; line height can be referenced using the roughness lengths found in App. 3.
Possible uses of this function include the positioning of forestry and differential localised roughness
along the domain. This additive roughness formulation can greatly add to the simulation by
incorporating blockage effects, which are not commonly visualised. A blockage effect is caused
when a turbine is positioned too close to large terrain differentials and the air passing through the
turbine cannot escape back to free stream causing a large area of significantly slowed air behind
part of the rotor.
33
FF++ Script – Section B
This section features a walkthrough on the FF++ input .edp file and displays the different aspects of
a FF++ input file. FF++ does have a graphical user interface that allows visualisation of the
software with a familiar drop down menu tooling. However the terminal input is more
straightforward and can be run from within the MATLAB syntax if required using the ‘!’ identifier
which signifies a system command.
The FreeFem++ script consists of three main sections:
1. Boundary and Domain Conditions (Meshing)
With Lines:
1 – 7 – Dirchilet boundary condition construction
9 – Build mesh function acting on all borders and named as ‘Th’
10 – Timer function for analysis of computation time
2. Solver Algorithm
An example of which with explanation can be seen in Figure 18.
3. Output Storage and Post Processing Commands
With Lines:
84-86 – Plotting and saving of data to an electronic post script file
88 – Loading the inbuilt medit toolbox for mesh manipulation
89 – Saving the solution as an ASCII .sol file with the Mesh (Th) variables u , v in order 1
which saves the solution data at vertex point data
90 – Saves the mesh as a .mesh file for compatibility with MATLAB
91 – Loads the medit visualiser for post experiment visualisation
34
Solver – Section B
From the selection of the Freefem++ (FF++) unified meshing and solver software, intensive
research was conducted to tackle the steep learning curve of using computational fluid dynamics
scripts and functions. FF++ uses a C++ based language and as such the basics had to be learnt
before it was possible to manipulate the script. The resources available on the FF++ website such as
example scripts and forum support have been critical to the learning process. The solver iterations
below highlight only a small amount of the investigations and trials, which took place during the
course of this thesis. Full scripts can be found within the solver trials folder on the digital medium.
Solver 1 – Steady Incompressible Navier-Stokes
V1.0 Standard Steady Navier Stokes [u,v,p] solver
Features a steady incompressible NS solver code, which was written by F.Hecht. The solver outputs
a steady state solution i.e. no time variation. Before manipulating any of the solvers parameters the
fundamentals of incompressible Navier-Stokes equations were researched.
Understanding the NS Equations
Consider a Newtonian fluid of density ! and velocity ! for an incompressible fluid with constant
density the continuity equation of mass conservation would be:
!!! + ! ∗ (!")!= !0
(FC. 1)"
Now the balanced equation of momentum where ! is the pressure and ! = !!/! denotes the static
viscosity of the fluid can be written as:
!!!! + !! ∗ !!!! − !!∆!! + !!!! = !!"
(FC. 2)
Equations FC (1,2) form the well-known Stokes equations; the equations are non-linear because of
the term ! ∗ !". When dealing with dimensionless NS equations the Reynolds number must be
factored in, where !! is the characteristic velocity and !! is the characteristic length.
!" =
!!!!
!
!
(FC. 3)
Now the dimensionless NS equation can be written as:
! · ! = 0,!!!!!!!!! + ! ∗ !" −
1
!"
∆! + !" = !
(FC.4)
Small values of Re lead to a more laminar flow dominated by stokes effects, whereas larger values
of Re lead to more turbulent flow. The transition regime where the flow is at an intermediate Re
causes the appearance of unsteady flows. The initial term ! · ! = 0 can be negligible in size
compared to the viscous term. This allows the NS equations to be approximated by the Stokes
equations.
"
35
! · ! = 0, !!! −
1
!"
∆! + !! = !
(FC.5)
Now when the flow is closed to a steady state, the unsteady stokes equation can be approximated by
the stationary stokes equation:
! · ! = 0, −
1
!"
∆! + !! = !!
(FC.6)
Steady Stokes Solver Script
The code within Figure 18 is the solver script from a FF++ .edp input file, with each line meaning
the following:
21 – 25. Defining the finite element space for Uh (velocity variables) and Vh (pressure variables)
29. Epsilon term used for stabilisation.
31-36. Incompressible NS equations dealing with each x & y component
37. Stabilisation term to fix the constant part of the pressure
41-44. Post data plotting
Figure'18')'Steady'Stokes'Script'
36
V1.1 Addition of Logarithmic Inlet Velocity Profile
Features the addition of variable inlet profiles, which are included to model the atmospheric shear
layer. The two inlet functions added to the .edp script are:
Exponent Logarithmic
real v10 = 60; // y = reference velocity at h10
real h10 = 10; // height of reference velocity
real ahe = 3; // hellman exponenet
func profile = v10*((y/h10)^(1/ahe));
real W6 = 4; // measured wind speed at H m
real H = 10; // Height of measured wind speed
real ro = 0.1;//roughness
func profile = W6*(log(y+5/ro)/log(H/ro));
The above codes reference the y (height) position at each element along the inlet boundary and
assigns a velocity value to the nodes. The mesh resolution must be adequate to allow the non-linear
inlet profiles to develop and stabilise in the extended domain area. Figure 19 shows the non-linear
inlet profile as see in the far right of the image. An error currently occurring with this solver is the
oversized boundary layer that forms independently of the inlet velocity profile, this error has been
researched but to no avail.
Figure'19'–'Example'[u,v]'Plot'w.'Error'Shear'Layer.''
37
Solver 2 – Projection Method for Navier-Stokes Equations
V.1 Baseline Chorin Projection Algorithm
The projection algorithm being used is based closely on R. Rannachers method, which is an adapted
version of Chorn’s see. (Rannacher, 1992). The idea to use this method was based around work
done by F.Hecht in the freefem ++ handbook, which uses the projection method to model the
backwards-facing step case.
The solver assumes neutral stability of fluid in the domain meaning that the air is adiabatically
balanced from a thermodynamic perspective. This is a reasonable assumption to make as in high
winds or complex terrain the effects of shearing forces are more dominant than domain buoyancy.
The baseline algorithm has a mass flux balancing term, which calculates the inlet and outlet fluxes
and terminates if they are unbalanced. This flux balance is maintained throughout the simulation.
As well as a convergence break which is calculated by finding the change of the u and v
components at every iteration:
Additional rules can be applied which do not let the solver quit for the first 100 iterations this is
important as on some laminar cases the solver can be projecting an error below the threshold even if
the flow has not developed.
Understanding the Projection Method
Projection methods are a class of Navier-Stokes procedures, which were introduced; in the form of
numerical simulations by Chorin see (Chorin. & Comput., 1967). A distinguishing feature of
Chorin's projection method is that the velocity field is forced to satisfy a discrete continuity
constraint at the end of each time step.
The projection method algorithm is based on the Helmholtz decomposition of any vector field into
a solenoidal part!!!"#and an irrotational part !!""#$. A solenoidal vector field is a vector field with
zero divergence at all points [∆ ∗ ! = 0]. The Helmholtz decomposition states that the vector field u
can be decomposed into a !!!"# and a !!""#! part.
From Chorin (Chorin. & Comput., 1967):
! =!!!"# +!!!""#$ =!!!"# + ∇!
Taking the divergence of the equation as ∇ ∗!∇! = !0:
∇ ∗ ! =!∇!
!
The above is the Poisson equation for the scalar function !, when the vector field u is known the
scalar function ! and divergence-free part of u can be found using:
!!"# = ! −!∇!
Using the incompressible form of the Navier-Stokes equations:
!"
!"
+ ! ∗!∇ ! = !−
1
!
∇! + !∇!
!
From Rannacher (Rannacher, 1992), one first solves for an intermediate velocity, !∗
using the
above momentum equation but ignoring the pressure gradient term giving:
38
!∗
− !!
∆!
=!− !!
∗!∇ !!
+ !!∇!
!!
where !!
is the velocity at the nth
time step.
Now for the second step of the algorithm the intermediate velocity is corrected to obtain the
solution of time step !!!!
:
!!!!
=!!∗
−!
∆!
!
∇!!!!
This can be rewritten as a function of time step:
!!!!
− !∗
∆!
=!−
1
!
∇!!!!
It is clear now that the above algorithm is essentially an operator splitting method in which firstly
the viscous forces are analysed and then the pressure forces.
Finally to compute the RHS of the pressure forces in the second step the pressure p at (n +1) time
step must be known. Taking the divergence and defining:
∇ ∗!!!!!
= 0
Which then gives the Poisson equation !!!!
:
∇!
!!!!
=!
!
∆!
∇ ∗ !∗
n.b. A Poisson equation is a partial differential equation of elliptic type and can be used to describe
the potential energy field caused by a given mass density distribution.
39
V.2 Adaptive Multi Grid Algorithm
Solver noise/chaos was becoming a problem during testing especially at higher time step iterations.
To combat this an adaptive multi grid method which resolves areas of high error or difference in
relation to local surrounding elements. There are significant benefits to this method as the
refinement will “better model the sharp changes that can occur over steep terrain gradients and over
variable roughness areas, it is a powerful tool when the solution of a problem varies locally and
sharply.” (Hecht F. , 2012)
FF++ comes with an adaptive mesh function that can be called using the methods found in Code 1.
Script Summary:
76. ‘if’ function specifying the point that the mesh should be refined in this case it is refined
between iteration 99 & 100 as specified by the == syntax.
77. ‘adaptmesh’ function where Th – mesh name, [u,v] q are variables, maximum allowable error =
0.02 and the maximum number of global vertices is nbvx.
78. ‘plot’ the new adapted mesh, if wait = true the code will wait for user approval to continue.
79-81. Re calibrate mass flux at inlet and outlet boundary condition.
Code'1')'Adaptive'Mesh'Code'Example'
V.3 Rotor Porosity Function
The inclusion of rotor porosity as a function of power coefficient is not possible in a single
simulation with the current functions available within FF++. It is however possible to model the
wakes by running two simulations the first obtaining the baseline !∞ condition and the second
places a turbine rotor disc within the simulation at the correct ‘porosity’, which is a function of flow
speed so that the wake of the turbine can be modelled. This has particular use, as analytical wake
equations do not factor in the effects of complex terrain.
The model assumes that the actuator disc has a uniform thrust per square meter, which can be
calculated using the turbine thrust coefficient curve and a formula to estimate the axial induction
factor [a].
Once a turbine has been selected the corresponding thrust coefficient [Ct] can be sampled from the
curve, this will need to be altered each time depending on the local hub height.
The pressure drop through the disc ‘t’ is calculated using:
! =!
!
!
=!!! !
1
2
!!!!!
!
40
!! =!
1
1 − !
!!!
! =!
!
!
1 − 1 − !! (Betz’s Law)
Therefore:
! =!
!
!
=!!! !
1
2
!!!
1
1 − !
!!!
!
From the above equations the U component can be assigned to the boundary condition of the
actuator disk and then solved. From early experimentation the wakes did not dissipate at the correct
rate as there is no turbulence model and the boundary condition method actually injects more fluid
into the domain causing instability in the mass flux balancing. Figure 20 shows a turbine with a
porosity setting in a free stream of 15 m/s. From the analytical wakes section it is expected that the
wake would have returned to free stream by 9 rotor diameter lengths behind the rotor. The inclusion
of a basic turbulence model and a solver function allowing porous mediums to enable the
computational optimisation workflow need to be considered.
Figure'20')'Example'of'Actuator'Disc'Porosity'
''
'
'
'
'
41
Solver Validation
Two methods of validation were undertaken to compare results to empirical data and to look at the
ability of the projection algorithm to model the more complex flow phenomenon. The flat plate case
was used initially with a more advanced model hill created using a Gaussian-shaped ridge, to verify
speed up and recirculation bubbles on the lee side of hills.
Flat Plate
The flat plate validation case compares the solver boundary layer solution to the proven numerical
solution obtained by Prandtl’s student H. Blasius in 1908. (Slater, 1998) The case relies on the
assumptions that there is a zero pressure gradient, the plate is infinitely thin and is at 0 degrees
angle of attack. A MATLAB analysis script was made to analyse the boundary layer profiles along
the plate.
The experiment was approached using NASA’s flat plate validation techniques on a 2D Zero
Pressure Gradient Flat Plate. This highlighted recommended domain sizing and meshing strategies.
From previous reading it was known that the projection method does not accurately model high
Reynolds number flows therefore a Re 200 setup was used.
Figure 21 shows the unstructured mesh used for this case; it features refinement on the inlet directly
in front of the plate and behind to capture the wakes. It has its highest resolution directly around the
plate. The run was setup with a free stream velocity of 6 m/s and a kinematic viscosity of 1.36 x 10-
4 m2
/s corresponding to a Reynolds number of 200. This is an incompressible flow condition. A time
step of 0.01s was used to capture dynamic flow effects. The solution converged at 1e-4 on iteration
198. Figure 22 displays the U vel. component as it flows through the domain with red representing
free stream 6 m/s.
The experiment data which can be found in the FlatPlateTest folder was analysed within MATLAB
with unsatisfactory results as seen in Figure 23 the initial from x/c = 0 – 0.3 is relatively accurate
however past this value there is a systematic over prediction of boundary layer height with a
maximum 19% difference and an error of 6% at x = 1c. This is unexpected and resulted in
contemplation of data extraction techniques as qualitatively by manual measurement the boundary
layer heights look in keeping with the numerical results.
Data extraction from an unstructured mesh is challenging, due to the nature of unstructured grids
the points are scattered, which makes it difficult to get a good sample. It is easy to lose vertex data
so a searching function was developed which grabbed data in a range. Additionally the mesh
resolution directly on top and below the plate was increased by using a mesh resize function at the
trailing edge of the plate with a high seed propagation. This allowed a highly populated triangular
area on the upper surface, which grew in size from the leading edge to the trailing edge as seen in
Figure 24.
Errors were experienced with node propagation on the flat plate, due to the solver only operating in
a single precision environment therefore a lower resolution had to be used in this area.
The output data was chaotic with large u velocity component fluctuations, which required manual
filtering looking for correlations within the samples. Figure 25 shows the filtered output data for 1c
with a clearly defined transition at 6 m/s.
42
Figure'21'–'Unstructured'Mesh.'Flat'Plate.'1m'Chord.'
Figure'22')'U'Vel.'!!'='6'm/s.'Re'='200.'
Figure'23')'Experimental'Vs.'Numerical'for'Flat'Plate.'Invalid'Solution.'
43
Figure'24')'Refined'Mesh'
Figure'25')'Boundary'Layer'Height'@'1c'w.'marker'at'U/u'transition'
44
Figure'26')'Final'Solution'
Flat Plate Results & Discussion
During the analysis of a flat plate several issues were overcome such as mesh resolution/control,
solver errors and data extraction.
Mesh resolution had significant influence on the ability of the solver to resolve the macro scale flow
effects occurring at and around the plate. New methods had to be learnt which allowed
manipulation of the localised mesh around the plate; however there are still solver errors when the
local and global mesh resolution ratios are too large. Meaning there has to be a compromise
between local resolution and global resolution, which in turn must balance with the needs of the
user in terms of solver time and solver accuracy. Indeed a result with known systematic error can be
obtained with limited computational power with the above runs solving in 231s.
Possible causes of error from the solver could be from the Hodge decomposition boundary
condition for p on the domain boundary since the real pressure (the pressure in the exact solution of
the Navier-Stokes equations) does not satisfy such boundary conditions.
Data extraction techniques were another significant factor in this analysis; due to the noise there
was significant scope for error leading to a manual data filtering process. A basic method of data
analysis was developed that can be found in ‘FlatPlate.m’. This script features manual scripted
searching within predefined search parameters.
With regard to the noise/chaos within the solver a multi grid method could have been used to filter
by using an interpolating or adaptive refinement method, and will be implemented for future
experimentation. Multi grid techniques and methods were researched focusing on the work that
Anthony Jameson has completed. It was found that the FF++ tool has an inbuilt multi grid
refinement function.
On a whole the analysis was a success resulting in a valid solution, which systematically under
predicts the boundary layer height. This was expected due to the inability to set a Y+
layer, model
turbulence occurring at the shear layer.
When looking at the future uses of this however and the large domain sizes which will be analysed
the level of accuracy obtained for the macro flow scales demonstrates the validity of this projection
method for the analysis of complex terrain flow.
45
Gaussian Hill
The Gaussian Hill case is used to assess the validity of a computational model using a measurement
of speed up factor due to the effect of a model Gaussian-shaped ridge. It is frequently used for
demonstrating optimisation codes, and verifying the ability of the solver. The results data is
compared to “Wind Farm Layout Optimisation in Complex Terrain” (J Feng, 2014). This paper
conducts LES simulations using the EllipSys 3D code to analyse the flow over a Gaussian Hill.
This simulation looks to model the neutrally stratified flow over a low hill with terrain shape in x-y
plane defined as:
! =!!!!"" ∗ exp!(−
!!
!!!""
! ∗ !"#2)
!!!!!- Height of the hill [m]
!!!"" - Hill half length at mid-height [m]
The case was set up with the !! moving across the domain in the x plane, and the flow conditions
are computed using Chorins Projection method solver the details of which can be found in the
solver section. A computational domain was constructed and can be seen in Figure 27, of
dimensions [−!!!"" ∗ 10, !!!"" ∗ 10] (span wise) and [0,!!!!"" ∗ 10] (vertical).
Figure'27')'Gaussian'Hill'Case'
The solver input code can be found on digital medium labelled GaussHill_5.edp. The dotted line in
Figure 27 also represents the positioning of a highly seeded mesh condition to improve data
samples available for the speed up calculation.
46
Gaussian Hill Case Analysis Code - ‘GaussianHill.m’
A more advanced data extraction methodology was constructed from the lessons learnt in the flat
plate case, by creating a completely automated extraction and analysis tool which can extract data
along a specific range, disregard anomalous values and plot/analyse results.
Due to the presence of variable terrain height a function, which maps the terrain at a set resolution
was written. This allows mapping of specific ranges as a function of y(n,1) with n representing the
height of terrain at that specific x location as seen in Code 2.
Code'2')'Mapping'Function'
The second part of the code searches through all of the node data with a set tolerance, which is in
effect a bounding box around each search criteria. A find function is used which places data which
fits into the find search parameters into row/column values depending on the ‘nnn’ count as seen in
Code 3.
Code'3')'Search'with'2'Dimensional'Criteria'
%% Gaussian Domain
% H = Height of Hill
% L = Hill half length at mid-height of hill
t = -1000:1000;
HH = 1000;
H = 200;
L = 200;
n=1;
for x = [t];
j = x^2;
k = L^2;
y(n,1) = H*exp(-(j/k)*log(2));
n = n+1;
end
p = 1;
for kk = [t];
x(p,1) = kk;
p = p + 1;
end
ANS = {}; % Create Array
Tolerance = .5; % Set Search area ±
for nnn = (1:2001) % Resolution of y height values
yrange = y100(nnn,1); % Specify Y range to search
yrangemin= yrange - Tolerance;
yrangemax= yrange + Tolernace;
xrange = x100(nnn,1);
xrangemin = xrange - Tolerance;
xrangemax = xrange + Tolernace;
search = find((Xsorted)>xrangemin & ... % Find, looks for data within
(Xsorted)<xrangemax & Ysorted>yrangemin ...
& Ysorted<yrangemax);
ANS{nnn,1} = search;
end
47
The data is then filtered using a series of ‘if’ conditions dependent on the inlet flow speed and the
height above terrain. If a value does not meet the criteria it is discarded using the ‘NaN’ descriptor.
This can be seen in Code 4. Additionally the data is sorted so that the continuity between the
[X,Y,U,V] data remains the same using a sort index which maintains the global positioning of data.
Code'4')'Data'Sort'and'Analysis'
Finally data is normalised against the free stream condition for qualitative comparison of speed up
and lee side flow behaviour against the Ellipsis 3D LES case.
for nnnn = (1:2001)
uavg = mean(Usorted(ANS{nnnn,:}));
if uavg > val
uavg = uavg;
end
if uavg < val
uavg = NaN;
end
UU(nnnn) = uavg;
vavg = mean(Vsorted(ANS{nnnn,:}));
VV(nnnn) = vavg;
velmag = sqrt((uavg^2)+(vavg^2));
UV(nnnn) = velmag;
yvals = y100(nnnn,1);
YY(nnnn) = yvals;
end
48
Gaussian Hill Results & Discussion
Acceptable data took several experiments to acquire due to the recirculation effects that were
occurring on the lee side of the hill. The time step had to be lowered to dt = 0.05, in order to capture
the effect of the wake from the hill. The separation point can be determined from Figure 29, which
shows a large U velocity deficit from 20-120m. The sample area used took a y sample consistent
with a rotor disc diameter, hence the capture of the separated layer and an x sample of 100m. The
data however is not equally weighted, as there are a higher number of elements due to the multi grid
refinement, which leads to a skew when averaging.
The data sampling method in this case is not entirely accurate as it depends on the continuity of
values between elements and also the effect of refinement due to the multi grid adjustment. The
multi grid in this case placed several thousand more elements around the crest of the hill causing the
plotted data to be affected by very low U velocities. To troubleshoot, statistical averaging
techniques were trialled, which yielded similar results as well as more precise data disqualification
parameters dependent on proximity to the crest. The solver results look undistorted in iso and
contour plots as seen in Figure 28 therefore it was decided that these results were indeed a function
of the data extraction techniques.
The scattered node data made extraction and analysis a challenging task requiring manipulation of
the ‘tolerance’ bounding box sample size. The data is averaged in an attempt to stabilise the
oscillatory data especially present on the lee side of the hill where transient recirculation pockets
have formed as shown in Figure 28. These would be extremely detrimental to the performance of a
turbine not just due to the inconsistent flow speed but the high shear forces that would be present
across the rotor.
Due to these inaccuracies the data was qualitatively compared looking for similarities in the
velocity deficits occurring around the hill. Considering the comparison is to an LES model it is
expected that the full scale of eddies and mixing behind the hill is not captured, however generally
the projection method performs well with an average slow down of 0.7 @ -500m on the front and
0.55 @ 500m on the lee side.
Figure'28')'Gaussian'Hill'[u]'Recirculation'on'lee'side'[Red'–'High,'Green'–'Low]'
49
Figure'29')'Averaged'[X'U]'Sample'Velocity'Deficit'@'Hub'Height'[100m]''
Figure'30')'Normalised'Speed'Up'LES'Ellipsis'3D'Solver'(J'Feng,'2014)'
50
Post Processing – Section C
Post processing is a semi-automated activity, the user has to import the results data using functions
developed for CTA, which read the mesh data file. The mesh import function was originally built
by R.LorphËvre “load_gmsh.m” and allows the import of FF++ mesh data. Additional functions
have been written to sort vectored velocity data and allow scanning of data.
After convergence the solver outputs two files, a .mesh file containing mesh data and a .sol file
which contains the [u,v,p] data. In order for the file to be imported with MATLAB it must be
converted to .msh format. The standard mesh file that is outputted by FF++ works with the MEDIT
toolbox which is used for data visualisation and data query. However the features of this tool were
not adequate for the data manipulation and control needed to accomplish the necessary optimisation
tasks. The .sol file can be imported as is by MATLAB as it is in ASCII format.
Importing Data Methodology:
1) Open .mesh file into GMesh. Save file as .msh in format Version II ASCII
2) Load MATLAB Script FEADATAIMPORT.m
3) Assign file locations for .mesh file and .sol file
4) Run
The FEADATAIMPORT.m file can be found on the accompanying media in MATLAB folder.
Key features of the FEADATAIMPORT.m script are:
1) Data visualisation dependent on user requirement. Possibility of displaying a reconstructed
mesh or node locations for verification post import
2) Visual console display of success or failure to complete certain stages of import
3) For improved processing speed at optimisation stage, data is sorted using a sort index this
maintains continuity of node locations and component data
4) Scanning of data through the domain, facilitating the extraction of data for graphing
The scanning feature required significant research into the methods of looping and of efficiently
searching through data. Research undertaken on MATLAB forums highlighted the importance of
using cell arrays for the storage of matrices which increase read write speeds and make it more
efficient to manipulate large data sets.
searchx = find((Xsorted)>xrangemin & (Xsorted)<xrangemax & Ysorted>yrangemin &
Ysorted<yrangemax);
'
Code'5')'Find'Function,'‘FEADATAIMPORT.m’
Code 5 uses a ‘find’ function with four input arguments corresponding to a two dimensional range.
A find function is faster than logical addressing as it is better at ordering. By using this function
within a ‘for’ loop the function can find all data points within the bounding box created and then
store them in a cell array corresponding to the iteration number. Once this function has completed it
leaves a cell array containing all the vertices lying within the ranges specified. The corresponding
velocity or pressure values at the nodes are averaged and can then be plotted.
51
Optimal Turbine Placement+
-- Section C
One of the key aims was to optimise the placement of turbines along the terrain, by a function of
total energy and planning constraints.
The original aim to optimise the position of multiple turbines along a two dimensional plane has
been altered as investigations have shown that this leads to a huge number of possible combinations
which is actually greater than the number of seconds the universe has been around if it were to be
applied to a large domain. This phenomenon known as state space explosion has led to a more
conservative approach which positions the turbines and includes analytical wakes however the
placement as a function of number of turbines is not considered. The further work sections contains
more investigations and research on the optimisation tool.
Sectored Energy Seeking Function
This searching function finds the optimal positions for a wind turbine as a function of maximum
extractable energy. The extractable energy is a function of velocity^3 and therefore a small
fluctuation can cause a large relative increase in available power. The conditions are compared to
the baseline energy estimate to make a direct comparison to quantify the effects of the terrain on the
flow.
The tool scans sectored areas, which are defined by the user dependent on the turbine type selected
as well as the defined sector resolution, which is a function of bounding box width. The problem is
broken into two sub problems dealing with a different Cartesian coordinates.
The code specifies the x conditions on which to search through the domain while an inner loop
scans through the relevant y conditions corresponding to the specific x conditions and the rotor size
and actuator resolution. The x coordinate specification is shown in Code 6 with comments detailing
each line.
Code'6'–'Sectioner.m'x'position'search'
The next step sorts through all of the specified positions that the rotor can occupy along the y
coordinate. This is specified by a user input requiring the specification of turbine type and the
variation of hub heights for which the turbine can be placed. This section uses a MATLAB function
‘inpolygon.m’ which draws a bounding box condition in the domain and labels co-ordinates that lie
within it with a Boolean true/false. This can be seen in Code 7 with comments.
+
Scripts relating to this section can be found in the Optimal Placement folder
52
Code'7'–'Sectioner.m'y'position'search'and'storage'
The variable ‘Usectors’ now contains all of the average u velocity components and has been stored
as a function of global domain position i.e. a matrix position of [1,5] corresponds to [X,Y]
=[x:x+ActuatorRes, yrange(5):yrange(5)+RD]. This allows the code to determine the position at
which the wake model should be applied.
This function was built with the intention of later implementation into the optimisation routines and
as such some analysis was done to look at its performance. A basic analysis was done using the
built in ‘Run and Time’ tool which outputs a detailed breakdown of the code. Figure 31 details
summary of time used. The analysis was conducted on a 1km x 1km domain with 23000 node
points. Results show that the solver takes ~10 minutes to complete with 95% of solve time being in
the ‘inpolygon>vec_inpolygon’ call. The solve time makes the development of an efficient and fast
optimiser a distant prospect.
Figure'31)MATLAB'Script'Execution'Summary''
53
Wind Turbine Model
Inputs for the constraints on a wind site can be built into the calculation, such as planning
constraints to do with maximum hub heights or minimum and maximum distances between each
turbine.
Analytical Wakes
Wakes are applied to the position at which the initial turbine is placed and correction factor
dependent on the local velocity of each point is applied. A new grid of data is created to preserve
the original results.
Implementation of Jensen Wake Model – ‘JensenWake.m’
The Jensen wake model has linear wake expansion, which is a function of rotor diameter and
localised speed at the turbine. Using the U inflow component the wake can be applied behind the
rotor in the form of a non-linear velocity deficit. It is based on global momentum conservation in
the downstream wake and assumes that the wake is turbulent. Additionally the contribution of tip
vortices is neglected. This model is primarily for predicting the far wake region as shown in Jensen
NO, 19834
.
A Boolean function is applied to the scattered node data to locate all the points that lie within the
wake region of the turbine. From the Boolean results a bounding box is drawn around the affected
wake region and the points are identified as shown in Figure 32. “A Boolean function is
any logical operation in which each of the operands and the result take one of two values, as “true”
and “false” or “circuit on” and “circuit off.”” (Janković, Stanković, & Moraga, 2003)
Figure'32')'Boolean'Capture'of'Points'Within'Wake'Area'
The Jensen wake functions discussed in the ‘Modelling Wakes’ section are applied resulting in a
linear wake diameter expansion and a non-linear velocity deficit profile as seen in Figure 33.
Instead of using the Uinf value the local u value at each point is taken, as this takes into account the
effect of the terrain on the flow field. The wake result data is saved to a temporary analysis file and
can then be run through the ‘sectioner.m’ algorithm n times to position all the turbines. This type of
placement solution is incomplete as the position of the first turbine may not be best for a final
solution featuring n turbines.
A wake interaction model was considered and is actually functional at this point in the 2D analysis
sense, due to the equation using the ulocal which means that any over lapping wake fields have the
deficit applied as a proportion of the non-linear wake recovery formula shown in ‘JensenWake.m’.
4
. A note on Wind Generator Interaction. Riso National Laboratory, Roskilde, Denmark.
54
Figure'33')'Jensen'wake'model,'Output'Visualisation''
55
Turbine Placement for Gaussian Hill Case
The following compares the placement of turbines along the Gaussian Hill with and without wakes.
By running the ‘sectioner.m’ script each time a new turbine is placed the effects of the wake
condition can be identified and applied to the next selection process. This is a slow optimisation
routine currently as each analysis takes ~ 9 minutes and has to be run each time a new turbine is
added.
The analysis fits three ‘Vestas V63’ turbines as seen in to the Gaussian Hill case. Basic constraints
have been implemented which define minimum separation distance of 3 * RD = 189 m and a
min/max hub height of 50m and 70m respectively. By using the terrains analytical function
throughout the search the local height above the terrain can be maintained. This is placed before the
‘YLimits’ script section, as it needs to vary the y position as a function of the distance along the
terrain.
The results of the analysis can be seen in Figure 35 and Figure 35, as the segmentation tool has not
been automated the script still returns values that do not take into account minimum separation
distance. Therefore the results must be sorted through until one meets the criteria.
Due to the adaptive meshing which resolves areas of high error we see a large concentration of data
at positions of irregular flow when comparing Figure 34 and Figure 28, notably the recirculation
behind the hill and the small disturbance at the front of the hill.
Positioning the ‘No Wakes’ case relies purely on picking the highest wind resource with the correct
separation distance. While for the ‘Jensen Wake’ case multiple wind resource charts are generated
and are dependent on the previous turbines placement.
Figure'34')'Wind'Resource'along'Terrain''
Case: PowerAvailable/Avg.Vel @ Rotor: Turbine Position:
No Wakes 1: 1.5 MW / 24 m/s
2: 1.5 MW / 25 m/s
3: 1.5 MW / 22 m/s
Total: 4.5 MW
1: X - 1000, HH - 70
2: X - 800, HH - 70
3: X - 400, HH - 70
Jensen Wake 1: 1.5 MW / 22 m/s
2: 1.5 MW / 21 m/s
3: 1.5 MW / 22 m/s
Total: 4.5 MW
Figure'35')'Power'Generation'vs.'Optimal'
CTA_FinalDraftPDF
CTA_FinalDraftPDF
CTA_FinalDraftPDF
CTA_FinalDraftPDF
CTA_FinalDraftPDF
CTA_FinalDraftPDF
CTA_FinalDraftPDF
CTA_FinalDraftPDF
CTA_FinalDraftPDF
CTA_FinalDraftPDF
CTA_FinalDraftPDF

Contenu connexe

Similaire à CTA_FinalDraftPDF

RAPID PROTOTYPING - AN OPPORTUNITY FOR CHANGE
RAPID PROTOTYPING - AN OPPORTUNITY FOR CHANGERAPID PROTOTYPING - AN OPPORTUNITY FOR CHANGE
RAPID PROTOTYPING - AN OPPORTUNITY FOR CHANGESimon Major
 
Airline Fleet Assignment And Schedule Design Integrated Models And Algorithms
Airline Fleet Assignment And Schedule Design  Integrated Models And AlgorithmsAirline Fleet Assignment And Schedule Design  Integrated Models And Algorithms
Airline Fleet Assignment And Schedule Design Integrated Models And AlgorithmsJennifer Roman
 
Hidoe student transportation study report
Hidoe student transportation study reportHidoe student transportation study report
Hidoe student transportation study reportHonolulu Civil Beat
 
23 Equipment Selection For Mining With Case Studies
23 Equipment Selection For Mining  With Case Studies23 Equipment Selection For Mining  With Case Studies
23 Equipment Selection For Mining With Case StudiesBrittany Brown
 
Mitacs comprehensive evaluation of nh3 production and utilization options for...
Mitacs comprehensive evaluation of nh3 production and utilization options for...Mitacs comprehensive evaluation of nh3 production and utilization options for...
Mitacs comprehensive evaluation of nh3 production and utilization options for...Steve Wittrig
 
Innovative Payloads for Small Unmanned Aerial System-Based Person
Innovative Payloads for Small Unmanned Aerial System-Based PersonInnovative Payloads for Small Unmanned Aerial System-Based Person
Innovative Payloads for Small Unmanned Aerial System-Based PersonAustin Jensen
 
Preliminary Study for Exergetic Analysis on Sugar Production in Tanzania the ...
Preliminary Study for Exergetic Analysis on Sugar Production in Tanzania the ...Preliminary Study for Exergetic Analysis on Sugar Production in Tanzania the ...
Preliminary Study for Exergetic Analysis on Sugar Production in Tanzania the ...Patrick VanSchijndel
 
Strategic Technology Roadmap Houston Community College 2005
Strategic Technology Roadmap Houston Community College 2005Strategic Technology Roadmap Houston Community College 2005
Strategic Technology Roadmap Houston Community College 2005schetikos
 
SUSTAINABLE REGENERATION OF URBAN GREEN AREAS IN EGYPT’S DESERT CITIES - Adop...
SUSTAINABLE REGENERATION OF URBAN GREEN AREAS IN EGYPT’S DESERT CITIES - Adop...SUSTAINABLE REGENERATION OF URBAN GREEN AREAS IN EGYPT’S DESERT CITIES - Adop...
SUSTAINABLE REGENERATION OF URBAN GREEN AREAS IN EGYPT’S DESERT CITIES - Adop...Mahmoud Moursy Hussein
 
CFD-Assignment_Ramji_Amit_10241445
CFD-Assignment_Ramji_Amit_10241445CFD-Assignment_Ramji_Amit_10241445
CFD-Assignment_Ramji_Amit_10241445Amit Ramji ✈
 
Dissertation AZAF COV UNI
Dissertation AZAF COV UNIDissertation AZAF COV UNI
Dissertation AZAF COV UNIAsaf Rasheed
 
E-FREELANCING - MAJOR/FINAL YEAR PROJECT DOCUMENTATION
E-FREELANCING - MAJOR/FINAL YEAR PROJECT DOCUMENTATIONE-FREELANCING - MAJOR/FINAL YEAR PROJECT DOCUMENTATION
E-FREELANCING - MAJOR/FINAL YEAR PROJECT DOCUMENTATIONPIYUSH Dubey
 
Inventory of Radiological Methodologies (Inventario de Metodologías Radiológi...
Inventory of Radiological Methodologies (Inventario de Metodologías Radiológi...Inventory of Radiological Methodologies (Inventario de Metodologías Radiológi...
Inventory of Radiological Methodologies (Inventario de Metodologías Radiológi...Omar Alonso Suarez Oquendo
 
Worcester Art Museum: Green Technology Evaluation
Worcester Art Museum: Green Technology EvaluationWorcester Art Museum: Green Technology Evaluation
Worcester Art Museum: Green Technology EvaluationFlanna489y
 
Interior Landscape Plants for Indoor Air Pollution Abatement
Interior Landscape Plants for Indoor Air Pollution AbatementInterior Landscape Plants for Indoor Air Pollution Abatement
Interior Landscape Plants for Indoor Air Pollution AbatementElisaMendelsohn
 

Similaire à CTA_FinalDraftPDF (20)

RAPID PROTOTYPING - AN OPPORTUNITY FOR CHANGE
RAPID PROTOTYPING - AN OPPORTUNITY FOR CHANGERAPID PROTOTYPING - AN OPPORTUNITY FOR CHANGE
RAPID PROTOTYPING - AN OPPORTUNITY FOR CHANGE
 
Airline Fleet Assignment And Schedule Design Integrated Models And Algorithms
Airline Fleet Assignment And Schedule Design  Integrated Models And AlgorithmsAirline Fleet Assignment And Schedule Design  Integrated Models And Algorithms
Airline Fleet Assignment And Schedule Design Integrated Models And Algorithms
 
Hidoe student transportation study report
Hidoe student transportation study reportHidoe student transportation study report
Hidoe student transportation study report
 
23 Equipment Selection For Mining With Case Studies
23 Equipment Selection For Mining  With Case Studies23 Equipment Selection For Mining  With Case Studies
23 Equipment Selection For Mining With Case Studies
 
Mitacs comprehensive evaluation of nh3 production and utilization options for...
Mitacs comprehensive evaluation of nh3 production and utilization options for...Mitacs comprehensive evaluation of nh3 production and utilization options for...
Mitacs comprehensive evaluation of nh3 production and utilization options for...
 
Innovative Payloads for Small Unmanned Aerial System-Based Person
Innovative Payloads for Small Unmanned Aerial System-Based PersonInnovative Payloads for Small Unmanned Aerial System-Based Person
Innovative Payloads for Small Unmanned Aerial System-Based Person
 
Preliminary Study for Exergetic Analysis on Sugar Production in Tanzania the ...
Preliminary Study for Exergetic Analysis on Sugar Production in Tanzania the ...Preliminary Study for Exergetic Analysis on Sugar Production in Tanzania the ...
Preliminary Study for Exergetic Analysis on Sugar Production in Tanzania the ...
 
Strategic Technology Roadmap Houston Community College 2005
Strategic Technology Roadmap Houston Community College 2005Strategic Technology Roadmap Houston Community College 2005
Strategic Technology Roadmap Houston Community College 2005
 
SUSTAINABLE REGENERATION OF URBAN GREEN AREAS IN EGYPT’S DESERT CITIES - Adop...
SUSTAINABLE REGENERATION OF URBAN GREEN AREAS IN EGYPT’S DESERT CITIES - Adop...SUSTAINABLE REGENERATION OF URBAN GREEN AREAS IN EGYPT’S DESERT CITIES - Adop...
SUSTAINABLE REGENERATION OF URBAN GREEN AREAS IN EGYPT’S DESERT CITIES - Adop...
 
CFD-Assignment_Ramji_Amit_10241445
CFD-Assignment_Ramji_Amit_10241445CFD-Assignment_Ramji_Amit_10241445
CFD-Assignment_Ramji_Amit_10241445
 
Dissertation AZAF COV UNI
Dissertation AZAF COV UNIDissertation AZAF COV UNI
Dissertation AZAF COV UNI
 
Gheorghe M. T. Radulescu
Gheorghe M. T. RadulescuGheorghe M. T. Radulescu
Gheorghe M. T. Radulescu
 
E-FREELANCING - MAJOR/FINAL YEAR PROJECT DOCUMENTATION
E-FREELANCING - MAJOR/FINAL YEAR PROJECT DOCUMENTATIONE-FREELANCING - MAJOR/FINAL YEAR PROJECT DOCUMENTATION
E-FREELANCING - MAJOR/FINAL YEAR PROJECT DOCUMENTATION
 
Inventory of Radiological Methodologies (Inventario de Metodologías Radiológi...
Inventory of Radiological Methodologies (Inventario de Metodologías Radiológi...Inventory of Radiological Methodologies (Inventario de Metodologías Radiológi...
Inventory of Radiological Methodologies (Inventario de Metodologías Radiológi...
 
Future Inspection of Overhead Transmission Lines
 Future Inspection of Overhead Transmission Lines Future Inspection of Overhead Transmission Lines
Future Inspection of Overhead Transmission Lines
 
MSci Report
MSci ReportMSci Report
MSci Report
 
Worcester Art Museum: Green Technology Evaluation
Worcester Art Museum: Green Technology EvaluationWorcester Art Museum: Green Technology Evaluation
Worcester Art Museum: Green Technology Evaluation
 
thesis
thesisthesis
thesis
 
Interior Landscape Plants for Indoor Air Pollution Abatement
Interior Landscape Plants for Indoor Air Pollution AbatementInterior Landscape Plants for Indoor Air Pollution Abatement
Interior Landscape Plants for Indoor Air Pollution Abatement
 
FinalReport-1
FinalReport-1FinalReport-1
FinalReport-1
 

CTA_FinalDraftPDF

  • 1. CTA-WT Complex Terrain Analysis - Wind Turbine An Open Source Alternative Christopher Thomas Hall MEng (Hons) Aerospace Engineering University of the West of England Abstract: This paper addresses the current availability shortfall in open source wind and turbine analysis tools and adds in the ability to quantify the affects of complex terrain. This was accomplished using a combination of analytical and computational methods. The latter using Freefem++ a finite element methods solver which runs an incompressible Navier-Stokes projection algorithm which has been validated against the flat plate case and the Gaussian hill model. This paper produces an early stage methodology and workflow, which can be used to aid understanding of the terrain on the performance of the turbine.
  • 2. 2 I would like to thank the academic staff at the University of the West of England for their unwavering support over the past year, particularly Dr. Chris Toomer, Prof. Yufeng Yao & Dr. Steve Wright. Each has made a significant contribution not just to the progression of the project but also to my development as an engineer. Thank you for your time, experience and dedication.
  • 3. 3 TABLE OF CONTENTS INTRODUCTION ...............................................................................................................................................6 AIMS & OBJECTIVES.......................................................................................................................................7 PART I – RESEARCH & PLANNING........................................................................................................8 CURRENT TURBINE & WIND ANALYSIS SOFTWARE ......................................................................................9 WaSP..........................................................................................................................................................9 Wind PRO...................................................................................................................................................9 TERRAIN MODELLING...................................................................................................................................10 MESHING.......................................................................................................................................................10 SOLVER.........................................................................................................................................................11 Open Foam...............................................................................................................................................12 FreeFEM++.............................................................................................................................................12 ATMOSPHERIC CONSIDERATIONS.................................................................................................................12 ROUGHNESS & WIND SHEAR........................................................................................................................13 TURBINE ANALYSIS/SIMULATION OPTIONS.................................................................................................15 Actuator Disk Theory ...............................................................................................................................15 Blade Element Momentum Theory...........................................................................................................15 Modelling Wakes......................................................................................................................................16 WIND ANALYSIS ...........................................................................................................................................18 OPTIMISATION METHODS .............................................................................................................................19 VALIDATION METHODS................................................................................................................................20 PROJECT PLANNING......................................................................................................................................20 PART II – SOFTWARE DEVELOPMENT ................................................................................................22 SYSTEM MAP ................................................................................................................................................23 TERRAIN – SECTION A..................................................................................................................................24 Analytical Terrain ....................................................................................................................................24 Real World Terrain - Polyline Fitting.....................................................................................................24 Fully Topographic maps to 2 ½ D - Multi Plane.....................................................................................26 WIND DATA – SECTION A ............................................................................................................................27 Basic Wind Analysis Tools using MATLAB .............................................................................................27 FILE CREATION [.EDP] – SECTION B.............................................................................................................30 Constructing & Meshing Terrain.............................................................................................................30 Simulating Roughness Features in the Domain.......................................................................................32 FF++ SCRIPT – SECTION B ...........................................................................................................................33 SOLVER – SECTION B....................................................................................................................................34 Solver 1 – Steady Incompressible Navier-Stokes.....................................................................................34 Solver 2 – Projection Method for Navier-Stokes Equations ....................................................................37 Solver Validation......................................................................................................................................41 POST PROCESSING – SECTION C ...................................................................................................................50 OPTIMAL TURBINE PLACEMENT -- SECTION C.............................................................................................51 Sectored Energy Seeking Function ..........................................................................................................51 Wind Turbine Model ................................................................................................................................53 Analytical Wakes......................................................................................................................................53 PART III – CONCLUDING DISCUSSION & FURTHER WORK .....................................................57 CONCLUSIONS...............................................................................................................................................58 FURTHER WORK ...........................................................................................................................................59 Computational Wake Models...................................................................................................................59 Wake Interaction ......................................................................................................................................60
  • 4. 4 Discrete Optimisation ..............................................................................................................................61 Progressing from 2D – 2 ½D Case Considerations ...............................................................................63 APPENDIX A..................................................................................................................................................64 WORKS CITED .............................................................................................................................................65 TABLE OF FIGURES & CODES FIGURE 1 - RESEARCH ACTIVITY & INSTALLED WIND ENERGY (INTERNATIONAL ENERGY AGENCY, 2010) ......................6 FIGURE 2 – DIST MESH POLYGON GEOMETRY (PERSSON & STRANG, 2010) .......................................................................10 FIGURE 3 - ROUGHNESS PROFILES (USGS, 2006)................................................................................................................13 FIGURE 4 - JENSEN MODEL (RENKEMA, 2007)....................................................................................................................16 FIGURE 5 - LARSEN MODEL (RENKEMA, 2007)...................................................................................................................17 FIGURE 6 - WAKE INTERACTION GENERATED USING THE ACTUATOR DISC METHOD STREAMWISE VELOCITY PLOTTED ON ISO-CONTOURS OF VORTICITY....................................................................................................................................18 FIGURE 7 - BRANCH AND BOUND TREE (CHACHUAT, 2008) ...............................................................................................20 FIGURE 8 - SYSTEM MAP.....................................................................................................................................................23 FIGURE 9 - ANALYTICAL TERRAIN EXAMPLE......................................................................................................................24 FIGURE 10 - TOPOGRAPHIC MAP WITH ELEVATION (GOOGLE EARTH, 2015) .....................................................................26 FIGURE 11 - WIND ROSE .....................................................................................................................................................27 FIGURE 12 - WIND ANALYSIS CHARTS................................................................................................................................28 FIGURE 13 - TABLE OF DEFAULT WIND TURBINES .............................................................................................................29 FIGURE 14 - COMPUTATIONAL DOMAIN EXAMPLE ..............................................................................................................30 FIGURE 15 - SEMI CIRCLE MESH (HECHT F. , 2012).............................................................................................................30 FIGURE 16 – POLYLINE TERRAIN ........................................................................................................................................31 FIGURE 18 - STEADY STOKES SCRIPT..................................................................................................................................35 FIGURE 19 – EXAMPLE [U,V] PLOT W. ERROR SHEAR LAYER. ............................................................................................36 FIGURE 20 - EXAMPLE OF ACTUATOR DISC POROSITY .......................................................................................................40 FIGURE 21 – UNSTRUCTURED MESH. FLAT PLATE. 1M CHORD. .........................................................................................42 FIGURE 22 - U VEL. U = 6 M/S. RE = 200.........................................................................................................................42 FIGURE 23 - EXPERIMENTAL VS. NUMERICAL FOR FLAT PLATE. INVALID SOLUTION. .......................................................42 FIGURE 24 - REFINED MESH................................................................................................................................................43 FIGURE 25 - BOUNDARY LAYER HEIGHT @ 1C W. MARKER AT U/U TRANSITION ...............................................................43 FIGURE 26 - FINAL SOLUTION .............................................................................................................................................44 FIGURE 27 - GAUSSIAN HILL CASE .....................................................................................................................................45 FIGURE 28 - GAUSSIAN HILL [U] RECIRCULATION ON LEE SIDE [RED – HIGH, GREEN – LOW]...........................................48 FIGURE 29 - AVERAGED [X U] SAMPLE VELOCITY DEFICIT @ HUB HEIGHT [100M].........................................................49 FIGURE 30 - NORMALISED SPEED UP LES ELLIPSIS 3D SOLVER (J FENG, 2014)................................................................49 FIGURE 31-MATLAB SCRIPT EXECUTION SUMMARY........................................................................................................52 FIGURE 32 - BOOLEAN CAPTURE OF POINTS WITHIN WAKE AREA.....................................................................................53 FIGURE 33 - JENSEN WAKE MODEL, OUTPUT VISUALISATION .............................................................................................54 FIGURE 35 - POWER GENERATION VS. OPTIMAL .................................................................................................................55 FIGURE 36 - WAKE TERRAIN INTERACTION ........................................................................................................................56 CODE 1 - ADAPTIVE MESH CODE EXAMPLE........................................................................................................................39 CODE 2 - MAPPING FUNCTION.............................................................................................................................................46 CODE 3 - SEARCH WITH 2 DIMENSIONAL CRITERIA ............................................................................................................46 CODE 4 - DATA SORT AND ANALYSIS .................................................................................................................................47 CODE 5 - FIND FUNCTION, ‘FEADATAIMPORT.M’..........................................................................................................50 CODE 6 – SECTIONER.M X POSITION SEARCH.......................................................................................................................51 CODE 7 – SECTIONER.M Y POSITION SEARCH AND STORAGE ...............................................................................................52
  • 5. 5 NOMENCLATURE CTA Compex Terrain Analysis FF++ Free Fem ++ FEM Code Re Reynolds Number ∇ Del – vector differential operator HH Hub Height
  • 6. 6 Introduction The wind energy industry is young and has significant political and industry support fuelling the development of resources ranging from analytics to material development. Research activity has flourished in the past decade expanding at a similar rate to the number of new installations as seen in Figure 1. As industry continually increases it’s analytical capabilities with the development of new methods, there is the possibility that techniques will become too complex and alienate all but the experts within. The development of a numerical code paired with a simple interface that can be operated by a basic user to discover the opportunities of a potential wind project could serve a niche market within industry. Figure'1')'Research'Activity'&'Installed'Wind'Energy'(International'Energy'Agency,'2010)' This work seeks to construct a method of fulfilling the identified niche through the use of open source software and publicly available knowledge to produce a workflow and methodology for the analysis of the flow over complex terrain and its impact on wind turbines. Three sections: research & planning; software development; conclusions & further work each documenting a different aspect of the work undertaken are presented. CTA has been supplied on USB and includes all the code, solver files and work undertaken which is documented accordingly. The first section discusses the aspects of wind turbine placement in complex terrain and touches on important principles that must be considered to produce an effective solution such as solver types, validation methods and wind analysis theory. Additionally, the project required a good level of understanding of the MATLAB and C++ programming languages due to most open source solvers using C++ idiom languages. Software development ranges from: initial terrain data importing; wind analysis; turbine specifications to computational solver mechanics and data manipulation. The solver; FreeFem++ a finite element method solver and Gmsh a mesh compilation tool are used to generate computational flow estimations of the effects of complex terrain on wind turbine performance. An incompressible Navier-Stokes projection method is used as the solver algorithm and has been validated against two empirical cases. The scripts which have been designed to aid in the manipulation and analysis of
  • 7. 7 data have been written in MATLAB and are interoperable with each other due to global parameter assignments. The final section discusses project results and proposes further works, such as the implementation of new solver algorithms and graphic user interfaces; also highlighting several aspects which could contribute to the advancement of CTA when moving from the current 2D to a 2 ½ D planar analysis.§ Aims & Objectives Key aims and objectives for this project include: • Develop a code which is operable by low end personal computers with minimal computational cost • A full methodology for the analysis of wind turbine power generation in complex terrain • 2D and 2 ½ D analysis of terrain • Computational analysis of fluid flow over terrain • Analytical/Computational Turbine wakes • Post processing and manipulation of data to facilitate placement optimisation (discrete optimisation) § A planar analysis is one which simplifies a 3D model it multiple 2D slices which can be anlaysed with reduced
  • 8. 8 PART I – RESEARCH & PLANNING
  • 9. 9 Current Turbine & Wind Analysis Software Current software used commercially and in the open source domain allow the modelling of complex wind resource sites coupled with infrastructure analysis, cost modelling climate estimation siting of turbines and more. Each of these tools facilitates the low computational cost model, which the paper is targeting and the abilities of the most prolifically used are discussed below. WaSP “Wind Atlas Analysis and Application Program (WAsP) was introduced in 1987 by the Wind Energy and Atmospheric Physics Department at Risø National Laboratory, Denmark. It can be used for wind data analysis, wind atlas generation, wind climate estimation and siting of wind turbines. The program extrapolates wind climate statistics both vertically and horizontally based on measurements. A simple wake model, based on the model by Jensen is implemented as well in order to be able to calculate wake losses. “ (Renkema, 2007) WAsP is available as commercial packages and is simple to operate and only requires an input of wind speed, direction and time series at a single location. The solutions can be run quickly (~minutes) and is most accurate in the analysis of offshore cases. It has tools, which can analyse wind farm wake models and uses the Jensen linear wake model with interaction. WaSP does not factor in global terrain into the analysis at any point, merely relying on analytical flow assumptions dependent on the hill gradient, thus delivering an unsatisfactory result in more complex terrain regimes. Additionally there is limited thermal variability analysis, which gives poor “spatial variability once roughness effects on wind speed are at equilibrium” (Barthlmie, Pryor, Frandsen, & Larsen, 2005). Wind PRO “WindPRO is an integrated software package developed by the Danish company EMD for the design and planning of wind energy projects. Since it is a modular based software, it can be accustomed to the needs of the user. It is also capable of processing data from other software packages like WAsP and WindSIM, a simulator developed by WindSim AS for optimizing the energy production from wind turbines based on CFD, making it suitable for more complex terrain. The most important module from the perspective of wake modeling is the PARK module. This module handles wind farm energy calculations and array losses. For a complete overview of the software, see the website of EMD.” (Renkema, 2007) Wind PRO is essentially a CFD post processor, which can optimally place turbines due to complex terrain. It is decoupled however and is part of a chain of software products required to reach a solution. There are several similar programmes, which accomplish similar goals such as WindFarmer [Garrad Hassan] and Wind – Farm [ReSoft]. Review: While it is clear that several viable and respected software solutions which can accomplish this terrain analysis exist, none do so in a fully streamlined manner and all require significant computational time to output even a basic model. The above represent the current cutting edge in terms of computational wind farm analysis and as such there is significant expense associated with these tools.
  • 10. 10 Terrain Modelling An effective method of plotting terrain in both 2 and 3 dimensions is required. Industry practice is to either obtain this data using LIDAR [Light Detection and Radar] fly over to get accurate mapping data which includes foliage, and also to use ordinance survey data, these methods are perfectly legitimate however both are costly. The use of readily accessible mapping data drawn from an open source mapping solution would be an effective solution that would be openly available to non- commercial users. Google Maps API - An open source code, which has 5min elevation data. A tool using this code could be designed to work within MATLAB with set long lat coordinates for a grid, so that surface terrain data can be exported. Z Terrain Online – This tool is useful for extracting, at relatively high resolution, the local topography. Open DEM- An open source XYZ data source which is under a free license from the University of Heidelberg. http://www.opendem.info/download_xyz.html Meshing An effective meshing tool was needed to model the fine details present over complex terrain. This tool must be capable of dealing with 2D/3D elements, be open source and be capable of dealing with large domains. Dist Mesh Dist Mesh, an open source triangular and tetrahedron meshing software, which is integrated into the MATLAB/Octave suites. It can compute 2D/3D meshes and output unstructured domains of variable resolution and complexity, however the software is numerically based which can cause anomalies and resolution issues on domain formation. Figure 2 shows a polygon function based geometry, which was used to build a smooth terrain. The geometries are specified by signed distance functions, for actual mesh generation “DistMesh uses the Delaunay triangulation routine in MATLAB and tries to optimise the node locations by a force-based smoothing procedure” (Persson & Strang, 2010) Ultimately the code was discounted after simple experimentation for its solving time on large domains and its lack of mesh control functions. An additional problem with the usage of this code is the ability to build in additional complexities and control boundary and domain conditions. Figure 2 – Dist Mesh polygon geometry (Persson & Strang, 2010)
  • 11. 11 IFISS The IFISS toolbox features a meshing code for finite element discretisation. The software has several example cases dealing with common PDE equations including NS equations; however the meshing tool is inadequate in dealing with the style of data inputs and specifically lacks the ability to mesh curved non-linear boundaries. Contact was made with one of the creators of the software at the University of Manchester and it was confirmed that while new tools are being constructed they will not be functional for the foreseeable future. Experimental research was conducted to create a small stepped semi-circle linear solution however the steps could not be made small enough to constitute continued work. Gmsh “Gmsh is a 3D finite element grid generator with a built-in CAD engine and post-processor. Its design goal is to provide a fast, light and user-friendly meshing tool with parametric input and advanced visualization capabilities. Gmsh is built around four modules: geometry; mesh; solver and post-processing. The specification of any input to these modules is done either interactively using the graphical user interface or in ASCII text files using Gmsh's own scripting language.” (Gmsh) Gmsh is a very capable generator, compatible with both OpenFoam and SU2, which are open source solvers. FreeFEM++ (BAMG) FreeFem++ is distributed with a 2D computational meshing tool, called the Bidimensional Anisotropic Mesh Generator. It can deal with complex domains shapes and features adaptive meshing for mesh enhancement as a function of element error. Testing has shown that this software is capable of fulfilling the above requirements; however it is not explicitly compatible with MATLAB so an import procedure will have to be built into the software. Solver There are several open source FEM solvers available, which have been developed by an active community of enthusiasts, universities, and not for profit companies. This project is looking to find a solver with low computational expense that can deliver on all aspects of flow modelling from basic models to advanced turbulence modelling for when the software jumps from 2D to 3D applications. SU2 “SU2 is a suite of open-source software tools written in C++ for the numerical solution of partial differential equations (PDE) and performing PDE constrained optimization. The primary applications are computational fluid dynamics and aerodynamic shape optimization, but has been extended to treat more general equations such as electrodynamics and chemically reacting flows.” (Francisco Palacios∗, 2013) The SU2 solver can deal with compressible and incompressible Euler, Navier-Stokes and RANS based solvers. The latter would be very useful for the modelling of turbulence occurring in the
  • 12. 12 wakes on a 3D case. It also has: multi-grid; preconditioning tools; adaptive goal orientated mesh refinement and deformation tools. From research on CFD-Online, SU2 is a highly capable code and runs compressible cases very well however in the low RE incompressible cases this results in a slow code that has problems in highly resolved boundary layers. Open Foam “The OpenFOAM® (Open Field Operation and Manipulation) CFD Toolbox is a free, open source CFD software package which has a large user base across most areas of engineering and science, from both commercial and academic organisations. OpenFOAM has an extensive range of features to solve anything from complex fluid flows involving chemical reactions, turbulence and heat transfer, to solid dynamics and electromagnetics. It includes tools for meshing, notably snappyHexMesh, a parallelised mesher for complex CAD geometries, and for pre- and post-processing. Almost everything (including meshing, and pre- and post-processing) runs in parallel as standard, enabling users to take full advantage of computer hardware at their disposal.” (Open Foam) Research from CFD-Online has shown that while OpenFoam has a wide range of applications and models ready to use, there is a very steep learning curve if you are needed to write new applications or add functionality in terms of integration with external programmes or new internal operations. FreeFEM++ “FreeFem++ is a partial differential equation solver. It has its own language. Freefem scripts can solve multiphysics non-linear systems in 2D and 3D. Problems involving PDE (2d, 3d) from several branches of physics such as fluid-structure interactions, require interpolations of data on several meshes and their manipulation within one program. FreeFem++ includes a fast 2^d-tree-based interpolation algorithm and a language for the manipulation of data on multiple meshes (as a follow up of bamg (now a part of FreeFem++ ). FreeFem++ is written in C++ and the FreeFem++ language is a C++ idiom. It runs on Macs, Windows, Unix machines. FreeFem++ replaces the olderfreefem and freefem+.” (Hecht F. , 2012) Due to the integration of the meshing tool, solver and post processing visualisation the FF++ tool was selected, as it is a unified system, selection will involve the learning of basic C++ scripting in order to access the functionality of the tool. FF++ can run RANS based turbulence models. By selecting software, which is standalone and has been built to interact well it is hoped this will save time during development and minimise the chance for error. Atmospheric Considerations “Winds are driven by the sun. The solar radiation heats parts of Earth’s surface differently because of its round shape, rotation around its axis, surface material etc. causing temperature differences that in turn cause atmospheric pressure differences. Winds are the movements of air that tend to equalize these pressure differences. The air mass movements are a combination of five different forces; gravitational force; pressure gradient force; Coriolis force; centrifugal force and friction force.” (Ackerman & J.A.Knox, 2003) When analysing a large fluid problem it is important to understand all of the different variables that are interacting within the model. Certainly the most dominant forces in this localised complex
  • 13. 13 terrain evaluation will be the effect on the shear layer due to the complex terrain. However it is still important to consider other aspects such as the diurnal profile, which looks at the change in temperature throughout the day, which can alter the vertical velocity profile and cause buoyancy effects. “Nested models that handle real-time meteorological data from the synoptic scale down to the micro-scale, including buoyancy effects on the micro-scale flow, have also been developed and tested. Such models still require weeks of computational efforts on today’s most powerful computers, in order to generate a wind resource map for a wind farm. Thus the temporal and economical costs of such models may still be too high for practical applications.” (Eidsvik, 2005) Cleary this type of model is not necessary for the aims and objectives of this terrain analysis tool. Looking towards improvements however it is realistic to consider implementation of basic turbulence models such as Spalart-Allmaras (Spalart, 1992,) or k-e. The former, a single equation turbulence model solves a transport equation for a viscous variable and has been shown to give good results for boundary layers. There are however concerns as “it cannot be relied on to predict the decay of homogeneous, isotropic turbulence. Furthermore, one-equation models are often criticized for their inability to rapidly accommodate changes in length scale, such as might be necessary when the flow changes abruptly from a wall-bounded to a free shear flow.” (Fluent) An additional consideration is the effect of having a coarsely resolved boundary layer due to the global mesh size, considering that these effects are macro and there is already an overriding vertical shear layer as a function of global terrain, it is not critical to have a small Y+ value. This will have to be re evaluated when the turbulence model is included. Roughness & Wind Shear High above the earth at heights greater than 1km the wind is considered free of the effects of the surface. The ability to accurately model the vertical wind profile in the lower 100-200m is critically important to an accurate simulation. The orography and flora of the area is directly linked with tunnel, hill and roughness effects. In the wind industry specific classes have been developed to define roughness lengths, which are then used to evaluate wind conditions in a landscape. A table defining the roughness classes can be found in appendices. . Figure'3')'Roughness'profiles'(USGS,'2006)'
  • 14. 14 Several numerical methods exist which model different types of scenarios to different levels of accuracy. In reality the dynamic nature of this atmospheric boundary layer means that a single profile is not going to provide a consistently reliable extrapolation of wind speed from one height to another. Each of the below methods requires knowledge of the wind speed at a reference height. Power Law This law is the most basic way of estimating wind speed at a specific height from reference measurements, with the power being a complex function of local climate, terrain, roughness and environmental conditions. !! !! ! =! !! !! Where V and Z are velocity and elevation variables respectively and ! is the exponent of the power law. “Provided there are wind speed records at two or more elevations, the above arithmetic solution provides an objective solution.” (Zekai Şen) “The power law is generally favoured by the wind industry and consultants, as the wind shear coefficient is a dynamic value that varies according to a large number of factors, including time of day, season, atmospheric stability and regional topography.” (Gipe, 2004) Log Law In flat terrain and with a neutrally stratified atmosphere, the logarithmic wind profile is a good estimation for the vertical wind shear. The reference wind speed v1 is measured at height h1, v2 is the wind speed at height h2, z0 is the roughness length. !! = !! !" !! !! !" !! !! ln ! ≠ 0 The log law on the other hand is only valid under certain assumptions, regarding atmospheric stability, and actual profiles may deviate from the log law. In the wind industry the two methods are generally checked where possible to ensure that they provide similar results. (L. Wheatley, 2010) Met Tower Data A meteorological tower will typically feature several anemometers, which gather wind speed data at different heights. This data is then computed and a more accurate value of the wind shear at that location is generated using statistical averaging techniques. Typically the data uses a Weibull distribution to fit the data with a k value, which conforms with the European Wind Turbine Standards II requirements. However in the case of this complex terrain analysis one must consider that the shear profile along the terrain will vary and therefore it is important to input a global inflow which is then refined by the computational solver to conform to the terrain at that localised position.
  • 15. 15 Turbine Analysis/Simulation Options There are several techniques available for the aerodynamic analysis of the wind turbine rotor. Each model has advantages/disadvantages. Models, which are investigated, include: Actuator Disk Theory; Blade Element Momentum Theory. Actuator Disk Theory This theory represents the turbine rotor with an equal area disk that is idealised as an infinitely thin disk, which is of a set permeability that fluid can pass through. The fluid flow within the simulation is considered to be incompressible, homogenous and steady. No viscous effects are taken into account. This type of model only analyses the axial momentum balance while pressures far up and downstream are considered ambient. A local pressure difference is given between the two sides of the disc as shown in 1. “The flow is slowed down, and from the conservations of mass, momentum and energy, the forces can be calculated giving an indication of the rotor forces. “ (Geurts, 2009) The actuator disc theory only gives integrated values of the actuator disc flow parameters. Meaning it will only give average flow velocity through the disc as a function of the thrust coefficient. For the requirements of this software this model could be used for the 2D analysis, however it does not model any wake behaviour. 1 2 Blade Element Momentum Theory BEM theory is a widely applied technique as it provides fast results with an acceptable level of accuracy. The rotor disc is discretised into radial stream-tube elements and from the forces on the blade element at a radial position the induced flow velocity can be calculated. Using the induced velocity with the blade and free stream velocities the local velocity and angle of attack can yield new values for the forces on the blade element. Empirical 2D aerofoil data is then used to calculate the forces on the blade elements, this is an iterative process and is repeated until a steady solution is found. Hansen et al. (H.O.L. Hansen, 2006) highlighted the errors that can occur due to the accuracy of the 2D aerofoil data applied to a 3D application. BEM theory can only deal with steady solutions, which is not so much a limitation at this stage however BEM does deal more with 3D analysis and the initial development of this software will focus on a 2D simulation. 1 Actuator Disc Model of a Wind Turbine (Manwell, McGowan, & Rogers, 2009) 2 Axial Velocity and Pressure across the Rotor Disk (Geurts, 2009)
  • 16. 16 Modelling Wakes Wakes can be modelled both computationally and analytically, differing in their model from a basic linear wake projection to fully developed computational solution. The wakes generated by a turbine can impact the flow up to 7.4 rotor diameters downstream and as such are a critical element of accurately predicting the effect of upstream turbines. Analytical Approach Kinematic models only use the momentum equations to model the velocity profile of wakes behind the turbine. They do not compute turbulence changes so the addition of a turbulence model must be considered if this is required. Jensen Model This model developed by G.C. Jensen assumes a linearly expanding wake with a velocity deficit as a function of downstream rotor distance. Figure 4 shows the wake model of a turbine in 2D plane. The wake diameter is given by: !! = !(1 + 2!") ! = !/! Velocity in the fully developed flow: ! =!!! 1 − 1 − 1 − !! 1 + 2!" ! ! 3 Both of the above depend on the variable !, !ℎ!"ℎ is the relative distance behind the rotor. The value k, which represents the wake decay constant for an onshore case is 0.075. Figure'4')'Jensen'Model'(Renkema,'2007) 3 (Renkema, 2007)
  • 17. 17 EWTSII/Larsen Model Based on the Prandlt turbulent boundary layer equations and currently one of the recommended analysis methods from the European Wind Turbine Standards II manual, the Larsen model has closed form solutions for both the wake width and mean wake velocity profile. Obtaining the closed form solutions is done using a self-similar velocity profile as well as Prandlt’s mixing length theory. Simplifications used in this model include: incompressible and stationary flow; no wind shear and symmetric axial flow. This model is capable of resolving the characteristic double dip velocity profile in the near wake field in its second-order variant. This feature would better compliment a more critical wind farm placement algorithm. “" !! ! = 35 2! ! ! 3!! ! ! !(!!! ! + !! ) ! ! Axial velocity deficit in wake (∆!)!. Constant !!& position of the rotor with respect to the applied coordinate system: “ (Renkema, 2007) Figure'5')'Larsen'Model'(Renkema,'2007)'
  • 18. 18 Computational Approach Computational methods give very fine detail in the near wake and as a result are computationally expensive. The modelling of wakes requires a turbulence model, traditionally k-ε, however as computers speed up RANS and LES methods are being used more commonly. There will be a significantly improved result with the concession of a much longer solve time. “The wake behind a wind turbine is divided into the near wake region and the far wake region. The near wake is the region close to the rotor, where the wake features are directly linked to the rotor geometry and aerodynamics as well as to the inflow conditions.” (Nilsson, 2012) For this research the far wake region is of the most interest, the near wake can be ignored as “ the far wake is more influenced by the surrounding environment such as wakes from other turbines and the topography” (Vermeer, Sørensen, & A.) Generally in computational wake modelling an actuator disc is positioned where the rotor would be, which has porous properties directly linked to thrust coefficient data, which adjusts porosity based on power extraction from the fluid. This model has been validated and is used in the Ansys Wind modeller software and produces results similar to those seen in Figure 6. For the required application of this software computational wake modelling is not accurate unless a 3D model is available coupled with the insertion of a capable turbulence model. However research should be conducted as to the feasibility of building a 2 ½ D wake analysis theory. Figure'6')'Wake'interaction'generated'using'the'actuator'disc'method'streamwise'velocity'plotted'on' iso)contours'of'vorticity' Wind Analysis During the analysis of a potential wind resource site, meteorological towers are used to understand wind patterns and the mean amount of wind energy that can be generated. Typical wind analysis software compiles transient wind, direction, temperature and pressure data from which it applies numerical processes to determine estimations of average wind speed and extreme wind speed. Results are used to determine the class of turbine required to tolerate the specific conditions present at the site. Tools such as data cleaners, which remove iced conditions, need to be considered as well as looking at the wind data frequency.
  • 19. 19 From initial research there are several open source wind analysis tools such as Open Wind, which could work well with the CTA code in terms of large data analysis. Wind analysis is a statistical genre of problem relying on complex curve fitting and probably distribution, which requires additional toolboxes not available on the educational license. Therefore basic functionality such as analysis of maximum speed and directional data should be considered, however more complex calculations such as maximum lifetime wind speed is not a priority. Optimisation Methods An optimisation problem consists of maximising or minimising an objective function by altering the input values from an allowed set of variables and computing the value of the function. By optimising a problem it will have the best available values for the objective function in a defined domain. These objective functions can comprise best generation efficiency, turbulence minimisation, minimum costs, minimising wakes acting on other turbines in a farm, minimum distance spacing etc. The type of optimisation required depends on the problem; as such several different aspects of optimisation methods are discussed from a selection of research literature. Evolutionary algorithms are nature-inspired, metaheuristic-based, optimisation algorithms, meaning it samples a set of solutions they are particularly useful with incomplete or imperfect information or limited computation capacity. They have been successfully used in wind farm layout optimisation problems, and can be thought of as genetic mutation method relying on a Darwinistic selection model. The mutations are facilitated using a random change in the prior layout, for example a specific random change can be made such as axial position change, hub height or rotor diameter. A paper which successfully uses an evolutionary based search algorithm is “A fast and effective local search algorithm for optimizing the placement of wind turbines” by Wagner & Neumann. This paper produces an effective optimisation algorithm, which takes into account wakes on a flat idealised farm. It significantly improves on existing results from software such as OpenWind the minimisation of wake effects using a new problem-specific local search algorithm, which solves in ~12 hours. Of note are the constraints that are used which “enforce an upper bound on the area of the farm. This constraint ensures that we can only place a turbine i within a certain area” (Wagner, Day, & Neumann, 2012) “The second constraint regulates the spatial proximity, as it dictates the minimal distance within which two turbines can be set up. It is satisfied: !"" (!! − !!)! + (!! − !!)! !≥ !", ∀!∀! where R is the rotor radius and M is a proximity factor usually decided ahead of the optimization based on the make and model of the turbines used. We use M 1⁄4 8 based on the industry standard.” (Wagner, Day, & Neumann, 2012) In addition they also implemented a constant power curve across all the turbines. This assumption would not coincide with the complex terrain model, as each turbine would have a changing ulocal. Another style of optimisation is Branch and Bound, commonly known as mixed integer programming, which has close origins with the above evolutionary type. However this type of optimisation uses a sequence of related simpler sub problems, the solutions of which converge to the original solution. The sub problems should be easier to solve than the original and each sub problem should yield a bound on the original optimal solution value. For example in Figure 7 each node represents a partial solution with the numbers indicating the sequence in which notes are investigated, with the edge of the tree specifying how variables are fixed.
  • 20. 20 This type of method could be used in the instance of the complex terrain domain by partitioning the domains, which would allow the turbine placement problem to be modelled as a branch and bound problem. The existence of turbines would be signified by a Boolean value. These functions are highly adaptable and allow the user more control of branching strategies. Figure'7')'Branch'and'Bound'Tree'(Chachuat,'2008)' Validation Methods The validation of the chosen solver method must be compared to an empirical solution to avoid systematic error, which can occur when results from a computational method are compared to one another. While Ansys CFX/Fluent are recognised as being accurate it does not represent good experimental technique. The CTA solver algorithm will be compared against the flat plate case, which is an empirical solution, and additionally use model Gaussian hills to investigate effects such as speed up and separation positions along the hill. Project Planning From the above research it is clear that the project will require a rounded analysis with suitable application of each section. This represents a significantly complex task, as building a code which incorporates all aspects in an intelligent manner will require significant planning not just due to implementation of the code but also in creating a system structure. It is clear that the most time will need to be spent on the solver mechanics and validation. Initial planning and investigations will take significant time, as two programming languages MATLAB and C++ will have to be learnt to an acceptable level as well as basic programming techniques. Methods of acquiring assistance with regard to troubleshooting code have been identified and include the Math Works forum, Git Hub, previous research papers (Science Direct) and solver forums. Additionally there is a plethora of experience present at the university if needed. Specific members of staff, which have relevant experience include: Dr. Chris Toomer for her experience in atmospheric flow modelling; Prof. Yufeng Yao for his experience in solver mechanics and Dr. Steve Wright with several years in industry and is familiar with a multitude of programing languages.
  • 21. 21 With the time constraints of the masters year an outline of possible bottlenecks and risks has been drafted to help visualise the problem and flag any areas of concern. Terrain Development of methodologies to obtain terrain through open source means 3D elevation and topographic data is difficult to obtain and may require clearance from Google to access their mapping tool Development of MATLAB scripts which will allow import of differing types and scales, possible limitations of poor qualtiy data Turbine Data Source manufacturer turbine data to add to the default selectable in - house types Obtain class data for future use of turbulence intensity Manufactuers usually do not freely distribute their data so some may have to be made up if they cannot be found Wind Data Find some freely available wind data Develop basic wind analysis tools such as transient wind, wind speed distribution temperature data. This tool has not set out to be a capable wind analysis tool. An open source tool FreeWind should be used for more advanced analyis Computational Solver Highest risk is the ability to build and work with an open source solver Develop the ability to mesh and run simulations using a valid method to obtain reliable results Bottleneck: Development of CFD code and research, errors may take time to troubleshoot as only peer to peer support is available Post Processing Development of the ability to import the data from the solver into MATLAB Risks in compatiblity with MATLAB, could take substantial time to understand the theory behind dealing with scattered nodal data Optimisation Develop the ability to optimise the positioning of turbines based on optimal energy Build in the ability to compute analytical wakes Risks: Fully discrete optimisation could be a black hole in terms of solver time and state space explosion
  • 22. 22 PART II – SOFTWARE DEVELOPMENT The following showcases the development of all aspects of the complex terrain analysis code, a flow chart detailing the system design and layout can be found overleaf.
  • 24. 24 Terrain – Section A The terrain input standardises several input types into the parametric format required by FF++. By selecting the type of terrain import the code determines the correct formatting and data methods to apply. Two input tools are available; analytical and a real world X,Y polynomial fitter. An additional tool was considered and will be discussed in detail however the level of programming needed to complete it was very technical. It is important that the terrain functions are built within MATLAB as they are used for post processing after the simulation has finished. Analytical Terrain This tool allows the creation of any type of terrain by user construction. Due to the nature of creation the terrain can easily be inserted within the ff++ .edp script with only minor changes to the parametric function for the X,Y positions. The analytical terrain example in Figure 9 demonstrates the correct method of specifying terrain. Figure'9')'Analytical'Terrain'Example' Real World Terrain - Polyline Fitting A solution to converting the often-complex shapes that terrain can form was to use a best-fit polynomial. This method has benefits and limitations. If the supplied terrain data is of low resolution it will essentially have a smoothing factor applied, while if the data has badly discretised sections the poly function will remedy bad segments. The downside of this method is the potential to miss critical features in the terrain like sudden cliff drops, which could be inadvertently smoothed over. There is a basic fitting tool within MATLAB that allows visualisation of up to a 10th order polynomial and also allows the display of the generated polynomial function. Within this tool are residual plots that can display to the operator the quality of the fit. The tool is accessed from the plotting window Tools > Basic Fitting. Relatively accurate 2D plane data can be obtained using the Zonum Solutions World Terrain Mapper software at ‘http://www.zonums.com/gmaps/terrain.php?action=sample’. The tool features a clear layout and allows .csv x y z point extraction for direct input into the CTA script.
  • 25. 25 Once this data has been fitted using the tool the equations can be extracted and then constructed as demonstrated in Figure 9 in the Analytical Terrain section. Zonum Terrain Elevation Mapper The Zonum Solutions terrain mapper is a free open source mapper using the Google Maps API. It allows a maximum sample of 500 points however if each sample is taken over a small range the full resolution of Google Maps of 10m can be utilised. Below is an example of how to use the tool. 1. Enter min/max of lat/long coordinates required. Use Get Elevations >> button. 2. The mapping tool will plot along the selected coordinates, simply change the format to comma separated values type and elevation in metres and click 'create report’ button. This will output the data in a text box.
  • 26. 26 Fully Topographic maps to 2 ½ D - Multi Plane A tool, which allows the selective extraction of planar data using the Google Earth software utility, could add considerable adaptability to CTA. It was envisioned that 2D planar slices are taken of the geometry dependent on the wind directions so that a more valid solution could be obtained. This would allow the solution to build up a 2 ½ dimensional flow profile over the terrain and potentially identify flow effects that only occur on certain features. It would do this based on the directional wind data and use the top frequency directions or directions of concern as indicated by the user to grab sectional profiles at those bearings. This additional input method was seen as a replacement for LiDAR imagery data and would have provided fully 3D topographic maps due to the recent high-resolution mapping completed by Google Imaging. This too relies on open source tools and an approval by Google Maps for an API key, which was not obtainable at the time of writing. Figure 10 shows a topographic map that was exported from the Google Earth mapping tool. The proposed applications used were Google Earth, Sketch-Up and QGIS to allow full topographic mapping. Unfortunately during development it was found that a data manipulation tool was needed to convert the meshes into readable NURBS data. NURBS (Non-Uniform Rational B-Splines) are a geometry type you can use to create 3D curves and surfaces. Therefore it was deemed that this aspect of the project was not crucial for the overall accomplishment of the objectives and was therefore put on hold. This tool could fundamentally improve the ability of the software and should be considered for future work as the only real industrially used software ‘Global Mapper’ has a substantial cost basis to do effectively the same thing. Figure'10')'Topographic'Map'with'Elevation'(Google'Earth,'2015)'
  • 27. 27 Wind Data – Section A The selection and intelligent usage of wind data is an important aspect of any analysis and simulation. The wind rose in Figure 11 depicts the outcome of data gathered using a coupling of anemometers (wind speed) and a wind vane (directional). The directional element of this data is difficult to implement into a realistic 2D analysis of specific terrain profiles as it is not always true that the most troublesome flow condition is associated with the highest directional frequency and speed. Ultimately this requires some user experience and the use of multiple samples to reliably conclude that no other detrimental flow conditions exist. New software developed by Sandia “Simulator for Wind Farm Applications or SOWFA” is attempting to target this phenomenon. Which is where the previously mentioned multi-plane section tool would have had a significant contribution. For the following complex terrain analysis the directional bearing with the highest ‘extreme’ speed is used. Figure'11')'Wind'Rose' Basic Wind Analysis Tools using MATLAB This section demonstrates some basic MATLAB methods of importing wind data and processing with wind data sets. Including removing icing conditions, visualisation of wind speeds using plots, defining turbine power curves if full manufacturer data is not available and calculating average turbine power and capacity factors. Sample wind and temperature data set was acquired from FINO, who supplied a 12-month sample of hourly averaged wind samples. Importing Time Averaged Wind Data A code was built which can import time averaged data sets and plot them with respect to time, additionally some cleaning techniques were implied such as removing of points that occur during icing conditions. This is important as while the turbine may well have been spinning during these icing periods the energy generation will be minimal due to the lack of effectiveness of the aerofoil. The below import code draws from a basic example supplied by a MATLAB Resource Assessment seminar. The methodology for using the time averaged wind data tool is as follows: 1) Navigate to Basic_Import_Functions in the software folder 2) Run ‘ImportTimeaveragedwinddata.m’ – Imports Data in correct format from .txt 3) Run ‘WindAnalysis.m’ – Runs all basic data imports, saves data and plots for visualisation.
  • 28. 28 By default up to 5 met towers can be analysed however more can be added by simply increasing the sample size on line 43 of ‘ImportTimeaveragedwinddata.m’. ‘WindAnalysis.m’ Output Charts: Wind Data; Power Curve; Wind Density Distribution; Temperature Profile and Temperature Profile w/ Icing exclusion. Figure'12')'Wind'Analysis'Charts' Baseline Energy Estimation The available power generation available at a specific point of a wind energy site is a function of blade length [L], wind speed [v], air density [!] and the power coefficient [!!]. !!"!#$ =! 1 2 !!!!!!! !!!
  • 29. 29 The equation relies on having accurate power coefficient data, which is dependent on the wind speed that the turbine is operating in. This is typically supplied by the manufacturer and is unique to each turbine type. It is worth mentioning at this stage one of the caveats on wind energy generation, Betz’ Law. This ‘limit’ stipulates that the “theoretical maximum power efficiency of any design of wind turbine is 0.59 of the energy carried by the wind can be extracted by a wind turbine” (RWE npower Renewables, 2009). For the above wind energy equation a function must lookup the corresponding power coefficient value according to the average velocity at the turbine and the turbine type. Accurate and legitimate power coefficient data is not freely available therefore only four example sets could be sourced. The coefficient data can be found in: CTA ¬ TurbineData. Figure 13details default turbines available with CTA. ' ' Figure 13 - Table of Default Wind Turbines ' The files stored in the TurbineData folder can be queried using the function ‘loadturbinedata.m’, the data has a .pow extension, which is an ASCII format. A secondary function was built for the querying of specific coefficient values dependent on wind speed. The data is interpolated to find the !!!!"!!! value; ‘findCp.m’ uses the assigned numbers to specify each model. Turb No. Model Power Hub Height [m] Rotor Diameter [m] 1 Bonus 2MW 60 76 2 Fiktional 700KW 43 39 3 Vestas V63 1.5MW 60 63 4 NEG-Micon NM 2MW 68 72
  • 30. 30 File Creation [.edp] – Section B Constructing & Meshing Terrain As a result of a lengthy learning process spanning a month of investigations into developing an understanding of Delaunay triangular meshes, using Distmesh, IFISS and MATLAB the methods to construct computational domains was realised and implemented. Figure 14 demonstrates the correct construction of a domain Ω with four defined boundaries Γ!! − !Γ! which have been defined in a counter clockwise orientation. This is fundamentally important as when building the case, the boundaries must always be drawn with the domain on their left. Dirichlet boundary conditions can be “imposed on an ordinary or partial differential equation which specifies the values that a solution needs to take on along the boundary of the domain” (Cheng & Cheng, 2005), it is often referred to as a fixed boundary condition. ' Figure'14')'Computational'domain'example' Research into the use of scalar values in the FF++ meshing tool has shown that terrain [x y] values are not suitable for use as boundaries due to errors occurring at the max/min coincident points. As a result a fully computational input method was devised using MATLAB to fit a variable order polynomial to the data set. Figure'15')'Semi'circle'mesh'(Hecht'F.','2012)' Initial development used the example code found in Section 3.14 (Hecht F. , 2012) as it demonstrates the construction of a curved domain. It is important to note that all the real values
  • 31. 31 remain outside of the boundary definitions, while the shape is defined by parametric values. When defining a boundary the term ‘border’ must be used followed by the name. Example 1 demonstrates the use of parametric and real values. The real values are the offset X0 and radius rr. Example 1: border circle(t=pi,0){ x=x0+rr*cos(t); y=y0+rr*sin(t);} Using Example 1 as a guide the computational parametric polynomial solution was implemented, with the resultant domain in Figure 16. The resulting geometry is satisfactory however the points at the start and end of the terrain need to be optimised as to not cause undesirable flow effects. The drop off at the end of the terrain will be constrained as determined by the user with three different functions [Cap, Extend and Shallow Gradient]. The Cap constraint can be seen within Figure 16, the Extend condition simply extends the terrain with a flat section to the end of the domain, while the shallow gradient gradually reduces the height based on a user-defined value. '' Figure'16'–'Polyline'Terrain' To generate a mesh for this domain the function: mesh Th = buildmesh(border1(n)+border2(n)+…. is used with the variable n standing for the resolution of nodes on each boundary condition. Mesh output data is defined and exported using the Medit toolbox within FF++ using the function: savemesh(Th,"TDomain.mesh"); This outputs the corresponding [TDomain.mesh] format plain txt file. It can also be plotted using the Medit toolbox for visualisation within FF++. Figure'17')'Meshed'Domain'with'Terrain'
  • 32. 32 Simulating Roughness Features in the Domain A manual way of applying roughness features to the simulation has been developed, which adds features to the domain to better simulate the shear profile experienced in the real world site. These features are built into the input file and can be positioned along the bottom boundary at any position; line height can be referenced using the roughness lengths found in App. 3. Possible uses of this function include the positioning of forestry and differential localised roughness along the domain. This additive roughness formulation can greatly add to the simulation by incorporating blockage effects, which are not commonly visualised. A blockage effect is caused when a turbine is positioned too close to large terrain differentials and the air passing through the turbine cannot escape back to free stream causing a large area of significantly slowed air behind part of the rotor.
  • 33. 33 FF++ Script – Section B This section features a walkthrough on the FF++ input .edp file and displays the different aspects of a FF++ input file. FF++ does have a graphical user interface that allows visualisation of the software with a familiar drop down menu tooling. However the terminal input is more straightforward and can be run from within the MATLAB syntax if required using the ‘!’ identifier which signifies a system command. The FreeFem++ script consists of three main sections: 1. Boundary and Domain Conditions (Meshing) With Lines: 1 – 7 – Dirchilet boundary condition construction 9 – Build mesh function acting on all borders and named as ‘Th’ 10 – Timer function for analysis of computation time 2. Solver Algorithm An example of which with explanation can be seen in Figure 18. 3. Output Storage and Post Processing Commands With Lines: 84-86 – Plotting and saving of data to an electronic post script file 88 – Loading the inbuilt medit toolbox for mesh manipulation 89 – Saving the solution as an ASCII .sol file with the Mesh (Th) variables u , v in order 1 which saves the solution data at vertex point data 90 – Saves the mesh as a .mesh file for compatibility with MATLAB 91 – Loads the medit visualiser for post experiment visualisation
  • 34. 34 Solver – Section B From the selection of the Freefem++ (FF++) unified meshing and solver software, intensive research was conducted to tackle the steep learning curve of using computational fluid dynamics scripts and functions. FF++ uses a C++ based language and as such the basics had to be learnt before it was possible to manipulate the script. The resources available on the FF++ website such as example scripts and forum support have been critical to the learning process. The solver iterations below highlight only a small amount of the investigations and trials, which took place during the course of this thesis. Full scripts can be found within the solver trials folder on the digital medium. Solver 1 – Steady Incompressible Navier-Stokes V1.0 Standard Steady Navier Stokes [u,v,p] solver Features a steady incompressible NS solver code, which was written by F.Hecht. The solver outputs a steady state solution i.e. no time variation. Before manipulating any of the solvers parameters the fundamentals of incompressible Navier-Stokes equations were researched. Understanding the NS Equations Consider a Newtonian fluid of density ! and velocity ! for an incompressible fluid with constant density the continuity equation of mass conservation would be: !!! + ! ∗ (!")!= !0 (FC. 1)" Now the balanced equation of momentum where ! is the pressure and ! = !!/! denotes the static viscosity of the fluid can be written as: !!!! + !! ∗ !!!! − !!∆!! + !!!! = !!" (FC. 2) Equations FC (1,2) form the well-known Stokes equations; the equations are non-linear because of the term ! ∗ !". When dealing with dimensionless NS equations the Reynolds number must be factored in, where !! is the characteristic velocity and !! is the characteristic length. !" = !!!! ! ! (FC. 3) Now the dimensionless NS equation can be written as: ! · ! = 0,!!!!!!!!! + ! ∗ !" − 1 !" ∆! + !" = ! (FC.4) Small values of Re lead to a more laminar flow dominated by stokes effects, whereas larger values of Re lead to more turbulent flow. The transition regime where the flow is at an intermediate Re causes the appearance of unsteady flows. The initial term ! · ! = 0 can be negligible in size compared to the viscous term. This allows the NS equations to be approximated by the Stokes equations. "
  • 35. 35 ! · ! = 0, !!! − 1 !" ∆! + !! = ! (FC.5) Now when the flow is closed to a steady state, the unsteady stokes equation can be approximated by the stationary stokes equation: ! · ! = 0, − 1 !" ∆! + !! = !! (FC.6) Steady Stokes Solver Script The code within Figure 18 is the solver script from a FF++ .edp input file, with each line meaning the following: 21 – 25. Defining the finite element space for Uh (velocity variables) and Vh (pressure variables) 29. Epsilon term used for stabilisation. 31-36. Incompressible NS equations dealing with each x & y component 37. Stabilisation term to fix the constant part of the pressure 41-44. Post data plotting Figure'18')'Steady'Stokes'Script'
  • 36. 36 V1.1 Addition of Logarithmic Inlet Velocity Profile Features the addition of variable inlet profiles, which are included to model the atmospheric shear layer. The two inlet functions added to the .edp script are: Exponent Logarithmic real v10 = 60; // y = reference velocity at h10 real h10 = 10; // height of reference velocity real ahe = 3; // hellman exponenet func profile = v10*((y/h10)^(1/ahe)); real W6 = 4; // measured wind speed at H m real H = 10; // Height of measured wind speed real ro = 0.1;//roughness func profile = W6*(log(y+5/ro)/log(H/ro)); The above codes reference the y (height) position at each element along the inlet boundary and assigns a velocity value to the nodes. The mesh resolution must be adequate to allow the non-linear inlet profiles to develop and stabilise in the extended domain area. Figure 19 shows the non-linear inlet profile as see in the far right of the image. An error currently occurring with this solver is the oversized boundary layer that forms independently of the inlet velocity profile, this error has been researched but to no avail. Figure'19'–'Example'[u,v]'Plot'w.'Error'Shear'Layer.''
  • 37. 37 Solver 2 – Projection Method for Navier-Stokes Equations V.1 Baseline Chorin Projection Algorithm The projection algorithm being used is based closely on R. Rannachers method, which is an adapted version of Chorn’s see. (Rannacher, 1992). The idea to use this method was based around work done by F.Hecht in the freefem ++ handbook, which uses the projection method to model the backwards-facing step case. The solver assumes neutral stability of fluid in the domain meaning that the air is adiabatically balanced from a thermodynamic perspective. This is a reasonable assumption to make as in high winds or complex terrain the effects of shearing forces are more dominant than domain buoyancy. The baseline algorithm has a mass flux balancing term, which calculates the inlet and outlet fluxes and terminates if they are unbalanced. This flux balance is maintained throughout the simulation. As well as a convergence break which is calculated by finding the change of the u and v components at every iteration: Additional rules can be applied which do not let the solver quit for the first 100 iterations this is important as on some laminar cases the solver can be projecting an error below the threshold even if the flow has not developed. Understanding the Projection Method Projection methods are a class of Navier-Stokes procedures, which were introduced; in the form of numerical simulations by Chorin see (Chorin. & Comput., 1967). A distinguishing feature of Chorin's projection method is that the velocity field is forced to satisfy a discrete continuity constraint at the end of each time step. The projection method algorithm is based on the Helmholtz decomposition of any vector field into a solenoidal part!!!"#and an irrotational part !!""#$. A solenoidal vector field is a vector field with zero divergence at all points [∆ ∗ ! = 0]. The Helmholtz decomposition states that the vector field u can be decomposed into a !!!"# and a !!""#! part. From Chorin (Chorin. & Comput., 1967): ! =!!!"# +!!!""#$ =!!!"# + ∇! Taking the divergence of the equation as ∇ ∗!∇! = !0: ∇ ∗ ! =!∇! ! The above is the Poisson equation for the scalar function !, when the vector field u is known the scalar function ! and divergence-free part of u can be found using: !!"# = ! −!∇! Using the incompressible form of the Navier-Stokes equations: !" !" + ! ∗!∇ ! = !− 1 ! ∇! + !∇! ! From Rannacher (Rannacher, 1992), one first solves for an intermediate velocity, !∗ using the above momentum equation but ignoring the pressure gradient term giving:
  • 38. 38 !∗ − !! ∆! =!− !! ∗!∇ !! + !!∇! !! where !! is the velocity at the nth time step. Now for the second step of the algorithm the intermediate velocity is corrected to obtain the solution of time step !!!! : !!!! =!!∗ −! ∆! ! ∇!!!! This can be rewritten as a function of time step: !!!! − !∗ ∆! =!− 1 ! ∇!!!! It is clear now that the above algorithm is essentially an operator splitting method in which firstly the viscous forces are analysed and then the pressure forces. Finally to compute the RHS of the pressure forces in the second step the pressure p at (n +1) time step must be known. Taking the divergence and defining: ∇ ∗!!!!! = 0 Which then gives the Poisson equation !!!! : ∇! !!!! =! ! ∆! ∇ ∗ !∗ n.b. A Poisson equation is a partial differential equation of elliptic type and can be used to describe the potential energy field caused by a given mass density distribution.
  • 39. 39 V.2 Adaptive Multi Grid Algorithm Solver noise/chaos was becoming a problem during testing especially at higher time step iterations. To combat this an adaptive multi grid method which resolves areas of high error or difference in relation to local surrounding elements. There are significant benefits to this method as the refinement will “better model the sharp changes that can occur over steep terrain gradients and over variable roughness areas, it is a powerful tool when the solution of a problem varies locally and sharply.” (Hecht F. , 2012) FF++ comes with an adaptive mesh function that can be called using the methods found in Code 1. Script Summary: 76. ‘if’ function specifying the point that the mesh should be refined in this case it is refined between iteration 99 & 100 as specified by the == syntax. 77. ‘adaptmesh’ function where Th – mesh name, [u,v] q are variables, maximum allowable error = 0.02 and the maximum number of global vertices is nbvx. 78. ‘plot’ the new adapted mesh, if wait = true the code will wait for user approval to continue. 79-81. Re calibrate mass flux at inlet and outlet boundary condition. Code'1')'Adaptive'Mesh'Code'Example' V.3 Rotor Porosity Function The inclusion of rotor porosity as a function of power coefficient is not possible in a single simulation with the current functions available within FF++. It is however possible to model the wakes by running two simulations the first obtaining the baseline !∞ condition and the second places a turbine rotor disc within the simulation at the correct ‘porosity’, which is a function of flow speed so that the wake of the turbine can be modelled. This has particular use, as analytical wake equations do not factor in the effects of complex terrain. The model assumes that the actuator disc has a uniform thrust per square meter, which can be calculated using the turbine thrust coefficient curve and a formula to estimate the axial induction factor [a]. Once a turbine has been selected the corresponding thrust coefficient [Ct] can be sampled from the curve, this will need to be altered each time depending on the local hub height. The pressure drop through the disc ‘t’ is calculated using: ! =! ! ! =!!! ! 1 2 !!!!! !
  • 40. 40 !! =! 1 1 − ! !!! ! =! ! ! 1 − 1 − !! (Betz’s Law) Therefore: ! =! ! ! =!!! ! 1 2 !!! 1 1 − ! !!! ! From the above equations the U component can be assigned to the boundary condition of the actuator disk and then solved. From early experimentation the wakes did not dissipate at the correct rate as there is no turbulence model and the boundary condition method actually injects more fluid into the domain causing instability in the mass flux balancing. Figure 20 shows a turbine with a porosity setting in a free stream of 15 m/s. From the analytical wakes section it is expected that the wake would have returned to free stream by 9 rotor diameter lengths behind the rotor. The inclusion of a basic turbulence model and a solver function allowing porous mediums to enable the computational optimisation workflow need to be considered. Figure'20')'Example'of'Actuator'Disc'Porosity' '' ' ' ' '
  • 41. 41 Solver Validation Two methods of validation were undertaken to compare results to empirical data and to look at the ability of the projection algorithm to model the more complex flow phenomenon. The flat plate case was used initially with a more advanced model hill created using a Gaussian-shaped ridge, to verify speed up and recirculation bubbles on the lee side of hills. Flat Plate The flat plate validation case compares the solver boundary layer solution to the proven numerical solution obtained by Prandtl’s student H. Blasius in 1908. (Slater, 1998) The case relies on the assumptions that there is a zero pressure gradient, the plate is infinitely thin and is at 0 degrees angle of attack. A MATLAB analysis script was made to analyse the boundary layer profiles along the plate. The experiment was approached using NASA’s flat plate validation techniques on a 2D Zero Pressure Gradient Flat Plate. This highlighted recommended domain sizing and meshing strategies. From previous reading it was known that the projection method does not accurately model high Reynolds number flows therefore a Re 200 setup was used. Figure 21 shows the unstructured mesh used for this case; it features refinement on the inlet directly in front of the plate and behind to capture the wakes. It has its highest resolution directly around the plate. The run was setup with a free stream velocity of 6 m/s and a kinematic viscosity of 1.36 x 10- 4 m2 /s corresponding to a Reynolds number of 200. This is an incompressible flow condition. A time step of 0.01s was used to capture dynamic flow effects. The solution converged at 1e-4 on iteration 198. Figure 22 displays the U vel. component as it flows through the domain with red representing free stream 6 m/s. The experiment data which can be found in the FlatPlateTest folder was analysed within MATLAB with unsatisfactory results as seen in Figure 23 the initial from x/c = 0 – 0.3 is relatively accurate however past this value there is a systematic over prediction of boundary layer height with a maximum 19% difference and an error of 6% at x = 1c. This is unexpected and resulted in contemplation of data extraction techniques as qualitatively by manual measurement the boundary layer heights look in keeping with the numerical results. Data extraction from an unstructured mesh is challenging, due to the nature of unstructured grids the points are scattered, which makes it difficult to get a good sample. It is easy to lose vertex data so a searching function was developed which grabbed data in a range. Additionally the mesh resolution directly on top and below the plate was increased by using a mesh resize function at the trailing edge of the plate with a high seed propagation. This allowed a highly populated triangular area on the upper surface, which grew in size from the leading edge to the trailing edge as seen in Figure 24. Errors were experienced with node propagation on the flat plate, due to the solver only operating in a single precision environment therefore a lower resolution had to be used in this area. The output data was chaotic with large u velocity component fluctuations, which required manual filtering looking for correlations within the samples. Figure 25 shows the filtered output data for 1c with a clearly defined transition at 6 m/s.
  • 44. 44 Figure'26')'Final'Solution' Flat Plate Results & Discussion During the analysis of a flat plate several issues were overcome such as mesh resolution/control, solver errors and data extraction. Mesh resolution had significant influence on the ability of the solver to resolve the macro scale flow effects occurring at and around the plate. New methods had to be learnt which allowed manipulation of the localised mesh around the plate; however there are still solver errors when the local and global mesh resolution ratios are too large. Meaning there has to be a compromise between local resolution and global resolution, which in turn must balance with the needs of the user in terms of solver time and solver accuracy. Indeed a result with known systematic error can be obtained with limited computational power with the above runs solving in 231s. Possible causes of error from the solver could be from the Hodge decomposition boundary condition for p on the domain boundary since the real pressure (the pressure in the exact solution of the Navier-Stokes equations) does not satisfy such boundary conditions. Data extraction techniques were another significant factor in this analysis; due to the noise there was significant scope for error leading to a manual data filtering process. A basic method of data analysis was developed that can be found in ‘FlatPlate.m’. This script features manual scripted searching within predefined search parameters. With regard to the noise/chaos within the solver a multi grid method could have been used to filter by using an interpolating or adaptive refinement method, and will be implemented for future experimentation. Multi grid techniques and methods were researched focusing on the work that Anthony Jameson has completed. It was found that the FF++ tool has an inbuilt multi grid refinement function. On a whole the analysis was a success resulting in a valid solution, which systematically under predicts the boundary layer height. This was expected due to the inability to set a Y+ layer, model turbulence occurring at the shear layer. When looking at the future uses of this however and the large domain sizes which will be analysed the level of accuracy obtained for the macro flow scales demonstrates the validity of this projection method for the analysis of complex terrain flow.
  • 45. 45 Gaussian Hill The Gaussian Hill case is used to assess the validity of a computational model using a measurement of speed up factor due to the effect of a model Gaussian-shaped ridge. It is frequently used for demonstrating optimisation codes, and verifying the ability of the solver. The results data is compared to “Wind Farm Layout Optimisation in Complex Terrain” (J Feng, 2014). This paper conducts LES simulations using the EllipSys 3D code to analyse the flow over a Gaussian Hill. This simulation looks to model the neutrally stratified flow over a low hill with terrain shape in x-y plane defined as: ! =!!!!"" ∗ exp!(− !! !!!"" ! ∗ !"#2) !!!!!- Height of the hill [m] !!!"" - Hill half length at mid-height [m] The case was set up with the !! moving across the domain in the x plane, and the flow conditions are computed using Chorins Projection method solver the details of which can be found in the solver section. A computational domain was constructed and can be seen in Figure 27, of dimensions [−!!!"" ∗ 10, !!!"" ∗ 10] (span wise) and [0,!!!!"" ∗ 10] (vertical). Figure'27')'Gaussian'Hill'Case' The solver input code can be found on digital medium labelled GaussHill_5.edp. The dotted line in Figure 27 also represents the positioning of a highly seeded mesh condition to improve data samples available for the speed up calculation.
  • 46. 46 Gaussian Hill Case Analysis Code - ‘GaussianHill.m’ A more advanced data extraction methodology was constructed from the lessons learnt in the flat plate case, by creating a completely automated extraction and analysis tool which can extract data along a specific range, disregard anomalous values and plot/analyse results. Due to the presence of variable terrain height a function, which maps the terrain at a set resolution was written. This allows mapping of specific ranges as a function of y(n,1) with n representing the height of terrain at that specific x location as seen in Code 2. Code'2')'Mapping'Function' The second part of the code searches through all of the node data with a set tolerance, which is in effect a bounding box around each search criteria. A find function is used which places data which fits into the find search parameters into row/column values depending on the ‘nnn’ count as seen in Code 3. Code'3')'Search'with'2'Dimensional'Criteria' %% Gaussian Domain % H = Height of Hill % L = Hill half length at mid-height of hill t = -1000:1000; HH = 1000; H = 200; L = 200; n=1; for x = [t]; j = x^2; k = L^2; y(n,1) = H*exp(-(j/k)*log(2)); n = n+1; end p = 1; for kk = [t]; x(p,1) = kk; p = p + 1; end ANS = {}; % Create Array Tolerance = .5; % Set Search area ± for nnn = (1:2001) % Resolution of y height values yrange = y100(nnn,1); % Specify Y range to search yrangemin= yrange - Tolerance; yrangemax= yrange + Tolernace; xrange = x100(nnn,1); xrangemin = xrange - Tolerance; xrangemax = xrange + Tolernace; search = find((Xsorted)>xrangemin & ... % Find, looks for data within (Xsorted)<xrangemax & Ysorted>yrangemin ... & Ysorted<yrangemax); ANS{nnn,1} = search; end
  • 47. 47 The data is then filtered using a series of ‘if’ conditions dependent on the inlet flow speed and the height above terrain. If a value does not meet the criteria it is discarded using the ‘NaN’ descriptor. This can be seen in Code 4. Additionally the data is sorted so that the continuity between the [X,Y,U,V] data remains the same using a sort index which maintains the global positioning of data. Code'4')'Data'Sort'and'Analysis' Finally data is normalised against the free stream condition for qualitative comparison of speed up and lee side flow behaviour against the Ellipsis 3D LES case. for nnnn = (1:2001) uavg = mean(Usorted(ANS{nnnn,:})); if uavg > val uavg = uavg; end if uavg < val uavg = NaN; end UU(nnnn) = uavg; vavg = mean(Vsorted(ANS{nnnn,:})); VV(nnnn) = vavg; velmag = sqrt((uavg^2)+(vavg^2)); UV(nnnn) = velmag; yvals = y100(nnnn,1); YY(nnnn) = yvals; end
  • 48. 48 Gaussian Hill Results & Discussion Acceptable data took several experiments to acquire due to the recirculation effects that were occurring on the lee side of the hill. The time step had to be lowered to dt = 0.05, in order to capture the effect of the wake from the hill. The separation point can be determined from Figure 29, which shows a large U velocity deficit from 20-120m. The sample area used took a y sample consistent with a rotor disc diameter, hence the capture of the separated layer and an x sample of 100m. The data however is not equally weighted, as there are a higher number of elements due to the multi grid refinement, which leads to a skew when averaging. The data sampling method in this case is not entirely accurate as it depends on the continuity of values between elements and also the effect of refinement due to the multi grid adjustment. The multi grid in this case placed several thousand more elements around the crest of the hill causing the plotted data to be affected by very low U velocities. To troubleshoot, statistical averaging techniques were trialled, which yielded similar results as well as more precise data disqualification parameters dependent on proximity to the crest. The solver results look undistorted in iso and contour plots as seen in Figure 28 therefore it was decided that these results were indeed a function of the data extraction techniques. The scattered node data made extraction and analysis a challenging task requiring manipulation of the ‘tolerance’ bounding box sample size. The data is averaged in an attempt to stabilise the oscillatory data especially present on the lee side of the hill where transient recirculation pockets have formed as shown in Figure 28. These would be extremely detrimental to the performance of a turbine not just due to the inconsistent flow speed but the high shear forces that would be present across the rotor. Due to these inaccuracies the data was qualitatively compared looking for similarities in the velocity deficits occurring around the hill. Considering the comparison is to an LES model it is expected that the full scale of eddies and mixing behind the hill is not captured, however generally the projection method performs well with an average slow down of 0.7 @ -500m on the front and 0.55 @ 500m on the lee side. Figure'28')'Gaussian'Hill'[u]'Recirculation'on'lee'side'[Red'–'High,'Green'–'Low]'
  • 50. 50 Post Processing – Section C Post processing is a semi-automated activity, the user has to import the results data using functions developed for CTA, which read the mesh data file. The mesh import function was originally built by R.LorphËvre “load_gmsh.m” and allows the import of FF++ mesh data. Additional functions have been written to sort vectored velocity data and allow scanning of data. After convergence the solver outputs two files, a .mesh file containing mesh data and a .sol file which contains the [u,v,p] data. In order for the file to be imported with MATLAB it must be converted to .msh format. The standard mesh file that is outputted by FF++ works with the MEDIT toolbox which is used for data visualisation and data query. However the features of this tool were not adequate for the data manipulation and control needed to accomplish the necessary optimisation tasks. The .sol file can be imported as is by MATLAB as it is in ASCII format. Importing Data Methodology: 1) Open .mesh file into GMesh. Save file as .msh in format Version II ASCII 2) Load MATLAB Script FEADATAIMPORT.m 3) Assign file locations for .mesh file and .sol file 4) Run The FEADATAIMPORT.m file can be found on the accompanying media in MATLAB folder. Key features of the FEADATAIMPORT.m script are: 1) Data visualisation dependent on user requirement. Possibility of displaying a reconstructed mesh or node locations for verification post import 2) Visual console display of success or failure to complete certain stages of import 3) For improved processing speed at optimisation stage, data is sorted using a sort index this maintains continuity of node locations and component data 4) Scanning of data through the domain, facilitating the extraction of data for graphing The scanning feature required significant research into the methods of looping and of efficiently searching through data. Research undertaken on MATLAB forums highlighted the importance of using cell arrays for the storage of matrices which increase read write speeds and make it more efficient to manipulate large data sets. searchx = find((Xsorted)>xrangemin & (Xsorted)<xrangemax & Ysorted>yrangemin & Ysorted<yrangemax); ' Code'5')'Find'Function,'‘FEADATAIMPORT.m’ Code 5 uses a ‘find’ function with four input arguments corresponding to a two dimensional range. A find function is faster than logical addressing as it is better at ordering. By using this function within a ‘for’ loop the function can find all data points within the bounding box created and then store them in a cell array corresponding to the iteration number. Once this function has completed it leaves a cell array containing all the vertices lying within the ranges specified. The corresponding velocity or pressure values at the nodes are averaged and can then be plotted.
  • 51. 51 Optimal Turbine Placement+ -- Section C One of the key aims was to optimise the placement of turbines along the terrain, by a function of total energy and planning constraints. The original aim to optimise the position of multiple turbines along a two dimensional plane has been altered as investigations have shown that this leads to a huge number of possible combinations which is actually greater than the number of seconds the universe has been around if it were to be applied to a large domain. This phenomenon known as state space explosion has led to a more conservative approach which positions the turbines and includes analytical wakes however the placement as a function of number of turbines is not considered. The further work sections contains more investigations and research on the optimisation tool. Sectored Energy Seeking Function This searching function finds the optimal positions for a wind turbine as a function of maximum extractable energy. The extractable energy is a function of velocity^3 and therefore a small fluctuation can cause a large relative increase in available power. The conditions are compared to the baseline energy estimate to make a direct comparison to quantify the effects of the terrain on the flow. The tool scans sectored areas, which are defined by the user dependent on the turbine type selected as well as the defined sector resolution, which is a function of bounding box width. The problem is broken into two sub problems dealing with a different Cartesian coordinates. The code specifies the x conditions on which to search through the domain while an inner loop scans through the relevant y conditions corresponding to the specific x conditions and the rotor size and actuator resolution. The x coordinate specification is shown in Code 6 with comments detailing each line. Code'6'–'Sectioner.m'x'position'search' The next step sorts through all of the specified positions that the rotor can occupy along the y coordinate. This is specified by a user input requiring the specification of turbine type and the variation of hub heights for which the turbine can be placed. This section uses a MATLAB function ‘inpolygon.m’ which draws a bounding box condition in the domain and labels co-ordinates that lie within it with a Boolean true/false. This can be seen in Code 7 with comments. + Scripts relating to this section can be found in the Optimal Placement folder
  • 52. 52 Code'7'–'Sectioner.m'y'position'search'and'storage' The variable ‘Usectors’ now contains all of the average u velocity components and has been stored as a function of global domain position i.e. a matrix position of [1,5] corresponds to [X,Y] =[x:x+ActuatorRes, yrange(5):yrange(5)+RD]. This allows the code to determine the position at which the wake model should be applied. This function was built with the intention of later implementation into the optimisation routines and as such some analysis was done to look at its performance. A basic analysis was done using the built in ‘Run and Time’ tool which outputs a detailed breakdown of the code. Figure 31 details summary of time used. The analysis was conducted on a 1km x 1km domain with 23000 node points. Results show that the solver takes ~10 minutes to complete with 95% of solve time being in the ‘inpolygon>vec_inpolygon’ call. The solve time makes the development of an efficient and fast optimiser a distant prospect. Figure'31)MATLAB'Script'Execution'Summary''
  • 53. 53 Wind Turbine Model Inputs for the constraints on a wind site can be built into the calculation, such as planning constraints to do with maximum hub heights or minimum and maximum distances between each turbine. Analytical Wakes Wakes are applied to the position at which the initial turbine is placed and correction factor dependent on the local velocity of each point is applied. A new grid of data is created to preserve the original results. Implementation of Jensen Wake Model – ‘JensenWake.m’ The Jensen wake model has linear wake expansion, which is a function of rotor diameter and localised speed at the turbine. Using the U inflow component the wake can be applied behind the rotor in the form of a non-linear velocity deficit. It is based on global momentum conservation in the downstream wake and assumes that the wake is turbulent. Additionally the contribution of tip vortices is neglected. This model is primarily for predicting the far wake region as shown in Jensen NO, 19834 . A Boolean function is applied to the scattered node data to locate all the points that lie within the wake region of the turbine. From the Boolean results a bounding box is drawn around the affected wake region and the points are identified as shown in Figure 32. “A Boolean function is any logical operation in which each of the operands and the result take one of two values, as “true” and “false” or “circuit on” and “circuit off.”” (Janković, Stanković, & Moraga, 2003) Figure'32')'Boolean'Capture'of'Points'Within'Wake'Area' The Jensen wake functions discussed in the ‘Modelling Wakes’ section are applied resulting in a linear wake diameter expansion and a non-linear velocity deficit profile as seen in Figure 33. Instead of using the Uinf value the local u value at each point is taken, as this takes into account the effect of the terrain on the flow field. The wake result data is saved to a temporary analysis file and can then be run through the ‘sectioner.m’ algorithm n times to position all the turbines. This type of placement solution is incomplete as the position of the first turbine may not be best for a final solution featuring n turbines. A wake interaction model was considered and is actually functional at this point in the 2D analysis sense, due to the equation using the ulocal which means that any over lapping wake fields have the deficit applied as a proportion of the non-linear wake recovery formula shown in ‘JensenWake.m’. 4 . A note on Wind Generator Interaction. Riso National Laboratory, Roskilde, Denmark.
  • 55. 55 Turbine Placement for Gaussian Hill Case The following compares the placement of turbines along the Gaussian Hill with and without wakes. By running the ‘sectioner.m’ script each time a new turbine is placed the effects of the wake condition can be identified and applied to the next selection process. This is a slow optimisation routine currently as each analysis takes ~ 9 minutes and has to be run each time a new turbine is added. The analysis fits three ‘Vestas V63’ turbines as seen in to the Gaussian Hill case. Basic constraints have been implemented which define minimum separation distance of 3 * RD = 189 m and a min/max hub height of 50m and 70m respectively. By using the terrains analytical function throughout the search the local height above the terrain can be maintained. This is placed before the ‘YLimits’ script section, as it needs to vary the y position as a function of the distance along the terrain. The results of the analysis can be seen in Figure 35 and Figure 35, as the segmentation tool has not been automated the script still returns values that do not take into account minimum separation distance. Therefore the results must be sorted through until one meets the criteria. Due to the adaptive meshing which resolves areas of high error we see a large concentration of data at positions of irregular flow when comparing Figure 34 and Figure 28, notably the recirculation behind the hill and the small disturbance at the front of the hill. Positioning the ‘No Wakes’ case relies purely on picking the highest wind resource with the correct separation distance. While for the ‘Jensen Wake’ case multiple wind resource charts are generated and are dependent on the previous turbines placement. Figure'34')'Wind'Resource'along'Terrain'' Case: PowerAvailable/Avg.Vel @ Rotor: Turbine Position: No Wakes 1: 1.5 MW / 24 m/s 2: 1.5 MW / 25 m/s 3: 1.5 MW / 22 m/s Total: 4.5 MW 1: X - 1000, HH - 70 2: X - 800, HH - 70 3: X - 400, HH - 70 Jensen Wake 1: 1.5 MW / 22 m/s 2: 1.5 MW / 21 m/s 3: 1.5 MW / 22 m/s Total: 4.5 MW Figure'35')'Power'Generation'vs.'Optimal'