1 - Rensselaer Hartford Campus - Rensselaer Polytechnic Institute

Influence of Pitch Axis Location on the Flight Characteristics of a
NACA 0012 Airfoil in Dynamic Stall
by
Joseph Andrew Ferrari
A Thesis Submitted to the Graduate
Faculty of Rensselaer Polytechnic Institute
in Partial Fulfillment of the
Requirements for the degree of
MASTER OF SCIENCE
Approved:
_________________________________________
Professor Ernesto Gutierrez-Miravete, Thesis Adviser
Rensselaer Polytechnic Institute
Hartford, Connecticut
October 2012
(For Graduation December 2012)
© Copyright 2012
by
Joseph Andrew Ferrari
All Rights Reserved
ii
CONTENTS
NOMENCLATURE ......................................................................................................... vi
LIST OF TABLES ........................................................................................................... vii
LIST OF FIGURES ........................................................................................................ viii
ACKNOWLEDGMENT .................................................................................................. xi
ABSTRACT .................................................................................................................... xii
1. Introduction.................................................................................................................. 1
1.1
Background ........................................................................................................ 1
1.2
History ................................................................................................................ 3
1.3
Goal .................................................................................................................... 5
2. Theory and Method...................................................................................................... 7
2.1
2.2
Theory ................................................................................................................ 7
2.1.1
Governing Equations .............................................................................. 7
2.1.2
Reynolds Decomposition ....................................................................... 7
2.1.3
Turbulence Modeling ............................................................................. 8
2.1.4
Dynamics ............................................................................................... 9
Method ............................................................................................................... 9
2.2.1
Design Space .......................................................................................... 9
2.2.2
Meshing ................................................................................................ 11
2.2.3
Boundary Conditions ........................................................................... 14
2.2.4
OpenFOAM ......................................................................................... 15
3. Results and Discussion .............................................................................................. 18
3.1
Residuals and Convergence ............................................................................. 18
3.2
Grid Morphing (Dynamic Mesh) ..................................................................... 20
3.3
Velocity ............................................................................................................ 24
3.4
Pressure Field ................................................................................................... 25
3.5
Turbulence Parameters ..................................................................................... 27
iii
3.6
Metrics.............................................................................................................. 30
3.6.1
Lift Coefficient ..................................................................................... 30
3.6.2
Drag Coefficient ................................................................................... 34
3.6.3
Moment Coefficient ............................................................................. 37
4. Conclusions................................................................................................................ 40
5. References.................................................................................................................. 42
6. Appendix A – Validation of OpenFOAM ................................................................. 44
6.1
6.2
6.3
Two-dimensional Poisuille flow ...................................................................... 44
6.1.1
Geometry and Fluid Properties ............................................................ 44
6.1.2
Governing Equations ............................................................................ 44
6.1.3
Analytical Solution .............................................................................. 44
6.1.4
Numerical Solution .............................................................................. 45
Two-dimensional Flow Over a Circular Cylinder ........................................... 47
6.2.1
Creating the Mesh ................................................................................ 48
6.2.2
Comparing the OpenFOAM Results with Published data ................... 57
Two-dimensional flow over a NACA 0012 airfoil .......................................... 61
7. Appendix B – OpenFOAM Case Files ...................................................................... 63
7.1
7.2
Folder 0 ............................................................................................................ 63
7.1.1
kl – laminar kinetic energy................................................................... 63
7.1.2
kt – turbulent kinetic energy ................................................................ 63
7.1.3
nut – turbulent eddy viscosity .............................................................. 64
7.1.4
omega – scale-determining variable..................................................... 65
7.1.5
p – pressure .......................................................................................... 66
7.1.6
pointDisplacement – grid dynamics ..................................................... 67
7.1.7
U – velocity .......................................................................................... 68
Folder constant ................................................................................................. 68
7.2.1
Folder polyMesh ................................................................................... 68
iv
7.3
7.2.2
dynamicMeshDict – specify mesh dynamics library ........................... 68
7.2.3
RASproperties – specify turbulence model.......................................... 69
7.2.4
transportProperties – specify fluid properties ...................................... 69
7.2.5
turbulenceProperties – turn turbulence on/off...................................... 70
Folder system .................................................................................................... 70
7.3.1
controlDict – control time and output .................................................. 70
7.3.2
decomposeParDict – set up for parallel processing ............................. 71
7.3.3
fvSchemes – specify numerical schemes ............................................. 72
7.3.4
fvSolution – specify solution algorithm parameters ............................ 73
8. Appendix C – kkLOmega Closure Equations ........................................................... 76
9. Appendix D – Ancillary Scripts and Codes ............................................................... 80
9.1
cL_fft.m ............................................................................................................ 80
9.2
forceCoeffsGIF ................................................................................................ 81
9.3
ResidualsGIF .................................................................................................... 81
10. Appendix E - OpenFOAM Tutorial ........................................................................... 83
10.1 Introduction ...................................................................................................... 83
10.2 Meshing using the blockMesh Utility .............................................................. 84
10.3 Flow properties ................................................................................................ 86
10.4 Boundary Conditions ....................................................................................... 87
10.5 Solution Control ............................................................................................... 89
10.6 Running OpenFOAM ....................................................................................... 93
v
NOMENCLATURE
NACA: National Advisory Committee for Aeronautics
MAV: micro aerial vehicle
RANS: Reynolds-averaged Navier-Stokes equations
α (t): angle of attack varying with time (°)
α0: mean angle of attack (°)
α1: angle of attack amplitude (°)
ω: angular frequency (rad/s) - this is differentiated from the scale-determining variable
only in context
f: frequency (Hz)
k: reduced frequency
c: airfoil chord (m)
U∞: freestream velocity (m/s)
ρ: fluid density (kg/m3)
ν: kinematic viscosity (m2/s)
P: pressure (m2/s2) - OpenFOAM calculates P/ρ
νT: turbulent eddy-viscosity (m2/s)
kl: laminar kinetic energy (m2/s2)
kt: turbulent kinetic energy (m2/s2)
ω: scale-determining variable (s-1) – this is differentiated from the angular frequency
only in context
ε: isotropic dissipation
vi
LIST OF TABLES
Table 1. Design matrix indicating ranges of independent variables. .............................. 10
Table 2. Boundary conditions. ........................................................................................ 15
Table 3. Maximum lift coefficients. Average and maximum of local maximums listed.
......................................................................................................................................... 30
Table 4. Maximum and average lift coefficients over runtime. ..................................... 32
Table 5. Minimum drag coefficients. Average and minimum of local drag coefficients
listed. ................................................................................................................................ 34
Table 6. Minimum, maximum, and average drag coefficients. ...................................... 34
Table 7. Average, minimum, and maximum moment coefficients. ............................... 37
Table 8. k-kl-omega turbulence model constants. .......................................................... 79
vii
LIST OF FIGURES
Figure 1. A NACA 0012 airfoil will pitch about an axis normal to the page. The airfoil
chord is c. The angle of attack is α. The freestream velocity is U∞. ................................ 1
Figure 2. The stages of dynamic stall as shown by Ekaterinaris [1]. ............................... 2
Figure 3. MAVs are in a flow regime with very low Reynolds Numbers. Figure is as
shown in [3]. ...................................................................................................................... 3
Figure 4. Sketch indicating pitching axes. ...................................................................... 11
Figure 5. Three blocks are used to create the mesh. ....................................................... 11
Figure 6. O-Grid of a NACA 0012 airfoil, farfield view................................................ 12
Figure 7. O-Grid of a NACA 0012 airfoil, near view. ................................................... 12
Figure 8. O-Grid of a NACA 0012 airfoil, trailing edge detail. ..................................... 13
Figure 9. General format for OpenFOAM cases (as shown on the OpenFOAM website).
......................................................................................................................................... 16
Figure 10. Residuals for case with k=0.05 and x/c=0.25. .............................................. 18
Figure 11. Lift and drag coefficients from case with k=0.05 and x/c=0.25. .................. 19
Figure 12. Mesh morphing for x/c = 0.25 - quarter-period shown. ................................ 21
Figure 13. Mesh morphing for x/c = 0 - quarter-period shown. ..................................... 22
Figure 14. Mesh morphing for x/c = -0.25 - quarter-period shown. ............................... 23
Figure 15. Velocity magnitude contours for k=0.1 and x/c = 0.25. ................................ 24
Figure 16. Velocity magnitude contour for k=0.1 and x/c=0.25 at t/T=0.7403, enlarged
for clarity. ........................................................................................................................ 25
Figure 17. Pressure contours for k=0.1 and x/c = 0.25. .................................................. 26
Figure 18. Pressure contour for k=0.1 and x/c=0.25 at t/T=0.7403, enlarged for clarity.
......................................................................................................................................... 27
Figure 19. kT contours for k=0.1 and x/c = 0.25. Scale is 1E-12 to 80.5 m2/s2. ............ 28
Figure 20. kL contours for k=0.1 and x/c = 0.25. Scale is 1E-12 to 36.1 m2/s2. ............ 29
Figure 21. Lift coefficient raw data (k=0.05). ................................................................ 31
Figure 22. Lift coefficient raw data (k=0.1). .................................................................. 31
Figure 23. Lift curve (k=0.05). ....................................................................................... 33
Figure 24. Lift curve (k=0.1). ......................................................................................... 33
Figure 25. Drag coefficient raw data (k=0.05). .............................................................. 35
viii
Figure 26. Drag coefficient raw data (k=0.1). ................................................................ 35
Figure 27. Drag polar (k=0.05). ...................................................................................... 36
Figure 28. Drag polar (k=0.1). ........................................................................................ 36
Figure 29. Moment coefficient raw data (k=0.05). ......................................................... 38
Figure 30. Moment coefficient raw data (k=0.1). ........................................................... 38
Figure 31. Moment curve (k=0.05)................................................................................. 39
Figure 32. Moment curve (k=0.1)................................................................................... 39
Figure 33. Mesh of the entry length for Poisuille flow................................................... 46
Figure 34. Fully-developed velocity profiles of analytical and numerical solutions for
Poisuille flow. .................................................................................................................. 46
Figure 35. Pressure gradient of the numerical solution for Poisuille flow. .................... 47
Figure 36. Mesh for case cylinder1. ............................................................................... 48
Figure 37. Pressure field for case cylinder1. .................................................................. 49
Figure 38. Velocity field for case cylinder1. .................................................................. 50
Figure 39. Mesh for case cylinder2. ............................................................................... 50
Figure 40. Pressure field for case cylinder2. .................................................................. 51
Figure 41. Velocity field for case cylinder2. .................................................................. 51
Figure 42. Enlarged view showing discontinuity in velocity field for case cylinder3. .. 52
Figure 43. Pressure field for case cylinder3. .................................................................. 53
Figure 44. Mesh for case cylinder4. ............................................................................... 53
Figure 45. An enlarged view of the annular region of the mesh for case cylinder4. ...... 54
Figure 46. Velocity field for case cylinder4. .................................................................. 54
Figure 47. Pressure field for case cylinder4. .................................................................. 55
Figure 48. Mesh for case cylinder5. ............................................................................... 56
Figure 49. Mesh for case cylinder6. ............................................................................... 56
Figure 50. Pressure field for case cylinder5. .................................................................. 57
Figure 51. Velocity field for case cylinder5. .................................................................. 57
Figure 52. Drag coefficient comparison. ........................................................................ 58
Figure 53. Time history of lift coefficient for flow over a cylinder at a Reynolds number
of 100. .............................................................................................................................. 59
Figure 54. Frequency composition of vortex shedding for Reynolds number of 100. ... 60
ix
Figure 55. Strouhal number of vortex shedding for Reynolds number of 100. ............. 61
Figure 56.
Static lift curve for NACA 0012 airfoil comparing OpenFOAM results to
NACA data. ..................................................................................................................... 62
x
ACKNOWLEDGMENT
I would like to thank Professor Ernesto Gutierrez-Miravete for his advisement and
guidance – he saw this work through from inception to completion. My friends and
coworkers at General Dynamics Electric Boat have all provided motivation and advice
in one way or another. Dr. Craig Wagner, Dr. Scot Slimon, Dr. Jay Phelps, Austin
French, Luke Gawronski, and Adam Goldschmidt have drawn on their vast knowledge
of Computational Fluid Dynamics to point me in the right direction or to provide me
with the means to complete this work. Austin French specifically with OpenFOAM,
Luke Gawronski specifically with creating meshes, and Adam Goldschmidt with
creating geometries. Matt Gerdon and Neal Guilmette have lent their expertise in fluid
dynamics to aiding in this thesis and have always been available to help solve problems
and hang-ups or to listen to frustrations of the day. Lastly, I would like to thank my wife
for her infinite patience and encouragement. This would not be possible without her.
xi
ABSTRACT
Dynamic stall is an aerodynamic phenomenon characterized by a sharp increase in lift
and a delay in stall of airfoils and wings past their static stall angle as a result of
unsteady pitching motion. It was first noticed in propeller and helicopter rotors – the
rotating blades experienced angles of attack that would change rapidly with time.
Recently this topic has gotten more attention since vertical axis wind turbines have
become more popular to support the clean energy boom of the early 21st century and
since the U.S. Army has expressed an interest in flapping-wing micro aerial vehicles.
This thesis uses the computational fluid dynamics (CFD) code OpenFOAM to model a
NACA 0012 airfoil pitching at two different reduced frequencies (0.05 and 0.1) about
three different rotation axes (quarter-chord, leading edge, and a quarter-chord forward of
the leading edge).
Velocity, pressure, and turbulence parameter contours are
qualitatively compared.
Lift, drag, and moment coefficients are quantitatively
compared. Dynamically pitching the airfoil increases the maximum and average lift
coefficient compared to the static maximum lift. Computed results show that moving
the pitching axis forward further increases the average lift coefficient, but increases both
the average drag and moment coefficients. Pitching the airfoil allows it to exceed its
static stall angle without actually stalling – this maintains stability in higher angles of
attack. Moreover, when the pitching axis is at the forward-most location considered in
this thesis, the moment coefficient is 16 to 22 times greater than when the pitching axis
is at the quarter-chord of the airfoil depending on the reduced frequency. Despite the
increase in magnitude and stability of lift, the increase in moment coefficient is likely
too large to be feasible on the scale of micro aerial vehicles since the weight increase of
the motors necessary to provide the larger torque will offset the gain in lift.
xii
1. Introduction
1.1 Background
Stall is an aerodynamic phenomenon characterized by flow separation and a decrease in
lift seen by a wing or airfoil with high angles of attack. Static stall is seen in steady flow
when the lift at a particular angle of attack is lower than that of a lower angle of attack.
Dynamic stall is different from static stall in that it is characterized by a sharp increase in
lift and a delay in stall of airfoils and wings past their static stall angle as a result of
unsteady pitching motion (this motion may be described as the airfoil in Figure 1
rotating about an axis coming out of the page).
α
c
U∞
Figure 1. A NACA 0012 airfoil will pitch about an axis normal to the page. The airfoil chord is c.
The angle of attack is α. The freestream velocity is U ∞.
There are semi-discrete stages to dynamic stall, summarized in Figure 2 by Ekaterinaris
[1]. First the flow begins to reverse near the trailing edge. Next, large eddies appear in
the boundary layer, and the flow reversal spreads up to the leading edge. Once the flow
reversal reaches the leading edge a vortex forms. When this leading edge vortex forms
the lift slope increases and the lift coefficient sharply increases with angle of attack until
the flow fully stalls and the lift coefficient drops. Then the flow reattaches, starting at the
leading edge. This process will repeat with the pitch oscillations of the airfoil.
This phenomenon was first noticed in propellers and helicopter rotors - the rotating
blades experience angles of attack that change rapidly with time. Recently this topic has
received more attention since wind turbines (both horizontal and vertical axis) have
become more popular to support the clean energy boom of the early 21st century and
since the U.S. Army has expressed an interest in flapping-wing micro aerial vehicle
(MAV) drones [2].
1
Figure 2. The stages of dynamic stall as shown by Ekaterinaris [1].
2
Despite being described as “micro”, MAVs typically have a wingspan on the order of
decimeters. MAVs will fly with a velocity of about 30 to 60 km/h. As seen in Figure 3,
their chord Reynolds Number,
Re c 
Uc
,

