You are on page 1of 36

An Alternate eddy viscosity formulation based on anisotropy

using fluent User Defined Function

B.Tech Project Report submitted in partial fulfillment for the award of degree of
Bachelor of Technology
in
Ocean Engineering and Naval Architecture

Submitted By:
MAYANK RUNTHALA
10NA10017

Under the guidance of:

Prof. Hari V Warrior


Department of Ocean Engineering and Naval Architecture
Indian Institute of Technology, Kharagpur, India
July2013 May2014.

Department of Ocean Engineering and Naval Architecture


Indian Institute of Technology, Kharagpur, India
1|P a g e

ACKNOWLEGMENT

I am heartily thankful to Prof. Hari V Warrior who amidst his busy schedule spared his
valuable time to guide me through the project. Without his support, motivation and
useful suggestions, this project would not have taken its present shape. I feel proud
and honored to be a student of such personality.

I also want to express my sincere gratitude and sincere thanks to all the M.
Tech scholars who helped with their valuable inputs towards completing the project.

2|P a g e

Abstract
An Alternate eddy viscosity formulation based on anisotropy using
fluent User Defined Function

Turbulence is a flow regime characterized by chaotic property changes. Lots of


research has been done to try and understand it and come up with a mathematical
form that can replicate it to some level of accuracy.
This project has been my attempt to formulate a code for an alternate eddy viscosity
model based on anisotropy using a two equation model, as the existing two equation
models does not incorporate turbulence anisotropy in their codes. To script the code I
have used the user defined function of an established coding tool for fluid dynamics,
FLUENT .A user defined function, or UDF is a function that you program, that can
be dynamically loaded with the FLUENT solver to enhance the standard features of the
code. UDFS are written in C programming language.

Turbulence has been called the last unsolved problem in classical mechanics and in it,
a complete closure for eddy viscosity (and diffusivity) is the most daunting feature.
Many types of turbulence models have been formulated starting from mixing length
hypothesis going up to the most complicated Direct Numerical Simulations. Hence a
lot of research has been carried out in this topic and is the motivation behind the present
thesis work. In this thesis, we provide a solution for eddy viscosity along the lines of
Reynolds stress anisotropy. A transport equation for second invariant of anisotropy (II)
is developed which takes into account a new and improved model for the slow pressure
strain rate. The new formulation for the slow pressure strain rate uses the anisotropy of
the dissipation tensor which is not negligible compared to the anisotropy of the
turbulent kinetic energy. The improved slow pressure strain rate model performs well
when compared with the established Reynolds stress model. The formulation so
implemented is advantageous in that it is simpler and more complete than the existing
eddy viscosity models and retains the accuracy of the existing Mellor Yamada two
equation model.

3|P a g e

CONTENTS

1. INTRODUCTION ....... 5

2. LITERATURE REVIEW.... 11
2.1 Overview of Turbulence Modeling... 11

3.

Eddy Viscosity Models...... 17


3.1 Introduction..17
3.2 Anisotropy in Turbulence....18
3.3 Eddy Viscosity Formulation...19

4. Fluent ..24
4.1 Governing Equations..24
4.2 The Universal Law of the Wall.........26
4.3 Reynolds Stress Tensor....................................................................................................26
4.4 FLUENT UDF.........................................................................................................................27

5. Result & Conclusion. ... 33


5.1 k- model results...............................................................................................................33
5.2 Anisotropic UDF model Results..................................................................................34

6. REFERENCES .. 35

4|P a g e

Introduction
1.1 Background of Turbulence
There are many opportunities to observe turbulent flows in our everyday surroundings,
whether it be smoke from a chimney, water in a river or waterfall, or the buffeting of a
strong wind. In observing a waterfall, we immediately think that the flow is unsteady,
irregular, seemingly random and chaotic, and surely the motion of every droplet or eddy
is unpredictable. In the plume seen by a solid rocket motor turbulent motions of many
scales can be observed, from eddies and bulges comparable in size to the width of the
plume, to the smallest scales that the camera can resolve. The features mentioned in
these two examples are common to all turbulent flows.

Study of this natural phenomenon is one of the most complicated and exciting fields of
research that raises many issues and this is a key feature in a large number of application
fields, ranging from engineering to geophysics to astrophysics. It is still a dominant
research topic in fluid dynamics, and several conceptual tools developed in the
framework of turbulence analysis have been applied in other fields dealing with
nonlinear chaotic phenomena (e.g. non-linear optics, non-linear acoustics etc.).

The scientific study of turbulence did not begin until late in the nineteenth century. The
first substantial step was the publication in 1883 of the paper by Osborne Reynolds. He
described how a smooth flow of water through long circular tubes with diameters
ranging from about 0.6 to 2.5 cm is disrupted and cannot be sustained when the mean
speed of flow, U, exceeds a value that is related to the tube diameter, d and to the
viscosity of water. In his laboratory experiments Reynolds introduced a thin line of dye
into the water entering through one end of the horizontal tube from a large tank of
stationary water. He described his observations as follows;
When the velocities were sufficiently low, the streak of color extended in a beautiful
straight line through the tube. But as the velocity was increased by small stages, at
some point in the tube, always at a considerable distance from the intake, the color
band would all at once mix up with the surrounding water; and fill the tube with a mass
5|P a g e