( 1-1 )
ranges between 20,000 and 200,000, with large insects on the lower end and small birds
on the higher end of this range. Flapping-wing MAVs have an advantage over other
types of MAVs (such as fixed-wing or rotary) since they are able to increase their
effective Reynolds Number without increasing flight speed [3].
Figure 3. MAVs are in a flow regime with very low Reynolds Numbers. Figure is as shown in [3].
1.2 History
In 1988, Carr [4] described in great detail the progress accomplished on dynamic stall in
the latter half of the 20th century. He notes how conventional aerodynamics was not able
to accurately describe the lift created by high-speed helicopter rotors, specifically when
the rotor was moving against the direction of motion of the helicopter. He also
3
mentioned that though dynamic stall is primarily a three-dimensional phenomenon, it
can still be accurately represented by a two-dimensional airfoil.
Geissler and Haselmeyer [5] investigated the onset of dynamic stall in 2006. They tested
an OA312 airfoil section in a wind tunnel and compared the results with CFD
simulations (2D-RANS using the Spallart-Almaras model [6], which they noted as being
the most accurate for dynamic stall). They included transition and compressibility
effects in their studies by simulating free transition at M = 0.2, turbulent flow at M = 0.2,
and free transition at M = 0.4. They found that shock waves develop at the higher Mach
number and that the development of these shock waves leads to shock-induced
separation which triggers dynamic stall onset earlier in the cycle. They developed their
results using six pressure transducers along their airfoil surface and determined that six
was not enough. They are therefore repeating their experiment with thirty-five pressure
transducers.
Sarkar and Venkatraman [7] presented results of dynamic stall behavior of airfoils
undergoing sinusoidal motion with larger angles of attacks (both in mean and amplitude)
as well as larger reduced frequencies than previous studies have reported. They used the
random discrete vortex method and studied the NACA 0012 airfoil. They found the
reduced frequency to be a bifurcation parameter that triggered period doubling behavior
at higher angles of attack and reduced frequencies.
In 2010, Rival and Torpea [8] combined both the pitching and plunging (periodic up and
down) motion. Their experiment included a carbon-fiber SD7003 airfoil in a wind
tunnel.
They found that the mean angle of attack greatly influenced the flow
characteristics since it dictated the level of dynamic stall occurring over the airfoil.
Also in 2010, Prangemeier, Rival, and Tropea [9] studied an airfoil in plunging motion
with a quick-pitching motion superimposed at the lowest point of the plunge using
particle image velocimetry. The quick-pitch proved to reduce the strength of the vortex
shed from the trailing edge without affecting the leading edge vortex – this makes the lift
achieved via dynamic stall more stable.
With a focus on wind turbines, Wang et. al. [10] use a mathematical model to describe
the motion of an airfoil driving a vertical axis wind turbine. They then establish a
relationship between the airfoil angle of attack and angular position of the turbine, and
4
set up CFD simulations to compare with experimental data. They found that the CFD
results agree with the experimental data except at very large angles of attack.
Dynamic stall has been studied extensively in the past and continues to be the focus of
study today. Researchers are modeling unsteady airfoils with roughness effects, flaps,
and erosion at wide ranges of angles of attack and reduced frequencies [11], [12].
Though there has been significant progress to date, this author isn’t aware of any
published data detailing the influence of the pitching axis location on dynamic stall and
airfoil performance.
1.3 Goal
The goal of this thesis is to model a NACA 0012 airfoil oscillating about different axes,
with the hypothesis being that moving the pitching axis will not only cause an increase
in pitching moment but also an increase in lift and production of thrust. The pitching
moment will increase since the center of pressure will be further from the rotation axis.
The lift should increase since the airfoil will see larger angles of attack without stalling
and the leading edge vortex should create a low pressure region on the upper surface of
the airfoil. This same low pressure region acting on the higher angles of attack may be
enough to cause the drag to be negative and therefore produce thrust. Keeping in mind
the application to MAVs, this increase in lift and generation thrust may be enough to
offset the need for larger motors to overcome the larger pitching moment and allow the
MAV wings to have a simpler motion. A Reynolds number of 170,000 is selected since
this is representative of the small birds and large insects that MAVs seek to mimic and
since there is experimental data on static lift available [13]. The pitching oscillations
will be of the form
 (t )   0  1 sin t ,
( 1-2 )
where α is the angle of attack in degrees varying with time, α0 is the mean angle of
attack about which the airfoil will oscillate in degrees, α1 is the amplitude of oscillation
in degrees, ω is the frequency of oscillation in radians per second, and t is time in
seconds. This allows for four independent variables – mean angle of attack, amplitude
of oscillations, pitching axis, and frequency of oscillations. Reduced frequency (k) is
defined to be
5
k
L
,
2U 
( 1-3 )
where L is a characteristic length (chord in this case) in meters, and U∞ is the freestream
velocity in meters per second.
Lift coefficients, drag (or thrust) coefficients, and
moment coefficients will be the primary data collected. Flow visualizations will also be
collected.
Another goal of this thesis is to carry out all work using open source software. A free
academic license of GridPro [14] can be used to create meshes. OpenFOAM [15] is the
CFD solver. Paraview (specifically paraFoam – an OpenFOAM utility) is used in postprocessing to view the solution. Gnuplot [16] was used to create graphs and data plots.
FreeMat [17] has many of the same capabilities as MATLAB, but is open source.
LibreOffice or OpenOffice can be used for word processing. These open source tools
run on Linux (Ubuntu distribution in this case), an open source operating system.
6
2. Theory and Method
2.1 Theory
2.1.1
Governing Equations
Incompressible Newtonian fluid flow can be completely described by a set of four partial
differential equations when the fluid is treated as a continuum. These equations are the
continuity equation,
u i
 0,
xi
( 2-1 )
which states that mass must be conserved through the boundaries of a control volume;
and the Navier-Stokes equations,
u i
u i
 2ui
1 P
1
uj


 Xi ,
t
x j
 xi
x j x j 
( 2-2 )
a set of three conserving momentum in a control volume.
2.1.2
Reynolds Decomposition
As previously stated, these four equations completely describe a flow field for any
conditions. However, the required spatial and temporal spacing is prohibitively small to
discretize these equations in their current form (direct numerical simulation). One way
to overcome this limitation is to use Reynolds decomposition. Each time-varying term
in the governing equations is decomposed into an ensemble-averaged component and a
fluctuating component.
Ensemble-averaged components are denoted by a prime,
fluctuating components are denoted by an over bar, and ensemble-averaged fluctuating
components are zero (note that the ensemble-average of fluctuating components
multiplied together is not zero). Applying Reynolds decomposition to the momentum
equation yields the following Reynolds-Averaged Navier-Stokes (RANS) equation [18],
ui
u
1 P

uj i  

t
x j
 xi x j
 ui
 1
 uiu j   X i .

 x j
 
( 2-3 )
This equation has a closure problem due to the new term,  uiu j , called Reynolds
stresses (when multiplied by density) since they share units with stresses. In order to
7
close this set of equations, Walters and Cokljat [19] start with the Boussinesq
hypothesis,
1
 uiuj   uk uk  ij  2T Sij ,
3
( 2-4 )
where Sij is the mean strain rate tensor,
S ij 
u i u j

.
x j xi
( 2-5 )
Rearranging the Boussinesq hypothesis yields a definition for the Reynolds stresses.
1
 uiuj  2 T Sij  uk uk ij .
3
( 2-6 )
This is the most common method of RANS-based CFD [19]. It is simple, but everything
depends on modeling the turbulent eddy-viscosity, νT. The turbulence model discussed
in the next section accomplishes this by breaking it into small-scale and large-scale
contributions.
2.1.3
Turbulence Modeling
Walters and Cokljat [19] introduced a three-equation eddy-viscosity turbulence model.
This model is based on existing k-ω work, but includes a third transport equation to
calculate the laminar kinetic energy (kL) that accounts for low-frequency velocity
fluctuations that precede the transition to fully turbulent flow. Walters and Cokljat
validated this model with multiple test cases including fully-developed channel flow, flat
plate transition (with and without a pressure gradient), and multiple airfoils.
The
turbulent and laminar kinetic energy transport equations include terms that describe the
production, destruction, and gradient of kinetic energy. The last equation solves for ω,
which is a scale-determining variable. Walters and Cokljat define it as ω=ε/kT, where ε
is the isotropic dissipation commonly used in k-ε turbulence models. The three transport
equations that form the model are shown below.
Dk T

 PkT  RBP  R NAT  k T  DT 
Dt
x j
8

 T  kT

 
 k  x j


.

( 2-7 )
Dk L

 Pk L  RBP  R NAT  DL 
Dt
x j
 k L 

.
 x j 
k
C

D

 C1
PkT   R  1 RBP  RNAT   C 2 2  C 3 f   T f W2 3T
Dt
kT
d
 fW
 kT
.
 T   
 


 

x j 
   x j 
( 2-8 )
( 2-9 )
The various terms in these three equations represent production, destruction, and
diffusion of kT, kL, and ω, respectively and are defined along with the ancillary equations
and constants that provide closure to this turbulence model in Appendix C.
This
turbulence model is selected since the authors [19] claim it accurately models the
transition from laminar to turbulent flow.
2.1.4
Dynamics
Rival, et. al. [8] suggest the following equation to describe the effective angle of attack
undergoing combined pitching and plunging motion.
 eff t    0   1 cos2 f t    
h
c

U U
( 2-10 )
This equation describes the combined pitching and plunging motion. The third term
(containing h , the vertical change in the pitching axis in time) describes the plunging
motion and is not relevant for this problem since h  0 . Rival, et. al. refer to the last
term (containing  , the rate of change of the angle of attack) as dynamic cambering,
and find that at low reduced frequencies it may be neglected. This equation is thus the
same as equation ( 1-2 ), reproduced below.
 eff t    0   1 sin  t 
( 2-11 )
2.2 Method
2.2.1
Design Space
As stated in section 1.3 the Reynolds number and airfoil geometry decided upon are
170,000 and NACA 0012, respectively. The NACA 0012 airfoil is selected because it is
9
a well understood geometry with a wide range of experimental and computational data
available. The downside to this airfoil is that it doesn’t show good performance at low
Reynolds numbers compared with airfoils with high camber and sharp leading edges.
The Reynolds number selected was chosen since it falls within the range of MAVs and
since there is experimental data available for static angles of attack to validate against
[13]. The independent variables are the angle of attack mean and amplitude, reduced
frequency, and pitching axis. The design space is summarized in Table 1. The mean
angle of attack selected is the angle of attack with maximum lift preceding stall. Angle
of attack amplitudes are selected to exceed stall but not create negative angles of attack.
Reduced frequencies are selected to make dynamic camber effects negligible and to
avoid chaotic behavior that occurs at higher reduced frequencies. Pitching axes are
selected such that they are forward of the aerodynamic center. This should result in
larger pitching moments but may also increase lift and produce thrust.
Table 1. Design matrix indicating ranges of independent variables.
Property
Value(s)
mean angle of attack (α0)
11°
angle of attack amplitude (α1)
5°
reduced frequency (k)
{0.05, 0.1}
pitching axis (x/c)
{-0.25, 0, 0.25}
Reynolds number
170,000
airfoil
NACA 0012
Figure 4 shows the three pitching axis locations. The origin is at the leading edge of the
airfoil, with the x-coordinate positive to the right as indicated in the figure. The first
pitching axis studied is located one quarter-chord from the leading edge of the airfoil in
the positive x-direction (x/c = 0.25). The second axis is located at the origin and
therefore the leading edge (x/c = 0). The third axis is located one quarter-chord from the
leading edge of the airfoil in the negative x-direction (x/c = -0.25).
10
x
Figure 4. Sketch indicating pitching axes.
2.2.2
Meshing
The mesh used (shown in Figure 6, Figure 7, and Figure 8) was created by a colleague
(Luke Gawronski of the Electric Boat Corporation CFD group) using Pointwise [20]
(GridPro [14] may be used as an open source alternative) by solving an elliptic partial
differential equation (the Poisson equation) to ensure smoothness. Pointwise creates the
mesh from three blocks as seen in Figure 5. The boundaries of these blocks are a
horizontal line extending from the leading edge of the airfoil forward to the edge of the
mesh. The other two boundaries are normal to both the airfoil and the surrounding circle
and meet the airfoil at the point where the NACA 4-digit airfoil ends and the rounded
trailing edge begins.
Figure 5. Three blocks are used to create the mesh.
With these blocks defined the mesh spacing is specified such that there is proper cell
distribution at the leading edge, trailing edge, and near the airfoil surface to properly
resolve the boundary layer and find the areas where the flow transitions to the turbulent
11
regime. Once the mesh spacing is specified, Pointwise solves the Poisson equation to
smooth out the mesh and ensure that it is orthogonal throughout the domain.
Figure 6. O-Grid of a NACA 0012 airfoil, farfield view.
Figure 7. O-Grid of a NACA 0012 airfoil, near view.
12
The mesh is an O-mesh (the airfoil transitions to a circle) made of 45,000 cells with a
diameter 30 times that of the chord length. This 2D mesh is extruded 0.1 chords in the
z-direction since OpenFOAM can only work with 3D meshes (OpenFOAM uses the
finite volume method (FVM)), but through the use of appropriate boundary conditions
the problem becomes effectively two-dimensional. The mesh is orthogonal to the surface
of the airfoil and transitions gradually to be orthogonal to the circle surrounding it. The
mesh has cells concentrated near the surface of the airfoil to accurately capture the
boundary layer. The trailing edge of the airfoil (Figure 8) is rounded with a radius of
curvature of 1% of the airfoil chord in order to have a closed surface and to have softer
transition as opposed to a sharp trailing edge. Cells are concentrated around the leading
edge and trailing edge.
Figure 8. O-Grid of a NACA 0012 airfoil, trailing edge detail.
The mesh has a y+ value of 1 or less in order to accurately resolve the viscous sublayer,
where y+ is the dimensionless distance normal from the airfoil surface and is defined as
13
y 
u* y
( 2-12 )

where y is the distance from the wall, ν is the kinematic viscosity, and u* is the friction
velocity defined as
u* 
w

( 2-13 )
where τw is the wall shear stress and ρ is the fluid density at the wall. OpenFOAM
handles the airfoil rotation (using the pointDisplacement object in the pointVectorField
class) by morphing the mesh as little as possible, moving the points of the airfoil about
the specified axis while maintaining orthogonality.
2.2.3
Boundary Conditions
Boundary conditions are defined in Table 2. There is a no-slip condition imposed at the
airfoil. This makes the velocity, laminar kinetic energy, and turbulent kinetic energy
zero. Walters and Cokljat note that the zeroGradient boundary condition for ω is
because this model accounts for the viscous dissipation in the sublayer with the kl and kT
terms whereas other k-ω models account for it with ω (and calculate ω as a boundary
condition). The freestream velocity uses the OpenFOAM boundary condition inletOutlet
meaning when the velocity vector is pointing into the domain the velocity is set at the
mean angle of attack discussed in section 2.1.4, but when the velocity vector is pointing
out of the domain, the boundary condition is zeroGradient. This boundary condition is
applied around the entire circle. The laminar kinetic energy is zero in the freestream
because it is considered to be far away from the boundary layer. The farfield turbulent
kinetic energy is defined by the turbulence intensity (Tu) and the freestream velocity
(U∞).
k T  1.5Tu  U   .
2
14
( 2-14 )
For this case the turbulence intensity is taken to be 0.01% due to the low Reynolds
number. With the turbulent kinetic energy defined, ω can be defined as