Of colored water. On viewing the tube by light of an electric spark, the mass of color
itself resolved itself into a mass of more or less distinct curls, showing eddies.

Reynolds remarkable experiments show that the laminar flow, the smooth flow
through the tube at low flow speeds breaks down into a random eddying turbulent
motion at higher speeds when a non-dimensional number now known as Reynolds
number
Re=
exceeds a value of 1.3 10 .

Despite more than a century of research and a number of important insights, a complete
understanding of turbulence remains elusive, as witnessed by a lack of fully satisfactory
theories of such basic aspects such as transition and the Kolmogorov spectrum. Most
of the problems raised in turbulence are often explained based on theories and models
that introduce closure issues and are supported by more and more numerical
experiments.

Turbulence is arguably the most challenging area in fluid dynamics and the most
limiting factor in accurate computer simulation of engineering flows. It constitutes a
classical multi-scale problem, which is far beyond human intuitive understanding and
beyond resolution capabilities of even the most powerful modern parallel computers.
Turbulence has been described by Nobel-prize winning physicist Richard Feynman as
the most important unresolved problem in classical physics. An even more
pronounced quote is associated to Werner Heisenberg: When I meet God, I am going
to ask him two questions: Why relativity? And why turbulence? I really believe he will
have an answer for the first.

From a more pragmatic standpoint, however, one could argue that a complete
understanding of turbulence is not required (and there is actually no indication that
humans can comprehend complex nonlinear problems), but a sufficiently accurate
solution of the underlying equations (better, a general method for achieving those)
6|P a g e

would suffice. Such numerical methods exist and allow a direct numerical simulation
(DNS) of NavierStokes equations for all turbulence scales in space and time.
However, due to the inherent scaling laws of turbulence, DNS can be applied only to
very low Reynolds (Re) numbers and very simple and limited geometries. The
numerical effort for DNS scales with Re , and with technical Re numbers in the range of
3

104 to 109, practically no numerical solution for flows of interest to engineers can be
obtained. Turbulence modeling is the attempt to develop approximate formulations that,
despite our incomplete understanding and limited computational resources, allow
engineers to obtain approximate solutions for their pressing technological applications.
When dealing with turbulence models, keep in mind that they often need to bridge a
gap of many orders of magnitude in computing power relative to DNS. The order of
CPU reduction of RANS methods relative to DNS for technical applications is
astronomic (easily reaching 1010 and more) such models, therefore, are not simply
models, but they alter and redefine the equations solved. Industrial users are often
disturbed by RANS-related inaccuracies in their CFD solution relative to data.
Considering the above challenge, such differences cannot always be avoided. Finally,
not all differences between numerical results and experimental data are automatically a
result of turbulence modeling; there are many other sources of error that should be
considered before casting a judgment on a model.

Industrial CFD codes have to cover a wide range of applications from aerodynamics to
internal flows, flows with heat and mass transfer to inherently unsteady applications.
There are numerous areas of turbulence interaction with other physical effects, like
combustion or acoustics. Obviously, no single model (or modeling approach) can cover
all such applications, and numerous modeling concepts need to be developed. On the
other hand, it would not be appropriate to simply program an indiscriminate number of
models into industrial CFD codes, as it would have severe negative effects on the user
community. The first is that most models published are not industrial-strength,
meaning they have severe weaknesses that prevent efficient use for complex problems.
The most prominent limitation is numerical robustness, as many new models are
applied only to generic test cases with relatively simple geometries and high-quality
grids. When faced with less-optimal conditions, they often pose severe challenges to
the solver and, in many cases, lead to numerical instabilities. Most models based on the
7|P a g e

low-Re -equations fall into this category. Furthermore, models often feature many
complex nonlinear terms, which are designed to resolve a very specific problem in
generic tests, but the side effects of such terms in complex flows are not sufficiently
considered. From a coding standpoint, it is desirable to limit the number of models, as
otherwise implementation quality will suffer and the user cannot rely on the correct and
optimal programming of equations. Support teams need to understand turbulence
models to ensure proper response to customer problems in a short timeframe. An
oversupply of models severely limits the engineering teams ability to properly help
customers and supply best-practice advice. Finally, the different models and submodels have to work properly in combination (for example, turbulence and transition,
etc.). For these reasons, it is necessary to provide a limited number of preselected
models that are:
Well understood and tested
Correctly implemented and documented
Accurate for certain classes of flows
Robust even for non-optimal grids
Interoperable with other models and sub-models
Supported by test cases

In both engineering and academia the most frequent employed turbulence models are
the Eddy-Viscosity-Models (EVMs). Although the rapidly increasing computer power
in the last decades, the simplistic EVMs still dominate the CFD community.