kT
( 2-15 )
,
l
where l is the turbulent length scale; 0.01 m in this case. The boundary condition for
pressure is zeroGradient at the wall as well as in the freestream.
Table 2. Boundary conditions.
Parameter
Wall
Freestream
U∞
{0,0,0}T
{17cos(11°),17sin(11°),0}T
p
zeroGradient
zeroGradient
kl
0
0
kT
0
0.20821
ω
zeroGradient
4.335e-5
2.2.4
OpenFOAM
OpenFOAM (Open Field Operations And Manipulations) is an open source collection of
numerical solvers and utilities.
There are solvers for laminar and turbulent flow,
compressible and incompressible flow, transient and steady-state flow, static and
dynamic meshes.
It includes solvers for solid mechanics (solving displacement
equations) and financial modeling (solving the Black-Scholes equation for pricing stock
options). The solver chosen for this thesis is the pimpleDyMFoam solver. This solver
accepts turbulence models (though turbulence can also be turned off), is transient,
incompressible, and allows for a dynamic mesh.
OpenFOAM also has many
preprocessing and post processing utilities. The general format for an OpenFOAM case
(depicted in Figure 9) is simply a directory named for that case. The case directory will
contain three folders: the constant folder, the system folder, and the 0 folder. The
constant folder contains information about the properties of the fluid, turbulence,
15
geometry, and mesh. The system folder contains information that controls the solver
such as starting and ending times, timesteps, maximum courant numbers, and finite
volume schemes to use to solve the discretized sets of equations. The 0 folder contains
the initial and boundary conditions of the flow and geometric properties and additional
time folders are generated upon running the solver based on the writing frequency
defined in the system directory. OpenFOAM has a reliable error handing system that
will alert the user if any of these files are missing or are not formatted properly.
Figure 9. General format for OpenFOAM cases (as shown on the OpenFOAM website).
2.2.4.1 Numerical Schemes
OpenFOAM provides the user with complete freedom when selecting numerical
schemes, yielding powerful but potentially negative results. Numerical schemes are
controlled by the fvSchemes file in the system directory. Appendix B lists the exact
syntax used in this thesis for the numerical schemes. An Euler scheme is used for time
derivatives.
The Euler scheme is a first-order explicit scheme and places a limit
(Courant number) on how fast a given simulation may be run. A linear scheme is used
for gradient terms and for interpolation. This linear interpolation scheme uses central
differencing. A total-variation diminishing (TVD) scheme with a Sweby flux limiter
16
[21] is used to calculate the divergence terms in the kT, kL, and omega equations. Flux
limiters allow a higher-order scheme to be used where gradients are small and enforce
first-order scheme where gradients are large; a switching function (the flux limiter)
dictates when to use each. This allows a solution to have the accuracy of a higher-order
numerical scheme while maintaining the benefit of zero overshoot that first-order
schemes provide. A linear upwind scheme is used for the divergence terms in the
momentum equation. This scheme is similar to the linear scheme previously described,
but differs since it uses upwind differencing.
2.2.4.2 Numerical Solvers
Equation solvers are controlled by the fvSolution file in the system directory. Appendix
B lists the exact syntax used in the thesis for the equation solvers. A multi-grid solver
with a Gauss-Seidel smoother (10 cells in the coarsest multi-grid level) is used for the
pressure and cell displacement equation.
A bi-conjugate solver with a diagonal
incomplete-LU asymmetric preconditioner is used for the momentum, kT, kL, and omega
equations [15].
17
3. Results and Discussion
Qualitatively, the vector and scalar fields are similar for all cases. For this reason, only
the results from a single case (k=0.05 and x/c=0.25) will be displayed and expanded
upon in sections 3.1 through 3.5, with an exception made in Section 3.2 in order to show
the difference in the mesh dynamics for each case. Section 3.6 will compare the effects
of the pitch axis location and reduced on the metrics previously discussed (lift, drag, and
moment coefficients about the pitching axis).
3.1 Residuals and Convergence
OpenFOAM’s pimpleDyMFoam solver is an unsteady solver and a dynamically pitching
airfoil is not a well-posed problem due to the complex flow field and mesh dynamics;
therefore, the residuals may not converge to machine zero.
Figure 10 shows the
residuals typical of the simulations run for this thesis (specifically the run with a reduced
frequency of 0.05 and a pitch axis located at the quarter chord).
Figure 10. Residuals for case with k=0.05 and x/c=0.25.
18
Along with the results of the metrics (shown in Section 3.6), Figure 10 indicates that the
solution has converged. The turbulence parameters meet the residual criteria set for each
iteration, but the pressure residual tends to stay high. This is caused by the cells at the
stagnation points on the airfoil and is typical of this type of problem. Note that the
pressure equation is solved during all loops through the PIMPLE algorithm (3 passes
through the outer corrector loop), the velocity equations are solved only during the last
two loops, and the kT, kL, and ω equations are solved only during the last loop. This is
why the residuals of each equation appear to run for a different number of iterations.
Also note how the residuals tend to vary cyclically. This is due to the periodic pitching
motion. The residuals vary in the same way as the metrics and at the same frequency
(when adjusting for the number of passes through the PIMPLE algorithm during each
time step). This is apparent when comparing the residuals to the graphs of the metrics in
cl , cd
Section 3.6 and to the time history of the lift and drag coefficients shown in Figure 11.
Time [s]
Figure 11. Lift and drag coefficients from case with k=0.05 and x/c=0.25.
19
3.2 Grid Morphing (Dynamic Mesh)
As previously stated, OpenFOAM has multiple methods for changing the mesh
dynamically according to a prescribed motion – proper entries in the pointDisplacement
dictionary (using the dynamicFvMesh class) will cause the mesh to deform and preserve
orthogonality whereas the arbitrary mesh interface (AMI) method will cause blocks
within the mesh move relative to one another with a sliding interface. The AMI method
has benefits when a constant motion is required (such as a rotating propeller), but the
sliding interface is a source of error. This thesis uses the dynamicFvMesh class since it
handles the problem at hand without introducing another source of error. Figure 12
shows a quarter-period of motion where the pitching axis is located at the quarter-chord
and details how the mesh changes over time.
No extra information is gained by
observing the rest of the period since the motion is reversed and then reflected about the
x-axis.
Note how the cells deform throughout the airfoil’s motion to preserve
orthogonality. Figure 13 and Figure 14 show the cases with the pitching axis at x/c = 0
and x/c = -0.25, respectively. The differences among Figure 12, Figure 13, and Figure
14 are subtle but noticeable. As the rotation axis changes, the way the cells need to
morph changes. In Figure 12, since the axis is at the quarter-chord, the leading edge is
pushing down on the cells below it, so those cells must compress. In Figure 14, the
entire airfoil is moving upwards, so the cells below the leading edge are pulled upwards
and must stretch out to accommodate the motion.
20
Figure 12. Mesh morphing for x/c = 0.25 - quarter-period shown.
21
Figure 13. Mesh morphing for x/c = 0 - quarter-period shown.
22
Figure 14. Mesh morphing for x/c = -0.25 - quarter-period shown.
23
3.3 Velocity
Though the grid motion shows symmetry, the flow properties do not; therefore a whole
period is shown for velocity. The flow field does not qualitatively change appreciably
from case to case, so results presented here are from the case with a reduced frequency
of 0.1 and a pitching axis located at the quarter-chord of the airfoil. Figure 15 shows
velocity magnitude contours from a full period of motion of the case with a reduced
frequency of 0.1 and a pitch axis location of 0.25c.
Figure 15. Velocity magnitude contours for k=0.1 and x/c = 0.25.
The first two images of Figure 15 show the first upstroke (trailing edge moving
upwards) of a period and therefore include the stall from the previous period. At this
point the angle of attack is approximately 11° and decreasing. Once the angle of attack
24
is sufficiently low (approaching the minimum 6°) the flow reattaches. This is seen at
time 0.3074.
At this point the airfoil starts a downstroke (trailing edge moving
downwards) and therefore the angle of attack is increasing. As the angle of attack
approaches the static stall angle at time 0.7132, a leading edge vortex is shed. This
vortex continues down the chord of the airfoil until it passes the trailing edge at time
0.7944. It is during this time that the spike in lift occurs, the angle of attack reaches the
maximum 16°, and the airfoil once again begins an upstroke (the trailing edge is moving
upwards and the angle of attack is decreasing). Once the vortex is sufficiently far from
the airfoil the flow separates and enters deep stall.
Figure 16 shows time 0.7403
enlarged for clarity.
Figure 16. Velocity magnitude contour for k=0.1 and x/c=0.25 at t/T=0.7403, enlarged for clarity.
3.4 Pressure Field
The pressure varies over an entire period as velocity does, so Figure 17 shows the
pressure field varying over one period. Results presented here are from the case with a
reduced frequency of 0.1 and a pitching axis located at the quarter chord. The first
image of Figure 17 shows a low pressure region directly over the trailing edge and is an
artifact from the previous oscillation. When the flow is attached as indicated by Figure
25
15 (t/T = 0.3074), the pressure contours show a high pressure on the lower surface of the
airfoil and a low pressure region on the upper surface. Once the leading edge vortex is
shed (t/T = 0.7132), the pressure contours indicate that the low pressure region on the
upper surface of the airfoil, previously restricted to near the leading edge, has expanded
to the entire upper surface. This is what causes the lift spikes. Once the flow separates
and enters deep stall, the pressure contours reflects this – the pressure on the upper
surface is much higher and the pressure on the lower surface is much lower. Figure 18
shows time 0.7403 enlarged for clarity – the separation region is apparent as well as the
scale (OpenFOAM calculates pressure divided by density).
Figure 17. Pressure contours for k=0.1 and x/c = 0.25.
26
Figure 18. Pressure contour for k=0.1 and x/c=0.25 at t/T=0.7403, enlarged for clarity.
3.5 Turbulence Parameters
Like the velocity magnitude and pressure, the calculated turbulence parameters shown
here cover a complete period of oscillation. Results presented here are from the case
with a reduced frequency of 0.1 and a pitching axis located at the quarter chord. Figure
19 and Figure 20 show results of kT and kL, respectively, at select times throughout a
single period (the same times shown in the velocity magnitude contours and pressure
contours). The turbulence transition process is represented in the model by a transfer of
energy from laminar kinetic energy to turbulent kinetic energy [19]. Figure 19 and
Figure 20 reflect this. The laminar kinetic energy is almost non-existent when the angle
of attack is low yet it is clear that there is turbulent kinetic energy present in the flow.
This indicates that the flow is laminar near the leading edge of the airfoil and transitions
to fully turbulent flow at approximately one eighth of the chord past the leading edge.
As the leading edge vortex is shed (t/T = 0.7132) there is strong activity in both the
laminar and turbulent kinetic energy values, indicating that there are pre-transitional
fluctuations as well as transfer from laminar kinetic energy to turbulent kinetic energy.
27
Figure 19. kT contours for k=0.1 and x/c = 0.25. Scale is 1E-12 to 80.5 m2/s2.
28
Figure 20. kL contours for k=0.1 and x/c = 0.25. Scale is 1E-12 to 36.1 m2/s2.
29
3.6 Metrics
3.6.1
Lift Coefficient
Aerodynamic coefficients are calculated by integrating the pressure distribution over the
surface of the airfoil. The lift coefficient is the component of this force that is normal to
the incoming velocity vector. Figure 21 and Figure 22 show the lift coefficient raw data
varying with time for reduced frequencies of 0.05 and 0.1, respectively. Table 3 lists the
peak lift coefficients of the last 6 periods of each simulation. Table 4 lists the maximum
and time-averaged lift coefficients of all six simulations. The lift coefficient peaks with
each local maximum in angle of attack, then suddenly decreases as expected. A second
peak in lift coefficient appears at each α local minimum. This second peak is caused by
the flow reattaching. As seen in Figure 15 and Figure 17, after the airfoil has entered
deep stall and α is decreasing, a trailing edge vortex is shed. This extends the low
pressure region from the upper surface of the airfoil to the lower surface – this
contributes to the severe decrease in lift. Once α decreases enough for the flow to
reattach, the low pressure region no longer extends to the lower surface and causes a
momentary increase in lift.
Table 3. Maximum lift coefficients. Average and maximum of local maximums listed.
AVG
MAX
x/c=0.25
1.232
1.173
1.359
1.204
1.141
1.341
1.242
1.359
k=0.05
x/c=0
1.011
1.124
1.128
1.126
1.304
1.062
1.126
1.304
x/c=-0.25
1.247
0.994
1.141
1.126
0.969
1.073
1.092
1.247
x/c=0.25
1.254
1.420
1.266
1.198
1.146
1.415
1.283
1.420
30
k=0.1
x/c=0
1.548
1.504
1.266
1.133
1.243
1.447
1.357
1.548
x/c=-0.25
1.492
1.236
1.340
1.031
0.987
1.541
1.271
1.541
Figure 21. Lift coefficient raw data (k=0.05).
Figure 22. Lift coefficient raw data (k=0.1).
31
For the simulations with k=0.05, Table 4 shows that the average lift coefficient decreases
and then increases as the pitching axis moves forward, with the maximum average value
occurring with the pitching axis located a quarter-chord forward of the leading edge. For
k= 0.1 Table 4 shows that there is an increasing trend in the average lift coefficient as
the pitching axis moves forward. Generally the average lift coefficient increases with
reduced frequency. The average lift coefficient for each of these cases is less than the
maximum static lift coefficient (0.9 as seen in Appendix A); however, the benefit from
these simulations is that the airfoil is constantly cycling through stall – if the static airfoil
were to stall it would lose all of its lift unless the angle of attack were brought low
enough for the flow to reattach. Figure 23 and Figure 24 show the dynamic lift curve for
k=0.05 and k=0.1, respectively. Comparing these lift curves to the static lift curve in
Appendix A confirm that a dynamically pitching airfoil will see higher lift than the
airfoil held at a constant angle of attack. These lift curves also demonstrate another
perspective of the dynamic stall phenomenon. The lift gradually increases as the angle
of attack increases during the upstroke until dynamic stall occurs, then the lift sharply
increases and immediately decreases as the airfoil fully stalls. With the lift coefficient
low, the flow reattaches during the downstroke and the cycle repeats. Figure 23 and
Figure 24 also show the secondary spike in lift coefficient seen in Figure 21 and Figure
22. It can be seen that there is a large spike in the lift coefficient at the highest angle of
attack (16°) and a small spike as the airfoil approaches the lowest angle of attack (6°).
Table 4. Maximum and average lift coefficients over runtime.
AVG
MAX
x/c=0.25
0.8025
1.3591
k=0.05
x/c=0
0.7837
1.3039
x/c=-0.25
0.8112
1.2254
x/c=0.25
0.7850
1.4195
32
k=0.1
x/c=0
0.8325
1.5481
x/c=-0.25
0.8556
1.5405
upstroke
downstroke
Figure 23. Lift curve (k=0.05).
upstroke
downstroke
Figure 24. Lift curve (k=0.1).
33
3.6.2
Drag Coefficient
Table 5 lists the drag coefficient local minimums of the last 6 periods of each simulation.
Table 6 lists the global maximum, minimum, and time-averaged drag coefficients of all
six simulations. Figure 25 and Figure 26 show the computed drag coefficient values for
reduced frequencies of 0.05 and 0.1, respectively. Figure 27 and Figure 28 show the
drag polar (lift vs. drag) for reduced frequencies of 0.05 and 0.1, respectively. The local
maximum drag coincides with the local maximum angle of attack and the local
minimum drag occurs at the local minimum angle of attack – there is no second local
maximum in drag at the local angle of attack minimum as with the lift coefficient. This
means that at the lowest angle of attack, the lift-to-drag ratio is very favorable. This
favorable lift-to-drag ratio occurs as the flow is reattaching and is explained in section
3.6.1. The original hypothesis suggesting that dynamically pitching the airfoil could
produce thrust is incorrect – the drag is always positive and therefore thrust is never
produced.
Table 5. Minimum drag coefficients. Average and minimum of local drag coefficients listed.
AVG
MIN
x/c=0.25
0.02030
0.02131
0.01892
0.01920
0.01880
0.01856
0.01952
0.02131
k=0.05
x/c=0
0.01745
0.01799
0.01752
0.01736
0.01748
0.01758
0.01756
0.01799
x/c=-0.25
0.01744
0.01959
0.01716
0.01605
0.01707
0.01599
0.01722
0.01959
x/c=0.25
0.02036
0.02125
0.02409
0.02402
0.02166
0.01954
0.02182
0.02409
k=0.1
x/c=0
0.01945
0.02228
0.01784
0.01866
0.01923
0.02030
0.01963
0.02228
x/c=-0.25
0.01590
0.02250
0.02044
0.01774
0.01596
0.02266
0.01920
0.02266
Table 6. Minimum, maximum, and average drag coefficients.
AVG
MIN
MAX
x/c=0.25
0.1196
0.0186
0.3622
k=0.05
x/c=0
0.1163
0.0174
0.3366
x/c=-0.25
0.1232
0.0158
0.3305
x/c=0.25
0.1197
0.0195
0.3845
34
k=0.1
x/c=0
0.1253
0.0178
0.4309
x/c=-0.25
0.1382
0.0159
0.4269
Figure 25. Drag coefficient raw data (k=0.05).
Figure 26. Drag coefficient raw data (k=0.1).
35
upstroke
downstroke
Figure 27. Drag polar (k=0.05).
upstroke
downstroke
Figure 28. Drag polar (k=0.1).
36
3.6.3
Moment Coefficient
Table 7 lists the time-averaged, minimum, and maximum moment coefficients from each
of the six simulations. Figure 29 and Figure 30 show the raw moment coefficient data
for reduced frequencies of 0.05 and 0.1, respectively. Figure 31 and Figure 32 show the
moment curves for reduced frequencies of 0.05 and 0.1, respectively. As expected,
moving the pitching axis forward greatly increases the moment seen by the airfoil. For
the simulations with a reduced frequency of 0.05, the moment coefficient increases by a
factor of 16.46 when the pitching axis is moved to its forward-most location compared to
when it is at the quarter-chord. The moment coefficient increases by a factor of 22.23
when the pitching axis is moved forward compared to when it is at the quarter-chord for
the simulations with a reduced frequency of 0.1.
This large of a moment coefficient is
likely too large to be beneficial since the lift coefficient doesn’t increase as much as the
moment coefficient. The moment coefficient increases by a factor of 8.337 when the
pitching axis is moved from the quarter-chord to the leading edge and by a factor of
11.24 when the reduced frequency is 0.05 and 0.1, respectively – even this much of an
increase may not be feasible on the scale of micro aerial vehicles. The motors that
would produce the necessary torque will likely increase weight more than the gained lift
force.
Table 7. Average, minimum, and maximum moment coefficients.
AVG
MIN
MAX
x/c=0.25
0.0267
-0.0407
0.1923
k=0.05
x/c=0
0.2226
0.0908
0.4463
x/c=-0.25
0.4396
0.2067
0.7615
x/c=0.25
0.0214
-0.0457
0.2111
37
k=0.1
x/c=0
0.2405
0.0635
0.6822
x/c=-0.25
0.4757
0.1854
1.0741
Figure 29. Moment coefficient raw data (k=0.05).
Figure 30. Moment coefficient raw data (k=0.1).
38
downstroke
upstroke
Figure 31. Moment curve (k=0.05).
upstroke
downstroke
Figure 32. Moment curve (k=0.1).
39
4. Conclusions
This thesis has shown the influence of the pitch-axis location and the reduced frequency
on the aerodynamic properties (specifically lift, drag, and moment coefficients) of a
NACA 0012 airfoil undergoing pitching oscillations at a Reynolds number of 170,000.
Results show that by pitching the airfoil about a mean nonzero angle of attack and
causing it to dynamically stall, it is possible to achieve a lift coefficient (average and
maximum) that is greater than that of a static airfoil at the same mean angle of attack.
By moving the pitching axis forward, an even greater average lift coefficient is possible.
In general, increasing the reduced frequency causes the maximum and average lift
coefficients to increase. Moving the pitching axis forward causes the average local
minimum drag to decrease, but the time-averaged drag to increase.
Doubling the
reduced frequency causes the time-averaged drag to increase. Moving the pitching axis
forward yields a larger maximum lift-to-drag ratio (when the angle of attack is at a
minimum), but the maximum time-averaged lift-to-drag ratio occurs when the pitching
axis is located at the leading edge of the airfoil. The original hypothesis stating that it
may be possible to produce thrust with a pitching airfoil is incorrect – at no point during
any simulation was the drag negative so therefore thrust was never produced. A greater
reduced frequency may yet produce thrust, but high reduced frequencies tend to generate
chaotic behavior in the system [7] – this is outside the scope of this thesis. The moment
coefficient of the airfoil rotated about a point a quarter-chord forward of the leading
edge is 16 and 22 times larger than the moment coefficient of the airfoil rotated about its
quarter-chord depending on reduced frequency. Despite the increase in lift and lift-todrag ratio, the moment coefficient occurring with the pitching axis at the forward-most
location is likely not feasible on the scale of micro aerial vehicles. It would be beneficial
from a MAV design standpoint to have a simply oscillating wing rather than complex
pitching-plunging wings, but since the moment coefficient increases as the rotation axis
moves forward, larger motors would be needed to provide the necessary torque. The
weight increase from larger motors would likely be greater than the increase in lift
gained by moving the rotation axis forward.
This study may be improved in a number of ways. Even though 2D CFD is capable of
capturing the dynamic stall phenomenon, it is inherently a 3D problem, so a 3D grid
40
would be better suited for this problem. Large eddy simulations (LES) or detached eddy
simulations (DES) would provide better accuracy and show better formation of the
vortices shed, but due to limited computational resources, this thesis used a RANS
approach. This study assumed the plunging motion to be negligible when determining
the effective angle of attack. As the pitching axis moves forward, the circular arc that
the airfoil moves about creates more and more of a plunging motion – with the limit
being pure plunging. An investigation of this effect would be insightful. With all of this
in mind, this thesis should serve as a useful basis for further work.
41
5. References
[1]
Ekaterinaris J A. and Platzer M F.. Computational Prediction of Airfoil Dynamic
Stall. Prog. Aerospace Sci. 33 (1997) 759.
[2]
Judsen, J.. Army Studying “Flappable” Wing Technology For Unmanned Aerial
Systems. Inside Defense. 16 March 2012 [online]. Accessed 22 May 2012.
[3]
Mueller, T., et. al.. Fixed and Flapping Wing Aerodynamics for Micro Air
Vehicle Applications. Progress in Astronautics and Aeronautics 195 (2001).
[4]
Carr L.. Progress in Analysis and Prediction of Dynamic Stall. Journal of
Aircraft 25 (1988) 6.
[5]
Geissler W. and Haselmeyer H.. Investigation of dynamic stall onset. Aerospace
Science and Technology 10 (2006) 590.
[6]
Spalart P R. and Allmaras S R..
A one-equation turbulence model for
aerodynamic flows. La Recherche Aérospatiale 1 (1994) 5.
[7]
Sarkar S. and Venkatraman K.. Influence of pitching angle of incidence on the
dynamic stall behavior of a symmetric airfoil. European Journal of Mechanics
B/Fluids 27 (2008) 219.
[8]
Rival D. and Tropea C.. Characteristics of Pitching and Plunging Airfoils Under
Dynamic-Stall Conditions. Journal of Aircraft Vol. 47, No. 1, January-February
2010.
[9]
Prangemeier T., Rival D., and Tropea C.. The manipulation of trailing-edge
vortices for an airfoil in plunging motion. Journal of Fluids and Structures 26
(2010) 193.
[10]
Wang S., Ingham D. B., et. al.. Numerical investigations on dynamic stall of low
Reynolds number flow around oscillating airfoils.
Computers & Fluids 39
(2010) 1529.
[11]
Gharali K. and Johnson D..
Numerical modeling of an S809 airfoil under
dynamic stall, erosion and high reduced frequencies. Applied Energy (2011),
doi: 10.1016/j.apenergy.2011.04.037.
[12]
Lee T. and Su Y. Y.. Unsteady airfoil with an harmonically deflected trailingedge flap. Journal of Fluids and Structures 27 (2011) 1411.
42
[13]
Jacobs E. N. and Sherman A.. Airfoil Section Characteristics as Affected by
Variations of the Reynolds Number. NACA Technical Report 586, 1937.
[14]
http://gridpro.com/
[15]
http://openfoam.com/
[16]
http://www.gnuplot.info/
[17]
http://freemat.sourceforge.net/
[18]
Kays W., Crawford M., and Weigand B.. Convective Heat and Mass Transfer,
McGraw-Hill, 2005.
[19]
Walters D. K. and Cokljat D.. A Three-Equation Eddy-Viscosity Model for
Reynolds-Averaged Navier-Stokes Simulations of Transitional Flow. Journal of
Fluids Engineering 130 (2008) 1.
[20]
http://www.pointwise.com/
[21]
Sweby P. K..
High resolution schemes using flux-limiters for hyperbolic
conservation laws. SIAM J. Num. Anal 21 (1984) 995.
[22]
White, F. M.. Viscous Fluid Flow, McGraw-Hill, 1992.
[23]
Patankar S. V. and Spalding D. B. A calculation procedure for heat, mass, and
momentum transfer in three-dimensional parabolic flows. Int. J. of Heat and
Mass Transfer. 15 (1972) 1787.
43
6. Appendix A – Validation of OpenFOAM
This appendix serves to validate the OpenFOAM software. Two well-understood test
cases were used for validation – Poisuille flow and flow over a circular cylinder.
6.1 Two-dimensional Poisuille flow
6.1.1
Geometry and Fluid Properties
The channel and fluid have the following properties:
Length L = 0.1 m
Width 2h = 0.01 m
Origin located at the inlet along the centerline
Uniform velocity of 0.01 m/s at the inlet
Uniform pressure of 0 Pa at the outlet
Density of ρ = 1.205 kg/m3
Dynamic viscosity of μ = 1.82 x 10-5 Pa-s
6.1.2
Governing Equations
The x-momentum equation for a fluid with constant density and viscosity is shown by
equation ( 6-1 ).
  2u  2u  2u 
 u
u
u
u 
P
u
v
 w   
   2  2  2   g x
x
y
z 
x
y
z 
 t
 x
 
( 6-1 )
Applying the boundary layer approximations, the PDE is now the ODE ( 6-2 ).
d 2u 1 dP

dy 2  dx
The boundary conditions are
u (  h)  u ( h)  0
u (0)  umax
du
dy
0
y 0
6.1.3
Analytical Solution
Solving the ODE and applying the boundary conditions yields
44
( 6-2 )
u( y) 

1 dP 2
y  h2
2  dx
uavg  
h 2 dP
3 dx
umax  
h 2 dP
2  dx

Using the inlet velocity as the average velocity for the fully developed flow and solving
for the pressure gradient yields -0.02184 Pa/m. The maximum velocity is therefore
0.015 m/s and the average velocity is equal to the inlet velocity of 0.01 m/s.
6.1.4
Numerical Solution
The mesh shown below is divided into four blocks. The two left blocks form the entry
length of the channel and are graded to have a denser cell distribution near the channel
walls and inlet. These make up the first 10% of the length of the channel. The two right
blocks form the fully-developed region of the channel. These blocks are graded to be
denser near the walls but are evenly spaced along the length of the channel.
The mesh previously described is the last of three meshes used to study this problem.
The first mesh used had uniform grading and spacing throughout the domain. The
second mesh used had grading identical to the last but contained half as many cells. The
last mesh used is the most accurate of the three.
45
Figure 33. Mesh of the entry length for Poisuille flow.
For all three cases (meshes) a timestep was chosen such that the courant number was less
than 1 in order to maintain stability. A first-order Euler scheme is used to solve the time
terms and a linear Gauss scheme is used to solve the spatial terms.
The fully-developed velocity profile for the three cases is shown in
Figure 34. Fully-developed velocity profiles of analytical and numerical solutions for Poisuille flow.
46
The graded mesh performs the worst with a maximum error of +2.752%. This mesh
does not accurately capture the parabolic velocity profile, especially near the velocity
maximum.
The more densely graded mesh (gradedFine) performs the best with a
maximum error of +0.400%. The ungraded mesh has maximum error of -1.074%.
The pressure of the fully-developed region of the channel decreases linearly as expected.
The slope of this linear decrease is -0.021827 Pa/m when adjusted for density
(OpenFOAM calculates pressure per unit density for simplicity when the Navier-Stokes
equations are non-dimensionalized, so to get pressure this value must be multiplied by
the fluid density). This is 0.060% less than the pressure gradient calculated from the
analytical solution. The comparison is shown in Figure 35.
Figure 35. Pressure gradient of the numerical solution for Poisuille flow.
6.2 Two-dimensional Flow Over a Circular Cylinder
The purpose of this study is to further validate OpenFOAM as a CFD tool and the author
as a competent user. The textbook problem of two-dimensional laminar flow over a
circular cylinder is modeled in OpenFOAM and compared to results in the literature
[22]. The drag coefficient cD per unit length and Strouhal number (when vortices are
present and the lift coefficient varies with time) are used as the basis of comparison
47
between OpenFOAM results and published results. The progression of the study is to
first create a suitable mesh with boundary conditions and secondly to gather data at
various Reynolds numbers. Cases are named cylinderN, where N is an integer from one
through eight. Cases with varying Reynolds number are named ReN, where N is the
Reynolds number (based on cylinder diameter) at which the case was run.
6.2.1
Creating the Mesh
OpenFOAM includes the blockMesh utility which allows the user to break down the
domain into hexahedrons, thus allowing the various solvers of OpenFOAM to use the
finite volume method (FVM) to calculate the desired flow properties in each cell.
6.2.1.1 Case cylinder1
Figure 36. Mesh for case cylinder1.
The first attempt at a mesh is shown in Figure 36. The mesh is composed of a circular
region enveloping the cylinder, centered inside of a square region. A rectangular region
is appended to the downstream side of the square region in order to capture the wake
region downstream of the cylinder. The boundary conditions for this case are fixed
velocity at the inlet, fixed pressure at the outlet, no-slip conditions along the top and
bottom faces as well as the cylinder, and an empty boundary condition on the faces into
and out of the page. The empty boundary condition causes OpenFOAM to treat the
48
problem in 2D rather than 3D as it does by default. Figure 37 shows the pressure field
and Figure 38 shows the velocity field for this case. Note the large pressure where the
inlet meets the top and bottom faces. This is caused by the continuity equation not being
satisfied in the cells in those corners. Refining the mesh would cause these regions of
high pressure to diminish, but not disappear entirely. Also note the discontinuities that
show up along the boundaries of the blocks (the vertical line separating the large square
block and rectangular block as well as the four diagonal lines radial to the cylinder).
These boundaries are very non-orthogonal relative to one another – this contributes to
the discontinuities seen. For the reasons previously stated this is a poor mesh for this
problem.
Figure 37. Pressure field for case cylinder1.
49
Figure 38. Velocity field for case cylinder1.
6.2.1.2 Case cylinder2
As seen in Figure 39, the mesh is finer in the region surrounding the annular region that
surrounds the cylinder as well as the rectangular region downstream of the cylinder. The
boundary conditions are the same as in the cylinder1 case. Note in Figure 40 and Figure
41 how the discontinuities are still present.
Figure 39. Mesh for case cylinder2.
50
Figure 40. Pressure field for case cylinder2.
Figure 41. Velocity field for case cylinder2.
51
6.2.1.3 Case cylinder3
Figure 42. Enlarged view showing discontinuity in velocity field for case cylinder3.
The mesh for this case is identical to that from cylinder2 (refer to Figure 39).
The
boundary conditions for this case are identical to those from cylinder2 except for along
the top and bottom boundaries. These boundary conditions have been changed to slip –
that is there is flow in the x-direction equal to that of the freestream but no mass flows
across this boundary. Even with the finer mesh and changed boundary conditions, the
same discontinuities appear in the velocity field (Figure 42) and pressure field (Figure
43).
52
Figure 43. Pressure field for case cylinder3.
6.2.1.4 Case cylinder4
The objective for this case was to reduce the amount of skew between adjacent cells
along lines separating regions in the mesh. The mesh for this case is shown in Figure 44.
Figure 44. Mesh for case cylinder4.
53
Figure 45. An enlarged view of the annular region of the mesh for case cylinder4.
This mesh has an annular region in the immediate vicinity of the cylinder in order to
have orthogonal cells. There are four square regions in each corner of the domain that
are also orthogonal. The remaining regions serve as a transition between the annular
region and the square regions.
Figure 46. Velocity field for case cylinder4.
54
Figure 47. Pressure field for case cylinder4.
An enlarged view of the annular region surrounding the cylinder is shown in Figure 45.
Though not apparent from the velocity field (Figure 46), the pressure field (Figure 47)
still show discontinuities.
6.2.1.5 Case cylinder5 and cylinder6
Cases cylinder5 (mesh shown in Figure 48) and cylinder6 (mesh shown in Figure 49) are
identical except cylinder6 has a mesh that is twice as fine as that in cylinder5. The aim
for these two cases was to enlarge the annular region surrounding the cylinder in order to
have minimal disturbances from the lack of orthogonality when transferring from one
region to another as well as having a larger region downstream of the cylinder to better
capture the wake. The boundary conditions for these two cases are the same as in
cylinder4. The comparison between these two cases also serves as a grid sensitivity
study – the drag coefficient (for Re = 1) and the velocity and pressure fields for these
two cases differ by less than 1%. The velocity field is shown in Figure 50 and the
pressure field is shown in Figure 51; both are from cylinder5. Since the boundary
conditions are adequate and the solution doesn’t change when doubling the fidelity of
the grid, this is a suitable mesh for this problem.
55
Figure 48. Mesh for case cylinder5.
Figure 49. Mesh for case cylinder6.
56
Figure 50. Pressure field for case cylinder5.
Figure 51. Velocity field for case cylinder5.
6.2.2
Comparing the OpenFOAM Results with Published data
Using the mesh found in section 48, it is now possible to compare the solution calculated
with OpenFOAM with data from White [22].
57
Figure 52. Drag coefficient comparison.
Figure 52 shows how the drag coefficient compares. At Reynolds numbers less than 10,
OpenFOAM overpredicts the drag coefficient. At Reynolds numbers greater than 10,
OpenFOAM underpredicts. This isn’t surprising since White’s result is a curve fit to
experimental data. This curve fit is described by equation ( 6-3 ).
CD  1 
10
2
( 6-3 )
Re 3
At a Reynolds number of about 60 vortices begin to shed off of the cylinder [22]. White
predicts a Strouhal number of about 0.2 for the shedding of vortices for Reynolds
numbers from about 100 to 100,000. Above and below this range of Reynolds numbers
the Strouhal number will be lower than 0.2.
58
Figure 53. Time history of lift coefficient for flow over a cylinder at a Reynolds number of 100.
Performing a Fourier transform on the lift coefficient time history shows the frequency
composition as seen in Figure 54. There is a clear magnitude spike at 16.2 Hz. This
frequency can be converted to a Strouhal number by multiplying by the diameter (1 m)
and dividing by the freestream velocity (100 m/s) as seen in equation ( 6-4 )
St 
fd
U
( 6-4 )
The Strouhal number composition is shown in Figure 55.
59
Figure 54. Frequency composition of vortex shedding for Reynolds number of 100.
60
Figure 55. Strouhal number of vortex shedding for Reynolds number of 100.
6.3 Two-dimensional flow over a NACA 0012 airfoil
The geometry, mesh, and boundary conditions used for this validation study are the same
as in section 2.2. The difference here is that the simpleFoam solver is used instead of the
pimpleDyMFoam solver. The simpleFoam solver uses the semi-implicit method for
pressure-linked equations – the SIMPLE algorithm [23]. The SIMPLE algorithm is a
predictor-corrector method; it first computes preliminary fluxes at cell faces, then
corrects them.
Though simpleFoam is a steady-state solver, the solution will not converge due to the
unsteady fluctuations in the flow. The lift coefficients shown in Figure 56 are averaged
across multiple iterations – the last 25,000 iterations of a 30,000 iteration simulation.
OpenFOAM overpredicts slightly pre-stall and underpredicts with a larger error post-
61
stall. This is due to the unsteadiness of the flow. The original NACA data may also
have a margin of error due to unsteadiness since it is difficult to measure average values
in a wind tunnel with unsteady flow.
Figure 56. Static lift curve for NACA 0012 airfoil comparing OpenFOAM results to NACA data.
62
7. Appendix B – OpenFOAM Case Files
Note: Headers are removed from all files.
7.1 Folder 0
kl – laminar kinetic energy
7.1.1
FoamFile
{
version
2.1;
format
ascii;
class
volScalarField;
object
kl;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions
[0 2 -2 0 0 0 0];
internalField
uniform 1e-12;
boundaryField
{
circle
{
type
inletValue
value
}
airfoil
{
type
value
}
inletOutlet;
uniform 1e-12;
uniform 1e-12;
fixedValue;
uniform 1e-12;
front
{
type empty;
}
back
{
type empty;
}
}
// *************************************************************** //
7.1.2
kt – turbulent kinetic energy
FoamFile
{
63
version
format
class
object
2.1;
ascii;
volScalarField;
kt;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
turbulentKE
turbulentOmega
4.335e-6;
0.20821;
dimensions
[0 2 -2 0 0 0 0];
internalField
uniform $turbulentKE;
boundaryField
{
circle
{
type
inletValue
value
//type
//value
}
airfoil
{
type
value
}
inletOutlet;
$internalField;
uniform 1e-12;
fixedValue;
$internalField;
fixedValue;
uniform 1e-12;
front
{
type empty;
}
back
{
type empty;
}
}
// *************************************************************** //
7.1.3
nut – turbulent eddy viscosity
FoamFile
{
version
format
class
location
object
}
// * * * * * *
2.1;
ascii;
volScalarField;
"0";
nut;
* * * * * * * * * * * * * * * * * * * * * * * * * * //
64
dimensions
[0 2 -1 0 0 0 0];
internalField
uniform 1e-12;
boundaryField
{
back
{
type
empty;
}
airfoil
{
type
zeroGradient;
//value
uniform 1e-12;
}
circle
{
type
fixedValue;
//inletValue
uniform 5.62176e-4;
//value
uniform 1e-12;
value
uniform 1.8738e-6;
}
front
{
type
empty;
}
}
// ********************************************************* //
7.1.4
omega – scale-determining variable
FoamFile
{
version
2.1;
format
ascii;
class
volScalarField;
object
omega;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
turbulentKE
turbulentOmega
4.335e-6;
0.20821;
dimensions
[0 0 -1 0 0 0 0];
internalField
uniform $turbulentOmega;
boundaryField
{
circle
{
type
inletValue
value
inletOutlet;
$internalField;
uniform 1e-12;
65
//type
//value
fixedValue;
$internalField;
}
airfoil
{
type
}
zeroGradient;
front
{
type empty;
}
back
{
type empty;
}
}
// ***************************************************************** //
p – pressure
7.1.5
FoamFile
{
version
2.1;
format
ascii;
class
volScalarField;
object
p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions
[0 2 -2 0 0 0 0];
internalField
uniform 0;
boundaryField
{
airfoil
{
type zeroGradient;
}
circle
{
type zeroGradient;
}
front
{
type empty;
}
back
{
66
type empty;
}
}
// ***************************************************************** //
pointDisplacement – grid dynamics
7.1.6
FoamFile
{
version
2.1;
format
ascii;
class
pointVectorField;
location
"0";
object
pointDisplacement;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions
[0 1 0 0 0 0 0];
internalField
uniform (0 0 0);
boundaryField
{
airfoil
{
type
axis
origin
angle0
amplitude
omega
value
}
front
{
type
}
angularOscillatingDisplacement;
(0 0 1);
(0.25 0 0);
0;
0.0872664626;
//radians
1.7;
//rad/s
uniform (0 0 0);
empty;
back
{
type
empty;
}
".*"
{
type
value
fixedValue;
uniform (0 0 0);
}
}
// ***************************************************************** //
67
U – velocity
7.1.7
FoamFile
{
version
format
class
object
}
// * * * * * *
2.1;
ascii;
volVectorField;
U;
dimensions
[0 1 -1 0 0 0 0];
internalField
uniform (16.68766212 3.243752921 0);
* * * * * * * * * * * * * * * * * * * * * * * * * * //
boundaryField
{
airfoil
{
type fixedValue;
value uniform (0 0 0);
}
circle
{
type inletOutlet;
inletValue $internalField;
}
front
{
type empty;
}
back
{
type empty;
}
}
// ***************************************************************** //
7.2 Folder constant
7.2.1
Folder polyMesh
This folder contains the files that describe the mesh. These files are not included here
since they specify information at each of the 40,000 cells of the grid.
7.2.2
dynamicMeshDict – specify mesh dynamics library
FoamFile
{
version
format
2.1;
ascii;
68
class
object
dictionary;
motionProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMesh
dynamicMotionSolverFvMesh;
motionSolverLibs ("libfvMotionSolvers.so");
solver
displacementLaplacian;
diffusivity
inverseDistance (airfoil);
// ***************************************************************** //
7.2.3
RASproperties – specify turbulence model
FoamFile
{
version
2.1;
format
ascii;
class
dictionary;
location
"constant";
object
RASProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
RASModel
kkLOmega;
turbulence
on;
printCoeffs
on;
// ***************************************************************** //
7.2.4
transportProperties – specify fluid properties
FoamFile
{
version
2.1;
format
ascii;
class
dictionary;
location
"constant";
object
transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
transportModel
Newtonian;
nu
nu [ 0 2 -1 0 0 0 0 ] 1e-4;
// ***************************************************************** //
69
7.2.5
turbulenceProperties – turn turbulence on/off
FoamFile
{
version
2.1;
format
ascii;
class
dictionary;
location
"constant";
object
turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType RASModel;
// ***************************************************************** //
7.3 Folder system
7.3.1
controlDict – control time and output
FoamFile
{
version
2.1;
format
ascii;
class
dictionary;
location
"system";
object
controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application
pimpleDyMFoam;
startFrom
startTime;
startTime
0;
stopAt
endTime;
endTime
25;
deltaT
1e-6;
writeControl
runTime;
writeInterval
0.2;
purgeWrite
0;
writeFormat
ascii;
writePrecision
6;
writeCompression off;
timeFormat
general;
70
timePrecision
6;
runTimeModifiable true;
adjustTimeStep true;
maxCo 1;
functions
(
forces
{
type forces;
functionObjectLibs ("libforces.so"); //Lib to load
patches (airfoil); // change to your patch name
pName p;
UName U;
rhoName rhoInf;
log true;
rhoInf 1.0; //Reference density for fluid
CofR (0 0 0); //Origin for moment calculations
outputControl outputTime;
//write at same frequency
as fields - see below
outputInterval 1;
}
forceCoeffsforceCoeffs
{
type forceCoeffs;
functionObjectLibs ("libforces.so"); //Lib to load
patches (airfoil); //change to your patch name
pName p;
UName U;
rhoName rhoInf;
AName Aref;
lName lRef;
rhoInf 1.0;
CofR (0.25 0 0);
liftDir (-0.1908089954 0.9816271834 0);
dragDir (0.9816271834 0.1908089954 0);
pitchAxis (0 0 1);
magUInf 17;
lRef 1.0;
Aref 0.1;
}
);
// **************************************************************** //
7.3.2
decomposeParDict – set up for parallel processing
FoamFile
{
version
format
class
2.1;
ascii;
dictionary;
71
location
object
"system";
decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 6;
method
simple;
simpleCoeffs
{
n
delta
}
( 2 3 1 );
0.001;
hierarchicalCoeffs
{
n
delta
order
}
manualCoeffs
{
dataFile
}
( 1 1 1 );
0.001;
xyz;
"";
distributed
no;
roots
( );
// ***************************************************************** //
7.3.3
fvSchemes – specify numerical schemes
FoamFile
{
version
2.0;
format
ascii;
class
dictionary;
object
fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default
grad(p)
grad(U)
}
Gauss linear;
Gauss linear;
Gauss linear;
72
divSchemes
{
default
none;
div(phi,U)
Gauss linearUpwind grad(U);
div(phi,kt)
Gauss limitedLinear 1;
div(phi,kl)
Gauss limitedLinear 1;
div(phi,omega) Gauss limitedLinear 1;
div((nuEff*dev(T(grad(U))))) Gauss linear;
}
laplacianSchemes
{
default
}
Gauss linear limited 0.5;
interpolationSchemes
{
default
linear;
}
snGradSchemes
{
default
}
fluxRequired
{
default
pcorr
p;
}
corrected;
no;
;
// ***************************************************************** //
7.3.4
fvSolution – specify solution algorithm parameters
FoamFile
{
version
2.1;
format
ascii;
class
dictionary;
object
fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
pcorr
{
solver
tolerance
relTol
smoother
nPreSweeps
nPostSweeps
GAMG;
0.02;
0;
GaussSeidel;
0;
2;
73
cacheAgglomeration on;
agglomerator
faceAreaPair;
nCellsInCoarsestLevel 10;
mergeLevels
1;
}
p
{
$pcorr
tolerance
relTol
1e-7;
0.01;
}
pFinal
{
$p;
tolerance
relTol
}
"(U|kt|kl|omega)"
{
solver
preconditioner
tolerance
relTol
}
1e-7;
0;
PBiCG;
DILU;
1e-06;
0.1;
"(U|kt|kl|omega)Final"
{
$U;
tolerance
1e-06;
relTol
0;
}
cellDisplacement
{
solver
GAMG;
tolerance
1e-5;
relTol
0;
smoother
GaussSeidel;
cacheAgglomeration true;
nCellsInCoarsestLevel 10;
agglomerator
faceAreaPair;
mergeLevels
1;
}
}
PIMPLE
{
correctPhi
yes;
nOuterCorrectors
2;
nCorrectors
1;
nNonOrthogonalCorrectors 0;
pRefCell 0;
pRefValue 0;
}
74
relaxationFactors
{
fields
{
p
0.3;
}
equations
{
"(U|kt|kl|omega)"
0.7;
"(U|kt|kl|omega)Final" 1.0;
}
}
cache
{
grad(U);
}
// ***************************************************************** //
75
8. Appendix C – kkLOmega Closure Equations
The relationships and definitions that close the three-equation eddy-viscosity turbulence
model are as follows.
PkT   T ,s S 2
( 8-1 )
PkL   T ,1 S 2
( 8-2 )
 T , s  f f INT C  k T , s eff
( 8-3 )
eff  min C  d , T 
( 8-4 )
k T , s  f SS f W k T
( 8-5 )
T 
kT
( 8-6 )

 eff 

f W  

 T 
 Re T
f  1  exp  
 A
Re T 
f W2 k T

76
( 8-7 )



( 8-8 )
( 8-9 )
f SS
  C   2 
 exp   SS  
  kT  
C 
 T ,1
( 8-10 )
1
S
A0  AS  
 
( 8-11 )


kL
f INT  min 
,1
 C INT kTOT 
( 8-12 )
kT ,1  kT  kT , s
( 8-13 )

 2eff
 min  f ,1C11 
 



0.5k L  kT ,1 
 kT ,1 eff   TS C12 Re  d 2 ,


S


Re  
d 2

 max Re   CTS ,crit ,0 

ATS


 TS  1  exp  

kT ,1 
f ,1  1  exp  C ,1 2 2 
eff  

DT  
 kT  kT
x j
x j
77
( 8-14 )
( 8-15 )
( 8-16 )
( 8-17 )
( 8-18 )
DL  
 kL  kL
x j
( 8-19 )
x j
 T  f C  , std k T , s eff

 eff
f   1  exp  0.41

 T
RBP 
( 8-20 )



4



C R  BP k L
fW
( 8-22 )
R NAT  C R , NAT  NAT k L 

 BP  1  exp  

( 8-23 )
 BP 

ABP 
( 8-24 )
 kT
 
 C BP,crit ,0
 
 
 BP  max 

 NAT  1  exp  

 NAT 

ANAT 

C NAT ,crit

f NAT ,crit
( 8-21 )
( 8-25 )
( 8-26 )

,0 

( 8-27 )
k d

f NAT ,crit  1  exp   C NC L 
 

( 8-28 )
 NAT  max Re  
78
Table 8. k-kl-omega turbulence model constants.
A0  4.04
C INT  0.75
C1  0.44
AS  2.12
CTS ,crit  1000
C 2  0.92
A  6.75
C R , NAT  0.02
C 3  0.3
ABP  0.6
C11  3.4  10 6
CR  1.5
ANAT  200
C12  1.0  10 10
C  2.495
ATS  200
CR  0.12
C  , std  0.09
C BP,crit  1.2
C ,  0.035
Pr  0.85
C NC  0.1
C SS  1.5
k 1
C NAT ,crit  1250
C ,1  4360
   1.17
79
9. Appendix D – Ancillary Scripts and Codes
9.1 cL_fft.m
This MATLAB (FREEMAT) script reads in the data file containing drag, lift, and
moment coefficients acting on a surface (specified in OpenFOAM input files), then
performs a Fourier transform and plots the data in both the time and frequency domains.
This script also converts the frequency to and plots Strouhal number.
clear all
clc
file = 'forceCoeffsMod.dat';
M = dlmread(file, '\t');
d = 1;
%diameter is 1 m
U = 100;
%velocity is 100 m/s
t = M(:,1);
cD = M(:,2);
cL = M(:,3);
cM = M(:,4);
T = t(2)-t(1);
Fs = 1/T;
L = length(t);
%sampling time (s)
%sampling frequency (Hz)
%length of data vectors
%plot cL in time domain
figure('Position',[0,300,700,600]);
plot(t,cL);
xlabel('Time [s]', 'Fontsize',8);
ylabel('CL', 'Fontsize',8);
axis([0 20 -0.5 0.5]);
title('Flow Over a Circular Cylinder [Re=100] Time Domain');
grid on;
%convert to frequency domain
NFFT = 2^nextpow2(L);
cL_freq = fft(cL,NFFT)/L;
cL_freq2 = 2*abs(cL_freq(1:NFFT/2));
f = Fs/2*linspace(0,1,NFFT/2);
%plot cL in frequency domain
figure('Position',[300,300,700,600]);
plot(f,cL_freq2);
xlabel('Frequency [Hz]', 'Fontsize',8);
ylabel('Magnitude', 'Fontsize',8);
title('Flow Over a Circular Cylinder [Re=100] Frequency Domain');
axis([0 25 0 0.5]);
80
%convert to Strouhal Number and plot
St = f*d/U;
figure('Position',[600,300,700,600]);
plot(St,cL_freq2);
xlabel('St','Fontsize',8);
ylabel('Magnitude', 'Fontsize',8);
title('Flow Over a Circular Cylinder [Re=100] Frequency Domain');
axis([0 0.25 0 0.5]);
'Frequency of vortex shedding (in Hz) is'
[cL_max,I] = max(cL_freq2);
f(I)
9.2 forceCoeffsGIF
This gnuplot [16] script reads the force coefficients output created as specified using the
control dictionary and creates a .gif file graphing said coefficients.
set
set
set
set
set
set
set
set
term gif
output "forceCoeffs.gif"
logscale y
key bottom right
xlabel "Simulationtime [s]"
ylabel "forceCoeff [-]"
title "Plot of forceCoeffs over simulationtime"
grid
plot
"./forceCoeffsforceCoeffs/0/forceCoeffs.dat" using ($1):($3)
with lines title "lift_coeff",\
"./forceCoeffsforceCoeffs/0/forceCoeffs.dat" using ($1):($2)
with lines title "drag_coeff"
9.3 ResidualsGIF
This gnuplot [16] script reads the log file created when OpenFOAM runs and creates a
.gif file plotting said coefficients.
set term gif
set output "residuals.gif"
set logscale y
set title "Residuals"
set ylabel 'Residual'
set xlabel 'Iteration'
plot "< cat log.pimpleDyMFoam | grep 'Solving for Ux' | cut -d' ' -f9 |
tr -d ','" title 'Ux' with lines,\
"< cat log.pimpleDyMFoam | grep 'Solving for Uy' | cut -d' ' -f9 | tr d ','" title 'Uy' with lines,\
"< cat log.pimpleDyMFoam | grep 'Solving for p' | cut -d' ' -f9 | tr -d
','" title 'p' with lines,\
81
"< cat log.pimpleDyMFoam | grep 'Solving for kt' | cut -d' ' -f9 | tr d ','" title 'kt' with lines,\
"< cat log.pimpleDyMFoam | grep 'Solving for kl' | cut -d' ' -f9 | tr d ','" title 'kl' with lines,\
"< cat log.pimpleDyMFoam | grep 'Solving for omega' | cut -d' ' -f9 |
tr -d ','" title 'omega' with lines
82
10. Appendix E - OpenFOAM Tutorial
10.1 Introduction
This appendix serves as a brief introduction and tutorial to running OpenFOAM. This
tutorial assumes that the user has already installed OpenFOAM. The example problem
being studied is the Poisuille flow. The first step in any CFD problem is to understand
the geometry being studied and generating the mesh onto the geometry. For this flow,
the geometry is a channel with the following properties:

Length L = 0.1 m

Width 2h = 0.01 m

Origin located at the inlet along the centerline

Uniform velocity of 0.01 m/s at the inlet

Uniform pressure of 0 Pa at the outlet

Density of ρ = 1.205 kg/m3

Dynamic viscosity of μ = 1.82 x 10-5 Pa-s

Kinematic viscosity of ν = 1.51 x 10-5 m2/s
The flow is incompressible and in the laminar regime so therefore the icoFoam solver
will be used. To run an OpenFOAM simulation, the following files and folder hierarchy
are necessary in the case directory:

constant\
o polyMesh\

blockMeshDict
o transportProperties

0\
o U
o p

system\
o controlDict
o fvSolution
o fvSchemes
83
10.2 Meshing using the blockMesh Utility
The blockMesh dictionary (blockMeshDict) is as follows (omitting headers).
FoamFile
{
version
format
class
object
}
2.0;
ascii;
dictionary;
blockMeshDict;
convertToMeters 1;
vertices
(
(0 -0.005 -0.005)
(0.1 -0.005 -0.005)
(0.1 0.005 -0.005)
(0 0.005 -0.005)
(0 -0.005 0.005)
(0.1 -0.005 0.005)
(0.1 0.005 0.005)
(0 0.005 0.005)
);
blocks
(
hex (0 1 2 3 4 5 6 7) (200 50 1) simpleGrading (1 1 1)
);
edges
(
);
patches
(
patch frontAndBack
(
(0 3 2 1)
(6 7 4 5)
)
patch topAndBottom
(
(7 6 2 3)
(0 1 5 4)
)
patch inlet
(
(4 7 3 0)
)
patch outlet
84
(
(1 2 6 5)
)
);
mergePatchPairs
(
);
FoamFile describes how the file fits in the OpenFOAM C++ hierarchy. It lists the
version of OpenFOAM for which the file was created, the format (ascii) and what class
and object it is.
The first statement after FoamFile is a scaling factor – this allows vertices in the next
block of the file to be listed in a format that is easier to write and read. Next is the list of
vertices. Eight vertices of a mesh block are listed here (x, y, and z position) and are
numbered starting from zero. In this case they are indexed 0 to 7.
Next, the block statement uses the eight vertices previously made to create a block in the
mesh.
Multiple blocks can be created, and blocks can be created that are not
hexahedrons, but this tutorial will only focus on a mesh consisting of a single
hexahedron.
The only statement in the block section begins by indicating that a
hexahedron is being created. The eight numbers in the parentheses are the indices of the
previously created vertices. The ordering convention is such that the first index listed
indicates the origin of that block. The second and third indices listed point in the
direction of the local x-axis and y-axis, respectively. The fourth index is the last index
in the local plane with the first three. The fifth index points in the direction of the local
z-axis. The remaining three indices copy the nomenclature of the points in the plane of
the first four indices.
This ordering convention describes the local coordinate and
therefore dictates how the rest of this line is executed. The three numbers in the next set
of parentheses indicate how many cells are created in the x, y, and z directions as set by
the local coordinate system. The simpleGrading keyword allows the user to have cells
clustered towards one end of the block. Specifically the numbers are the ratio between
the length of the cells furthest and nearest to the origin in the x, y, and z directions. This
example uses 200 cells in the x-direction (the length of the channel) and 50 cells in the
y-direction (the width of the channel). Only one cell is used in the z-direction since this
is a 2D problem. No cell grading is used.
85
The next keyword (edges) allows the user to specify the edges of blocks. OpenFOAM
allows arcs, polyLines, and splines. Since this example only uses straight lines and a
single block this keyword section is empty.
The last step is to denote the outer boundaries of the domain. Generally only the patch
and wall keywords are necessary to describe the boundaries, but OpenFOAM has more
advanced options (such as the arbitrary mesh interface). This tutorial only uses the patch
type. A patch is described by the four vertices that bound it, with the convention that if a
viewer is inside of the domain looking outward, the vertices must be listed in a
clockwise manner. This is necessary to set which side of the patch is positive and which
is negative when calculating surface normals. There are six boundaries in this domain
and are grouped by which boundary conditions will be applied. The top and bottom
faces have the same boundary condition so they are grouped together. This logic also
applies to the front and back faces.
The mergePatchPairs statement is required but has no contents.
With the blockMeshDict file complete, the user may run the blockMesh command. If
this command is issued in the case directory, OpenFOAM will execute the blockMesh
utility and read the blockMeshDict file and create additional files (boundary, faces,
neighbor, owner, and points) that describe the mesh. These files will not be shown here
since they are simply a listing of all points in the domain.
10.3 Flow properties
The transportProperties file is shown below. This file is a dictionary (an object in the
dictionary class) as specified in the FoamFile section. The only entry in this file is the
kinematic viscosity (nu). The format dictates that the keyword be listed, then the
dimensions, then the value.
OpenFOAM specifies dimensions as seven SI unit
exponents – kilograms, meters, seconds, Kelvin, kilogram-mole, ampere, and candela.
FoamFile
{
version
format
class
location
object
2.0;
ascii;
dictionary;
"constant";
transportProperties;
86
}
nu
nu [ 0 2 -1 0 0 0 0 ] 0.000015104;
10.4 Boundary Conditions
The boundary conditions are specified in the p and U files in the 0 folder. The 0
indicates that it is the zero timestep. As OpenFOAM runs, it will create new folders for
each timestep that the user sets to be written. The p file is shown below.
FoamFile
{
version
format
class
object
}
2.0;
ascii;
volScalarField;
p;
dimensions
[0 2 -2 0 0 0 0];
internalField
uniform 0;
boundaryField
{
topAndBottom
{
type
}
frontAndBack
{
type
}
zeroGradient;
empty;
inlet
{
type
zeroGradient;
type
value
fixedValue;
0;
}
outlet
{
}
}
This file has a FoamFile entry similar to blockMeshDict. This entry states that the
object p (pressure) is part of the volScalarField class.
87
The next statement specifies the dimensions of pressure. OpenFOAM lists meterssquared and negative seconds-squared as units for pressure – this is because OpenFOAM
calculates pressure divided by density.
The internalField entry causes all cells that are not boundary cells in the domain to have
the value 0. This is necessary only to set initial conditions since the internal cells will be
calculated during each subsequent timestep.
Next, the boundary conditions are specified. The topAndBottom patch (which consists
of the top and bottom faces as stated in the blockMesh dictionary) has a zeroGradient
(Neumann) boundary condition. This is a typical boundary condition for pressure at a
wall. The frontAndBack patch has an empty boundary condition in order to make
OpenFOAM treat this as a 2D problem. The inlet also has a zeroGradient boundary
condition since this is a velocity-driven flow (this will be evident after seeing the U file).
The outlet pressure uses a Dirichlet boundary condition to constrain it to be zero, but
other values (such as atmospheric pressure) may be used.
The U file is shown below.
As with the other files, there is a FoamFile entry.
The U file is in the class
volVectorField.
Since velocity is a vector quantity, any values listed must be sets of three (x, y, and z)
within parentheses. The initial condition for internalField is specified.
A no-slip boundary condition is imposed for the top and bottom walls of the domain.
For the front and back faces, the same empty boundary condition seen in the p file is
used in order to make this problem 2D. The inlet velocity is given in the problem
definition. The outlet velocity is set as zeroGradient since the pressure is specified at the
outlet.
This zeroGradient condition ensures that the velocity doesn’t change when
moving normal to that surface.
FoamFile
{
version
format
class
object
}
2.0;
ascii;
volVectorField;
U;
88
dimensions
[0 1 -1 0 0 0 0];
internalField
uniform (0.01 0 0);
boundaryField
{
topAndBottom
{
type
value
}
frontAndBack
{
type
}
fixedValue;
uniform (0 0 0);
empty;
inlet
{
type
value
fixedValue;
uniform (0.01 0 0);
type
zeroGradient;
}
outlet
{
}
}
10.5 Solution Control
The most important file to control how OpenFOAM runs is the control dictionary
(controlDict). This file specifies which solver OpenFOAM will run (icoFoam in this
case), at which timestep to run, and at what frequency to write output files. The control
dictionary is as follows.
FoamFile
{
version
format
class
location
object
}
2.0;
ascii;
dictionary;
"system";
controlDict;
application
icoFoam;
startFrom
startTime;
startTime
0;
89
stopAt
endTime;
endTime
1.0;
deltaT
0.0125;
writeControl
timeStep;
writeInterval
8;
purgeWrite
0;
writeFormat
ascii;
writePrecision
6;
writeCompression off;
timeFormat
general;
timePrecision
6;
runTimeModifiable true;
The FoamFile segment indicates that this is a dictionary. The keyword application
dictates what solver to use. This example uses icoFoam, but OpenFOAM has many
other solvers to account for more complex flow such as flows encountering turbulence or
dynamic meshes.
The StartFrom keyword accepts arguments indicating when the
simulation will start. Options include StartTime and LatestTime. This example uses
StartTime and starts at time 0, but LatestTime is a useful option for starting a simulation
that has previously started and has some output files available. The endTime keyword
specifies the end of the simulation (1 second in this case). The timestep is set with
deltaT – the timestep must be adjusted to maintain a stable courant number (typically
less than 1). OpenFOAM has the capability of setting a maximum courant number and
will adjust the timestep to maintain this maximum courant number, however in this case
the timestep is set as a constant. The remaining entries control the format, fidelity, and
frequency of the output data. In this case data is written every eight timesteps and
therefore every tenth of a second.
90
The fvSchemes file is shown below.
FoamFile
{
version
format
class
location
object
}
ddtSchemes
{
default
}
gradSchemes
{
default
grad(p)
}
divSchemes
{
default
div(phi,U)
}
2.0;
ascii;
dictionary;
"system";
fvSchemes;
Euler;
Gauss linear;
Gauss linear;
none;
Gauss linear;
laplacianSchemes
{
default
none;
laplacian(nu,U) Gauss linear corrected;
laplacian((1|A(U)),p) Gauss linear corrected;
}
interpolationSchemes
{
default
linear;
interpolate(HbyA) linear;
}
snGradSchemes
{
default
}
fluxRequired
{
default
p
corrected;
no;
;
91
}
The FoamFile section indicates that the fvSchemes file is a dictionary.
This file specifies the numerical schemes used in the discretization of
the equations that OpenFOAM solves.
When the Navier-Stokes equations
are discretized, there are time derivatives (ddtSchemes), laplacian
operators, gradients, divergence operators, and interpolation schemes.
OpenFOAM has many options for each of these keywords (see [15] for a
full listing), but except for complex problems, the options used in
OpenFOAM tutorials are sufficient.
U should not concern themselves
with this file when beginning to learn OpenFOAM.
The fvSolution file is listed below.
FoamFile
{
version
format
class
location
object
}
2.0;
ascii;
dictionary;
"system";
fvSolution;
solvers
{
p
{
solver
preconditioner
tolerance
relTol
PCG;
DIC;
1e-06;
0;
solver
preconditioner
tolerance
relTol
PBiCG;
DILU;
1e-05;
0;
}
U
{
}
}
The FoamFile keyword indicates that this is yet another dictionary. This file specifies
what solvers to use for each equation (pressure and velocity in this case). The term
solver here refers to the method of inverting the matrices in the discretized equations as
opposed to the application solver (such as icoFoam) that details exactly which equations
are being solved. This file shows that the pressure equation is being solved with a
92
preconditioned conjugate gradient solver with a diagonal incomplete-Cholesky
preconditioner since it is a symmetric matrix and the velocity equation is solved with a
preconditioned
bi-conjugate
gradient
solver
with
a
diagonal
incomplete-LU
preconditioner since it is an asymmetric matrix. OpenFOAM also has solvers that use
smoothers, employ multigrid techniques, as well as diagonal solvers that are used in
explicit systems. Both the pressure and velocity equations must have set tolerances.
Absolute and relative tolerances may be specified. If no relative tolerance is specified
(i.e. set to zero), OpenFOAM will iterate until the absolute tolerance is met.
10.6 Running OpenFOAM
With all files complete and in their proper folders, the user may now run the icoFoam
command in the case directory. If all files are correct, OpenFOAM will begin running
the simulation and creating the output files as specified by the controlDict.
This
particular example should not take long to run; however, OpenFOAM has parallel
processing capabilities using the message passing interface (MPI), though this requires
an additional dictionary describing how the mesh should be decomposed.
When
running commands in Linux, it is useful to send output to a file rather than display it in
the terminal. This is accomplished with the ‘>’ operator. Appending a command with
this operator and a filename,
icoFoam > log.icoFoam
will send the output of the icoFoam command to the file log.icoFoam for postprocessing.
The preceding tutorial describes a simple geometry using one of OpenFOAM’s simplest
solvers, but is a good starting point for a user looking to start running OpenFOAM.
93