The landmark model is the k- model of Jones and Launder which appeared in 1972.
This model has been followed by numerous EVMs, most of them based on the equation
and an additional transport equation, such as the k-, models. With the emerging Direct
Numerical Simulations (DNSs), it has now been possible to improve the EVMs,
especially their near-wall accuracy, to a level not achievable using only experimental
data. The first accurate DNS was made by Kim et al. albeit at a low Reynolds number
Re = 180 and for a simple fully developed Channel flow test-case. Today however,
DNS's are made at both interesting high Reynolds numbers, and of more complex flows,
enabling accurate and advanced EVMs to appear.

8|P a g e

This paper will try to explain these newly developed EVMs which are based on DNSdata. A number of turbulence models are compared with both DNS-data and
experimental data for different flows. Particularly interesting is how these newer
models compare to the older, non-DNS tuned EVMs. The majorities of the different
ideas when modifying/tuning turbulence models, such as damping functions, boundary
conditions, etc. are included.
Although there is neither any hope nor intention to including all two-equation EVMs,
quite a number of them are tabulated and referenced.

ES

Time

3D

Aniso

Trans

DNS

LES

RANS-RSM

RANS-EVM

RANS-Algebraic N

Table 1: Turbulence models and physics. ES: The ability to predict the Energy-Spectrum, Time: whether
or not the computation is time accurate, 3D: if a 3D solution is required, Aniso: if the model predicts
anisotropic Reynolds stresses, Trans: if turbulence is a transported or local quantity.

1.2 Motive behind the Project


The state-of-art numerical ocean models like solves for turbulent quantities by solving
for the eddy viscosity (defined as the rate of mixing) through two equation models of
Mellor and Yamada (1982) or Canuto et al (2001). Full-fledged details of the terms
used in this section are given later. They use stability function based method to
determine the turbulent viscosity after solving for the turbulent quantities. This involves
computation of complex forms of stability functions. In the present thesis the author
deviates from this usual method and implement a formulation for eddy viscosity which
is based on Reynolds stress anisotropy. The II equation or the second invariant of
anisotropy, takes into account an improved model for the slow pressure strain rate.

The new model developed for the slow pressure strain rate uses the anisotropy of the
dissipation tensor which is not negligible as compared to the anisotropy of the turbulent
Reynolds stress tensor. The improved slow pressure strain rate model performs well as
9|P a g e

compared to the established Reynolds stress model of Speziale, Sarkar and Gatski
(abbreviated as SSG model) and in some of the cases it better reflects the experiments
than the SSG model. The slow pressure strain rate is then utilized to modify the II
equation model developed by Maity et al (2011). The II-equation model so developed
has been implemented in POM by replacing the Mellor-Yamada scheme with the new
formulation. Though the results do not show any significant progress than the existing
results the formulation so implemented is advantageous in that it is simpler and more
complete than the MY model where the return to isotropy is assumed to be
instantaneous.

10 | P a g e

Literature Review
2.1. Overview of Turbulence Modeling
The primary emphasis in this dissertation is upon the time-averaged Navier-Stokes
equation. The origin of this approach dates back to the end of the nineteenth century
when Reynolds (1895) published results of his research on turbulence. His pioneering
work proved to have such profound importance for all future developments based on
the concept of Reynolds averaging.

The earliest attempts at developing a mathematical description of turbulent stress


sought to mimic the molecular gradient diffusion process. In the spirit, Boussinesq
(1877) introduced the concept of a so-called eddy viscosity. As with Reynolds,
Boussinesq has been immortalized in turbulence literature. The Boussinesq eddyviscosity approximation is so widely known that few authors find a need to reference
his original paper.

Reynolds or Boussinesq did not attempt a solution of the Reynolds-averaged NavierStokes equation in any systematic manner. Much of the physics of viscous flows was a
mystery in the nineteenth century until Prandtls discovery of the boundary layer in the
year 1904. Focusing upon turbulent flows, Prandtl (1925) introduced the mixing length
(an analog of the mean free path of a gas) and a straightforward prescription for
computing the eddy viscosity in terms of the mixing length. The mixing-length
hypothesis, closely related to the eddy-viscosity concept, formed the basis of virtually
all turbulence modeling research for the next twenty years. Important early
contributions were made by several researches, most notably by von Krmn (1930).
In modern terminology, we refer to a model based on the mixing-length hypothesis as
an algebraic model or a zero-equation model of turbulence. By definition, an nequation model signifies that a model requires solving n additional differential
transport equations in addition to the transport equations that express conservation mass
conservation, momentum and energy conservation for the mean flow.

11 | P a g e

With the concept involved in mixing length hypothesis several modifications were
made to the model in successive years of research in turbulence. Prandtl (1945)
postulated a model in which the eddy viscosity depends upon the kinetic energy of the
turbulent fluctuations, k. This improved the ability to predict properties of turbulent
flows and it was a step forward to develop a more realistic mathematical description of
the turbulent stresses. Prandtl proposed a modeled partial-differential equation
approximating the exact equation for k. This improvement, on a conceptual level, takes
account of the fact that the turbulent stresses, and thus the turbulent viscosity or the
eddy viscosity, are affected by where the flow has been, i.e., upon flow history. This
led to the evolution of one-equation models in the area of turbulent research.

Though an eddy viscosity model that depends upon the flow history provides more
physically realistic model, there is still the need to specify a turbulence length scale.
Now, on dimensional grounds, viscosity has the dimensions of velocity times length. It
is thus essential to have an idea of the length scale of flow since it more or less
represents characteristic eddy size in a flow. Since such scales are different for each
flow, turbulence models that do not provide a length scale are referred to as incomplete
models. In other words, turbulence models should provide some advance information
about the flow, other than initial and boundary conditions. It has been found out that
though the incomplete models do not render much information, still they are not without
merit. In fact in many engineering applications they have proven to be of worth.

Keeping in view the above discussions, it is desirable to develop a turbulence model


that can be applied to a given turbulent flow by prescribing at most the appropriate
boundary and/or initial conditions. That is, no advance knowledge of any property of
the turbulence should be required for determining the flow features. Such a model is
referred to as a complete model. These models give an idea of the turbulent length
scale and hence the characteristic size of the eddy.

It was in 1942 that Kolmogorov introduced the first complete model of turbulence. He
introduced a second parameter , which he referred to as rate of dissipation of energy
in unit volume in unit time, other than having a modeled equation for k, the turbulent
kinetic energy. The inverse of served as the time scale in turbulence,

/ served as
12 | P a g e

the analog of mixing length and k served as analog of dissipation rate, . In this model,
satisfied a differential equation which is very much similar to that of the transport
equation for the turbulent kinetic energy k. The model, known as the k- model, is thus
referred to as two-equation model of turbulence as it solves for two transport
equations other than the transport equations for conservation of mass, momentum.
Though this model offered great anticipation, because of the insufficient computational
facilities to compute the differential equations these models went with practically no
applications in turbulence research.

The two equation models developed determined eddy viscosity with the aid of
Boussinesq assumption. It was only by Chou (1945) and Rotta (1951) that turbulence
models were developed which avoided the use of Boussinesq approximation which was
a major assumption in simplifying the turbulent dynamics. Rotta developed a
reasonable model for the differential equation of the turbulent stresses or the Reynoldsstress. These models are popularly referred to as stress-transport models or second
order closure models or second-moment closure models. These are also referred to
as seven equation models as these solve for six additional transport equations for the
turbulent stresses other than the transport equation for the turbulent length scale. The
introduction of the turbulent stress transport models straightway gives an advantage of
considering the history effects and non-local effects. Though these models involve
computational complexities they automatically accommodate complicating effects in
the flow like streamline curvatures or rigid body rotations. In eddy viscosity models,
these complications are taken care of through introduction of additional empirical
terms. As with Kolmogorovs, k- model, stress transport models also awaited
adequate computational requirements.

Thus all the above can be categorized into four main categories of turbulence models,
viz.
A. Algebraic (Zero-Equation) Models
B. One-Equation Models
C. Two-Equation Models
D. Reynolds Stress-Transport Models

13 | P a g e

The following discussions briefly introduce to the different models that are popularly
referred in turbulence modeling related research.

Algebraic Models. In these models, an algebraic equation is used to compute the


turbulent viscosity or the eddy viscosity. The Reynolds stresses are then calculated
using the Boussinesq approximation. This correlates the turbulent stresses with the
mean velocity gradient of the flow. Van Driest (1965) introduced a viscous damping
correction to the mixing-length model or the zero equation model or the algebraic
model, which has been included in virtually all algebraic models that are in use today.
Cebeci and Smith (1974) also refined the eddy-viscosity or mixing-length model to a
point that it can be used with great confidence for most attached boundary layers.
Though this model possesses algebraic simplicity in determining the turbulent length
scale, Baldwin and Lomax (1978) proposed an alternative algebraic model that enjoyed
widespread use in turbulence research for many years.

One-Equation Models. As discussed earlier when defining n-equation model, one


equation model refers to solving one additional transport equation for one turbulent
parameter, viz. the turbulent kinetic energy. The turbulent length scale is obtained from
an algebraic expression. Here also the Boussinesq assumption is used to calculate the
eddy viscosity. Of the four types of turbulence models described above, these one
equation model has enjoyed the least popularity and success. Perhaps the most
successful early model of this type was formulated by Bradshaw, Ferriss and Atwell
(1967). The reason being this model reproduced flow properties in best agreement with
the experimental data available then in the 1968 Stanford Conference on Computation
of Turbulent Boundary Layers [Coles and Hirst (1969)]. In the early nineties of the
twentieth century there had been renewed interests in one-equation models based on a
postulated equation for eddy viscosity [c.f. Baldwin and Barth (1990), Goldberg (1991)
and Spalart and Almaras (1992)]. This was due to the ease with which the one-equation
models gave a rough estimate of the eddy viscosity in comparison with the two equation
models or the Reynolds stress transport models. Of the one-equation models, literature
survey reveals that Spalart and Almaras model was perhaps the most accurate for
practical turbulent-flow applications.

14 | P a g e

Two-Equation Models. The two equation models solve for two additional transport
equations other than the continuity and momentum transport equations. While
Kolmogorovs k- model was the first of this type, it remained unutilized till the
development of computers. The most useful two equation model is that of Launder and
Spalding (1972). Launders k- model is very well known and is the mostly used two
equation model,

being the turbulent dissipation. Even the models demonstrable

inadequacy for flow with adverse pressure gradient [Rodi and Scheuerer (1986),
Wilcox (1988a, 1993b) and Henkes (1998a)] could hardly do anything to discourage its
widespread use. Several modifications were adopted in this model by the continuing
succession of his students and colleagues. Without any prior knowledge of
Kolmogorovs work, Saffman (1970) formulated another k- model that enjoyed
advantages over the k- model. This is mainly due to the integration carried out through
the viscous sublayer and due to taking into account the effects of adverse pressure
gradient. Many further developments in the k- model have been carried out by Wilcox
and Alber (1972), Saffman and Wilcox (1974), Wilcox and Traci (1976), Wilcox and
Rubesin (1980), and Wilcox (1988a). In 1986, it was pointed out by Lakshminarayana
that the k- models are the second most widely used type of two-equation turbulence
model.

Reynolds Stress-Transport Models. By early seventies in the twentieth century,


computational resources slowly became more and more available to compute the
complex computations in solving transport equations for the Reynolds stresses. Among
the noted works, those of Donaldson [Donaldson and Rosenbaum (1968)], Daly and
Harlow (1970) and Launder, Reece and Rodi (1975) are praise worthy. The latter has
become the baseline stress-transport model: more recent contributions by Lumley
(1978), Speziale (1985, 1987a, 1991) and Reynolds (1987) have also provided
mathematical rigor to the turbulence closure process. Although significant
contributions have been made till then, still the complexity involved limits the use of
stress transport models to simple engineering and industrial applications when
compared to algebraic models or the two equation models.

Turbulence models have been created that fall beyond the bounds of the four categories
cited above. This is true because model developers have tried unconventional

15 | P a g e

approaches in an attempt to remove deficiencies of existing models of the four basic


classes. In this dissertation focus is on one type of Reynolds stress model depending
on anisotropy. The primary emphasis is upon examining the underlying physical
foundation and upon developing the mathematical tools for analyzing and testing the
model.

2.2. Summary
In the current chapter, we have given a literature survey about the various developments
in turbulence starting with the work of Prandtl. Though a lot of research has gone into
the study of mixed length models, one equation models and two equation models, little
work has been done in the topic of anisotropic models. In this thesis, we have taken the
anisotropy of turbulence as the basic variable in the turbulence modeling and gone
ahead with devising the Reynolds stress model.

16 | P a g e

Eddy Viscosity Models


3.1 Introduction
The two-equation EVMs, which all use the turbulent kinetic energy as one of the solved
turbulent quantities. Apart from the transport equation for k, the models add another
transport equation for a second turbulent quantity. The main difference between these
EVMs is the choice of this quantity.

The commonly accepted idea is that the eddy-viscosity may be expressed as the product
of a velocity scale and length scale. Thus the obvious choice would be, to combine ,
with l. Although its logical construction this combination has not been used with any
two-equation turbulence model.

Instead of velocity-length scale model the overwhelmingly majority of the used twoequation EVMs are based on the k- concept, which use the dissipation, , in the kequation to construct the eddy-viscosity. The subsequent relation is based on
dimensional reasoning, and as such is no improvement compared to a k-l model.
However using the k- concept one avoids the additional complication of how to model
the dissipation rate in the k-equation.
The k- models originally developed by Kolmogorov, however more recently
promoted by Wilcox, uses the reciprocal to the time scale or vorticity. This secondary
quantity is however more commonly referred to as the specific dissipation rate of
turbulent kinetic energy.

The major differences and also benefits of using either of the above mentioned types of
two-equation EVMs are:
1. The used secondary turbulent quantity, and its boundary condition.
2. The way the turbulent is modelled.
3. Modelling of the exact terms in the -equation.

17 | P a g e

3.2 Anisotropy in Turbulence


The value of anisotropy is a determining factor in the development of two equation
models. Anisotropy varies throughout the energy cascade spectrum. Smaller eddies at
high Reynolds numbers are highly anisotropic than the large eddies. These ideas lead
to the concept of a complicated variable known as eddy viscosity. Eddy viscosity is
defined as a proportionality constant between the Reynolds stresses and the mean strain
rate. This is what is famously referred to as Boussinesq eddy viscosity assumption
which postulates that Reynolds stress tensor,

, is proportional to the mean strain rate

tensor, Sij and is represented as :

=2
where
=

=
+

(3.1)
,

represents the Reynolds stress components,

is the strain rate of the mean flow,

represents a scalar property

called the eddy viscosity and is normally computed from the two transported variables,
k which is the turbulent kinetic energy and

which is the Kronecker delta.

From its very inception the Boussinesq eddy viscosity assumption helped in the
simplification of the complicated phenomenon of turbulence. It is a powerful
assumption in that it is a huge simplification allowing one to think of the effect of mean
flow on turbulence in the same way as molecular viscosity affects a laminar flow
(referred to as the Newtonian law). However, the main principle in two equation models
is that the eddy viscosity depends on the complex structure parameter(

). These two-

equation models (including the k-kl model known as Mellor-Yamada model (MYM))
approximate the eddy viscosity as,
=
In the above expression

(3.2)

is the turbulent eddy viscosity =

parameter, k is the turbulent kinetic energy and

is the structure

is the rate of turbulent kinetic energy

dissipation. The above relation is reflected in the works of Kolmogorov et.al (1942) and
Prandtl (1945). Thus a lot of information on second moments is now contained in the
rather-complicated, non-dimensional structure parameter

. Therefore it is very

important that we model this structure parameter or stability function accurately.


18 | P a g e

Pioneering work on geophysical turbulence started with Mellor and Yamada (1982)
proposing their k-kl model, k being the turbulent kinetic energy and l being the integral
length scale. The two unknowns, k and kl are solved using transport equations just like
in the k- model. In addition, they proposed eddy viscosities as functions of stability
functions (structure parameters). It is to be mentioned here that Launder in his work on
two equation (k-) models set the structure parameters as constants. In MYM (1982),
they are treated explicitly as functions of shear and buoyancy, the two quantities on
which turbulence production depends. This parameterization was subsequently
improved upon over the years with notable contribution coming from Kantha and
Clayson (1994) followed by Canuto et al 2001, whereby the form of the structure
parameter was modified to include the effects of vorticity and anisotropy. These
parameterizations led to improved prediction for viscosities because the value of critical
Richardson's number (Ricr) for buoyancy is increased to unity as it should in the
presence of non-linear instabilities. This value of unity is both a necessary and sufficient
condition for turbulence to die out (Abarbanel, 1984).

We have come up with an eddy viscosity formulation that obviates the need for
calculating the structure parameter. Jovanovic et al. (2000) has already come up with
formulation by a totally different method. Our derivation here is very simple and easy
to use. In the current chapter the focus is on that formulation. This is done by making
the eddy viscosity a function of the anisotropy invariant (defined in the following
pages).

However the transport equation for the second invariant of anisotropy, II , is simplified
using Craft et al (1997) for our study of geophysical domain. It should be stressed here
that this formulation is more exhaustive than the used structure parameter approach in
that it also incorporates the degree of anisotropy in addition to the turbulent stresses
which makes it superior to any two equation model. With it we have the additional
advantage of not having to model the complex structure parameters.

19 | P a g e

3.3 Eddy Viscosity Formulation


The Reynolds stresses appearing as unknowns in the momentum equations are
determined in the turbulence model either by turbulent eddy viscosity hypothesis or
directly from modeled Reynolds stress transport equation. As stated before, definition
of eddy viscosity follows Boussinesq (1877) approximation, which stands as the
building block of two-equation model,
U i U j
ui u j t

x
x i
j

2
k ij
3

(3.3)

This Boussinesq assumption provides closure to RANS equations.


General time-averaged Navier Stokes equations can be written in tensor form as
=

with

(3.4)

Now we rewrite the equation 2 in terms of anisotropy aij, defined as;

aij

ui u j

1
ij
2k 3

(3.5)

This gives,

aij 2 t

Sij
2k

(3.6)

There is a slight problem with this equation. Equation (3.6) implies that the Reynolds
stress is aligned with the mean strain rate, which is found to be untrue by many scientists
(Tao et al., 2000). In fact, it has been found that the stress tensor has a preferred
orientation of 34 - 45 with respect to the mean strain rate. It is seen that the nonalignment of the vectors mainly arises due to the (aik S kj + aik Vkj + S ikVkj + S jkVki ) term
which will exist in (3.6). Here Vij is vorticity. Therefore it goes beyond doubt that the
anisotropy should depend on vorticity as well, and we are working on improving this
model by inclusion of extra terms in equation (3.6). It has already been shown that once

20 | P a g e

these extra vorticity terms are removed from the model, the stress rate aligns parallel to
the mean strain rate, as it does in the current model.
From equation (3.6) it follows directly that
Sij

aij a ji 2 t

2k

II

(3.7)

where II is defined as the second invariant of anisotropy tensor, Lumley (1978). From
this, we get the expression for eddy viscosity as,
1/ 2

t II

k
S

(3.8)

12

where S Sij S ji , Sij is the mean rate of strain tensor which is analogous to viscous
stress in the Newtonian fluid.
A similar expression was derived by Jovanovic et al (2000) but it was after a lot of
unnecessary assumptions and mathematics.
We show below in Fig 3.1 the results of equation (3.6) with DNS data of Rogallo
(1981). The performance of this new equation (3.7) is as good as possible with the
Boussinesq assumption. The results are this accurate because the only assumption in
deriving the expression for eddy viscosity is the Boussinesq approx. whereas in the
stability function method, many more approximations and corrections are used.
A very promising tool for representing the effect of anisotropy is the anisotropy
invariant map (or it can also be represented as the Lumley triangle, Lumley, 1978)
which is a invariant space between II and III (the second and third invariants). Figure
2 represents this triangle. The physically realizable turbulence possibilities occur inside
the triangle. The different sides represent axisymmetric expansion or contraction and
2-component turbulence. The three vertices of the triangle represent the case for
isotropic two-dimensional turbulence, isotropic three-dimensional turbulence and onedimensional turbulence. The limiting cases of eddy viscosity for these three vertices
will be (The values of II have been derived from Pope, 2000, page 395).

21 | P a g e

Fig 3.1: A plot of anisotropy aij against

II 1 2 . Sij S for axisymmetric turbulence from Direct

Numerical Simulations of Rogallo (1981).

For isotropic 2D turbulence:


1/ 2

1
k
II 1 6 Implies t .
6 S

(3.9)

For isotropic 3D turbulence;

II 0 Implies t 0

(3.10)

For 1D turbulence;
1/ 2

2
k
II 2 3 Implies t .
3 S

(3.11)

22 | P a g e

Fig 3.2: Lumleys triangle

3.4 Summary
For anisotropic turbulence, the Reynolds stress tensor, ui u j , is usually anisotropic.
The second and third invariances of the Reynolds-stress anisotropic tensor aij are
nontrivial, where aij

ui u j

1
ij and k is the turbulent kinetic energy.
2k 3

It is natural to suppose that the anisotropy of the Reynolds-stress tensor results from the
difference in various Reynolds stress components which arises from turbulent
production, dissipation, transport, pressure-stain-rate, and the viscous diffusive tensors.
In the current chapter, we introduced the concept of anisotropy in the calculation of
eddy viscosity. The applications of this equation will be carried out in the coming
chapters.

23 | P a g e

Fluent

4.1 Governing Equations


Mean and Instantaneous Velocities
If we recorded the velocity at a particular point in the real (turbulent) fluid flow, the
instantaneous velocity (U) would look like this:

At any point in time:

The time average of the fluctuating velocity

But , the RMS of

K this is the sum of the 3 fluctuating velocity components : k =


0.5*

is not necessarily zero :

must be zero:

=0

Reynolds-Averaged Navier Stokes (RANS) in Fluent

This is the main tool used by engineers.

Equations are solved for time-averaged flow behavior and the


magnitude of turbulent fluctuations

24 | P a g e

RANS Equations and the Closure Problem

The time-averaging is defined as


= lim

( , )

The instantaneous field is defined as the sumo of the mean and the fluctuating
= +

component , such as

By averaging the Navier-Stokes equations, we obtain the Reynolds averaged


Navier-Stokes (RANS) equations:
+

Reynolds stress tensor,

=0

2
3

Eddy Viscosity Models (EVM)

These assume the stress is proportional to the strain (strain being the
gradients of velocity). The only new (unknown) quantity needed by EVMs is an
effective viscosity

2
3

Eddy viscosity is similar to molecular viscosity in its effect of diffusing


momentum.

Eddy viscosity is NOT a fluid property; it is a turbulent flow characteristic.


Unlike an isothermal laminar flow in which viscosity is a constant which
varies with position throughout the flow field

EVMs are the most widely used turbulence models for CFD.
25 | P a g e

4.2 The Universal Law of the Wall

The size of your grid cell nearest to the wall (value of y+) is very important.
The value you need depends on the modelling approach chosen.

In the near-wall region, the solution gradients are very high, but accurate
calculations in the near-wall region are paramount to the success of the
simulation.

4.3 Reynolds Stress Tensor

26 | P a g e

Rij is a symmetric, second-order tensor; it comes from averaging the


convective acceleration term in the momentum equation

Reynolds stress thus provides the averaged effect of turbulent (randomly


fluctuating) convection, which is highly diffusive

Reynolds stress tensor in the RANS equations represents a combination of


mixing due to turbulent fluctuation and smoothing by averaging.

SST k- Model Background


Many people, including Menter (1994), have noted that:

The k model has many good attributes and performs much better than k
models for boundary layer flows

Wilcox original k model is overly sensitive to the free stream value of ,


while the k model is not prone to such problem

Most two-equation models, including k models, over-predict turbulent


stresses in the wake (velocity-defect) regions, which leads to poor
performance in predicting boundary layers under adverse pressure gradient
and separated flows

The basic idea of SST k is to combine SKW in the near-wall region with
SKE in the outer region

4.4 FLUENT UDF


What is a User Defined Function?
A UDF is a function (programmed by the user) written in C which can be dynamically
linked with the Fluent solver.

Standard C functions (Trigonometric, exponential, control blocks, do-loops, file


i/o, etc.)

Pre-Defined Macros (Allows access to field variable, material property, and cell
geometry data and many utilities)

All data exchanged between the UDF and the solver must be in SI units

Why program UDFs?

27 | P a g e

a) Customization of boundary conditions, source terms, reaction rates,


material properties, etc.
b) Customization of physical models
c) User-supplied model equations
d) Adjust functions (once per iteration)
e) Execute on Demand functions
f) Solution Initialization

Interpreted vs. Compiled UDFs

UDFs can either be run compiled or interpreted.

a) The supported compiler for Fluent on Windows platforms is Microsoft Visual


Studio
b) Most Linux systems provide a C compiler as a standard feature.

Interpreted code vs. compiled code

Interpreted
C++ Interpreter bundled with Fluent

Interpreter executes code on a line by line basis instantaneously.

Advantage Does not require a third-party compiler.

Disadvantage Interpreter is slow, and cannot do some functions.

Compiled

UDF code is translated once into machine language (object modules).

Efficient way to run UDFs.

Creates shared libraries which are linked with the rest of the solver.

Does require a compilation step between creating/editing your UDF and using
it.

UDF Step by Step


The basic steps for using UDFs in Fluent are as follows:
1. Identify the problem to be solved
2. Check the usability & limitations of the standard models of Fluent

28 | P a g e

3. Program the UDF (must be written in C) i.e. Prepare the Source Code
4. Compile the UDF in the Fluent session

5. Hook the UDF in Fluent GUI

29 | P a g e

6. Assign the UDF to the appropriate variable and zone in BC panel


7. Solution Initialization
8. Run the calculation
9. Examine the results

30 | P a g e

User Access to Fluent Solver


31 | P a g e

CFD Flow Chart

Pre Processor

Geometry or Computational Domain


Grid Generation

Solver

Approximation of unknown variables


Discretisation
Solution
Fluent Solver using FVM

Post Processor

Vector plots
Line & Shaded contour plots
2D & 3D surface plots
Particle tracking

32 | P a g e

RESULT & CONCLUSION


For flow in a pipe various turbulence models were used to analyze the turbulence
characteristics like velocity profile, variation of Turbulence Kinetic Energy,
Turbulence eddy dissipation and pressure contours. Eddy viscosity variation along the
length of the pipe were then finally obtained and compared for k- model & eddy
viscosity formulation based on anisotropy.

5.1 k-

model results

Velocity contours along a transverse section located midway inlet & outlet
Velocity contour along the length of the pipe

Variation of Turbulence Kinetic Energy and Turbulence Eddy Dissipation


along the length of the pipe

33 | P a g e

Eddy Viscosity variation for k- model

5.2 Anisotropic

UDF model Results

Velocity contours
along a transverse
section located
midway inlet & outlet

Variation of Turbulence Kinetic Energy and Turbulence Eddy Dissipation


34 | P a g e

Eddy Viscosity variation for Anisotropic UDF model

35 | P a g e

REFRENCES
1. Carrica P, Wilson RV, Stern F (2006) Unsteady RANS simulation of the ship
forward speed diffraction problem. Comput Fluids 35:545570
2. Stern F, Wilson RV, Coleman HW, et al (2001) Comprehensive approach to
verification and validation of CFD simulationspart 1: methodology and
procedures. J Fluids Eng 123:793
3.

Wilson RV, Paterson E, Stern F (2000) Verification and validation for RANS
simulation of a naval combatant. In: Gothenburg 2000: A Workshop on
Numerical Ship Hydrodynamics. Chalmers University of Technology,
Gothenburg, Sweden

4.

Wilson R, Carrica P, Stern F (2005) RANS simulation of a container ship using


a single-phase level set method with overset grids. CFD Workshop Tokyo 2005,
911 March, Tokyo, Japan, pp 546551

5.

Carrica P, Wilson RV, Stern F (2006) An unsteady singlephase level set method
for viscous free surface flows. Int J Numer Methods Fluids (in press)

6.

Rhee S, Stern F (2001) Unsteady RANS method for surface ship boundary
layer and wake and wave field. Int J Numer Methods Fluids 37:445478

7.

Wilson R, Stern F (2002) Unsteady RANS simulation of a surface combatant


with roll motion.24th Symposium on Naval Hydrodynamics, July 813,
Fukuoka, Japan (CDROM)

8. Campana EF, Peri D, Tahara Y, et al (2004) Comparison and validation of CFDbased local optimization methods for surface combatant bow. 25th Symposium
on Naval Hydrodynamics, August 813, St. Johns, Newfoundland and
Labrador, Canada (CD-ROM)
9. CFD ONLINE Forum http://www.cfd-online.com/

36 | P a g e

You might also like