Sie sind auf Seite 1von 206

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

TABLE OF CONTENTS
SECTION 1: Lecture Notes
S.No.

Page
Topics

No.

Design and optimization of systems using computational fluid dynamics by Dr. Abdus Samad,
Assistant Professor, Department of Ocean Technology, Indian Institute of Technology Madras
Tackling Turbulent Flows in Engineering Using Large Eddy Simulation by Prof. Anupam Dewan,
Department of Applied Mechanics, Indian Institute of Technology Delhi
Grid Generation: An Introduction by Mr. Zafar Haider, Deputy Manager CAE, Mahindra and
Mahindra Limited
Lattice Boltzmann Method as an Alternative to Navier-Stokes Solvers, by Dr. Amit Gupta,
Assistant Professor, Department of Mechanical Engineering, Indian Institute of Technology
Delhi
Direct Numerical Simulation of Turbulent flows by Prof. Mirza Faisal S. Baig, Department of
Mechanical Engineering, ZHCET, AMU, Aligarh
Computing of Compressible flows by Dr. Nadeem Hasan, Associate Professor Department of
Mechanical Engineering, ZHCET, AMU, Aligarh
An Introduction to Turbulent Modeling by, Dr. Nadeem Hasan, Associate Professor and Dr. Syed
Fahad Anwer, Assistant Professor Department of Mechanical Engineering, ZHCET, AMU,
Aligarh

1.
2.
3.
4.
5.
6.
7.

3
14
18
30
42
55
77

SECTION 2: Hands on Session Tutorials on Fluent 6.3


S.No.

Page
Topics

No.

1.

Introduction to Mesh Generation

99

2.

Flow in a Two Dimensional Lid Driven Cavity at Re =1000 and 10,000

112

3.

Flow in a Two Dimensional Differentially heated Cavity at Ra = 5000

139

4.

Flow past a Two Dimensional Circular Cylinder at Re =40 and 100

153

5.

Inviscid Compressible Flow past a Forward Facing Step at Mach number 3.0

180

6.

Simulation of Turbulent flows past a Sphere at Re =1.14E06

191

By:
1.
2.
3.
4.
5.
6.

Dr. Nadeem Hasan, Associate Professor, Department of Mechanical Engineering, ZHCET, AMU, Aligarh
Dr. Syed Fahad Anwer, Assistant Professor, Department of Mechanical Engineering, ZHCET, AMU,
Aligarh
Mr. Jawed Mustafa, Guest Faculty, University Polytechnic, ZHCET, AMU, Aligarh
Mr. Rashid Ali, Guest Faculty, Department of Mechanical Engineering, ZHCET, AMU, Aligarh
Mr. P.A. Fuaad, Masters Student ,Department of Mechanical Engineering, ZHCET, AMU, Aligarh
Mr. Husain Mehdi, Masters Student ,Department of Mechanical Engineering, ZHCET, AMU, Aligarh

1|P a ge

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

SECTION 1: LECTURE NOTES

2|P a ge

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

Chapter 1
DESIGN AND OPTIMIZATION OF SYSTEMS USING COMPUTATIONAL
FLUID DYNAMICS
ABDUS SAMAD
Department of Ocean Engineering, Indian Institute of Technology Madras, Chennai
Email: samad@iitm.ac.in

SUMMARY
To alleviate the experimental expenses and time cost related issues, CFD tool is used to predict the flow
properties and design the fluid systems. The fluid systems are optimized via CFD techniques coupling
with optimization algorithms. As the CFD has several parameters and controlling those parameters needs
an expertise of the user of CFD tool. In the present article, application of CFD and optimization has been
discussed with examples.

1.1 INTRODUCTION
Fluid flows play an important role in various equipment and processes in the industry. Flows of air or
water are often used for cooling purposes. Information about the structure of the flow in a process or an
apparatus can be obtained from measurements in experimental test facilities or from flow visualization
studies. Although these techniques have proven to be of great importance, there are also limitations and a
full picture of the flow field is often hard to obtain in this way.
Computational fluid dynamics (CFD) is a technique to model fluid flow using a computer simulation.
Due to the recent rapid grow of powerful computer resources and the development of general purpose
CFD software packages, CFD is now being applied to solve industrial flow problems. In a computational
simulation the flow structure is computed by solving the mathematical equations that govern the flow
dynamics. The result is a complete description of the three-dimensional flow in the entire flow domain in
terms of the velocity field and pressure distribution, including profiles of temperature variations, density
and other related physical quantities [1].
The fundamental basis of almost all CFD problems is the NavierStokes equations, which define any
single-phase fluid flow. Two-dimensional codes, such as NASA Ames' ARC2D code first emerged. A
number of three-dimensional codes (viz. ARC3D, OVERFLOW, CFL3D) were developed. Numerous
commercial packages such as Ansys-CFD, Star CD etc are also available.
CFD modeling for practical applications
Flows in process installations are usually very complex. Many processes deal with flows consisting of
multiple phases or mixtures of several components and these flow properties have to be included in the
numerical simulation. The motion of bubbles or droplets in a flow can be modeled by seeding the
computed flow field with particles, which tracks are then traced as part of the solution of the flow
computation. The mean time the particles spent in the flow domain provides the residence times of the
droplets in the process. In mixing vessels the mixing of multi-component flows is modeled by introducing
passive scalars for each flow component. These scalars are advected by the main flow and the scalar
concentration is computed as part of the solution. The dispersion of these scalars in the flow is a measure
3|P a ge

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012
for the mixing performance in the vessel. In heat exchangers, furnaces or cooling equipment a
combination of effects of heat convection by the flowing medium and heat conduction in the solid
material requires inclusion of the solid material properties in the computation of the temperature profile.
The conjugate heat transfer between the fluid and the solid is based on a model for the thermal boundary
layer along the solid surface. In fans and turbines a part of the flow geometry rotates while in engines the
flow domain changes in time by the motion of pistons and valves. The time-variation of these flow
geometries is programmed in the numerical simulation and the transient flow field is solved according to
the geometrical variations.

1.2 CFD SOLUTION PROCEDURE


The CFD solution procedure contains common steps:
Geometry: The geometry (physical bounds) of the problem is defined.
Meshing: The volume occupied by the fluid is divided into discrete cells called the meshing.
The physical modeling is defined
Boundary conditions are defined. This involves specifying the fluid behavior and properties at the
boundaries of the problem. For transient problems, the initial conditions are also defined.
The simulation is started and the equations are solved iteratively as a steady-state or transient.
Finally a postprocessor is used for the analysis and visualization of the resulting solution.
1.2.1 Turbulence models
In studying turbulent flows, the objective is to obtain a theory or a model that can yield quantities of
interest, such as velocities. For turbulent flow, the range of length scales and complexity of phenomena
make most approaches impossible. The primary approach in this case is to create numerical models to
calculate the properties of interest.
The main difficulty in modeling turbulent flows comes from the wide range of length and time scales
associated with turbulent flow. As a result, turbulence models can be classified based on the range of
these length and time scales that are modeled and the range of length and time scales that are resolved.
The more turbulent scales that are resolved, the finer the resolution of the simulation, and therefore the
higher the computational cost. If a majority or all of the turbulent scales are modeled, the computational
cost is very low, but the tradeoff comes in the form of decreased accuracy.
1.2.2 Meshing
Applying CFD to flow problems was limited because of the complexity of the flow geometries. Recent
development of high speed computers has allowed solving complex problems using CFD solvers. To
perform a numerical simulation the flow geometry has to be represented by a computational mesh
consisting of a large number of computational cells. The flow field is solved in all these cells according to
the conservation equations describing the flow dynamics. The accuracy and resolution of the results
obtained depend on the number of cells defined: using more cells yields more details of the flow field on
the expense of more computational effort (i.e. computer memory and CPU-time). At this moment meshes
with cell numbers in the range between 100,000 to several millions are very commonly used; this number
is sufficient for solving practical industrial flow problems.
The quality of the computation depends on the quality of the mesh and therefore the generation of a good
mesh is another important stage in the preparation of a CFD simulation. Cells have to be distributed so
that cells of small sizes are clustered in regions of interest with severe flow gradients, leaving larger cells

4|P a ge

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012
in the ambient far field. Therefore, an impression of the flow field to be computed is necessary in advance
and the mesh has to be adjusted accordingly.
1.2.3 CFD solver
To solve the CFD equations, it is necessary to set boundary conditions. The parameters such as velocity,
pressure, mass flow rates etc are initially. Once this step is over, the other parameter such as convergence
criteria is set. The equations are solved iteratively and a check for convergence is required [2]. The result
is post-processed to get the desired output parameters and flow visualization.
1.2.4 Grid dependency test and validation
Increasing number of nodes does not imply that a good result can be achieved. The computer processor
speed or the complexity of geometry may not allow the convergence. Large number of node requires
longer time to get a solution. Reducing number of nodes may increase approximation error. Hence an
optimal number of nodes can be selected to get good result.
CFD requires a large number of parameters to set. Hence it is inevitable to validate the result with an
experimental of other results. Some cases such as simulation of fighter craft fluid flow may be a problem
to validate. In these types of cases, only the expertise of the engineers involved in CFD simulation is
sufficient.

1.3 OPTIMIZATION PROCEDURE


An optimization problem consists of maximizing or minimizing a real function by systematically
choosing input values from within an allowed set and computing the value of the function. The
generalization of optimization theory and techniques to other formulations comprises a large area of
applied mathematics. More generally, optimization includes finding "best available" values of some
objective function given a defined domain, including a variety of different types of objective functions
and different types of domains.
In engineering optimization, some objective is to be maximized or minimize by changing the input
parameters. For example a pressure drop in pile flow can be objective and the parameters can be pipe
number of bends, width and height of pipe etc. The pressure drop can be minimizing by changing the
variable values. There are single and multi-objective optimization procedures [2] and in the present
discussion a single objective optimization will be discussed.
If a system has a number of variables and system needs to be optimized, a systematic approach will
alleviate of trial and error method. Surrogate based modeling is such an approach (Fig 1). Using design
variables and objective functions, a response surface is created and optimum design is sought from the
surface. There are several surrogate models such as response surface approximation (RSA), Kriging,
artificial neural network (ANN), weighted average method (PBA) etc. Optimum designs can be obtained
from these surrogates by a search algorithm [2].
The Fig 2 shows a response surface created using the objective function and design variables. A red dot
on the surface shows the maxima of the function. Hence the corresponding design is the optimum design.

5|P a ge

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

Fig 1: Flow chart

Fig 2: response surface


1.3.1 Surrogate approach
Most engineering design problems require experiments and/or simulations to evaluate objectives and
constraints as function of design variables. For many real world problems, however, a single simulation
can be expensive in terms of time and cost. One way of alleviating this burden is by constructing
approximation models (known as surrogate models) that mimic the behavior of the simulation model as
closely as possible while being computationally cheaper to evaluate. Surrogate models are constructed
using a data-driven, bottom-up approach. A model is constructed based on modeling the response to a
limited number of intelligently chosen data points. An important distinction can be made between two
different applications of surrogate models. The first involves building small and simple surrogates for use
in optimization. Simple surrogates are used to guide the search towards a global optimum. Once the
6|P a ge

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012
optimum is found the surrogates are discarded. In the second case one is not interested in finding the
optimal parameter vector but rather in the global behavior of the system. Here the surrogate is tuned to
mimic the underlying model as closely as needed over the complete design space. Such surrogates are a
useful, cheap way to gain insight into the global behavior of the system.
The scientific challenge of surrogate modeling is the generation of a surrogate that is as accurate as
possible, using as little simulation evaluations as possible. The process comprises of three major steps
which may be interleaved iteratively:
Sample selection
Construction of the surrogate model and optimizing the model parameters
Appraisal of the accuracy of the surrogate.
The accuracy of the surrogate depends on the number and location of samples (expensive experiments or
simulations) in the design space. Various designs of experiments (DOE) techniques cater to different
sources of errors, in particular errors due to noise in the data or errors due to an improper surrogate
model. Some basic surrogate models are polynomial RSA, Kriging, Support vector machines (SVM) and
ANN.
1.3.2 Optimization algorithm
Sequential quadratic programming (SQP) has been used as an optimization algorithm that follows
Newtons method for constrained optimization in the manner of an unconstrained optimization problem.
In its basic form it replaces the objective function with a quadratic approximation and replaces the
constraint function by linear approximation. Its implementation consists of three steps, i.e., updating the
Hessian matrix of the Lagrangian function using a quasi-Newton updating method, solution of the
quadratic programming sub-problem, and the formation of a search direction for a line search procedure
using a line search and merit function calculation.

1.4 EXAMPLES OF PRACTICAL APPLICATION OF CFD SIMULATION AND


OPTIMIZATION
1.4.1 EXAMPLE 1: Electrical submersible pump design
An electrical submersible pump (ESP) (Fig 3) is a centrifugal pump and several impellers and diffusers
are fixed in an assembly to get desired head. The smaller the diameter, the less is the head per stage of
ESP. Hence it was great challenge to find proper design for narrow hole oil wells.
A small diameter (3.5 in.) electrical submersible pump was designed from the empirical relations. The
inlet angle, outlet angle, impeller height etc were calculated and efficiency and head was predicted. The
design was sent for computer aided design (CAD). Once the CAD design was done, the design was
converted to .step file and a CFD simulation was done to check if the empirical correlation based design
were good enough. Once the CFD results were obtained, the design modifications were done and the final
design were sent for manufacturing. The experimental result and the CFD predictions were compatible.

7|P a ge

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

Fig 3: Electric submersible pump


1.4.2 EXAMPLE 2: Heat transfer through turbine blade internal cooling passage
Turbine blade internal cooling passage shape was optimized by Samad et al [3]. Dimples on the channel
surface were placed to increase turbulence. As the dimples increases turbulence, it increases pressure drop
(Ff) as well as heat transfer rate (FNu). Heat transfer is desirable is this cools the blade maximum
temperature. Higher pressure drop implies a higher requirement of pumping power. Hence a design
optimization was done by changing the geometric design parameters.
Fig 4 shows the geometry, dimple orientation and flow domain. Dimple depth (d), spacing (S), channel
height (H) etc were design parameters (Table 1). By changing these parameters, different heat transfer
rate and pressure drops were obtained after solving through a CFD solver. Using optimization algorithms,
the optimization were done and it was found to increase the heat transfer surface performance.
1.4.2.1 Objective functions and design variables
Three design variables (Table 1) and two objectives were selected. A design space was created using the
lower and upper limit of the variables. Several designs were considered within the design space by
changing the design variable values within the design space. The designs were evaluated by a CFD solver
to find the objective function values. The evaluated results were used to construct approximation
functions. Finally optimized results were obtained. The objective function:

FNu

Ff

Where,
F: Combined objective function (COF)
FNu : heat transfer related objective function
Ff: friction loss related objective function
: weighting factor
In the problem the COF was minimized.
8|P a ge

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012
1.4.2.2 Results
Table 2 shows that the COF was reduced from 0.58 to 0.39. Fig 5 shows that the optimized profile has
higher heat transfer rate.

Internal cooling channel


(a) Turbine blade

Front view

Top view
(b) dimples on the surface

9|P a ge

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

(c) Flow domain and mesh (this shows the flow domain. Proper grid refinement is necessary to get proper
solution. Near wall grids are finer than the grids away from the wall.)
Fig 4: Dimple channel optimization

Table 1: Design variables


Design variable

Lower limit

Upper limit

H/d

0.2

1.5

Hd/d

0.1

0.3

d/S

0.30

0.57

Table 2: Results
Design Variables

Nua

Ff

H/d

Hd/d

d/S

Reference

1.155

0.289

0.499

2.34

1.71

0.58

Optimized

0.219

0.264

0.318

5.06

2.22

0.39

10 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

Reference

Optimized

Fig 5: Reference and optimized dimpled channel (Optimized profile shows an increase in heat transfer
rate.)
1.4.3 EXAMPLE 3: Compressor blade shape optimization
A single objective optimization was performed to optimize NASA rotor 37 (Fig 6) compressor blades.
Instead of simulating whole compressor, a single blade was designed and meshed. The benefit of using
single blade is that it reduces computational cost.

Fig 6: Compressor blade profile


1.4.3.1Objective functions and design variables
An objective function (ad) was considered and efforts were applied to minimize its value. The objective
function is given as:

Ptotal,exit / Ptotal,inlet
ad

( k 1) / k

Ttotal, exit Ttotal,inlet 1

Where,
ad is the adiabatic efficiency. In this problem it was maximized.
Ptotal,exit and Ttotal, exit are the total pressure and temperatures at compressor exit, respectively.
Ptotal,inlet and Ttotal,inlet are the total pressure and temperatures at compressor inlet, respectively.

11 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012
Several design variables were considered and sweep and lean (7) are among those. Table 3 shows the
ranges of design variables. An optimized profile of compressor blade were tried to find within these
limits.

(a) sweep

(a) Sweep

(a) Lean
Fig 7: Design variables
1.4.3.2 Results
After optimization it was found that 0.5% efficiency can be increased. The post process results (Fig 8)
show that the separation lines have been moved and efficiency increased.
Table 3: Design variables
Design variables

Lower limit

Upper limit

Sweep,

0.0

0.25

Lean,

-0.036

0.000

12 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

Reference blade

Efficiency Optimized blade


Fig 8: Stream lines

CONCLUDING REMARK
CFD method can be widely used to design and to optimize the systems. The design can be from the first
principle from an existing design. A numerical simulation can be considered to be an idealized
experiment with well-defined boundary conditions, being perfectly reproducible with full control of the
initial flow properties. Contributions of effects of heat and mass transfer and other physical or chemical
processes that are included in the simulation, can be studied individually just by changing or switching
them on and off in a series of simulations. However, the results of the calculations represent a flow-model
obeying the physics and boundary conditions imposed by the user. Proper physical modeling of the fluid
flow investigated is therefore a very important step in preparing a CFD simulation, since it dominates the
applicability of the results obtained later. This requires solid knowledge and justification of the models of
all physical and chemical processes taken into account in the computations. Despite the overwhelming
amount of possibilities and advantages of the present CFD codes, the role of this new tool should not be
exaggerated. Although vendors of commercial CFD software claim that their codes do not require
specialized knowledge of CFD, some knowledge is principally indispensable.
REFERENCES:
1. Eisenga, AHM, Application of CFD in the Industry CFD for Process-Technological Flow
Problems, http://www.cyclone.nl/npt/npt.htm, accessed on January 25, 2012.
2. Samad, A., Numerical Optimization of Turbomachinery Blade Using Surrogate Models, PhD
Thesis, Inha University, republic of Korea, 2008.
3. Samad, A. Lee, K.D. and Kim, K.Y., Shape Optimization of a Dimpled Channel to Enhance Heat
Transfer Using a Weighted-Average Surrogate Model, Heat Transfer Engineering, 31(13):1114
1124, 2010.

13 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

Chapter 2
TACKLING TURBULENT FLOWS IN ENGINEERING USING LARGE EDDY
SIMULATION
ANUPAM DEWAN
Department of Applied Mechanics, Indian Institute of Technology Delhi, New Delhi 110016
Email: adewan@am.iitd.ac.in

We encounter turbulent flows almost everywhere, for example, atmospheric and ocean currents, discharge
of pollutants, oil transport in pipelines, flow through pumps and turbines, and the flow in boat wakes and
around aircraft wing tips. Turbulent flows are characterized mainly by unsteadiness, vorticity, threedimensionality, dissipation, wide spectrum of scales, and large mixing rates. Turbulent flows are
extremely complex. In contrast, laminar flows are realized mostly in laboratories or in special situations.
Fluid turbulence remains one of the biggest challenges to scientists and engineers and therefore it
continues to be an active research topic (Dewan, 2011).
Numerical methods have an important role in the computation of turbulent flows. Different
approaches can be used to study a turbulent flow. The first approach is based on the use of equations
obtained by averaging the equations of motion and the resulting equations are termed as the ReynoldsAveraged Navier-Stokes (RANS) equations. In this approach, different types of turbulence models are
used to close the system of governing equations and these depend on the number of additional transport
equations used for the closure. Different types of models are categorized as (a) the simplest algebraic
(zero-equation) models; (b) One-equation models; (c) The widely used two-equation models; and (d) the
most complex Reynolds-stress transport models.
In the second approach, instantaneous, three-dimensional flow field is obtained by solving the
corresponding Navier-Stokes equations. This method of numerically obtaining the turbulent flow field is
further sub-divided into two types: LES and DNS. In Large Eddy Simulation (LES) unsteady, threedimensional Navier-Stokes equations are solved for the large scale motions of flow while approximating
or modelling only the small scale motions and these models are termed as the sub-grid scale (SGS)
model. In Direct Numerical Simulation (DNS) unsteady, three-dimensional Navier-Stokes equations are
solved for all scales in a turbulent flow and this method requires extremely large computer resources
because all scales in space and time ranging from the smallest Kolmogorov scale to the largest scale,
which are approximately equal to the geometry being investigated, are resolved. The spatial mesh
requirement in a DNS goes as Re9/4 and number of time steps also grows as a power law of the Reynolds
number as Re3/4 . Although DNS studies are limited to low Reynolds number, detailed results provided
by DNS, e.g., budgets of different turbulent quantities, can be quite useful to develop a new RANS based
turbulence model. In LES, a filtering operation is performed over the governing equations to separate the
motion of the small scales from the large scales. The small-scale turbulence is weaker, contributing less to
the Reynolds stress and therefore less critical. Also, it is more nearly isotropic and has nearly-universal
characteristic and therefore it is easy to model small eddies (Wilcox, 2006). Thus, a coarser grid and
much larger time steps can be chosen in a LES as compared to the grid size and time steps used in DNS.
Hence, for a given computational cost it is possible to simulate flow with much higher Reynolds number
than that with DNS. Issues related to RANS based turbulence models, LES and DNS will be discussed in
the lecture.

14 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012
The second part of the lecture will deal with large eddy simulation of turbulent jet impingement
heat transfer. This is topic on which PhD student Mr. Rabijit Dutta is working with me and my colleague
Dr. Balaji Srinivasan as his thesis supervisors. Jet impinging flow has been one of the widely studied flow
configuration in the last five decades, because of its fundamental as well as wide industrial applications in
heating, cooling and drying applications. The flow structure of a jet impinging flow is very complex
consisting of free-shear region, stagnation region and streamline curvature (Figure 1). Figure 2 shows the
surface Nusselt number distributions on the impingement plate obtained using four different RANS based
turbulence models (for the steady flow) and comparison with the corresponding experimental data of
Beitelmal et al. (2006). It can be seen that none of the turbulence models can accurately predict the
Nusselt number at the impingement point, called the stagnation Nusselt number, and the overall Nusselt
number distributions. This is because of a simple turbulence model is not able to capture the complex
nature of the jet impingement flow.
When the jet is issued from a small distance from the plate the surface Nusselt number
distribution shows a secondary peak at some distance from the impingement point. The steady RANS
models are also not capable of predicting this secondary peak in the Nusselt number. Hadziabdic and
Hanjalic (2008) reported that the secondary peak in the Nusselt number is associated with the formation
of secondary vortices at the impingement wall and the corresponding unsteadiness in the flow. Therefore,
large eddy simulation (LES) can accurately predict the flow and heat transfer characteristics of the jet
impinging flow. However, LES at a higher Reynolds number is not feasible because of its higher
computational needs near the walls. Detached eddy simulation (DES) is a technique, where a RANS
based model is used near the wall and LES is performed in the regions away from the wall. DES is now
widely used in industrial flows where RANS based models are not capable of simulating the flow
(Dewan, 2012). Figure 3 shows a snapshot of pressure and velocity contours at flow time 0.121 s taken
from our detached eddy simulation (DES) which was conducted in a parallel version of FLUENT 6.3.26
in a workstation with four processors. DES captures the complex nature of the impinging flow.

Figure 1: Different regions of a jet impingement flow (Dewan et al., 2012).

15 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

Figure 2 Comparison of different turbulence models for turbulent jet impinging flow (here SA denotes
Spalart-Allmaras).

Figure 3 Instantaneous static pressure and velocity magnitude contours (at a flow time of 0.121 s) in a jet
impinging flow.
The objective of the present study is to perform LES, DES and Unsteady RANS computations and
compare their relative usefulness in computing impinging flows with a high accuracy and using
reasonable computational time. The other objective of the present study is to perform LES to assess the
transport equations of different RANS based turbulence models and, accordingly modify existing
turbulence model to account for the complexities of impinging flow. Initially, computations have been
performed with the standard and dynamic Smagorinsky SGS models at different grid sizes and the
computed results have been compared with the corresponding experimental data reported in the literature.
All the simulations have been performed using the finite-volume based commercial software FLUENT
6.3.26. The details of the governing equations, SGS model, computational procedure and results will be
presented in the lecture.

16 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

REFERENCES
1. A.H. Beitelmal, A.H. Shah, M.A. Saad, 2006, Analysis of an Impinging Two Dimensional Jet, J.
Heat Transfer, Vol. 128, pp. 307310.
2. A. Dewan, 2011, Tackling Turbulent Flows in Engineering, Springer.
3. A. Dewan, R. Dutta and B. Srinivasan, 2012, Recent Trends in Computation of Turbulent Jet
Impingement Heat Transfer, Journal of Heat Transfer Engineering, Vol. 33, pp. 447-460.
4. M. Hadziabdic and K. Hanjalic, 2008, Vortical Structures and Heat Transfer in a Round Impinging
Jet, Journal of Fluid Mechanics, Vol. 596, pp. 221-260.
5. D.C. Wilcox, 2006, Turbulence Modeling for CFD, La Canada, California, USA, 2006.

17 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

Chapter 3
GRID GENERATION: AN INTRODUCTION
ZAFAR HAIDER
Deputy Manager CAE, Mahindra and Mahindra Limited
Email: HAIDER.ZAFAR@mahindra.com

3.1 INTRODUCTION
CFD of today is marked by the simulation of flows past complex geometries and/or utilizing complex
physics. A comparison between the impact of the numerical technique and the computational grid used
reveals that in many cases grid effects are the dominant factor on the accuracy of the flow solution.
Mesh generation has evolved to the point where highly complicated domains can be covered by a variety
of mesh types including hexahedral and tetrahedral meshes. The application of these methods to
computational fluid dynamics has become a routine exercise and numerical predictions, for example, over
complete aircraft now complement experimental results obtained from wind tunnels.
An essential step in scientific computing is to find a proper discretization of a continuous domain. This is
the problem of mesh generation. Once we have a discretization or sometimes we just say a mesh,
differential equations for flow, waves, and heat distribution are then approximated by different numerical
formulations. However, not all meshes are equally good numerically. Discretization errors depend on the
geometric shape and size of the elements while the computational complexity for finding the numerical
solution depends on the number of elements in the mesh and often the overall geometric quality of the
mesh as well.

3.1 What is a Grid?


A mesh/grid is an artificial geometric construction that facilitates the spatial
discretization of the governing equations to be solved.
The mesh determines the locations in the field where the variables will be evaluated
and the stencil of the discrete equations.

3.2 Why is a grid needed?


The grid:
Designates the cells or elements on which the flow is solved.
Is a discrete representation of the geometry of the problem.
Has cells grouped into boundary zones where boundary condition/s are applied.
The grid has a significant impact on:
Rate of convergence (or even lack of convergence).
Solution accuracy.

18 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012
CPU time required.
Importance of mesh quality for good solutions:

Grid density.
Adjacent cell length/volume ratios.
Skewness.
Tetrahedral vs. hexahedral elements.
Boundary layer mesh.
Mesh refinement through adaption.

The final accuracy and efficiency of any numerical solution are highly dependent on the particular
meshing strategy and mesh density distribution employed. A good matching of the strengths and
weaknesses of the grid generation and flow solution techniques and a strong and favourable interplay
between the two is the key to an efficient overall numerical solution.

3.3 Geometry
The starting point for all problems is geometry.
The geometry describes the shape of the problem to be analysed.
Can consist of volumes, faces (surfaces), edges (curves) and vertices (points).
Geometry can be simple or complex and accordingly mesh generation complexity varies.

3.4 Geometry Creation


Geometries can be created top-down or bottom-up.
Top-down refers to an approach where the computational domain is created by
performing logical operations on primitive shapes such as cylinders, bricks, and
spheres.
Bottom-up refers to an approach where one first creates vertices (points), connects
those to form edges (lines), connects the edges to create faces, and combines the
faces to create volumes.
Geometries can be created using the same pre-processor software that is used to create the grid, or created
using other programs (e.g. CAD, graphics).

3.2 CLASSIFICATION OF MESHING STRATEGIES


3.2.1 Structured Mesh
Physical location of any mesh point and the identity of its neighbours are known implicitly. Physical
locations may have to be stored.

3.2.2 Cartesian Mesh


Mesh generation is trivial. The grid points and their connectivity are known implicitly. Methods can be
extended to complex geometries using cut-cell approach.

19 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012
i,j,k indexing to locate neighboring cells.
Grid lines must pass all through domain.
Obviously cant be used for very complicated geometries

Figure 1: Mapping of Physical Domain into Computational Domain

3.2.3 Body-Fitted Mesh


Grid lines/surfaces conform to the boundary lines/surfaces. It is mapped Cartesian-type mesh, where the
boundaries of the mesh coincide exactly with the boundaries of the physical domain (figure 1).

3.2.4 Overset Mesh


Multiple overlapping grids to discretize the domain, the solver interpolate values between the various
grids in the regions of overlap (figure 2).

Figure 2: An Example of an Overset Mesh

3.2.5 Block-Structured Mesh


The domain is decomposed into a number of topologically simpler domains and each domain is meshed
independently with a structured grid (figure 3).
The grid can be made up of (somewhat) arbitrarily-connected blocks.
20 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012
More flexible than single block, but still limited.

Figure 3: An example of a Structured Multi-Block method

3.2.6 Unstructured Mesh


Physical location of a mesh point and the identity of its neighbors, i.e., the connectivity of the mesh are to
be determined explicitly (figure 4).
Elements are generally triangles and tetrahedrons but need not be.

Figure 4: An example of a Unstructured mesh

3.2.7 Hybrid Mesh


It is a combination of the Structured and unstructured mesh.
Use the most appropriate cell type in any combination.
Triangles and quadrilaterals in 2D.

21 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012
Tetrahedral, prisms and pyramids in 3D.
Can be non-conformal: grids lines dont need to match at block boundaries.

(a)

(b)
Figure 5: An example of a hybrid mesh

3.3

TERMINOLOGY

Cell = control volume into which domain is broken up.


Node = grid point.
Cell centre = centre of a cell.
Edge = boundary of a face.
Face = boundary of a cell.
Zone = grouping of nodes, faces, and cells:
Wall boundary zone.
22 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012
Fluid cell zone.
Domain = group of node, face and cell zones.

Figure 6: Depiction of grid terminology in 2D and 3D

3.3.1 Mesh Naming Conventions


Tri mesh: mesh consisting entirely of triangular elements.
Quad mesh: consists entirely of quadrilateral elements.
Hex mesh: consists entirely of hexahedral elements.
Tet mesh: mesh with only tetrahedral elements.
Hybrid mesh: mesh with one of the following:
o

Triangles and quadrilaterals in 2D.

Any combination of tetrahedra, prisms, pyramids in 3D.

Boundary layer mesh: prisms at walls and tetrahedra everywhere else.

Hexcore: hexahedra in center and other cell types at walls.

Polyhedral mesh: consists of arbitrary polyhedra.


23 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012
Nonconformal mesh: mesh in which grid nodes do not match up along an interface.

3.3.2 MESH GENERATION PROCESS


1. Create, read (or import) boundary mesh (es).
2. Check quality of boundary mesh.
3. Improve and repair boundary mesh.
4. Generate volume mesh.
5. Perform further refinement if required.
6. Inspect quality of volume mesh.
7. Remove sliver and degenerate cells.
8. Save volume mesh.

3.3 MESH QUALITY


It is very important to develop grid generation
For the same cell count, hexahedral meshes will give more accurate solutions, especially if the grid lines
are aligned with the flow.
1. The mesh density should be high enough to capture all relevant flow features.
2. The mesh adjacent to the wall should be fine enough to resolve the boundary layer flow.
In boundary layers, quad, hex, and prism/wedge cells are preferred over tris, tets, or
pyramids.

3.3.1 Measure of Quality


Aspect Ratio
This is the ratio of the longest edge of an element to either its shortest edge or the shortest distance from a
corner node to the opposing edge ("minimal normalized height").
For 3-D elements, each face of the element is treated as a 2-D element and its aspect ratio determined.
The largest aspect ratio among these faces is returned as the 3-D elements aspect ratio.
Aspect ratios should rarely exceed 5:1.

Aspect ratio = 1

high-aspect-ratio quad

24 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

Aspect ratio = 1

high-aspect-ratio triangle

Chordal Deviation
Curved surfaces can be approximated by using many short lines instead of a true curve.

Chordal deviation is the perpendicular distance between the actual curve and the approximating line
segments.

Jacobian
This measures the deviation of an element from its ideal or "perfect" shape, such as a triangles deviation
from equilateral. The Jacobian value ranges from 0.0 to 1.0, where 1.0 represents a perfectly shaped
element. The determinant of the Jacobian relates the local stretching of the parametric space which is
required to fit it onto the global coordinate space.
In the case of Jacobian evaluation at the Gauss points, values of 0.7 and above are generally acceptable.

Length (min.)
Minimum element lengths are calculated using one of two methods:
The shortest edge of the element. This method is used for non-tetrahedral 3-D
elements.
The shortest distance from a corner node to its opposing edge (or face, in the case of
tetra elements); referred to as "minimal normalized height".

Figure 7: Figure showing different mesh terminology: Minimum length

Skew
Skew of triangular elements is calculated by finding the minimum angle between the vector from each
node to the opposing mid-side, and the vector between the two adjacent mid-sides at each node of the
element.

25 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

Figure 8: Figure showing different mesh terminology: Skew

The minimum angle found is subtracted from ninety degrees and reported as the elements skew.

Taper
Taper ratio for the quadrilateral element is defined by first finding the area of the triangle formed at each
corner grid point:

Figure 9: Figure showing different mesh terminology: Taper

These areas are then compared to one half of the area of the quadrilateral. Then find the smallest ratio of
each of these triangular areas to the quad elements total area (in the diagram above, "a" is smallest).
The resulting value is subtracted from 1, and the result reported as the element taper. This means that as
the taper approaches 0, the shape approaches a rectangle.

Warpage
This is the amount by which an element (or in the case of solid elements, an element face) deviates from
being planar. Since three points define a plane, this check only applies to quads. The quad is divided into
two trias along its diagonal, and the angle between the trias normals is measured. warpage of up to five
degrees is generally acceptable.

Figure 10: Figure showing different mesh terminology: Warpage

Change in Size
Change in size should be gradual (smooth)

26 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

Smooth change cell size

Large jump in in cell size

Figure 11: Figure showing different mesh terminology: Change in size

Striving for Mesh Quality


A poor quality grid will cause inaccurate solutions and/or slow convergence.
Minimize equiangular skew:
Hex and quad cells: skewness should not exceed 0.85.
Tris: skewness should not exceed 0.85.
Tets: skewness should not exceed 0.9.
Minimize local variations in cell size:
E.g. adjacent cells should not have size ratio greater than 20%.
If such violations exist: delete mesh, perform necessary decomposition and/or pre-mesh edges
and faces, and re-mesh.

Value of Skewness

0-0.25

0.25-0.50

0.50-0.80

0.80-0.95

0.95-0.99

0.99-1.00

Cell Quality

excellent

good

acceptable

poor

sliver

degenerate

Grid Design Guidelines


Resolution

Pertinent flow features should be adequately resolved.

Cell aspect ratio (width/height) should be near one where flow is multidimensional.

Quad/hex cells can be stretched where flow is fully-developed and essentially


one-dimensional.

Figure 12: An example showing appropriate grid resolution

27 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

Smoothness

Change in cell/element size should be gradual (smooth).

Ideally, the maximum change in grid spacing should be <20%

Total Cell Count


More cells can give higher accuracy. The downside is increased memory and CPU time.
To keep cell count down:
o Use a non-uniform grid to cluster cells only where they are needed.
o Use solution adaption to further refine only selected areas.
Cell counts of the order:
o 1x 104 is relatively small problems.
o 1 x 105 is intermediate size problems.
o 1x 106 is large. Such problems can be efficiently run using multiple
CPUs, but mesh generation and post-processing may become slow.
o 1x 107 are huge and should be avoided if possible. However, they are
common in aerospace and automotive applications.
o 1x 108 and more are department of defense style applications.

3.4 GRID ADAPTATION


Grid adaption adds more cells where needed to resolve the flow field.
Fluent adapts on cells listed in register. Registers can be defined based on:
Gradients of flow or user-defined variables.
Isovalues of flow or user-defined variables.
All cells on a boundary.
All cells in a region.
Cell volumes or volume changes.
y+ in cells adjacent to walls.
To assist adaption process, one can:
Combine adaption registers.
Draw contours of adaption function.
Display cells marked for adaption.
Limit adaption based on cell size and number of cells.

28 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

Figure 13: 2D Planar Shell- grid adapted to pressure contours

3.5 MAJOR SOURCES OF ERROR

Mesh too coarse.

High skewness.

Large jumps in volume between adjacent cells.

Large aspect ratios.

Interpolation errors at non-conformal interfaces.

Inappropriate boundary layer mesh.


SUMMARY
Design and construction of a quality grid is crucial to the success of the CFD analysis.
Appropriate choice of grid type depends on:

Geometric complexity.

Flow field.

Cell and element types supported by solver.


Hybrid meshing offers the greatest flexibility. Take advantage of solution adaption.

29 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

Chapter 4
LATTICE BOLTZMANN METHOD AS AN ALTERNATIVE TO NAVIERSTOKES SOLVERS
AMIT GUPTA
Department of Mechanical Engineering, Indian Institute of Technology, Hauz Khas, New Delhi-110016.
Email: agupta@mech.iitd.ac.in

4.1 INTRODUCTION
In the following sections, an introductory tutorial to lattice Boltzmann method (LBM) has been presented.
This simulation technique is based on the lattice Boltzmann equation (LBE) which is derived from the
Boltzmanns kinetic equation. The collision operator in the traditional Boltzmanns equation for the
particle distribution function fi is written in terms of a local Maxwellian distribution. This leads to a
linear differential equation for the particle distribution function. In addition, three important features of
LBM distinguish it from other numerical methods. These are:
1) The convection operator in velocity (phase) space is linear, which has been brought from kinetic
theory and is in contrast with the non-linear convection terms in other approaches like the NavierStokes equations.
2) The incompressible form of the Navier-Stokes equations can be obtained in the nearly
incompressible limit of LBM.
3) In the Maxwell-Boltzmann equilibrium distribution, the phase-space is a complete functional
space, due to which the averaging involves the whole velocity (phase) space. In LBM, only a few
moving directions are used and thus the transformation that relates the microscopic properties is
simplified.
The fundamental LBE in its differential form is derived in section 2. To show that LBM bridges the gap
from microscopic physics to the real world fluid phenomenon, the Navier-Stokes equations will be
derived starting from the Bhatnagar-Gross-Krook (BGK) form of the collision operator (Bhatnagar et al
(1954)) using the zeroth and first order moments of the particle distribution functions, and for the special
form of the equilibrium distribution function in section 3. The numerical implementation of the lattice
BGK has been described in section 4. Since LBM deals with the distribution function as the dependent
variable, applying macroscopic boundary conditions in terms of velocity of pressure becomes a nontrivial process. Some of the available methods to accomplish this task are discussed in section 5. Two
common multiphase models used in the scientific community for simulating two immiscible phases have
been described in section 6. The advantages and disadvantages of these models are explained in addition
to a discussion on existing models for simulation of two-phase flows in the context of LBM.

4.1.1 Lattice BGK from Boltzmanns Equation


In LBM, the evolution equation for the particle distribution function is very similar to the kinetic equation
in lattice gas automata, given by

f i x ei t , t

fi x, t

fi x, t

(1)

where i 0,1,...., M
30 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012
i is the collision operator and takes into account the collision of the fluid particles and satisfies the
relationships given by,

0 &

i i

(2)

at each lattice location.


If equation (1) is expanded in a Taylor series about , a small parameter and proportional to the Knudsen
number, i.e.

x, t

(3)

Then on expansion, we get

fi x ei t , t
fi x, t

fi
t

fi
t

fi x, t

ei . fi

fi
2

ei . fi

ei .

fi
t

O
(4a)

1 2 fi
2 t2

ei . f i

1
ei ei :
2

fi

fi
t

1
ei .
2

(4b)

Using the Chapman-Enskog expansion, where we use


2

t1

t2

(5)

x1

where t1 is the convection time scale and t2 is the diffusion time scale such that t1 t2 . Further, the
particle distribution functions can be expanded as

fi eq

fi

fi neq &

fi eq

fi eq ei

0,

fi neq

fi (1)

fi (2)

fi1,2

and

(6a)

(6b)

fi1,2 ei

0 ;

(6c)

Thus the collision operator up to third order is given by

For small ,

eq

f eq
fj

lim
0

f eq

(1)
j

f eq
fj

(2)
j

f eq

f j fk

f j(1) f k(1)

O( 3 )

(7)

0 . Thus the above equation would reduce to

31 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

f eq

fj

f j(1)

(1)
j

(2)
j

f eq

fj
1

f eq

M ij

where

M ij

fj

fj

fj

fj

f eq

f j(2) O

f eq
fj

(8a)

f jneq

f jeq

(8b)

f jeq

is the collision matrix (Higuera and Jiminez (1989)). Further assuming that the local particle

distribution function relaxes to an equilibrium state at a single rate , so that

M ij

(9)

ij

we arrive at the lattice BGK collision term,


i

fi eq

fi

fi neq

(10)

This form of the collision operator with the single time relaxation approximation is also known as the
lattice BGK (Bhatnagar-Gross-Krook) operator. This form of the collision operator reduces (1) to a
differential equation of the form

fi
t

ei . f i

fi

fi eq

(11)

where i is the potential as a consequence of any external force applied on the fluid. Equation (11) can
be discretized in time and discrete-velocity space. There are two commonly used discretization methods
for this differential equation that are widely cited and used. The most commonly used is the explicit
formulation in which the collision operator is written in terms of the distribution functions calculated on
the previous time step. This results in

f i x ei t , t

f i x ei t , t
t

f i x ei t , t
x
Assuming x
(LBE), given as

fi x, t

fi x, t

(12)

fi eq x, t
i

t 1 , equation (12) simplifies to the most commonly used lattice Boltmann equation
32 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

f i x ei t , t

fi x, t

f i x, t

fi eq x, t

(13)

The density per node and the macroscopic momentum flux in the weakly compressible formulations as
defined in equation (13) is given by

fi ;

fiei

(14)

For the explicit scheme the leading truncation error of a velocity-space discretization is taken into
account in a way to ensure that the viscosity in the NS equation derived from equation (11) becomes

1 2
cs t
2

(15)

where the positivity of the viscosity requires that

1 2.

4.2 NAVIER-STOKES FROM LBE


The particular form of the collision operator with the single time relaxation approximation, also known as
the lattice BGK (Bhatnagar-Gross-Krook) operator leads to a differential equation of the form given by
equation (11) for the Boltzmanns kinetic equation. In the low frequency, long wavelength limit and
under zero external forces, the Chapman-Enskog expansion can be used under the assumption that
, where is a small parameter as compared to the macroscopic scales and is proportional to
x t
the Knudsen number. Thus, the particle distribution functions can be expanded in a Taylor series about ,

fi eq

fi

fi (1)

fi (2) O

(16)

Similarly, the time and space derivatives can be expanded as


2

t1

t2

(17)

x1

To recover the Navier-Stokes equations from the BGK form of the LBE, we need to substitute equation
(16) and (17) into (11). This would give

fi eq
t1
O

ei
2

1 i

eq

fi

(1)

fi eq
t2

1
1
2

fi (1)
t1

ei

f (1)

1 i

fi (2)

(18)

where higher order terms have been grouped together. Filtering out

and O

terms leads to

33 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

fi eq
t1

f eq

ei

1 i

fi (1)

(19a)

and

fi eq
t2

fi (1)
t1

1
1
2

f (1)

ei

fi (2)

1 i

(19b)

Using the condition that the zeroth and first order moments of the equilibrium particle distribution
function give the macroscopic density and momentum flux respectively (equation (14)), equation (19)
simplifies to the governing equations that have the form given by,

. u 0

t
u

(20a)

eiei fi eq

1
2

eiei fi (1)

(20b)

Chen and Doolen (1998) show that the two summations in equation (20b) can be reduced to

ei

fi eq

ei

u u

1
1
2
where

(21)

ei

ei

fi

(1)

p cs2 &

cs2

u
t

u. u

1/ 2
2

. The resulting momentum equation is

(22)

Thus, the lattice Boltzmann equation is able to recover the Navier-Stokes equation in the low Mach
number limit using the Chapman-Enskog expansion, and is second order accurate in space. Hence, the
lattice Boltzmanns equation is a tool which can bridge the gap between the microscopic fluid interactions
and the macroscopic world.

4.3 NUMERICAL IMPLEMENTATION


The D2Q9 and D3Q19 form of the discrete velocity space are the most popular discretization schemes for
the phase-velocity. These are especially useful as they yield a square and cubic lattice for the space
discretization, respectively. The phase-space velocities are shown in fig. 1. The velocity vectors are given
as:
34 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

ea

(0,0),
a 0;
( 1,0)c,(0, 1)c, a 1,2,3,4;
( 1, 1)c,
a 5,6,7,8.

(23a)

for the D2Q9 lattice arrangement, and

ea

(0,0,0),
( 1,0,0)c,(0, 1,0)c,(0,0, 1)c
( 1, 1,0)c,( 1,0, 1)c,(0, 1, 1)c

a 0;
a 1,2,..,6;
a 7,8,..,18.

(23b)

for the D3Q19 configuration, where c is the lattice speed and is given by c

x t . The other forms of

the velocity discretization commonly used are D2Q7 (hexagonal lattice) and D3Q15 (15 velocity 3-D
model). Broadly, the lattice Boltzmann scheme consists of two computational steps,
collision step:

streaming step:
where

fi

and

f AC i x, t

fi x, t

f i x ei t , t

fi AC

fi x, t

fi AC x, t

fi eq x, t

(24a)

(24b)

denote the pre- and post-collision state of the distribution function, respectively. As

is evident from equation (24), the LBE is a simple time-marching algorithm for the particle distribution
function, whereas the NS involves non-linear advection terms that make the process iterative. Because of
its explicit form, the LBE is easy to implement, and natural to parallelize as the collision step is
completely local and the streaming step takes very little computational effort at every time step. However
unlike the macroscopic solvers for which a no-slip boundary condition for the velocity u on the wall is
easily satisfied, there is no similar form available for boundary condition for the particle distribution
function(s). Several different ways and treatments have been proposed in literature to date, and have been
summarized below.

4.3.1 BOUNDARY CONDITIONS IN LBM


Considerable work has been carried out on creating newer and reliable boundary conditions in the BGK
variant of the LBE. Some of the boundary conditions commonly encountered in fluid flows are related to
stationary or moving wall, inlet or outlet velocity, and inlet/outlet pressure. Since the lattice Boltzmann
method works with the particle distribution function as the dependent variable, specification of velocity or
pressure boundary conditions becomes a highly complex process. In many scenarios, solving for the
distribution function based on the macroscopic variables on the boundary could lead to a set of equations
that may not have a closed form solution. With regard to such issues, simple rules have been formulated
and proposed in literature through which a closure, which is physically harmonious to the problem at
hand and at the same time is easy to implement with good accuracy, can be achieved.

35 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

e2
e6

e3

e0

e7

e4

e5

e1

e8

(a) D2Q9

(b) D3Q19

Figure 1: Discrete velocity vectors for the (a) 2-D nine speed, and (b) 3-D 19 speed model.

The simplest form of wall boundary condition that has been quoted innumerably in literature is the pure
wall bounceback proposed by Wolfram (1986) and Lavalle at al (1991). In this form, the particle
distribution function streamed to the wall is scattered (reflected) along the same direction it came from, as
shown in fig. 2a. Accordingly, the unknown distributions going from the wall into the fluid nodes can be
written as

f 2 (x)

f 4 (x), f5 (x)

f7 (x), f6 (x)

f8 (x)

(25)

However, the no-slip boundary condition described by equation (25) is only first-order accurate. Since the
LBE is second-order accurate in space, use of the standard bounceback results in loss of accuracy near the
walls. Shifting the wall (boundary) half-mesh unit into the fluid, in other words applying the bounceback
between the nodes, yields second-order accuracy at the walls. This scheme is popularly known as the halfway bounceback method and is shown in fig. 2b.

36 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

(a) Standard Bounceback

(b) Half-way Bounceback

Figure 2: Schematic to show the working of the standard and half-way bounceback schemes for
enforcing zero velocity on the wall. The physical location of the wall is shown by dotted horizontal lines.
The known (unknown) distributions are shown by solid (dashed) arrows.

The unknown

f2 x

distributions

f 4 x e4 , f 5 x

streamed

into the

f 7 x e7 , f 6 x

fluid from the

f6 x e6

wall

side are given as


(26)

According to this closure of the wall boundary distributions, it can be observed that the fluid momenta
carried by each of the distributions cancels off completely half-way between the wall (green) and fluid
(red) nodes, and thereby making the boundary treatment second-order accurate.
Other than the traditional bounceback schemes described earlier, other methods that deal with handling of
the wall and inlet-outlet boundary conditions in context of LBM also exist. More details on these are
given in the works of Inamuro et al (1995), Noble et al (1995), Maier at al (1996), Chen at al (1996), Zou
and He (1997) and Mei et al (1999).

4.3.2 Multiphase Models in LBM


Numerous methods have been used by researchers over the past decade to conduct multiphase simulations
using LBM. These include the model proposed by Rothman and Keller or better known as the R-K model
(1988), where the two fluids are denoted by different colors. In this model, phase separation is produced
by the repulsive interaction based on the color gradient. The R-K model was originally meant for lattice
gas simulations (LGCA). Grunau et al (1993) introduced some free parameters in this model.

The lattice Boltzmann implementation was first introduced by Shan & Chen (1993). In Shan-Chens (SC) model, multiphase phases were simulated by introducing non-local interactions between particles at
each lattice site, thereby making it hard to parallelize. Hou et al (1997) in one of the earliest works on
multiphase LBM studied the chromodynamic (RK) and the pseudopotential (SC) models and showed that
the latter is a major improvement over the former. Swift et al (1996) proposed the free-energy

37 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012
approach. In this model, unlike the S-C model, the local momentum conservation was satisfied. However,
Swifts model suffered from the lack of Galilean invariance.

Recent work has been focused towards development of new methods that could simulate high density
ratios for the liquid-vapor mixture. Inamuro et al (2004) developed a multiphase model that could be used
to simulate dissimilar fluids with large density difference and show its applicability by conducting droplet
collision and bubbly flow simulations for a density ratio of 50. Although the large density contrast was an
exciting development, the model suffers from time consuming iterations for solving the pressure field,
which is given by a Poisson equation.

A more recent variant that modifies the R-K model and introduced an explicit specification of the surface
tension parameter was given by Lishchuk et al (2003). This model enhanced the suitability of LBM as a
tool to simulate multiphase flows due to its robust nature and reduction of spurious velocities, a
phenomenon commonly encountered in the R-K and S-C model, by a great extent. In the next sections,
more details of the S-C and Lishchuk models are described.

4.3.2.1 S-C Model for Multiple Phases and Components


Shan & Chen (1993) in their work proposed a lattice Boltzmann based model that could simulate multiple
phases and components. They incorporated non-local interactions amongst particles to simulate multiple
component fluids. The interaction potential between components and
was defined as

V x, x
where

x, x

x, x

is the Greens function. The quantity

(27)
is the effective mass. If only nearest

neighbor interactions were considered, then

x, x

; x x

; x x

The magnitude of

controls the strength of the interaction between components

(28)

and

, while its

sign determines whether the interaction is attractive or repulsive.

This form of the potential gives the rate of net momentum change at each lattice site to be

dp
x
dt

G
1

x ea ea

(29)

a 0

Therefore, this change in momentum is applied at each lattice site in the equilibrium distribution function
before the collision:
38 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

dp
x
dt

(30a)

where

m f

(30b)

is the mass density of the th component and


S

f a ea
a

(30c)

fa
a

and

fa

(30d)

4.3.2.2 Lishchuk Model for Greatly Reduced Spurious Currents


In a recent and more robust scheme for the treatment of the interface, Lishchuk et al (2003) proposed an
algorithm by which a two-fluid mixture is kept separated through a diffuse interface that spans a few
lattice nodes. The location of the interface is controlled by a surface tension force which is incorporated
such that the stress boundary condition and the continuity of velocity across the interfacial line are
satisfied. This model uses two particle distributions to denote the two different fluids. Each fluid is
assigned a color (the use of the word color is meant for identifying the fluid only) at all locations in the
domain of interest. Each of these colored phases undergoes collision and streaming operations, given as

f i k , AC x, t

f i k x, t

f i k x, t

f i k ,eq x, t

(31)

where k denotes the Red or Blue distribution. More so, the densities of each of the phases is given by
R

fi R x, t

(32a)

fi B x, t

(32b)

B
i

In order to impose the stress boundary condition and the continuity equation for the incompressible fluids,
Lishchuks model introduced a local pressure gradient throughout the interface, which is incorporated into
the LBE at the collision step. This force is defined such that it acts normal to the interface, centripetally
and with a magnitude that is proportional to the gradient of the phase field,

, defined as

39 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

R
N

x, t

Clearly,

x, t
x, t

x, t
x, t

(33)

(x, t ) 1 . The local curvature at the mixed locations on the interface is computed

based on the normal vector computed at the particular lattice location. The normal vector, n, is defined as
a function of the phase field, and is given by
N

(34)

Based on the local normal vector, the radius of curvature, R, of the interface is computed as

1
R

(35)

where
is the curvature and

I nn

(36)

where I is the unit tensor and


i

is the surface gradient operator. Based on the curvature, the source term

is calculated such that it incorporates the surface tension force, and is given as

wi
F.ei
cs2

(37)

where

F x, t

1
2R

(38)

REFERENCES
1. Bhatnagar P., Gross E. and Krook M., A model for collisional process in gases 1: Small
Amplitude processes in charged and neutral one-component system, Phys. Rev. 94, 511-525
(1954)
2. Chen S. and Doolen G.D., Lattice Boltzmann method for fluid flows, Ann. Rev. Fluid Mech.
30, 329-364, (1998)
3. Chen S., Martinez D. and Mei R., On boundary conditions in lattice Boltzmann methods, Phys.
Fluids 8, 2527-2536 (1996)
4. Grunau D., Chen S. and Eggert K., A Lattice Boltzmann Model for Multiphase Fluid Flows,
Phys. Fluids A 5, 2557-2562 (1993)
40 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012
5. Higuera F. and Jiminez J., Boltzmann approach to lattice gas simulations, Europhys. Lett. 9,
663-668 (1989)
6. Hou S., Shan X., Zou Q., Doolen G.D. and Soll W.E., Evaluation of two lattice Boltzmann
models for multiphase flows, J. Comp. Phys. 138, 695-713 (1997)
7. Inamuro T, Yoshino M. and Ogino F., A non-slip boundary condition for lattice Boltzmann
simulations, Phys. Fluids 7, 2928-2930 (1995)
8. Inamuro T., Ogata T., Tajima S. and Konishi N., A lattice Boltzmann method for incompressible
two-phase flows with large density differences, J. Comp. Phys. 198, 628-644 (2004)
9. Lavalle P, Boon J.P. and Noullez A., Boundaries in lattice gas flows, Physica D 47, 233-240
(1991)
10. Lishchuk S.V., Care C.M. and Halliday I., Lattice Boltzmann algorithm for surface tension with
greatly reduced microcurrents, Phys. Rev. E 67, 036701 (2003)
11. Maier R.S., Bernard R.S. and Grunau D.W., Boundary conditions for the lattice Boltzmann
method, Phys. Fluids 8, 1788-1801 (1996)
12. Mei R., Luo L.S. and Shyy W., An accurate curved boundary treatment in the lattice Boltzmann
method, J. Comp. Phys. 155, 307-330 (1999)
13. Noble D.R., Chen S., Georgiadis J.G. and Buckius R.O., A consistent hydrodynamic boundary
condition for the lattice Boltzmann method, Phys. Fluids 7, 203-209 (1995)
14. Rothman D.H. and Keller J.M., Immiscible cellular-automaton fluids, J. Stat. Phys. 52, 11191127 (1988)
15. Shan X. and Chen H., Lattice Boltzmann Model for simulating flows with multiple phases and
components, Phys. Rev. E. 47, 1815-1819 (1993)
16. Swift M., Orlandini S., Osborn W. and Yeomans J., Lattice Boltzmann simulations of liquid-gas
and binary fluid systems, Phys. Rev. E. 54, 5041-5052 (1996)
17. Wolfram S., Cellular automaton fluids 1: Basic theory, J. Stat. Phys. 45, 471-526 (1986)
18. Zou Q. and He X., On pressure and velocity boundary conditions for the lattice Boltzmann BGK
model, Phys. Fluids 9, 1591-1598 (1997)

41 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

42 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

43 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

44 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

45 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

46 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

47 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

48 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

49 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

50 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

51 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

52 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

53 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

54 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

55 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

Chapter 6
COMPUTING OF COMPRESSIBLE FLOWS
NADEEM HASAN
Department of Mechanical Engg., Aligarh Muslim University, Aligarh-202002, INDIA
Email: nadhasan@gmail.com

6.1 Introduction
High speed flow of fluids (gases), low speed flows subjected to large temperature differences represent
flow scenarios that require modelling incorporating compressibility or significant volumetric straining
effects in fluid flows. The high speed flow of gases are typically encountered in external aerodynamics,
internal flows through propulsion systems like aircraft / rocket engines etc, while low speed flows under
large temperature differences are typically encountered in solar technology, manufacturing processes like
heat treatment, cooling of electronic equipments.
The physics of compressible flows is dominated by propagation and interaction of waves of
several families (entropy, vorticity and acoustic family). Therefore, it is generally believed that schemes
that rely on the wave dynamics would capture the flow physics of compressible flows much better. This,
perhaps, explains an almost one-sided effort, in the development of numerical strategies relying on wave
dynamics for the computing of compressible flows. However, a carefully designed flux-based scheme
can deliver a comparable performance and yet be much simple to implement in comparison to some of the
popular wave based schemes. As an effort in this direction, a new algorithm for the computing of
compressible flows governed by Euler / Navier-Stokes equations, developed originally by the author is
presented in this Chapter. This class of algorithm represents an attempt to develop a flux-based scheme
that offers robustness, accuracy, efficiency and simplicity in comparison to the state-of-the-art wave
based TVD schemes of Flux-Vector Splitting (FVS) type or the Reconstruction-Evolution type (Godunov
family) of schemes.
This Chapter is organized in three sections. The governing equations for compressible flows in
two space dimensions are presented in 6.1. The origin and development of Particle Velocity Upwind
(PVU) family of schemes is presented in brief in 6.2. In the same section, the higher order particle
velocity upwind scheme (PVU-M+ scheme) is presented. Section 6.3 demonstrates the performance of
the PVU-M+ scheme on 1-D Riemmann problems or Test Cases governed by 1-D Euler equations as well
as the two-dimensional inviscid and viscous flow test cases.
6.1 Governing equations
The compressible form of the Navier-stokes equations in strong conservative form (Anderson, 1995) in
two space dimensions in Cartesian coordinates are expressed as,

U
t

(F c

F nc )
x

(G c

G nc )
y

J,

(6.1)

Where U, Fc, Fnc, Gc, Gnc and J are solution, flux and source vectors respectively, given as,

56 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

0
p
M o2

u
u

Fc

2
Reo

, F nc

uv

v
x

Reo

uh T

u
(
x

V) / 3

k
T
Reo Pro x

uv

, Gc

u
y
1)M o2
Reo

v2

(6.2a)

vh T
DF

0
v
x

Reo
G

nc

p
M o2

0
0

u
y

2
Reo

V) / 3

v
(
y
(

k
T
Reo Pro y

1)M
Reo

2
o

u
, J
v

, U

Fro2

DG

(6.2b)

1) vM o2
Fro2

The quantities DF and DG are the dissipation terms in the energy equation given as,

DF

2
u
3

v
y

2 u
x

v
x

u
y

, DG

2
v
3

u
x

2 v
y

v
x

u
y

(6.3)

The symbols E and hT are the dimensionless total energy and enthalpy defined as,

E e


1)M o2 (V V) / 2, h T

E p/

E e.

In addition to the mass, momentum and energy equations, the equations of state are also required to close
the system of equations represented by (6.1). Taking the gas to be thermally and calorically perfect, the
following equations of state apply,

e T,

e p

T3 2 (1 S / To ) (T S / To ),

(6.4)

The dimensionless viscosity is related to the dimensionless temperature T by the well known Sutherland
law of viscosity and, the Prandtl number and the sp. heat at constant pressure is assumed constant over a
wide temperature range to yield the equation of state of thermal conductivity. The governing equations
have been non-dimensionalized using Uo, L and L / Uo as the relevant imposed scales of velocity, length
and time respectively. The scales of thermodynamic variables pressure, density and energy are taken to
be the values in a suitable reference state po, o and CvTo, respectively, where T o represents the
temperature scale. The viscosity and thermal conductivity are scaled with respect to their values in the
reference state symbolically denoted as o and ko, respectively. The dimensionless transformation gives
rise to the usual dimensionless parameters like the Reynold number (Reo), sp. heat ratio ( ), Mach number
(Mo), Prandtl number (Pro) and Froude number (Fr o). Usually for high speed gas flows, Fr o is large and
therefore effects of gravity are neglected in the governing equations.
Since the simulations are to be carried out for a wide range of free-stream Mach numbers ranging
from very low subsonic to high supersonic regimes, it is found necessary to employ different scaling for
pressure in low subsonic regimes (M 0.5) in order to capture the flow physics in a better manner. It is
known that as the Mach number is reduced, the coupling between pressure and density becomes
57 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012
progressively weak and pressure becomes more of a relative variable whose variations scale strongly with
the scale of kinetic energy of the flow. Therefore, simulations upto M = 0.5, have been obtained from a
rescaled system of equations in which the dimensionless pressure is redefined as, (P Po ) /

U o2 , where

the subscript o refers to appropriate reference values. In addition to this, the fluxes in energy equation
are expressed in terms of the total energy instead of the total enthalpy for the low Mach number regime.
With this choice of pressure scaling, the fluxes in the governing equations (equation (6.2)) are modified
as,

0
p

u
F

u2
uv

2
Reo

F nc

Reo

uE

u
(
x
v
x

V) / 3

u
y

k
T
(
Reo Pro x

1)u(1

M o2 p)

1)M o2
Re o

(6.5)

(6.6)

DF

0
v
Gc

uv
v

Reo
,

G nc

vE

2
Reo

v
x

u
y
v
(
y

k
T
(
Reo Pro y

V) / 3
1)v(1

2
o

M p)

1)M o2
Reo

DG

The above scaling appears to be suitable for low Mach number flows since the compressibility effects in
the energy equation, the dissipation and the compression work, both become small as Mo becomes small.
However, the density variations, which may be caused by large temperature variations, can still influence
the flow strongly due to the presence of the divergence term in the flux components. The thermal
equation of state is also modified to account for the rescaled pressure as,

M o2 p 1

(6.7)

Generalized coordinates
For case studies involving the circular cylinder, the body-fitted curvilinear coordinates are
employed. The governing equations (6.1)-(6.2) are readily transformed into generalized curvilinear
coordinates (x, y), (x, y) as,

U
t

(F c F nc )

c G
nc )
(G

J .

(6.8)

The various flux and source vectors in (1.8) are expressed as,

58 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

F c

c
G
J

Fc

Fc

G c , F nc
y

nc
Gc, G

F nc
x

G nc

F nc

G nc
y

(F c F nc )

(6.9)
y

(G c G nc )

Since, the PVU family of schemes separate out the convective flux for an upwind / central treatment, the
convective flux vectors in generalized coordinates are given explicitly, for high mach number scaling, as,

u
F c

( u)u
( v)u
( h T )u

u
c
, G

( u)u
( v)u

(6.10)

( h T )u

6.2 The PVU family of schemes: Origin and development


To meet the challenges of high speed flow computing a new mathematically simple, robust and easy to
implement, flux based scheme for the computation of compressible flows was recently proposed by
Qamar et al. (2006). The scheme is a, flux based, two-step, predictor-corrector algorithm utilizing the
basic ideas of upwinding. The scheme in its original form employed first-order upwind procedure only.
The PVU strategy is based on the following ideas:
1. The total flux is separated into the convective and non-convective parts. . The pressure terms
occurring in the momentum and the energy equations are clubbed with the viscous terms to form
the non-convective part of the flux.
2. The gradient of the convective fluxes is constructed from the cell face values which are obtained
by employing upwind biased procedure. The upwind direction at a cell interface is decided on
the basis of fluid particle velocity or entropy wave speed at the cell face. The non-convective
fluxes are computed on the grid nodes
The first-order upwind scheme suffers from large dissipation and hence low resolution. In an attempt to
remove the excessive dissipation, Qamar et. al (2010) also extended the scheme by employing a second
order upwinding in smooth regions of flow and first order upwinding in regions of steep gradients or
discontinuities for the convective transport property vector. However, the first order interpolation was
retained for the inter-cell particle velocities. The separation of smooth flow zone from the zone of
discontinuity was based on a function sensitive to density gradients. In its third phase, Mujaheed (2010)
and Shameem (2011) extended the scheme to higher order by incorporating limiters or solution sensitive
weight functions that enable the intercell flux estimate to blend smoothly between a first order and a
higher (second) order estimates. This higher order version developed in its third phase is named as the
PVU-M+ scheme. A detailed description of the PVU-M+ scheme is given in the next subsection.
6.2.1 The PVU-M+ Scheme
For the sake of a clear yet concise description of the various discretization concepts in the PVU-M+
scheme, the scheme is described within the one-dimensional framework. Figure 6.1 shows a typical
uniform 1-D mesh and a computational segment surrounding the ith node or grid point. The Particle
Velocity Upwind scheme is a two-step predictor-corrector scheme. The solution vector at the ith grid
point is obtained at the new time level (n+1) through the predictor and corrector steps given as,

59 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012
Predictor step:
*

U =U - t

Corrector step: U

n 1

Fic 1/2 Un
xi

Fic 1/2 U n

1/2

xi

U* U n
2

Finc1 U n
xi

1/2

Finc U n
1

(6.11)

xi

c
*
Fic 1/ 2 U*
t Fi 1/ 2 U
2
x i 1/ 2 x i 1/ 2

Finc U*
xi

Finc1 U*
xi

(6.12)

i-2

i-1

i+1

i-1/2

i+2

i+1/2

Figure 6.1 Computational molecule around ith node in a uniform grid


The
main drawback of the basic PVU scheme (Qamar et al., 2006) is the use of first-order upwinding for the
estimation of numerical inter-cell convective fluxes, Fic 1/2 and G ic 1/2 both in smooth and regions of steep
gradients or discontinuities, which reduces the overall order of accuracy. In order to overcome the
reduced order accuracy, the scheme was later extended to higher order with intelligent blending strategies
of lower order and higher order estimates through appropriately designed solution sensitive weight
functions or limiters (Mujaheed, 2010). In order to familiarize the reader with the higher order version of
the scheme, the essential aspects of PVU-M+ scheme are described here.
The inter-cell numerical convective flux is expressed as,

Fic 1/2
where u i

1/2

and

i 1/2

ui

1/2

(6.13)

i 1/2

is an estimate of inter-cell particle velocity and the inter-cell convective property


c

uQ .
vector Q. The convection property vector is defined from the convective flux vector as, F
The basic features in the PVU-M+ scheme are summarized as,
a) Higher order (central) estimates for inter-cell particle velocity and inter-cell convective property
vector were obtained.
b) The higher order estimates were combined with the lower order estimates (upwind biased)
through suitably defined solution sensitive weight functions or limiter functions in order to
compute the inter-cell numerical convective flux.
c) Since the blended estimates always contain some amount of higher order estimates, there is a
tendency to produce spurious oscillations. In order to control such spurious oscillation range
boundedness criterion is employed.
In the discussion to follow, the above ideas are mathematically expressed and described in brief.
6.2.1.1 Estimation of inter-cell numerical particle velocity u i+1/ 2 and convective transport property
vector

i 1/2

60 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012
Consider the uniform 1-D mesh shown in Fig. 6.1. The higher order (cubic central interpolation) and
lower order (quadratic upwind biased and first order upwind biased interpolation) estimates of any
discrete function fi at midway location i+1/2 in the interval [xi, xi+1] can be expressed as,

fi

9fi 9fi
16

f (L)

fi

fi

fi fi

9fi 9fi
16

fi

sgn u

fi

(6.14)

3fi 3fi
16

/ 2.0 sgn u f i - f i

fi

/ 2.0

(6.15)
(6.16)

In the above equations, u is the mean of the velocity on either side of the cell interface and the sgn is
the signum function defined as,

sgn(u)

u u

(6.17)

It was shown by Shameem (2011) that the use of fully upwind schemes to estimate the inter-cell
convective flux associated with a weak velocity component can generate oscillatory flow fields.
Therefore, it is proposed to combine or blend the cubic central and quadratic upwind estimates for both
inter-cell numerical particle velocity and the inter-cell convective property vector through a suitably
defined weight function Wf. The combination is given as,

u wf

u (C)

wf

(C)

Wf (u (U)

u (C) )

(U)

Wf (

(C)

(6.18)

The weight function must be designed so as to lie in the range [0, 1] for combined value to be bounded by
the central and the upwind estimates. Further, the weight function must approach unity with increasing
magnitude of the convection velocities. In order to satisfy the above criteria, the weight function is
defined as,

Wf

u sn
u sn

(6.19)

where u sn is an appropriate measure of scaled normal velocity magnitudes and is a positive adjustable
constant. The measure u sn for the convective flux along x-direction is defined as,

u sn

max

ui
US

ui

US

(6.20)

where U S is an appropriate velocity scale. For problems with an imposed velocity scale, the imposed
scale is a logical choice. More will be said about this later when dealing with the actual test cases. Since

u sn 0 and > 0, the weight function Wf must lie in the interval [0, 1]. Increase in the value of u sn
results in monotonic increase in Wf approaching unity values for u sn >> . The adjustable parameter,

can be utilized to set the thresholds for giving more weight to upwind estimates than central estimates and
vice versa. The behaviour of the W f function and the effect of the adjustable parameter on the weight
function is shown in Fig. 6 2.

61 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

1
0.9
0.8
0.7

Wf

0.6
0.5
0.4
0.3
0.2
0.1
0

usn
Figure 6.2 Behaviour of Wf function for different values of

0.1 , the weight rises sharply as the scaled normal velocity magnitude increases attaining a value
of nearly 0.85 for u sn 0.5 . Thus, upwinding dominates over central differencing, except for very low
For

values of the scaled normal velocity magnitude ( u sn

0.2 ). For

0.5 , the weight rises less rapidly

and central differencing is dominant for a large range of u sn . Thus, by varying the constant in (6.19),
relative importance of central and upwind estimates can be effectively controlled. This plays an
important role in adjusting to different type of flow situations as demonstrated later.
The solutions of Euler / Navier-Stokes equations for compressible flows can exhibit sudden and
large changes in the primitive flow variables particularly in the vicinity of shocks and other types of
discontinuities. In order to maintain the numerical stability in such regions to prevent oscillations, the
artificial viscosity or numerical dissipation is enhanced by employing lower order estimates. However, to
achieve a smooth transition between higher order estimates in well behaved continuous solution regions
and lower order estimates in the zones of sudden change in solution gradients (neighbourhood of
discontinuities), the weighted estimates in equation (6.18) are combined with the lower order estimates,
via solution sensitive weight functions and , to finally estimate the inter-cell values. This is given as,

ui(1)1 2

u wf

(u (U) u wf ),

wf
i 12

(L)

wf

).

(6.21)

A second estimate of the inter-cell velocity is also obtained as,

ui(2)1 2

u (U)

(u Wf

u(U) ).

(6.22)

This second estimate is obtained as it is not known apriori that which of the two yields a good estimate
(physically realistic, monotonicity preserving) for a given local non-linear solution trend.
The weight functions and must be such that their values lie in the range [0, 1] in order to yield
inter-cell estimates that are bounded by the higher order and lower order estimates. Further their values
must approach unity in regions of sudden change in solution gradients (non-smooth feature) while their
62 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012
values should become small and approach zero for relatively well behaved continuous smooth solution
zones. Based on the above requirements, these functions are defined as,
The function is a solution sensitive weight function that is defined as,

Max Zi , Zi

(6.23)

The Z values are estimated as,

ui

Zi

ui

ui

ui ui

ui

ui ui

if u i

ui

ui ui

(6.24)

otherwise

Defined in this manner, the weight function is a dimensionless number, in the interval [0,1],
sensitive to changes in first spatial derivatives or spatial rate of change of u. The values of are expected
to be large i.e., 0(1) in the vicinity of large changes in velocity gradients and very small in smooth or well
behaved regions. Since the values of lie in the interval [0, 1], equation (6.23) yields a linear convex
combination of u (U) and u (C) estimates. This implies that u i

1/ 2

lies in the interval [min ( u (U) , u (C) ),

max ( u (U) , u (C) )]. The function is defined in an analogous manner except for the fact that for
estimating a given component of , the corresponding solution vector component is employed in
determining the Zi and the Zi+1 values.
Since higher order (quadratic & cubic) polynomial estimates are involved, the combination
expressed in equation (6.21) can build up a non-monotonic or oscillatory trend in particle velocity u in the
region [xi, xi+1]. The two estimates of inter-cell particle velocity are examined against a range
boundedness criteria which is expressed mathematically as,

min u i , u i
(1)

The estimate u i

1/ 2

or u i

2
1/2

ui

1/2

max u i , u i

(6.25)

that satisfies the range boundedness criteria (equation (6.25)) is chosen as


(1)

the final estimate of the inter-cell numerical particle velocity. If both u i

1/ 2

and u i

2
1/2

happen to satisfy

the range boundedness criteria, then the mean of the two estimates is chosen as the inter-cell numerical
particle velocity.

(1)

If both u i

1/ 2

and u i

1 / 2 do

not satisfy equation (6.25), then u i

1/ 2

is assigned to be

the mean of the value on either side of the interface i.e., (ui+ui+1) / 2.
Similarly, the values of the components of i 1/2 estimated from equation (6.21) are examined for
acceptability utilizing a range boundedness criteria given as,

min Qi , Qi

i 1/2

max Qi , Qi

(6.26)

If any estimate does not satisfy the range boundedness criteria, then the value of the component is taken
to be the mean of the value on either side of the interface.
6.2.1.2 Estimation of u i

1/ 2

and

i 1/2

in the vicinity of shocks

The procedures described earlier, to obtain the estimates of

ui

1/ 2

and

i 1/ 2

, lead to

oscillations/overshoots/undershoots in the vicinity of high solution gradients or shocks. This is because:


a)

ui

1/ 2

and

i 1/ 2

both involve some contribution from higher order polynomial

approximations as the limiter function do not completely remove their effect in the vicinity
of shocks.
63 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012
b) On failure of range boundedness criteria, the values of u i
of the values (ui, ui+1) and (

i 1/2 )

1/ 2

and

i 1/ 2

are estimated as mean

respectively. It is known that utilizing values from both

side of discontinuity or shock can lead to oscillations.


Therefore, a different procedure to assign the inter-cell values in the vicinity of shocks is proposed.
In order to apply a different procedure in the region of shocks, a method of shock detection needs to be
utilized. The weight or limiter functions and defined via equation (6.23) and (6.24) respectively, are
already designed so as to differentiate between regions of smooth variation and regions of large changes
in the first spatial derivative of the velocity/solution vector components. Hence, as a first step, the
threshold values of functions and are utilized to identify non-smooth or regions of large change in
solution gradients. A threshold value is selected as a suitable cut-off limit. A value of or in excess
of this cut-off limit indicates a non-smooth flow feature. Cut-off limits in the range of [0.7-0.9] are
shown to be suitable (Mujaheed, 2010).
Once a non-smooth solution feature is identified via the weight functions, in order to specifically
identify the shock, the wave speeds (u-c) or (u+c) on either of the interface (i+1/2) are utilized. It is
known that for the formation of shocks, the characteristics (acoustic) must converge or the wave speed
left of the interface must be greater than the wave speed right of the interface . Mathematically, for the 1D Euler equations,

u c

u c

i 1

or u c

u c

i 1

(6.27)

The above conditions are utilized as a second check to ascertain the presence of shock. Once a shock is
detected the inter-cell particle velocity and convective transport property vector are determined as,
u i 1/2 u i , i 1/2 Qi
(6.28)
6.3 TEST CASES
A numerical method for high speed flows must be able to capture solution with discontinuities
and complex waveforms (both in shape & amplitude). In other words, the numerical artefacts like
numerical viscosity and numerical dispersion should be carefully controlled. In order to objectively
highlight these aspects of the proposed PVU-M+ scheme, the 1-D Riemann problems governed by the
Euler equations have been selected. These one-dimensional test cases have been chosen as they permit
comparisons with exact (analytical) solutions and also provide a very simple platform for focussing on the
resolution aspects of flow features like shocks and contact discontinuities. The 1-D Riemann problems
have been extensively discussed by Toro (1999). The performance of the PVU-M+ scheme is assessed
and compared with some of the well established wave based schemes like the Van-Leer, the AUSMPW+
schemes of the FVS family and the HLL scheme of the Godunov family. The higher order versions of
these schemes employing higher order interpolations for estimating the left and right states across the cell
interface, in line with the MUSCL approach, with appropriate (standard) limiters have been employed
(Laney (1998), Blazek (2001)). While the code for AUSM family of schemes (Liou (1996), Kim et al.
(2001)) have been developed by the author, the codes developed by E.F Toro, made available by him
freely upon request, have been employed for obtaining the exact solutions as well as the solutions for the
Van-Leer and the HLL schemes.
6.3.1 One-Dimensional Inviscid Test Cases
The one-dimensional Riemann problem has uniform initial conditions on an infinite spatial
domain, except for a single discontinuity. For example, for the Euler equations, the Riemann problem
centered on x

x 0 and t

t 0 has the conditions,


64 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

U(x, t 0 )

UL

x0

UR

x0

(6.29)

where U L and U R are constant state vectors. The main reason for choosing Riemann problems as test
cases for the numerical schemes is that they serve as excellent examples of interaction between the
entropy and the acoustic waves leading to the formation of expansion waves, shock waves, and contacts.
Further, since the Riemann problem has an exact solution, it makes a nice test case to clearly identify the
resolution capabilities of a numerical algorithm.
The initial data for the various 1-D Riemann problems (test cases) in the domain [0, 1] for the 1D Euler equations are summarized in Table 6.1, where
indicates the initial discontinuity location and
is
the
time
at
which
the
solution
is
compared.
These
test
cases
Table 6.1: Data for the Riemann test problems.
Test

Left state (x<


(

Right state (x>

, )

cases
Test 1

(0.3, 0.2)

1.0

0.75

1.0

0.125

0.0

0.1

Test 2

(0.5, 0.15)

1.0

-2.0

0.4

1.0

2.0

0.4

Test 3

(0.5, 0.012)

1.0

0.0

1000.0

1.0

0.0

0.001

Test 4

(0.4, 0.035)

5.99924

19.5975

460.894

5.99242

-6.19633

46.095

are
discussed in detail by Toro (1999). All the values in Table 6.1 are in S.I. units. The boundaries at the two
ends of the 1-D flow domain are transmissive and characteristic boundary conditions as described by
Hirsch (1990) have been employed.
All the computations are carried out on a uniform mesh having 200 cells. For comparison with
the Van Leer and the HLL schemes, a time step of 10-5 is employed for all the test cases. However, for
comparison with the AUSMPW+ scheme, a smaller time step of 10-6 is employed as the AUSMPW+
scheme becomes unstable for some test cases for a time step of 10-5. For the estimation of the weight
function Wf, the value of is taken to be 0.1. The velocity scale US appearing in equation (6.20) is chosen
to be the local speed of sound as there is no imposed velocity scale for the 1-D Riemann problems.
Further, for near boundary points, the inter-cell convective flux is estimated using the first order PVU
scheme. In fact, for all the cases reported in this work, this strategy is adopted for the near boundary
points.
Test 1 is a modified version of the popular Sods test and the solution consists of a right moving
shock wave, a right travelling contact discontinuity and a left moving rarefaction wave. Figure 6.3
compares
the
density
solutions
obtained
by
the
PVU-M+

65 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

Exact
PVU-M+
Van Leer

0.8

0.8

Density

0.6

0.6

0.6

0.4

0.4

0.4

0.2

0.2

0.2

0.25

0.5

0.75

Exact
PVU-M+
AUSMPW+

0.8

Density

Density

Exact
PVU-M+
HLL

0.25

0.5

0.75

0.25

Position

Position

0.5

0.75

Position

Figure 6.3 Comparison of density solutions obtained by PVU-M+ scheme with Van Leer,
HLL and AUSMPW+ schemes for Test 1

scheme with the exact solution and the Van Leer, HLL and AUSMPW+ schemes. The accuracy achieved
by the PVU-M+ scheme is comparable to the established schemes. The shock resolution of PVU-M+
scheme
is
quite
good
as
it
is
smeared
across
a
single
mesh
Exact
PVU-M+
AUSMPW+

Exact
PVU-M+
HLL

Specific Internal energy

Specific Internal energy

0.8

0.6

0.4

0.8

0.6

0.4

0.2

0.2
0

0.25

0.5

Position

0.75

0.25

0.5

0.75

Position

Figure 6.4 Comparison of sp. internal energy solutions obtained by PVU-M+ scheme with HLL
and AUSMPW+ schemes for Test 2

point. The contact discontinuity is slightly less smeared than the AUSMPW+ scheme.
Test 2 comprises of two symmetric rarefaction waves and a trivial contact of zero wave speed.
This is a suitable test for assessing the performance of numerical methods for low-density flows. The
specific internal energy solutions for this test case are depicted in Fig. 6.4. Interestingly, the higher order
Van Leer scheme fails in this test case. The solution for specific internal energy shows a spurious hump
near x = 0.5 for all the schemes. However, the hump is smallest for the PVU-M+ scheme.

66 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012
The third Test is designed to assess the robustness and accuracy of the numerical methods. Its
solution comprises of strong right travelling shock wave of shock Mach number 198, a contact
discontinuity and a left rarefaction wave.
In Test 4, the flow originates from
Exact
PVU-M+
AUSMPW+

Specific Internal energy

Density

Exact
PVU-M+
AUSMPW+

2400

1800

1200

600

0
0

0.25

0.5

0.75

Position

Specific Internal energy

18

12

6
0.5

Position

0.75

0.75

0.75

Exact
PVU-M+
AUSMPW+

200

100

0.25

0.5

Position

300

24

0.25

(a)

Exact
PVU-M+
AUSMPW+

30

Density

0.25

0.5

Position

(b)

Figure 6.5 Comparison of density (left) and sp. internal energy (right) solutions obtained by PVUM+ scheme with AUSMPW+ scheme for a) Test 3 and b) Test 4
two very strong waves travelling towards each other and the solution consists of three strong
discontinuities travelling to the right. The left shock wave moves to the right very slowly adding some
amount of difficulty to the numerical methods. Figure 6.5 compares the density and specific internal
energy solutions for Test 3 and Test 4 with the AUSMPW+ scheme. For Test 3 and Test 4, the PVU-M+
scheme yields accuracy comparable to that of the Van Leer and the HLL schemes. The shock and contact
discontinuity resolution is slightly better for the PVU-M+ than the AUSMPW+ scheme. The contact
discontinuity is slightly less smeared than the AUSMPW+ scheme. Also a slight overshoot is seen in the
left shock for AUSPW+ scheme which is absent for the PVU-M+ scheme for Test 4.
6.3.2 Multi-dimensional test cases
In this section the capability of the PVU-M+ scheme to capture the flow physics of compressible
flows in a multi-dimensional scenario is examined via suitable test cases in two space dimensions. The
multi-dimensional test cases are necessary in order to assess the resolution capability of a numerical
method for specific flow features like complex shock geometries and their interactions, Regular and Mach
shock reflections from solid walls, slip slines, shock-vortex interactions, shock induced instabilities and
67 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012
shock-boundary layer interactions. Test Cases involving two independent problems are reported. These
problems are;
(i) Two-dimensional inviscid supersonic flow past a forward facing step in a channel,
(ii) Two-dimensional inviscid / viscous compressible flow past a circular cylinder.
A number of test cases spanning a wide range of free-stream Mach numbers ranging low values in the
incompressible regime to a high value in the supersonic regime for the circular cylinder problem are
presented. These problems have been carefully selected as they offer some challenges to a given
numerical scheme.
Woodward and Collela (1984) have shown that the supersonic (Mach = 3) flow past a forward
facing step involves complex features of Mach as well as multiple Regular reflections, slip lines and
presence of both concave and convex sharp corners. These flow aspects combine to yield a rather
challenging test case.
The inviscid compressible flow past a circular cylinder is another difficult test case as the
problem exhibits a series of bifurcations from steady to periodic and from periodic to quasi-periodic and
even chaotic states as the free-stream Mach number is increased from 0.2 to 0.85. Interestingly, through
another bifurcation the flow again reverts to a quasi-steady flow for a free-stream Mach number of 0.98.
A detailed numerical investigation of this problem has been carried out by Botta (1995a, 1995b).
Likewise, viscous flow past a circular cylinder at low Mach numbers (< 0.2) and low Re (<200) is a well
studied problem both experimentally and numerically. Therefore, this problem is utilized as a viscous
flow test case.
In the subsections to follow the details of the above three problems along with the associated test
cases are provided.
Supersonic inviscid flow past a forward facing step in a channel
Figure 6.8 shows the two-dimensional configuration of an inviscid flow of a

3.0

1.0
M=3.0

0.2
0.6

0.2

Figure 6.8 Geometry of flow domain for supersonic inviscid flow past a forward facing step in a
channel.

supersonic stream of air past a forward facing step in a channel. This problem was first introduced by
Emery (1968) and is known to provide a stiff challenge to numerical methods, as it involves shock-shock
and shock-boundary interactions leading to the formation regular and mach reflections, formation of slip
68 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

0.9

0.9

0.8

0.8

0.7

0.7

0.6

0.6

0.5

0.5

lines, contact discontinuities and multiple shock reflections in the supersonic flow regime. The flow
domain consists of a channel of width equal to 1 dimensionless unit while the total length is 3
dimensionless units (Fig. 6.8). A uniform stream having dimensionless density = 1.0, dimensionless
pressure = 1.0 and Mach number Mo = 3 is continuously fed from in-flow boundary into the channel
containing a step that is 0.2 units high located at 0.6 dimensionless units from the left hand inflow
boundary of the channel. At the solid walls, reflective boundary conditions are employed. The normal
velocity is taken to be zero ( VN = 0), while the first derivatives of remaining solution vector variables ( ,
VT, E) along wall normal direction are set to zero. At the inflow and outflow boundaries transmissive
characteristic boundary conditions are employed (Hirsch (1990)).
The sharp corner of the step is a rarefaction fan and a singular point. Consequently the flow is
seriously affected by large numerical errors generated just in the neighbourhood of this singular point.
These errors generate a spurious boundary layer of about one grid spacing in thickness to form just above
the step. Shocks then interact with this boundary layer, and the qualitative nature of the flow in the
channel is altered depending upon the scheme and the size of the grid employed. In order to overcome
this problem, a special treatment of flowfield around the corner is utilized (Woodward and Collela
(1984)). The density, velocities and sp. internal energy at 4 points immediately downstream of the corner
and in the first row of grid points above the step are corrected without altering the flow direction so as to
preserve the entropy and total sp. enthalpy across the sharp corner.
A 24080 mesh with uniform and equal spacing in both directions is employed along with a time
step of 0.001 with
0.1 and results are shown in Figs. 6.9(a)-6.9(b). The flow field is captured quite
faithfully
with
the
various
shock/
discontinuity
features.

0.4

0.4

0.3

0.3

0.2

0.2

0.1
0

0.1
0

(a)

(b)

Figure 6.9 Contour maps of (a) density (b) sp. int. energy of the steady flow field obtained by
PVU M+ scheme on a mesh size of 24080.

The mach stem is well resolved. Contact discontinuity issuing from the triple point is somewhat smeared
in density plot but clearly visible in energy contour map. Slight bending of the shock after the first
reflection from the top of the step, as reported by Botta (1995b), is also faithfully captured.
In order to demonstrate the resolution capabilities of the PVU-M+ scheme, simulations on much
finer meshes (160480 and 320960) are shown in Fig. 6.10. Contact discontinuity issuing from the
triple point is captured quite well for both meshes.

69 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

1
0.9

0.8

0.8

0.7

0.7

0.6

0.6

0.5

0.5

1
0.9

0.4

0.4

0.3

0.3

0.2

0.2
0.1

0.1
0

0.9

0.9

0.8

0.8

0.7

0.7

0.6

0.6

0.5

0.5

(a)

0.4

0.4

0.3

0.3

0.2

0.2
0.1

0.1
0

(b)

Figure 6.10 Contour maps of (a) density and (b) specific internal energy of the steady
flow field obtained by PVU M+ scheme on mesh sizes of 160480 (left) 320960
(right).

Two-dimensional inviscid compressible flow past a Circular Cylinder


A detailed investigation of the bifurcations encountered in the two-dimensional inviscid
compressible flow past a circular cylinder as the approaching free-stream Mach number M is increased
from 0.38 to 0.98 has been carried out by Botta (1995a, 1995b). Firstly, the flow undergoes complex
transitions from a steady symmetric to periodic vortex-shedding and from periodic vortex-shedding to
quasi-periodic / chaotic vortex-shedding and then finally back to a quasi- steady flow at M = 0.98.
Formation of radial shocks leading to flow separation, vortex formation and vortex shedding makes this
problem very challenging for a scheme to capture the above features. Simulations are also carried out for
M = 3.0 and M = 10.0 to examine the performance of the PVU-M+ for simulating high Mach number
(supersonic / hypersonic) flows past immersed bodies.
For the computation of inviscid flow past the circular cylinder, body-fitted orthogonal
coordinates, , are employed. Further, for 0.38 M 0.5 (low subsonic regime), the low Mach
number pressure rescaled equations (equations (6.5)-(6.6)) are employed, otherwise the normal equations
(equation (6.2)) are employed. In order to remove the effect of gravity, the Froude number Fr o is taken to
be large and hence the corresponding terms in the source vector J are neglected.
A non-uniform structured body-fitted, O-type of grid in the physical plane is mapped on to a
uniform grid along and directions in a rectangular computational plane defined as [0,1] [0, max ]
through the relations,

0.5

e(

a)p

cos(2

), y

0.5

e(

a)p

sin 2 .
(6.30)
e
e
Thus, constant lines are radial and constant curves are concentric circles, with = 0 being the cylinder
surface. The quantities (a, p) are adjustable parameters that control stretching of the grid in the
direction. Values of a = 0.2 and p = 1.2 are found to be suitable for generating optimally stretched grids.
ap

ap

70 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012
Denoting the radial spacing between the cylinder and the first concentric grid line as r and the distance
(or radius) of the artificial boundary (last concentric circle) from the center of the cylinder as Rmax, the
dimensionless values of r and Rmax (cylinder diameter is employed as the length scale) are taken to be
0.006 and 20, respectively, to generate a grid having 211 points in the direction. Slightly finer meshes
having 292 points in the direction are employed for simulations of M = 0.9, .95 and 0.98 cases.
Two different sets of boundary conditions are employed at the cylinder surface depending upon
the value of M. These conditions are given as,

a) u N
b) u N

uT

p
2

( uT )

( E)

0,
( )

0.5
(6.31)

0, M

0.5

In the above equation(s), u N and u T are the local normal and tangential components of velocity at the
cylinder surface, respectively. At higher Mach numbers, the approximately reflective conditions of set
(b) are employed. However, the approximately reflective conditions produce some spurious oscillations
close to the cylinder surface for M 0.5. Conditions set (a) are found to give better results for low
subsonic Mach numbers. At the artificial far boundary, characteristic boundary conditions have been
utilized. All the computations are carried out with a time step of 0.510-3 for a long time such that the
transients die out and the flow attains a long term stable state (stationary or non-stationary). The value of
is taken to be 0.1 in all the computations, unless mentioned otherwise.
B. Transonic flow (M = 0.38-0.98)
For M = 0.38, at large times, the flow attained a symmetric steady state with no shock formation and no
vortex flormation on the downstream side as shown in Fig. 6.11(a). However, as reported by Botta
(1995a), a periodic vortex-shedding flow state is observed at large times for M = 0.5. Figure 6.11(b)
clearly shows that a radial shock forms on the cylinder surface which leads to flow separation and
eventually to a vortex-shedding periodic flow. The complete periodic cycle involves, alternate formation
of shocks on the top and bottom half of the cylinder surface, leading to alternate generation of counterrotating vortices. These cyclic events are captured in the instantaneous density contour and surface
distribution plots shown in Fig. 6.12, generated from snapshots of the flowfield recorded over one time
period of the cycle. The radial shocks form alternately over the top and bottom half of the cylinder
surface and move towards the upstream side as the vorticity downstream of the shock builds up.
Eventually shocks are pushed too far upstream so that locally the flow cannot sustain them.
Simulations are carried out further for higher Mach numbers going upto 0.98 in order to assess
the ability of the PVU-M+ to correctly capture the bifurcations from periodic to quasi-periodic / chaotic
states and back to nearly steady states as reported by Botta (1995a). In order to monitor these changes in
the temporal behavior, time histories of Lift and Drag Coefficients are recorded for M = 0.5-0.98. As
the free-stream is aligned with the x-direction, the force coefficients are defined in the usual manner (in
the body-fitted coordinates) as,

CL
CD

U2 d

2
M2

2Fx
U2 d

2
M2

2Fy

p sin(2

)d ,

(6.32)

p cos(2

)d ,

71 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012
Since the flow is inviscid, the viscous contributions are absent. For the low Mach number scaling the
factor 1 M 2 is dropped in equations (6.32).
Figure 6.13 depicts the changes that take place in the time histories of the Drag Coefficient as M is
increased.
Only the long term behavior is shown in the figures.
It can
t=300
2

t=150
2

-1

-1

-2

-2

-1

-1

t=300

t=150

-1

-2

(a)

-1

-1

-2

-1

(b)

Figure 6.11 Density contour maps (left) and streamline patterns (right) for (a) M = 0.38
(steady state) and (b) M = 0.5.

be readily observed that the flow behavior changes from periodic to quasi-periodic, with increase in the
frequencies / time scales as M is increased to 0.8. At M = 0.9 the character of flow again changes and
the flow reverts back to a nearly steady state with fluctuation amplitudes dropping to very low values.
The Strouhal number obtained from the present scheme also matches quite well with the experimental
value of 0.42 at (M= 0.98, Re = 105) as reported by Dyment (1979). The changes in the spatial flow
pattern in the range 0.6 M 0.98 are shown in Fig. 6.14 via instantaneous density contour plots. At
M = 0.8, two primary and one secondary shock can be seen on the cylinder surface. At M = 0.9, in
addition to weak radial shocks on the cylinder surface (visible in density contours), wake recompression
oblique shocks are observed. Vortices are clearly seen to form in the wake recompression shock zone and
propagate downstream with the flow.

72 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012
C. Supersonic flow at M = 3.0 and M = 10.0
In order to examine the flow under supersonic / hypersonic free-stream conditions, computations
are carried out at M = 3.0 and M = 10.0. The flow attains a steady state and the density flow pattern is
depicted in Figs. 6.15(a)-6.15(b). The detached curved shock in front of the cylinder is accurately
captured without any known distortion.

t=278

t=280

t=279

0.5

0.5

0.5

-0.5

-0.5

-0.5

-1

-1

-1

0.5

0.5

0.5

-0.5

-0.5

-0.5

-1

-1

-1

t=281

t=282

t=283

Figure 6.12 Cyclic variations in the density field with alternate radial shock formation and vortexshedding at M = 0.5
effects like carbuncle phenomenon exhibited by some of the other methods. At M = 3.0, the
dimensionless observed shock detachment distance of 0.35 agrees well with the experimental value of
0.336 reported in Liepmann and Roshko (2001). At M = 10.0, the detached shock becomes closer to the
cylinder and is swept more (bends) towards the downstream side. No carbuncle phenomenon is observed
even for M = 10.0.
D. Two-dimensional viscous flow past a Circular Cylinder
In order to examine the performance of the scheme for viscous flows, the well studied problem of
viscous flow past a circular cylinder at M = 0.1, Re = 100 is considered. The low Mach, low Re flow is
considered to examine the accuracy of the scheme in computing a nearly incompressible viscous flows.
The value of is 0.1 and the same grid of 181211 size (far boundary at 20 cylinder diameter) as used in
the previous case is employed unless mentioned otherwise.
For viscous flows, the boundary conditions at the cylinder surface comprise of no-slip condition
for the velocity, specified temperature or heat flux. The pressure at the solid surface is obtained by
employing the normal momentum equation. The equation of state is employed to obtain the density on
73 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012
the cylinder surface. In addition, the expressions for the Drag and Lift Coefficients are modified to
incorporate the viscous contributions as,
2

CD

p cos d
0
2

CL

psin d
0

1
Re

1
Re

sin d
0

cos d
0

4
3Re

4
3Re

D cos d ,
0

(6.34)
Dsin d .

In the above relations, is vorticity and D is the dilation / volumetric strain rate on the cylinder surface.
At M = 0.1, th flow past a circular cylinder would behave like an incompressible flow with very small
copressibility effect (variation in density, temperature and related
2

1.9

1.9

1.8

1.8

1.7

1.7

1.6

1.6

1.5

1.5

1.5
1.3

CD

1.2

CD

1.4

1.3

CD

1.4

1.2

1.1

1.1

0.9

0.9

0.8

0.8

0.7

0.7

0.6
0.5
200

0.6
225

250

275

300

0.5
200

225

250

275

300

300

(a)
2.1
2

1.8

1.9

1.9

1.7

1.8

1.6

1.7

1.7

1.5

1.6

1.6

1.4

1.5

1.5

1.3

1.4

1.4

CD

1.2

1.2

1.1

1.1

0.9

0.8

0.9

0.9

0.7

0.8

0.8

0.6

0.7

(d)

0.6

400

1.3

1.1

300

375

1.8

1.3

275

400

2.1

CD

CD

250

375

(c)

(b)

1.2

350

1.9

225

325

0.7
325

350

375

400

0.6

325

350

(e)

(f)

)
Figure 6.13 Histories of Drag Coefficient for a free-stream Mach no. of a) 0.5 b) 0.6 c) 0.7 d) 0.8
e) 0.9 and f) 0.98

transport properties). The incompressible flow at Re=100 is known to be unsteady with vortex shedding.
The time histories of drag and lift coefficient are shown in Fig. 6.16. The periodic nature of flow is quite
evident from Fig. 6.16. Figure 6.17(a)-6.17(b) depict the instantaneous flowfield structure through
snapshots of streamlines and vorticity, respectively. The regular Karman Vortex Street is clearly visible
in the vorticity field visualization.

74 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

t=400

t=400

t=300
2

-1

-1

-1

-2

-2

-2

-1

-1

-1

-1

-1

-1

-2

-2

-2

-1

-1

M = 0.9

t=300

t=300
2

M = 0.8

t=400

-1

M = 0.7

M = 0.6

M = 0.98

M = 0.95

Figure 6.14 Instantaneous density flow fields depicting the changes in the flow structure with
increase in free-stream Mach no.

-2

-2

-4

-4
-1

(a)

-1

(b)

Figure 6.15 (a) Density contour maps of the steady flow field at (a) M = 3.0 and (b) M =
10.0 inviscid flow past a circular cylinder.

75 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012
From the practical point of view, the robustness and accuracy of the PVU-M+ scheme combined with the
overall simplicity makes it an attractive algorithm for the computing of compressible flows.

1.6

0.5

1.55

0.4

1.5

0.3

1.45

0.2

1.4

0.1

CD

CL

1.35
1.3

-0.1

1.25

-0.2
1.2

-0.3
1.15

-0.4

1.1

-0.5

1.05
260

270

280

260

290

270

280

290

(a)

(b)

Figure 6.16 Time histories of (a) drag coefficient and (b) lift coefficient for M = 0.1, Re = 100
flow past a cylinder.
4

20

15

10

-2

-1

X
(a)

-10

10

(b)

Figure 6.17 Instantaneous snapshot of (a) streamlines and (b) vorticity for flow past a circular
cylinder at M = 0.1, Re = 100.

76 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012
REFERENCES
Anderson, J.D. (1995), Computational Fluid Dynamics, New York: McGraw-Hill.
Blazek, J. (2001), Computational Fluid Dynamics: Principles and Applications, Elsevier Science Ltd.,
U.K, 112-113.
Botta, N. (1995a), The inviscid transonic flow about a cylinder, J. Fluid Mech., 301, 225-250.
Botta, N. (1995b), Numerical Investigations of Two-dimensional Euler Flows: cylinder at transonic
speed, Swiss federal Institutes of technology, Zurich, Diss. ETH No. 10852.
Emery, A. F. (1968), An evaluation of several differencing methods for inviscid fluid flow problems, J.
Comp. Physics, 2(3), 306-331.
Hirsh, C. (1990), Computation of Internal and External flows-Vol. 2, Wiley, 344-401.
Kim, K. H., Kim, C., and Rho, O. H. (2001), Methods for the accurate computtions of Hypersonic flows,
J. Comp. Physics, 174, 38-80.
Laney, C. B. (1998), Computational Gasdynamics, Cambridge (U. K): Cambridge Univ. Press.
Liepmann, H. W., and Roshko. A. (2001), Elements of Gasdynamics, Dover Publication Inc.
Liou, M. S. (1996), A Sequel to AUSM: AUSM+, J. Comp. Physics, 129, 364-382.
Liu, C. et al. (1998), Preconditioned multigrid methods for unsteady incompressible flows, J. Comp.
Physics, 139(1), 35-57.
Mujaheed, S. K. (2010),Higher Order Particle Velocity Upwind Scheme for the Computation of
Compressible Flows, Dissertation, Aligarh Muslim University, India.
Pandolfi, M. and Larocca, F. (1989), Transonic flow about a circular cylinder, Comp. and Fluids, 17(1),
205-220.
Qamar, A., Hasan, N., Sanghi, S. (2006), New scheme for the computation of compressible Flows, AIAA
Journal, 44, 1025-1039.
Qamar, A., Hasan, N., Sanghi, S. (2010), A new spatial discretization strategy of the convective flux
Term for the Hyperbolic Conservation Laws, Engg. Appls. of Computational Fluid Mech., 4, 593-661.
Shameem, F. (2010), Higher Order Particle Velocity Upwind Scheme for Multi-dimensional
Compressible Flows governed by Euler / Navier-Stokes Equations, Dissertation, Aligarh Muslim
University, India.
Toro, E. F. (1999), Riemann solvers and numerical methods for fluid dynamics (second ed)., Berlin:
Springer-Verlag, 225-235.
Woodward, P., and Collela, P. (1984), The numerical simulation of 2-D flow with strong shock, J. Comp.
Physics, 54, 115-173.
77 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

Chapter 7
AN INTRODUCTION TO TURBULENT MODELING
SYED FAHAD ANWER1, AND NADEEM HASAN2
1
Assistant Professor Department of Mechanical Engineering, ZHCET, AMU, Aligarh
2
Associate Professor Department of Mechanical Engineering, ZHCET, AMU, Aligarh

7.1 INTRODUCTION
The abbreviation CFD stands for computational fluid dynamics. It represents a vast area of numerical
analysis in the field of fluids flow phenomena. Headway in the field of CFD simulations is strongly
dependent on the development of computer-related technologies and on the advancement of our
understanding and solving ordinary and partial differential equations (ODE and PDE). However CFD is
much more than just computer and numerical science. Since direct numerical solving of complex flows
in real-like conditions requires an overwhelming amount of computational power success in solving such
problems is very much dependent on the physical models applied. These can only be derived by having a
comprehensive understanding of physical phenomena that are dominant in certain conditions. [1], [5]
Why turbulence?
Whenever turbulence is present in a certain flow it appears to be the dominant over all other flow
phenomena. That is why successful modeling of turbulence greatly increases the quality of numerical
simulations.
All analytical and semi-analytical solutions to simple flow cases were already known by the end of 1940s.
On the other hand there are still many open questions on modeling turbulence and properties of
turbulence it-self. No universal turbulence model exists yet.
Further-more, the price tag for our ignorance is immense. That makes the area of CFD modeling also
extremely economically attractive.

7.2 GENERAL REMARKS


7.2.1 Ideal turbulence model
Solving CFD problem usually consists of four main components: geometry and grid generation, settingup a physical model, solving it and post-processing the computed data. The way geometry and grid are
generated, the set problem is computed and the way acquired data is presented is very well known.
Precise theory is available. Unfortunately, that is not true for setting-up a physical model for turbulence
flows.
The problem is that one tries to model very complex phenomena with a model as simple as possible.
Therefore an ideal model should introduce the minimum amount of complexity into the modeling
equations, while capturing the essence of the relevant physics.

78 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

7.2.2 Complexity of the turbulence model


Complexity of different turbulence models may vary strongly depends on the details one wants to observe
and investigate by carrying out such numerical simulations. Complexity is due to the nature of NavierStokes equation (N-S equation). N-S equation is inherently nonlinear, time-dependent, three-dimensional
PDE.
Turbulence could be thought of as instability of laminar flow that occurs at high Reynolds numbers (Re).
Such instabilities origin form interactions between non-linear inertial terms and viscous terms in N-S
equation. These interactions are rotational, fully time-dependent and fully three-dimensional. Rotational
and three-dimensional interactions are mutually connected via vortex stretching. Vortex stretching is not
possible in two dimensional space. That is also why no satisfactory two-dimensional approximations for
turbulent phenomena are available.
Furthermore turbulence is thought of as random process in time. Therefore no deterministic approach is
possible. Certain properties could be learned about turbulence using statistical methods. These introduce
certain correlation functions among flow variables. However it is impossible to determine these
correlations in advance.
Another important feature of a turbulent flow is that vortex structures move along the flow. Their lifetime
is usually very long. Hence certain turbulent quantities cannot be specified as local. This simply means
that upstream history of the flow is also important of great importance.

7.2.3 Classification of turbulent models


Nowadays turbulent flows may be computed using several different approaches. Either by solving the
Reynolds-averaged Navier-Stokes equations with suitable models for turbulent quantities or by
computing them directly. The main approaches are summarized below.
Reynolds-Averaged Navier-Stokes (RANS) Models
Eddy-viscosity models (EVM)
One assumes that the turbulent stress is proportional to the mean rate of strain. Furthermore eddy viscosity is derived from turbulent transport equations (usually k + one other
quantity).
Non-linear eddy-viscosity models (NLEVM)
Turbulent stress is modeled as a non-linear function of mean velocity gradients. Turbulent
scales are determined by solving transport equations (usually k + one other quantity).
Model is set to mimic response of turbulence to certain important types of strain.
Differential stress models (DSM)
This category consists of Reynolds-stress transport models (RSTM) or second-order
closure models (SOC). One is required to solve transport equations for all turbulent
stresses.
Computation of fluctuating quantities
Large-eddy simulation (LES)
One computes time-varying flow, but models sub-grid-scale motions.
Direct numerical simulation (DNS)
79 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012
No modeling what so ever is applied. One is required to resolve the smallest scales of the
flow as well.
Extend of modeling for certain CFD approach is illustrated in the following figure 1. It is clearly seen,
that models computing fluctuation quantities resolve shorter length scales than models solving RANS
equations. Hence they have the ability to provide better results. However they have a demand of much
greater computer power than those models applying RANS methods. [2], [5]

Figure 1 Extend of modeling for certain types of turbulent models

7.3 REYNOLDS-AVERAGED NAVIER-STOKES MODELS


The following Chapter deals with the concept of Reynoldss decomposition or Reynoldss averaging. The
term Reynoldss stress is introduced and explained briefly. Further on methods how to include these ideas
into certain numerical models are presented. [1], [3], [5]

7.3.1 Reynoldss decomposition


7.3.1.1 Equations describing instantaneous fluid motion
For easier understanding of certain mathematical ideas it is convenient to briefly revise N-S equations
describing instantaneous fluid motion at the beginning. All variables describing instantaneous flow are
marked with a tilde. These variables are fluids density ( ), velocity components ( ), pressure ( ) and
components of viscous stress tensor ( ). At this point it is also suitable to point out that these variables
are al time and space dependent.
General N-S equations for both turbulent and non-turbulent flow run:
80 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012

and

(7.1)

(7.2)
The firs equation (7.1) is called momentum equation (second Newtonian law for fluids). The second
equation (7.2) is known as continuity equation. At this point, we would also like to define viscous stress
tensor as follows:
(7.3)
where means:
(7.4)
If we assume incompressible flow the previous equations simplify immensely. The continuity equation
(7.2) is reduced to

. Having this result in mind the momentum equation (7.1) can be rewritten as:
(7.5)

The factor is often regarded to as kinematic viscosity. Viscous stress tensor simplifies as well:
(7.6)

7.1.2 Reynolds averaging


The concept of Reynolds averaging was introduced by Reynolds in 1895. One may consider Reynolds
averaging in many different ways. There are three most common perceptions of this term: time averaging,
space averaging or ensemble averaging. Time averaging is appropriate when considering a stationary
turbulence. That is when the flow does not vary on the average in time. In such cases time average is
defined by:

(7.7)
Space average is appropriate for homogenous turbulence. That is a turbulent flow that on the average does
not vary in any direction. Space average is defined by:

(7.8)

Ensemble average is the most general aspect of Reynolds average. It should be understood as an average
of N identical experiments. Ensemble average is both time- and space-dependent. It is defined by:

(7.9)
The main idea of Reynolds averaging is to decompose the flow to averaged and fluctuating component:
(7.10a)
(7.10b)
81 | P a g e

Workshop on Computational Methods in heat and Flow at MED, AMU ,18-19th February,2012
(7.10c)
This process is called Reynolds decomposition. The upper case letters represent the mean values; the
lower case letters represent the fluctuating values on the right hand side in expressions (3.10). By
inserting relations (7.10) into N-S equation (7.1) one obtains the following expression:
(7.11)
This equation can now be averaged to yield an equation expressing momentum conservation for the
averaged motion. At this point it is important to stress that the operations of averaging and differentiation
commute. It is also assumed that the average of fluctuating quantities is zero. Therefore the averaged
momentum equation reduces to:
(7.12)
In similar manner continuity equation for incompressible flow can be decomposed. Such a continuity
equation is linear therefore the original form for the instantaneous motion is preserved:
(7.13)

Using the second relation in equation (7.13) one can rework the last term on the right hand side of the
equation (7.12). The result runs:

Term
has the same structure and dimension as the viscous stress tensor. However this term is not
a stress at all. It is just a re-worked contribution of the fluctuating velocities to the change of the averaged
ones. On the other hand as far as the motion of the fluid is concerned it acts as a stress. Hence its name,
Reynolds stress.

7.3.2 The closure problem


The problem with the above concept of Reynolds decomposition and averaging is that it introduces
additional variables (
), for which there are no available relations. Not in a
general sense at least. [1], [8].
One could pretend that Reynolds stress is indeed a stress and try to write constitutive relations similar to
those for viscous stress. However there is an important difference among these two stresses. Viscous
stress is a property of a fluid. That is why separate experiments can be carried out in order to determine
corresponding constitutive relations. These relations are valid then whenever a flow in that particular fluid
is observed. On the other hand Reynolds stress is a property of the flow. Hence, it is dependent on the
flow variables themselves. That is the reason why it changes from flow to flow and no general
constitutive relations are available.

82 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

7.3.3 Reynolds stress modeling


There were many different concepts and attempts to solve the turbulence closure problem in a general
form in the past. Nowadays there are two concepts that underlie most of the Reynolds stress models. One
and the most obvious attempt was to describe Reynolds stress in a similar way viscous stress is described:
the fluid is simply prescribed another property turbulent viscosity. This model had been introduced by
Boussinesq back in 1877 even earlier then Reynolds proposed his decomposition and averaging approach
in 1895. There are many difficulties regarding this model. Probably the major problem is how to obtain
this property without carrying out an actual experiment involving that particular flow. Major
breakthrough was done by Prandtl in 1925. He introduced the mixing length concept analogous to mean
free path of the molecules in gas. He also prescribed an algebraic expression relating turbulent viscosity
to the mixing length. That is why Prandtl is known as the founder of so called algebraic or zero-equation
models. Zero-equation refers to the fact, that no additional transport equations besides to energy, mass and
momentum equations are needed.
Another important breakthrough was done by Prandtl in 1945, by introducing a concept of turbulent
viscosity as a function of turbulent kinetic energy. Major advantage of this concept over the previous one
is that it already takes into account flows history. Hence it is a physically more realistic model. Prandtl
used one additional transport equation to model turbulent kinetic energy. Models based on this concept
are usually called one-equation models.
Still there is a need to specify a turbulence length scale, which is also a flow dependent property. Hence
one still needs to have certain knowledge about the studied flow in advance. Therefore such models are
called incomplete. Both zero- and one-equation models are incomplete.
On the other hand complete model would be characterized by the fact that no knowledge of the flow
except the initial and boundary conditions is needed in advance.
First complete model was introduced by Kolmogorov in 1942. The basic idea of his model was to model
turbulent kinetic energy (k) and the rate of energy dissipation ( ) and then relate the missing information
of length and time scales to these quantities. Since two additional equations are used to model and these
kind of models are called two-equation models. They are also referred to as k- models. Variations of
this concept are so called models (k-),
. Instead of , is modeled.
Another conceptually different attempt was to model Reynolds stress tensor directly. At first one tried to
derive actual Reynolds stress equations. The idea was to re-work fluctuating momentum equation (7.15)
in such a manner that it would describe Reynolds stress. Major problem with this attempt is that it
introduces even more new unknown variables for which no constitutive relations are known. In 1951
Rotta managed to successfully model Reynolds stress tensor by using PDE. This model is concept is more
realistic than the Boussinesqs turbulent viscosity model. However it introduces six additional equations
describing Reynolds stress and one additional equation describing turbulence length scale.
7.3.3.1 One-equation model
The Spalart-Allmaras Turbulence Model
In all of the following, a "hat" is used over the turbulence field variable, rather than a "tilde" as given in
the references, for the sole practical reason that the "tilde" showed up very poorly on the screen.
The one-equation model [6], [7], [8] is given by the following equation:

83 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

and the turbulent eddy viscosity is computed from:

where

and is the density,


is the molecular kinematic viscosity, and
viscosity. Additional definitions are given by the following equations:

where
nearest wall, and

is the molecular dynamic

is the magnitude of the vorticity, d is the distance from the field point to the

The boundary conditions are:

The constants are:

The Nut-92 Turbulence Model


The Nut-92 model evolved from a model originally proposed by Kovasznay in 1967. The model was
improved over the years, including one termed Nut-90. None of these earlier variants is described here
The model [9] (written in conservation form) is given by the following:
84 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

where

Here, a is the speed of sound and the angle braces < > represent a long-time average. The turbulent eddy
viscosity is

Other term appearing in the above equations are given by:

The term

and

is the distance to the nearest wall, and

is the Nikuradse roughness scale height (0 for smooth walls).

The constants are:

85 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

There are no specific farfield boundary conditions recommended for this model. At solid smooth walls:

At solid rough walls:

where

is the wall shear stress and

is the friction velocity

7.3.3.2 Two-equation models


There are quite a few two equation models in turbulence, some of the promising models are
The Chien k-epsilon Turbulence Model
The two-equation model [10] (written in conservation form) is given by the following:

where

and the turbulent eddy viscosity is computed from:

where

is the density and

is the molecular dynamic viscosity.

There are no specific farfield boundary conditions recommended for this model. At solid walls, the
boundary conditions are:

The constants and auxiliary functions are:


86 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

with
a non-local function of distance to the wall (in wall variables), and thus dependent on properties
at the nearest wall location.

with U the velocity parallel to the wall, n the direction normal to the wall, and d the minimum distance to
the wall.

Wilcox (2006) k-omega:


The two-equation model [11, 12], (written in conservation form) is given by the following:

where

and the turbulent eddy viscosity is computed from:

87 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

where:

and

is the density and

is the molecular dynamic viscosity.

There are no specific far-field boundary conditions recommended for this model At solid walls:

There are various wall boundary conditions mentioned for in the references above, including both
smooth and rough walls. For smooth walls, the asymptotic behavior is

as
, where d is the distance to the nearest wall. The references also specify a so-called "slightlyrough-surface" boundary condition for :

where it is important for smooth walls to "select a small enough value" of

to insure that

The constants and auxiliary functions are:

88 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Wilcox (1998) k-omega


The two-equation model [13](written in conservation form) is given by the following:

and the turbulent eddy viscosity is computed from:

Meanings of variables and definitions of boundary conditions are the same as for (Wilcox2006).
The constants and auxiliary functions are:

Wilcox (1988) k-omega Two-Equation Model (Wilcox1988)


The basic equations for this two-equation model [14, 15] are the same as for (Wilcox1998):

and the turbulent eddy viscosity is computed from:

89 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

The only difference is in the values taken by some of the variables:

Low Reynolds Number Version of Wilcox (2006) k-omega Two-Equation Model (Wilcox2006-LRN)
Instead of

use:

Instead of

use:

Instead of

use:

Instead of

use:

Instead of

in the diffusion term use:

Instead of

in the

diffusion term use:

with:

90 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

7.3.3.3 Reynolds stress models


The Explicit Algebraic Stress k-omega Turbulence Model
This web page gives detailed information on the equations for various versions of Explicit Algebraic
Stress Models (EASM) in k-omega form. EASMs as a class have been developed by several independent
groups over the years. As a result, it is difficult to present the many variations completely and cohesively.
Currently, only a small subset is given. If any particular variant has been overlooked, please report it to
the page curator. It should also be noted that the distinction is drawn between nonlinear EASMs[17-22]
Nonlinear EASMs are fundamentally different from linear eddy viscosity models in the equation for
obtaining the modeled turbulent stresses in the Reynolds-averaged or Favre-averaged Navier-Stokes
equations. Linear models use the Boussinesq assumption:

(where the
term is often ignored for non-supersonic speed flows, and the second term in
parentheses is identically zero for incompressible flows). For nonlinear EASMs, this equation is altered to
include additional (nonlinear) terms, as detailed below. Thus, including nonlinear turbulence models like
EASM is not simply a matter of computing
alone. One must also insure that the turbulent stress
terms
are computed appropriately to include the additional nonlinear components in the Navier-Stokes
equations.
In this model, the turbulent stress relationship can be given by:

where

Note that for 2-D flows, the constitutive model can, if desired (choosing a different set of basis terms) be
simplified to:

The two-equation model (written in conservation form) is given by the following:

91 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

where

is the density and

is the molecular dynamic viscosity, and

and the turbulent eddy viscosity is computed from:

The variable coefficient

is obtained from:

However, if the 2-D flow (superscript (2D)) constitutive model is used, then
is used instead. Furthermore,

and N is obtained from the solution of a cubic equation. The solution is given by:
for
for
where

92 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Farfield boundary conditions are not specified for this model. However, the reference states that the
model is reasonably insensitive to freestream values of k and , provided that excessively high values are
avoided.
Solid wall boundary conditions are:

where

for

with
and

for
specified for rough walls, and for smooth walls:
is the inner-scaled wall distance of the first solution point next to the solid wall.

The constants in the scale-determining k- model are determined via:

where C represents any of the model coefficients, and

where d is the distance to the nearest wall. The coefficient values are:

Nonlinear EASM k-omega (2005) Model with Curvature Correction (EARSMko2005-CC)


This model is the same as the (EARSMko2005), with the exception that

93 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

where

and

with all other

, and

is the Levi-Civita symbol, defined as

zero.

Nonlinear EASM k-omega (2005) Model


Flows (EARSMko2005a), (EARSMko2005a-CC)

with

Better

Approximation

for

3-D

The equations are the same as (EARSMko2005) or (EARSMko2005-CC), with the exception that N gets
augmented by an additional term:

with

Nonlinear EASM k-omega (2003) Model (EASMko2003)


However, note that the journal reference (EASMko2001) used different values for two of the constants (
and
); those listed in the NASA/TM reference (same as below) are considered better,
particularly for jet-type flows.
In this model, the turbulent stress relationship is derived based on a three-basis approximation. It is given
by:

The two-equation model (written in conservation form) is given by the following:

where

94 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

and the turbulent eddy viscosity is computed from:

where

is the density and

The variable coefficient

is the molecular dynamic viscosity.


is obtained by solving the cubic equation:

where

The correct root to choose from this cubic equation is the root with the lowest real part. The degenerate
case when
must be avoided. The appendix of Journal of Aircraft, Vol. 38, No. 5, 2001, pp. 904910 provides an algorithm for determining this root, as follows.
If

, then

Otherwise, define:

If

, then

95 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

If

, then

In this model,

is limited to be no smaller than 0.0005.

Other parameters are:

The function

is given by:
when
when

where

The P term in the k-equation is limited, replaced by:


96 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Also, the variables


constraint).

, and

(as defined) are all limited to be negative (this is the realizability

The farfield boundary conditions given in this reference are:

where
,
respectively.

where

, and

are the reference (typically freestream) speed of sound, density, and viscosity,

is the distance from the wall to the nearest field solution point.

The constants are:

REFERENCES
[1] Wilcox, D.C. Turbulence Modelling for CFD, DCW Industries, California, USA, 1994
[2] Apsley, D., CFD, Turbulence modelling in CFD, 2004
[3] Celi, A. Performance of Modern Eddy-Viscosity Turbulence Models, Institut fr Aerodynamik un
Gasdynamik, Germany, 2004
[4] Bell, B. Turbulent flow cases, Fluent Inc. 2003
[5] http://www.cfd-online.com/Wiki/Turbulence_modeling, March 2007
[6] Spalart, P. R. and Allmaras, S. R., "A One-Equation Turbulence Model for Aerodynamic
Flows," Recherche Aerospatiale, No. 1, 1994, pp. 5-21.
[7] Spalart, P. R., "Trends in Turbulence Treatments," AIAA 2000-2306, June 2000.
[8] Spalart, P. R. and Rumsey, C. L., "Effective Inflow Conditions for Turbulence Models in
Aerodynamic Calculations," AIAA Journal, Vol. 45, No. 10, 2007, pp. 2544-2553.

97 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

[9] Shur, M., Strelets, M., Zaikov, L., Gulyaev, A., Kozlov, V., Secundov, A., "Comparative Numerical
Testing of One- and Two-Equation Turbulence Models for Flows with Separation and Reattachment,"
AIAA Paper 95-0863, January 1995.
[10] Chien, K.-Y., "Predictions of Channel and Boundary-Layer Flows with a Low-Reynolds-Number
Turbulence Model," AIAA Journal, Vol. 20, No. 1, 1982, pp. 33-38.
[11] Wilcox, D. C., "Formulation of the k-omega Turbulence Model Revisited," AIAA Journal, Vol. 46,
No. 11, 2008, pp. 2823-2838.
[12] Wilcox, D. C., Turbulence Modeling for CFD, 3rd edition, DCW Industries, Inc., La Canada CA,
2006.
[13] Wilcox, D. C., Turbulence Modeling for CFD, 2nd edition, DCW Industries, Inc., La Canada CA,
1998.
[14] Wilcox, D. C., "Reassessment of the Scale-Determining Equation for Advanced Turbulence
Models," AIAA Journal, Vol. 26, No. 11, 1988, pp. 1299-1310.
[15] Wilcox, D. C., Turbulence Modeling for CFD, 1st edition, DCW Industries, Inc., La Canada CA,
1993.
[16] Wilcox, D. C., Turbulence Modeling for CFD, 3rd edition, DCW Industries, Inc., La Canada CA,
2006.
[17] Hellsten, A., "New Advanced k-omega Turbulence Model for High-Lift Aerodynamics," AIAA
Journal, Vol. 43, No. 9, 2005, pp. 1857-1869.
[18] Wallin, S. and Johansson, A. V., "An Explicit Algebraic Reynolds Stress Model for Incompressible
and Compressible Turbulent Flows," J. Fluid Mechanics, Vol. 403, 2000, pp. 89-132.
[19] Hellsten, A., "New Advanced k-omega Turbulence Model for High-Lift Aerodynamics," AIAA
Journal, Vol. 43, No. 9, 2005, pp. 1857-1869.
[20] Wallin, S. and Johansson, A. V., "Modelling Streamline Curvature Effects in Explicit Algebraic
Reynolds Stress Turbulence Models," Int. J. Heat and Fluid Flow, Vol. 23, No. 5, 2002, pp. 721730.
[21] Hellsten, A., "New Two-Equation Turbulence Model for Aerodynamics Applications," Helsinki
University of Technology Laboratory of Aerodynamics, Report A-21, PhD Dissertation, 2004, Espoo,
Finland.
[22] Wallin, S. and Johansson, A. V., "An Explicit Algebraic Reynolds Stress Model for Incompressible
and Compressible Turbulent Flows," J. Fluid Mechanics, Vol. 403, 2000, pp. 89-132.

98 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

SECTION 2: HANDS ON SESSION TUTORIALS

99 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Chapter 1
INTRODUCTION TO MESH GENARATION
1.1 Structured Mesh Generation by Using Gambit
Problem Description
The problem to be considered is schematically shown in figure 1. Consider the flow in differential cavity
with one side wall heating for aspect ratio 1 (all sides are of equal length).
TOP

SIDE

SIDE

BOTTOM
L

Figure 1: Schematic of the Problem


Procedure
Start GAMBIT
Start
Programs
gambit2.3
Run
This should open up the gambit interface that would look like in fig 2.

Figure 2: Gambit Interface.


100 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Step 1: Select a Solver


1. Choose the solver to run your CFD calculation by selecting the following from the main menu bar.
Solver
FLUENT 5/6
This selects the FLUENT 5/6 solver as the one to be used for the CFD calculation. The choice of a
solver dictates the options available in various forms (for example, the boundary types available in the
Specify Boundary Types form). The solver currently selected is indicated at the top of the GAMBIT
GUI.
Step 2: Create the vortex
1. Create the corner point by drawing a vortex
Vertex command button
Create vertex
To create vertex enter label A and x = 0, y = 0. Similarly create vertex B (x = 1, y = 0), C (x = 1, y = 1)
and D (x = 0, y = 1).

Fit the display to screen by using

at the bottom of the screen to see the vertices (A, B, C and D).

1. Creating an edge for cavity.


Edge command button
Select votex A and B and then apply.

Create edge

101 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Same for B and C, C and D, D and A.

2. Creating a face for edge


Face command button
Create face
Select all the edges and label them as domain and then click apply. The color of the edges turn to blue

102 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

3. Creating a mesh point on edge.


Mesh command button
Select all edges

Edge

Mesh edge

Take Double sided, Ratio 1.05 and Spacing 0.01and click apply

103 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

4. Creating a mesh on face.

Mesh command button


Face
Mesh edge
Select domain and for element Quad, for type Map and click apply
Mesh will generate on face.

104 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Figure 3: The Meshed Domain.


Step 4: Set Boundary Types
Zones
Specify Boundary Types
This will open the Boundary types panel
1. Under Entity change the option from Faces to Edges by right clicking.
105 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

2. Choose the cavity left edge and under Type leave it as default wall. In the Name box, enter left wall
for the name of the edge (any name can be specified) and apply.
3. Similarly select the top edge of the rectangular domain and name it as Top wall. Name the bottom
edge as Bottom wall and right edge as right wall.

Step 5: Exporting the mesh to be read by FLUENT


File
Export
Mesh
It will open the Export Mesh File panel. Specify the path and the filename of the mesh to be exported.
Specify cavity.msh as the filename. Make sure to click on the Export 2-D mesh radio button to make it
active. Click apply. The mesh will get exported in a format that FLUENT reads.
File
Save as
Enter path and filename. This will save the .dbs file.
File
Exit

106 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

1.2 Unstructured Mesh Generation by Using Gambit


Problem Description
The problem to be considered is shown schematically in figure 1. Consider flow past a circular cylinder
placed inside a channel. The cylinder diameter is 1m and the cylinder is placed 10cm away from the
inlet. The height of the channel is 20cm and the channel width is 50cm. The mesh generated to capture
the flow dynamics around a cylinder is unstructured mesh.

Procedure
Start GAMBIT
Start
Programs
gambit2.3
Run
This should open up the gambit interface that would look like in figure 2.

Figure 2: Gambit Interface.


Step 1: Select a Solver
1. Choose the solver to run CFD calculation by selecting the following from the main menu bar
Solver
FLUENT 5/6
This selects the FLUENT 5/6 solver as the one to be used for the CFD calculation. The choice of a
solver dictates the options available in various forms (for example, the boundary types available in the
Specify Boundary Types form). The solver currently selected is indicated at the top of the GAMBIT
GUI.
Step 2: Create the domain
107 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

1. Create the outer domain by drawing a rectangle


Face command button
Create face
In the create rectangle box, enter the height and width as w = 50, h = 20 and apply.

If you do not see the rectangle, fit the display to screen by using
2. Similarly create a circle for the cylinder.
Right click on

at the bottom.

and choose the circle option. In the radius panel enter r = 0.5.

3. Offset the circle by 10 units to the left by using the move command.
Move/Copy/Align faces

To select the circle, use shift + left click on the circle.

In the local panel, enter -10 for the x value. This will move the circle by 10 units to the left.
4. Subtract the circle from the rectangle to get the region of the domain where the flow occurs.
108 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Right click on Boolean Operations


and choose subtract option. This will open up the subtract
real faces window. For the first selection, choose the rectangle by using shift + left click on any of the
boundaries of the rectangle. Once the rectangle is selected, it will be displayed in red. Now click in the
subtract faces box and choose the circle by following the same procedure as before. Click Apply.

The transcript window will give a description of the operations performed. Any error will also be
displayed here.
Step 3: Meshing the edges.
While a face can be directly meshed in gambit, specifying the node distribution on the edges gives a
better control on the grid distribution. This would be especially important when the problem requires a
finer mesh in some regions of the domain and not so fine in other regions where there is not much action
taking place. In the present example it is clear that most of the interesting physical phenomena take place
near the surface of the cylinder and hence needs a fine mesh close to the cylinder.
Mesh
Edge
Mesh Edges
This will open up the edge meshing panel.
1. Select the edge that makes the cylinder using the same procedure described previously. Leave the
value of the ratio at the default value of 1. Right click on the Interval Size button and choose Interval
Count option. This will allow specifying the number of nodes on the cylinder surface. Enter a value of
50 in the corresponding box to the left and apply.

2. Select all the other edges. Right click on the Interval Count button and bring it back to Interval Size
and enter 1 in the box. Click Apply.

109 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

This will create an edge mesh for all the edges.


Now it is ready to mesh the face.
Mesh
Face
This will open the mesh faces panel

Mesh Faces

Select the face of the domain. In the Elements option, right click on the Quad option and choose Tri.
The type will be set to Pave by default. Click apply. The face will be meshed with triangular mesh
elements. The display should look as shown in figure 3.
Finer mesh is created near to the cylinder surface and coarser away from the cylinder surface.

110 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Figure 3: The Meshed Domain.


Step 4: Set Boundary Types.
Zones
Specify Boundary Types
This will open the Boundary types panel

1. Under Entity change the option from Faces to Edges by right clicking.
2. Choose the cylinder edge and under Type leave it as default wall. In the Name box, enter cylinder
for the name of the edge (any name can be specified) and apply.
3. Similarly select the top edge of the rectangular domain and name it as Top wall. Name the bottom
edge as Bottom wall.
4. Select the left boundary and choose velocity inlet from the options under Type. Name it as inlet and
apply.
5. Select the right boundary and choose Outflow from the options under Type. Name it as outlet and
apply.
111 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

This specifies the boundary types.


Step 5: Exporting the mesh to be read by FLUENT.
File
Export
Mesh
Will open the Export Mesh File panel. Specify the path and the filename of the mesh to be exported.
Specify Cylinder.msh as the filename. Make sure to click on the Export 2-D mesh radio button to
make it active. Click apply. The mesh will get exported in a format that FLUENT reads.
File
Save as
Enter path and filename. This will save the .dbs file.
File
Exit

112 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Chapter 2
LID-DRIVEN CAVITY
2.1 Flow in a Lid-Driven Cavity at Re = 1000
The lid-driven cavity is a well-known benchmark problem for viscous incompressible fluid flow. A
square cavity consisting of three rigid walls with no-slip conditions and a lid moving with a tangential
unit velocity is shown in Figure 1.

Figure 1: Geometry of the Lid-driven Cavity


Introduction
The purpose of this tutorial is to illustrate the setup and solution of the two-dimensional laminar fluid
flow for a lid-driven cavity.
This tutorial demonstrates how to do the following:
(a) Read an existing mesh file in FLUENT.
(b) Verify the grid for dimensions and quality.
(c) Change the material properties.
(d) Carry out solver settings and perform iterations.
(e) Examine the results and compare them with experimental data.
(f) Display and create animation for pathlines.
Problem Description
The lid-driven cavity flow is probably one of the most studied fluid problems in the field of
computational fluid dynamics. Lid-driven cavity flow retains a rich fluid flow physics manifested by
multiple counter rotating recirculating regions on the corners of the cavity depending on the Reynolds
number. In this tutorial, we consider a square cavity with a height H = 1 m (Figure 1). The top wall is
moving with a velocity of 1 m/s in X direction, while bottom and side walls are stationary. The flow is
considered to be flow at Re = 1000.
Preparation
1. Copy the following files cavity.msh, data-uvel.xy and data-vvel.xy to the working folder.
2. Start the 2D double precision (2ddp) version of FLUENT.
Setup and Solution
Step 1: Grid
113 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

1. Read the mesh file cavity.msh.


File
Read
Case...
FLUENT will read the mesh file and report the progress in the console window.
2. Check the grid.
Grid
Check
This procedure checks the integrity of the mesh. Make sure the reported minimum volume is a positive
number.
3. Scale the grid.
Grid
Scale...

Check the domain extents to see if they correspond to the actual physical dimensions. Otherwise the grid
has to be scaled with proper units.
4. Display the grid (Figure 2).
Display
Grid...
(a) Click Colors... in the Grid Display.

i. Enable Color by ID in the Options list.


ii. Close the Grid Colors panel.

(b) Click Display and close the Grid Display panel.


114 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Figure 2: Grid Display


The grid adjacent to the walls is finer compared to that in the central region. The purpose of such fine
mesh is to capture sharp gradients near the walls correctly.
Step 2: Models
Do not alter the default settings as the problem is to be solved in steady state with two dimensional
laminar conditions.
Step 3: Materials
Define
Materials...

1. Enter 1 kg/m3 for Density.


2. Enter 0.001 kg/m-s for Viscosity.
3. Click Change/Create and close the Materials panel.
As Reynolds number is defined as Re = UD/ , velocity will be set to 1 m/s to have Re = 1000.
Step 4: Boundary Conditions
1. Set the boundary condition for lid.
Define
Boundary Conditions...
(a) Select lid from Zone list.
(b) Click Set... to open the Wall panel.
115 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(c) Click the Momentum tab.


(d) Select Moving Wall in the Wall Motion options.
(e) Enter 1 m/s for Speed.
(f) Click OK to close the Wall panel.

2. Close the Boundary Conditions panel.


Step 5: Solution
1. Set the solution controls.
Solve
Controls
Solution...

116 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(a) Select SIMPLEC from the Pressure-Velocity Coupling drop-down list.


(b) Select Second Order Upwind from the Momentum drop-down list.
(c) Click OK to close the Solution Controls panel.
SIMPLEC is a better option for uncomplicated problems, where convergence depends on pressurevelocity coupling. In SIMPLEC, the pressure-correction under relaxation factor is generally set to 1.0,
which helps speed up convergence.
2. Initialize the flow.
Solve
Initialize
Initialize...

(a) Enter 0.5 m/s for X Velocity.


(b) Enter 0.02 m/s for Y Velocity.
(c) Click Init and close the Solution Initialization panel.
To have a good convergence, provide an initial estimate for the velocity field. As the wall is moving with
a velocity of 1 m/s, in X direction, X-velocity can be set as some fraction of this value say, 0.5 m/s. Very
low velocities such as 0.02 m/s can be set in Y direction.
3. Enable the plotting of residuals during the calculation.
Solve
Monitors
Residuals...
For a better match of results, the case has to converge till the residuals flatten out. In this case,
convergence criteria can be set as 1e-5 for all equations.

(a) Enable Plot in the Options list.


(b) Click OK to close the Residual Monitors panel.
117 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

4. Set the animation controls.


Solve
Animate
Define...

(a) Increase the Animation Sequences to 1.


(b) Enter 5 for Every.
(c) Select Iteration from the When drop-down list.
(d) Click Define... for sequence-1 to open the Animation Sequence panel.

i. Increase Window to 2 and click the Set button to open a graphics window.
ii. Select Contours from the Display Type list to open the Contours panel.
iii. Select Velocity... and Velocity Magnitude from the Contours of drop-down lists.
iv. Enter 50 for Levels.
v. Click Display and close the Contours panel.
vi. Adjust the view as shown in Figure 3.
vii. Click OK to close the Animation Sequence panel.
(e) Click OK to close the Solution Animation panel.
This will save .hmf file after every 5 iterations. You can create an animation in the form of movie clip
using these files.

118 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Figure 3: Contours of Velocity Magnitude


5. Save the case file (cavity.cas.gz).
File
Write
Case...
Retain the default Write Binary Files option so that you can write a binary file. The .gz extension will
save compressed files on both Windows and UNIX platforms.
6. Start the calculation by requesting 1500 iterations.
Solve
Iterate...
(a) Enter 1500 for the Number of Iterations.
(b) Click Iterate
(c) After the solution converges close the Iterate panel.

The solution converges in about 1200 iterations, with convergence criteria. The residuals plot is shown in
Figure 4. Experimental results for X and Y-velocity along the two center lines passing through the flow
domain are available. For comparison purpose, isosurfaces needs to be created at X=0.5 and Y=0.5.

Figure 4: Scaled Residuals


119 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

7. Save the case file (cavity.cas.gz).


File
Write
Case...
8. Create an isosurface.
Surface
Iso-surface...
(a) Select Grid... and X-Coordinate from the Surface of Constant drop-down lists.
(b) Enter 0.5 m for the Iso-Values.
(c) Enter x = 0.5 for the New Surface Name.
(d) Click Create.
(e) Similarly, create an isosurface for Y-coordinate, with the new surface name as y = 0.5.

(f) Close the Iso Surface panel.


9. Create a plot of X velocity (Figure 5).
Plot
XY Plot...

(a) Click Load File....


This opens the Select File panel.
i. Select files data-uvel.xy, and data-vvel.xy.
ii. Click OK to close the Select File panel.
(b) Select Expt-U-vel in the File Data list.
(c) Select x = 0.5 from the Surfaces list.
(d) Enter 0 for X and 1 for Y in the Plot Direction group box.
(e) Select Velocity... and X Velocity from the Y Axis Function drop-down lists.
(f) Click the Curves... button.

120 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

i. Select line from the Pattern drop-down list.


ii. Select blank from the Symbol drop-down list.
iii. Click Apply and close the Curves - Solution XY Plot panel.
(g) Click Plot.

Figure 5: Calculated Vs Experimental Data for X-velocity


10. Create a plot of Y-velocity.
(a) Select Expt-V-vel from the File Data list.
(b) Select y = 0.5 from the Surfaces list.
(c) Enter 1 for X and 0 for Y in the Plot Direction group box.
(d) Select Velocity... and Y Velocity from the Y Axis Function drop-down lists.
(e) Click Plot and close the Solution XY Plot panel (Figure 6).

121 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Figure 6: Calculated Vs. Experimental Data for Y-velocity


11. Compare the results by repeating Experimental Data for X-velocity and Y-velocity.
Note: Since the experimental data is already read, they can be used. The results for both the velocities are
in very close agreement with the experimental values.
Step 6: Postprocessing
1. Display velocity vectors (Figure 7).
Display
Vectors
(a) Click Vector Options....
(b) Enable Fixed Length from the options.
(c) Click Apply and close the Velocity Vectors panel.
(d) Enter 0.04 for Scale and 3 for Skip.

(e) Click Display and close Vectors panel.

122 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Set the Fixed Length option to display all the vectors with the same length. Increase the Skip to reduce
the number of vectors, so that the display does not have too many vectors.

Figure 7: Velocity Vectors


2. Display stream function (Figure 8).
Display
Contours...

(a) Select Velocity... and Stream Function from the Contours of drop-down lists.
(b) Click Display.
Note: Right-click on a point in the domain to display the value of the corresponding contour in the
console window.

123 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Figure 8: Contours of Stream Function


3. Change the range to view the vortices in the corners.
(a) Deselect Auto Range from the Options list.
(b) Enter 8e-7 for the Min and 0.509 for Max.
(c) Click Display (Figure 9).

Figure 9: Vortices in the Corner


To visualize circulation in the cavity, display path lines by releasing from point surfaces. Create a point
surface for doing this.
4. Create point surfaces.
Surface
Point...

124 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(a) Enter 0.3267275 for x0 and 0.792252 for y0.


(b) Enter point-0 for New Surface Name.
(c) Click Create.
(d) Similarly, create three more points at (x0, y0) = (0.0722, 0.17402), (0.03889, 0.06426), and (0.93554,
0.055343) respectively. Display these four points by selecting all the point surfaces, under Surfaces and
deselecting default-interior in the Grid Display panel.
5. Display path lines (Figure 10).
Display
Pathlines...

(a) Select point-0, point-1, point-2 and point-3 from the Release from Surfaces list.
(b) Enter 0.001 m for the Step Size and 4000 for the Steps.
(c) Select line-arrows from the Style drop-down lists.
(d) Click the Style Attributes... button.
i. Set parameters in the Path Style Attributes panel as shown in the table:
Parameter
Line Width
Spacing Factor
Scale

Value
0.5
4
0.15

ii. Click OK and close the panel.


(e) Click Display.

Figure 10: Path Lines


125 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

6. Create animations for path lines.


After displaying path lines, create an animation file so that the progress of path lines can be viewed
clearly.
(a) Change the display to have small path lines
Display
Scene

i. Select path-7-particle-id from the Names list.


ii. Click Path Lines....
iii. Enter 2 for the Max Steps in the Path line Attributes panel and click Apply.
iv. Click Apply and close the Scene Description panel.
This will change the display in graphics window, with very small path lines
7. Display the scene animation.
Display
Scene Animation

(a) Click Add to create key-1 in the Keys list.


(b) Enter 4000 for Max Steps in the Pathline Attributes panel and click Apply.
(c) Enter 100 for Frame and click Add in the Animate panel.
(d) Select Hardcopy Frames from the Write/Record Format drop-down list.
(e) Click the Hardcopy Options... button.

126 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

i. Select TIFF from the Format list.


ii. Select Color from the Coloring list.
iii. Click Apply and close the Graphics Hardcopy panel.
(f) Click the Write... button in the Animate panel.
(g) Enter pic.tif for the file name and click OK to close the Select File panel.
pic0002.tif, ... , and pic0100.tif will be written.

Files pic0001.tif,

127 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

2.2 Flow in a Lid-Driven Cavity at Re = 10000


The lid-driven cavity is a well-known benchmark problem for viscous incompressible fluid flow. A
square cavity consisting of three rigid walls with no-slip conditions and a lid moving with a tangential
unit velocity is shown in Figure 1.

Figure 1: Geometry of the Lid-driven Cavity


Introduction
The purpose of this tutorial is to illustrate the setup and solution of the two-dimensional unsteady flow for
a lid-driven cavity.
This tutorial demonstrates how to do the following:
(a) Read an existing mesh file in FLUENT.
(b) Verify the grid for dimensions and quality.
(c) Change the material properties.
(d) Carry out solver settings and perform iterations.
(e) Examine the results.
Problem Description
The lid-driven cavity flow is probably one of the most studied fluid problems in the field of
computational fluid dynamics. Lid-driven cavity flow retains a rich fluid flow physics manifested by
multiple counter rotating recirculating regions on the corners of the cavity depending on the Reynolds
number. In this tutorial, we consider a square cavity with a height H = 1 m (Figure 1). The top wall is
moving with a velocity of 1 m/s in X direction, while bottom and side walls are stationary. The flow is
considered to be flow at Re = 10000.
Preparation
1. Copy the following files lid_cavity.msh, data-uvel.xy and data-vvel.xy to the working folder.
128 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

2. Start the 2D double precision (2ddp) version of FLUENT.


Setup and Solution
Step 1: Grid
1. Read the mesh file lid_cavity.msh.
File

Read

Case...

FLUENT will read the mesh file and report the progress in the console window.
2. Check the grid.
Grid

Check

This procedure checks the integrity of the mesh. Make sure the reported minimum volume is a positive
number.
3. Scale the grid.
Grid

Scale...

Check the domain extents to see if they correspond to the actual physical dimensions. Otherwise the grid
has to be scaled with proper units.
4. Display the grid (Figure 2).
Display

Grid...

(a) Click Colors... in the Grid Display.


i. Enable Color by ID in the Options list.
ii. Close the Grid Colors panel.

129 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(b) Click Display and close the Grid Display panel.

Figure 2: Grid Display


130 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

The grid adjacent to the walls is finer compared to that in the central region. The purpose of such fine
mesh is to capture sharp gradients near the walls correctly.
Step 2: Models
The problem is unsteady steady at Re = 10000.
1. Set up the unsteady solver settings.
Define

Models

Solver...

(a) Select Unsteady in the Time group box.


(b) Select 2nd-Order implicit for unsteady formulation.
(c) Click OK to close the Solver panel.

Step 3: Materials
Define

Materials...

131 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

1. Enter 1 kg/m3 for Density.


2. Enter 0.0001 kg/m-s for Viscosity.
3. Click Change/Create and close the Materials panel.
As Reynolds number is defined as Re = UD/ , velocity will be set to 1 m/s to have Re = 10000.
Step 4: Boundary Conditions
1. Set the boundary condition for lid.
Define

Boundary Conditions...

(a) Select lid from Zone list.


(b) Click Set... to open the Wall panel.

(c) Click the Momentum tab.


132 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(d) Select Moving Wall in the Wall Motion options.


(e) Enter 1 m/s for Speed.
(f) Click OK to close the Wall panel.
2. Close the Boundary Conditions panel.
Step 5: Solution
1. Set the solution controls.
Solve

Controls

Solution...

(a) Select PISO from the Pressure-Velocity Coupling drop-down list and disable Skewness-Neighbor
Coupling.
(b) Select PRESTO! for Pressure drop-down list.
(b) Select Second Order Upwind from the Momentum drop-down list.
(c) Click OK to close the Solution Controls panel.
2. Initialize the flow.
Solve

Initialize

Initialize...

133 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(a) Enter 0.5 m/s for X Velocity.


(b) Enter 0.02 m/s for Y Velocity.
(c) Click Init and close the Solution Initialization panel.
To have a good convergence, provide an initial estimate for the velocity field. As the wall is moving with
a velocity of 1 m/s, in X direction, X-velocity can be set as some fraction of this value say, 0.5 m/s. Very
low velocities such as 0.02 m/s can be set in Y direction.
3. Enable the plotting of residuals during the calculation.
Solve

Monitors

Residuals...

For a better match of results, the case has to converge till the residuals flatten out.

In this case,

convergence criteria can be set as 1e-5 for all equations.

(a) Enable Plot in the Options list.


(b) Click OK to close the Residual Monitors panel.
4. Set the animation controls.
Solve

Animate

Define...

(a) Increase the Animation Sequences to 1.


(b) Enter 10 for Every.
(c) Select Iteration from the When drop-down list.

134 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(d) Click Define... for sequence-1 to open the Animation Sequence panel.

i. Increase Window to 2 and click the Set button to open a graphics window.
ii. Select Contours from the Display Type list to open the Contours panel.
iii. Select Velocity... and Velocity Magnitude from the Contours of drop-down lists.
iv. Enter 50 for Levels.
v. Click Display and close the Contours panel.
vi. Adjust the view as shown in Figure 3.
vii. Click OK to close the Animation Sequence panel.
(e) Click OK to close the Solution Animation panel.
This will save .hmf file after every 10 time step. You can create an animation in the form of movie clip
using these files.

135 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Figure 3: Contours of Velocity Magnitude


5. Save the case file (lid_cavity.cas.gz).
File

Write

Case...

Retain the default Write Binary Files option so that you can write a binary file. The .gz extension will
save compressed files on both Windows and UNIX platforms.
6. Start the calculation.
Solve

Iterate...

(a) Enter 0.5 for the time step


(b) Enter 10000 for number of time steps.
(c) Enter 50 for max iteration per time step
(b) Click Iterate
(c) After complete the iteration close the Iterate panel.

136 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

7. Save the case file (lid_cavity.cas.gz).


File

Write

Case...

12. Create an animation using the .hmf files.


Solve

Animate

Playback

(a) Select MPEG from the Write/Record Format drop-down list.


(b) Click Write and close the Playback panel.
This creates a movie file in the working folder, which can be viewed using Windows Media Player
Step 6: Postprocessing
1. Display velocity vectors (Figure 7).
Display

Vectors

(a) Click Vector Options....

(b) Enable Fixed Length from the vector options.


137 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(c) Click Apply and close the Velocity Vectors panel.


(d) Enter 0.04 for Scale and 3 for Skip.
(e) Click Display and close Vectors panel.
Set the Fixed Length option to display all the vectors with the same length. Increase the Skip to reduce
the number of vectors, so that the display does not have too many vectors.

Figure 7: Velocity Vectors


2. Display stream function (Figure 8).
Display

Contours...

(a) Select Velocity... and velocity magnitude from the Contours of drop-down lists.
(b) Click Display.
Note: Right-click on a point in the domain to display the value of the corresponding contour in the
console window.
138 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Figure 8: Contours of velocity magnitude

139 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Chapter 3
DIFFERENTIALLY HEATED CAVITY
3. Modeling of Natural Convection in a Differential Cavity
Introduction
In this tutorial natural convection are solved in a two-dimensional square box on a mesh consisting of
quadrilateral elements. This tutorial demonstrates how to do the following:
(a) Use the Boussinesq model for density.
(b) Set the boundary conditions for a heat transfer problem involving natural convection.
(c) Change the properties of an existing fluid material.
(d) Calculate a solution using the pressure-based solver.
(e) Display velocity vectors and contours of stream function and temperature for flow visualization.
Problem Description
The problem to be considered is shown schematically in Figure 1. A square box of side L has a hot left
wall at T = 2000 K, a cold right wall at T = 1000 K, and adiabatic top and bottom walls. Gravity acts
downwards. A buoyant flow develops because of thermally-induced density gradients. The medium
contained in the box is assumed to be air. All walls are black. The objective is to compute the flow and
temperature patterns in the box. The working fluid has a Prandtl number of approximately 0.71, and the
Rayleigh number based on L is 1E106. This means the flow is inherently laminar. The Boussinesq
assumption is used to model buoyancy.
Rayleigh Number is defined as: Ra = (g TL3)/( ), where = k/( Cp)
Note that the values of physical properties and operating conditions (e.g., gravitational acceleration) have
been adjusted to yield the desired Prandtl and Rayleigh numbers. The fluid properties are as follows,
2000 kg/m3
Cp
1.1030 X 104 J/kgK
K
15.309 W/mK
10-3 kg/ms
10-5 K-1
G
-6.96 X 10-5 m/s2
L
1m
Ra
1 X106
Pr
0.71

Figure1. Schematic of the problem


140 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Setup and Solution


Preparation
1. Copy the mesh file, dcavity.msh to the working folder.
2. Start the 2D double precision (2ddp) solver of FLUENT.
Step 1: Grid
1. Read the mesh file dcavity.msh.
File
Read
Case...
As the mesh is read in, messages will appear in the console reporting the progress of the reading. The
mesh size will be reported as 10201 nodes.
2. Check the grid.
Grid
Check
FLUENT will perform various checks on the mesh and report the progress in the console. Make sure that
the minimum volume reported is a positive number.
3. Display the grid.
Display
Grid...
(a) Retain the default settings.
(b) Click Display to view the grid in the graphics display window (figure 2).

(c) Close the Grid Display panel.

Figure 2: Graphics Display of Grid


141 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Step 2: Models
1. Retain the default solver settings.
Define
Models
Solver...

2. Open the Energy panel.


Define
Models
Energy
(a) Enable the energy calculation.

(b) Click OK to close the Energy panel panel.


3. Add the effect of gravity to the model.
Define
Operating
Conditions
(a) Enable the Gravity option in the Gravity group box.
The panel will expand to show additional inputs.
(b) Enter -6.94e-5 m/s2 for Y in the Gravitational Acceleration group box.
As previously mentioned, the gravitational acceleration is adjusted to yield the correct dimensionless
quantities for Prandtl and Rayleigh numbers.
(c) Enter 1000 K for Operating Temperature in the Boussinesq Parameters group box.
The operating temperature will be used by the Boussinesq model which you will enable in the next step.

142 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(d) Click OK to close the Operating Conditions panel and set the parameters.
Step 3: Materials
The default fluid material is air which is the working fluid in this problem. However, since you are
working with a fictitious fluid whose properties have been adjusted to give the desired values of the
dimensionless parameters, you must change the default properties for air.
1. Define the material properties.
Define
Materials
(a) Select Boussinesq from the drop- down list for Density and then enter 2000 to set the density to 2000
kg/m3.

(b) Enter 1.103 X 104 J/kg-K for Cp to set the specific heat.
(c) Enter 15.309 W/m-K for Thermal Conductivity.
(d) Enter 0.001 kg/m-s for Viscosity.
(e) Enter 1 X 10-5 K-1 for Thermal Expansion Coefficient (used by the Boussinesq model).
(f) Click Change/Create and then close the Materials panel.
Step 4: Boundary Conditions
Define
Boundary Conditions...

1. Set the boundary conditions for the left wall.


(a) Enter left for Zone Name.
(b) Open Wall panel.
(c) Click the Thermal tab.
143 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

i. Select Temperature from the Thermal Conditions list.


ii. Enter 2000 K for Temperature.
(d) Click OK to set the conditions and close the Wall panel.

2. Set the boundary conditions for the top wall.


(a) Enter top for Zone Name.
(b) Open Wall panel.
(c) Click the Thermal tab and retain the default thermal conditions (Heat Flux of 0) to specify an adiabatic
wall.
(d) Click OK to set the conditions and close the Wall panel.

3. Set the boundary conditions for the bottom wall.


(a) Enter bot for Zone Name.
(b) Open Wall panel.
(c) Click the Thermal tab and retain the default thermal conditions (Heat Flux of 0) to specify an adiabatic
wall.
(d) Click OK to set the conditions and close the Wall panel.
4. Set the boundary conditions for the right wall.
(a) Enter right for Zone Name.
(b) Open Wall panel.
(c) Click the Thermal tab.
144 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

i. Select Temperature from the Thermal Conditions list.


ii. Enter 1000 K for Temperature.
(d) Click OK to set the conditions and close the Wall panel.
5. Close the Boundary Conditions panel.
Step 5: Solution
1. Set the parameters that control the solution.
Solve
Controls
Solution...
(a) Set the under-relaxation factor for energy to 0.8 and Retain the default Under- relaxation Factors for
others.
(b) Select PRESTO! from the Pressure drop-down list in the Discretization group box.
(c) Select Second Order Upwind from the Momentum and Energy drop-down lists.
(d) Click OK to set the parameters and close the Solution Controls panel

2. Initialize the flow field.


Solve
Initialize
Initialize
(a) Enter 1500 K for Temperature to set the initial temperature.
(b) Click Init and then close the Solution Initialization panel.

3. Enable the plotting of residuals during the calculation.


Solve
Monitors
Residual
145 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(a) Enable Plot in the Options group box.


(b) Click OK to set the conditions and close the Residual Monitors panel.

4. Set animation to visualize vortex shedding.


Display
Contours...

(a) Select Velocity... and Stream Function from the Contours of drop-down lists.
(b) Enable Filled in the Options group box.
(c) Enter 50 for Levels.
(d) Click Display and close the Contours panel (Figure 3).
(e) Change the background of graphics window to white.
File
Hardcopy...
i. Select Color from the Coloring group box.
ii. Click Preview.
A Question dialog box appears. Click No.

146 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

iii. Click Apply and close the Graphics Hardcopy panel.

Figure 3: Contours of Velocity


5. Set the animation controls.
Solve
Animate
Define...

(a) Increase the Animation Sequences to 1.


147 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(b) Enter 5 for Every.


(c) Select Iteration from the When drop-down list.
(d) Click Define... for sequence-1 to open the Animation Sequence panel.

i. Increase Window to 2 and click the Set button to open a graphics window.
ii. Select Contours from the Display Type list to open the Contours panel.
iii. Select Velocity... and Stream Function from the Contours of drop-down lists.
iv. Enter 50 for Levels.
v. Click Display and close the Contours panel.
vi. Adjust the view as shown in Figure 4.
vii. Click OK to close the Animation Sequence panel.
(e) Click OK to close the Solution Animation panel.
This will save .hmf file after every 5 iterations. You can create an animation in the form of movie clip
using these files.

Figure 5: Contours of Velocity Magnitude


6. Save the case file (dcavity.cas).
File
Write
Case...
7. Start the calculation by requesting 1500 iterations.
Solve
Iterate...
148 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(a) Enter 1500 for Number of Iterations.


(b) Click Iterate.

The results of the solution will be reported in the console. The solution will converge in approximately
800 iterations.
(c) After the solution converges close the Iterate panel.
8. Save the data file (dcavity.dat).
File
Write
Data
Step 6: Postprocessing for the Differential Cavity Model
1. Display velocity vectors.
Display
Vectors...
(a) Retain the default settings.
(b) Click Display to view the vectors in the graphics display window (figure 6).

(c) Close the Vectors panel.

Figure 6. Velocity Vectors


149 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

2. Display contours of stream function.


Display
Contours...
(a) Select Velocity... and Stream Function from the Contours of drop-down lists.
(b) Click Display to view the contours in the graphics display window (Figure 7).

(c) Close the Contours panel.

Figure 7: Contours of Stream Function


3. Display filled contours of temperature.
Display
Contours...
(a) Enable Filled in the Options group box.
(b) Select Temperature... and Static Temperature from the Contours of drop-down lists.
(c) Click Display to view the filled contours in the graphics display window (Figure 8).

150 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(d) Close the Contours panel.

Figure 8. Contours of Temperature


4. Create an isosurface at y = 0.5, the horizontal line through the center of the box.
Surface
Iso-Surface...
(a) Select Grid... and Y-Coordinate from the Surface of Constant drop-down lists.
(b) Click Compute to calculate the extents of the domain.
(c) Enter 0.5 for Iso-Values.
(d) Enter y = 0.5 for New Surface Name.
(e) Click Create to create a surface at y = 0.5.
The new isosurface at y = 0.5 will appear in the From Surface list.

151 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(f) Close the Iso-Surface panel.


5. Create an XY plot of y velocity on the isosurface.
Plot
XY Plot...

(a) Retain the default selection of Node Values in the Options group box.
If you prefer to display the cell values, disable the Node Values option. Note, however, that you will need
to ensure that whatever option you choose for Node Values is used throughout the tutorial for displaying
and saving XY plots. This will enable you to correctly compare the XY plots for different radiation
models in a later step, as they will use identical options.
(b) Retain the default values of 1 for X and 0 for Y in the Plot Direction group box.
With a Plot Direction vector of (1; 0), FLUENT will plot the selected variable as a function of x. Since
you are plotting the velocity profile on a cross-section of constant y, the x direction is the one in which
the velocity varies.
(c) Select Velocity... and Y Velocity from the Y Axis Function drop-down lists.
(d) Select y = 0.5 from the Surfaces selection list.
(e) Click Plot to display the x-y plot in the graphics display window (Figure 9).
The velocity profile reflects the rising plume at the hot right wall, and the falling plume at the cold left
wall.

152 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Figure 9: XY Plot of Centerline y Velocity


(f) Enable Write to file in the Options group box and save the plot data to a file.
(g) Click Write... to open the Select File dialog box.
(h) Enter dcavity.xy for XY File and click OK.
This will save the xy plot file named dcavity.xy to your working folder.
(i) Close the Solution XY Plot panel.
7. Save the case and data _les (dcavity_std.cas and dcavity_std.dat).
File
Write
Case & Data...

153 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Chapter 4
FLOW PAST A CIRCULER CYLINDER
4.1 Flow Past a Circular Cylinder at Re = 40
Problem Description
The purpose of this tutorial is to illustrate the setup and solution of a steady flow past a circular cylinder
(Figure 1). Flow past a circular cylinder is one of the classical problems of fluid mechanics. The
Reynolds number for the present problem is 40.

Figure 1: Problem schematic


Preparation
1. Copy the mesh file, cylinder.msh to the working folder.
2. Start the 2D double precision (2ddp) solver of FLUENT.
Setup and Solution
Step 1: Grid
1. Read the grid file, cylinder.msh.
File
Read
Case...
FLUENT will read the mesh file and report the progress in the console window.
2. Check the grid.
Grid
Check
This procedure checks the integrity of the mesh. Make sure the minimum volume reported is a positive
number.
3. Check the scale of the grid.
Grid
Scale...
Check the domain extents to see if they correspond to the actual physical dimensions. If not, the grid has
to be scaled with proper units. In this case, do not scale the grid.
(a) Close the Scale Grid panel.

154 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

4. Display the grid (Figures 2).


Display
Grid...
(a) Click Display and close the Grid Display panel.

Figure 2: Grid display


Step 2: Models
The problem is steady at Re = 40.
2. Set up the steady solver settings.
Define
Models
Solver...

(a) Select Steady in the Time group box.


(b) Click OK to close the Solver panel.
155 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Step 3: Materials
1. Change the material properties.
Define
Materials...

(a) Enter 2 for Density and 0.1 for Viscosity.


The Reynolds number is defined as: Re = UD/
The values of D and U are 2 m and 1 m/s respectively.
(b) Click Change/Create and close the Materials panel.
Step 4: Boundary Conditions
1. Set the boundary conditions for inlets ff1, ff2 and ff3 as shown in figure 3.

Figure 3: Edge Labeling


Labeling edge A as farfield1 (ff1), edges B and C as farfield2 (ff2), edges D and E as farfield3 (ff3),
edges F, G and H as farfield4 (ff4) and the edges I and J as cylinder.
Define
Boundary Conditions...
2. Select ff1 from the Zone selection list.
The Type will be reported as velocity-inlet.

156 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

3. Click the Set... button to open the Velocity Inlet panel.

(a) Enter 1 m/s for Velocity Magnitude.


(b) Click OK to close the Velocity Inlet panel.
(c) Do the same exercise for ff2 and ff3 boundary conditions.
4. Close the Boundary Conditions panel.
Step 5: Solution
1. Set the solution controls.
Solve
Controls
Solution...

(a) Select SIMPLE from the Pressure-Velocity Coupling drop-down list.


(b) Select Second Order Upwind from the Momentum drop-down list in the Discretization group box.
(c) Click OK to close the Solution Controls panel.
2. Initialize the flow.
Solve
Initialize
Initialize

157 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(a) Enter 1 for X Velocity.


(b) Click Init and close the Solution Initialization panel.
3. Set the reference values used to compute the lift, drag, and moment coefficients. The reference values
are used to non-dimensionalize the forces and moments action on the wall surface.
Report
Reference Values...

(a) Select ff1 from the Compute From drop-down list.


FLUENT will update the Reference Values based on the boundary conditions at the inlet boundary.
(b) Click OK to close the Reference Values panel.
4. Set the monitor for drag coefficient on cylinder wall.
Solve
Monitors
Force...

158 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(a) Select Drag from the Coefficient drop-down list.


(b) Select cylinder from the Wall Zones selection list.
(c) Enable Print, Plot and Write in the Options group box.
(d) Click Apply and close the Force Monitors panel
5. Enable plotting of residuals during the calculation.
Solve
Monitors
Residual...
(a) Enable Plot in the Options group box.
(b) Click OK to close the Residual Monitors panel.

6. Set animation to visualize vortex shedding.


Display
Contours...

(a) Select Pressure... and Static Pressure from the Contours of drop-down lists.
159 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(b) Enable Filled in the Options group box.


(c) Enter 50 for Levels.
(d) Click Display and close the Contours panel (Figure 4).
(e) Change the background of graphics window to white.
File
Hardcopy...
i. Select Color from the Coloring group box.
ii. Click Preview.
A Question dialog box appears. Click No.

iii. Click Apply and close the Graphics Hardcopy panel.

Figure 4: Contours of Static Pressure


7. Set the animation controls.
Solve
Animate
Define...
(a) Increase the Animation Sequences to 1.
(b) Enter 5 for Every.
(c) Select Iteration from the When drop-down list.

160 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(d) Click Define... for sequence-1 to open the Animation Sequence panel.

i. Increase Window to 2 and click the Set button to open a graphics window.
ii. Select Contours from the Display Type list to open the Contours panel.
iii. Select Velocity... and Velocity Magnitude from the Contours of drop-down lists.
iv. Enter 50 for Levels.
v. Click Display and close the Contours panel.
vi. Adjust the view as shown in Figure 5.
vii. Click OK to close the Animation Sequence panel.
(e) Click OK to close the Solution Animation panel.
This will save .hmf file after every 5 iterations. You can create an animation in the form of movie clip
using these files.

161 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Figure 5: Contours of Velocity Magnitude


8. Save the case and data files (cylinder_std.cas.gz and cylinder_std.dat.gz).
File
Write
Case & Data...
Retain the default enabled Write Binary Files option so that you can write a binary file. The .gz option
will save zipped files, this will work on both, Windows as well as Linux/UNIX platforms.
9. Iterate the solution.
Solve
Iterate..

(a) Enter 600 for Number of Time Steps.


(b) Click Apply.
(c) Click Iterate to start the iterations.
(d) After the solution converges close the Iterate panel.
10. Save the case and data files (cylinder_std.cas.gz and cylinder_std.dat.gz).
File
Write
Case & Data...
11. Create an animation using the .hmf files.
Solve
Animate
Playback

162 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(a) Select MPEG from the Write/Record Format drop-down list.


(b) Click Write and close the Playback panel.
This creates a movie file in the working folder, which can be viewed using Windows Media Player
Step 6: Postprocessing
1. Display the pressure contours (Figure 6).
Display
Contours
(a) Select Pressure... and Static Pressure from the Contours of drop-down lists.
(b) Set the number of Levels to 50.

(c) Click Display (Figure 6).

Figure 6: Contours of Static Pressure


2. Display the contours of Velocity magnitude (Figure 7).
(a) Select Velocity... and Velocity Magnitude in the Contours of drop-down lists.
(b) Enable Auto Range.
(c) Set Levels to 50.
(d) Click Display (Figure 7).
163 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Figure 7: Contours of Vorticity Magnitude


3. The streamlines are shown in Figure 8.
(a) Select Velocity... and Stream Function from the Contours of drop-down lists.
(b) Disable Filled
(d) Set Levels to 50.
(e) Click Display (Figure 8).

164 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Figure 9: Contours of Stream Function


4. Close the Contours panel.

165 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

4.2 Flow Past a Circular Cylinder at Re = 100


Introduction
The purpose of this tutorial is to illustrate the setup and solution of an unsteady flow past a circular
cylinder and to study the vortex shedding process. Flow past a circular cylinder is one of the classical
problems of fluid mechanics. The geometry suggests a steady and symmetric flow pattern. For lower
value of Reynolds number, the flow is steady and symmetric. Any disturbance introduced at the inlet gets
damped by the viscous forces. As the Reynolds number is increased, the disturbance at the upstream flow
cannot be damped. This leads to a very important periodic phenomenon downstream of the cylinder,
known as `vortex shedding'.
This tutorial demonstrates how to do the following:
Read an existing mesh file in FLUENT.
Check the grid for dimensions and quality.
Solve a time dependent simulation.
Set the time monitors for lift coefficient and observe vortex shedding.
Set up an animation to demonstrate the vortex shedding.
Prerequisites
This tutorial assumes that you have little experience with FLUENT but are familiar with the interface.
Problem Description
Consider a cylinder of unit diameter (Figure 1). The computational domain consists of an upstream of
11.5 times the diameter to downstream of 20 times the diameter of the cylinder and 12.5 times the
diameter on each cross-stream direction. The Reynolds number of the flow, based on the cylinder
diameter, is 100
Preparation
1. Copy the mesh file, cyl.msh to the working folder.
2. Start the 2D double precision (2ddp) solver of FLUENT.

Figure 1: Problem schematic


Setup and Solution
Step 1: Grid
1. Read the grid file, cyl.msh.
File
Read
Case...
FLUENT will read the mesh file and report the progress in the console window.
2. Check the grid.
Grid
Check
This procedure checks the integrity of the mesh. Make sure the minimum volume reported is a positive
number.
3. Check the scale of the grid.
Grid
Scale...

166 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Check the domain extents to see if they correspond to the actual physical dimensions. If not, the grid has
to be scaled with proper units. In this case, do not scale the grid.
(b) Close the Scale Grid panel.
4. Display the grid (Figures 2 and 3).
Display
Grid...
(a) Click Display and close the Grid Display panel.

Figure2: Grid display


167 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Zoom-in using the middle mouse button to see the mesh around the cylinder (Figure 3). The boundary
layer is resolved around the cylinder. A submap mesh is used in the block containing the cylinder.

Figure 3: Grid Display Zoom-in View


Step 2: Models
This is an unsteady problem in a symmetric geometry. In experiments, uncontrollable disturbances in the
inlet flow cause the start of the vortex shedding. Similarly, in the computational model, the numerical
error accumulates and the vortex shedding starts.
3. Set up the unsteady solver settings.
Define
Models
Solver...

(a) Select Unsteady in the Time group box.


(b) Click OK to close the Solver panel.
Step 3: Materials
2. Change the material properties.
Define
Materials...
(a) Enter 100 for Density and 1 for Viscosity.
The Reynolds number is defined as: Re = UD/
The value of , D, and U is unity. Therefore, set the value of density same as the Reynolds number.

168 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(b) Click Change/Create and close the Materials panel.


Step 4: Boundary Conditions
1. Set the boundary conditions for inlet.
Define
Boundary Conditions...

2. Select inlet from the Zone selection list.


The Type will be reported as velocity-inlet.
3. Click the Set... button to open the Velocity Inlet panel.

169 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(a) Enter 1 m/s for Velocity Magnitude.


(b) Click OK to close the Velocity Inlet panel.
4. Close the Boundary Conditions panel.
Step 5: Solution
1. Set the solution controls.
Solve
Controls
Solution...

(a) Select PISO from the Pressure-Velocity Coupling drop-down list.


PISO allows the use of higher time step size without affecting the stability of the solution. Hence it is the
recommended pressure-velocity coupling for solving transient applications.
(b) Disable Skewness-Neighbor Coupling.
(c) Select Second Order Upwind from the Momentum drop-down list in the Discretization group box.
Since the simulation is transient, start with higher order schemes right from initial conditions.
(d) Click OK to close the Solution Controls panel.
2. Initialize the flow.
Solve
Initialize
Initialize

(a) Enter 1 for X Velocity.


(b) Click Init and close the Solution Initialization panel.
3. Create registers to patch the Y velocity in down-stream of cylinder.
Adapt
Region...

170 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(a) Enter 1 m and 20 m for X Min and X Max, respectively.


(b) Enter 0 and 12.5 for Y Min and Y Max, respectively.
(c) Click Mark.
FLUENT will print the following message in the console window: 2928 cells marked for refinement, 0
cells marked for coarsening.
(d) Enter -12.5 and 0 for Y Min and Y Max, respectively and retain the previous values for X Min and X
Max.
(e) Click Mark.
(f) Close the Region Adaption panel.
4. Patch the Y velocity.
Solve
Initialize
Patch...

(a) Select hexahedron-r0 from the Registers to Patch selection list.


(b) Select Y Velocity from the Variable selection list.
(c) Enter 0.2 for Value.
(d) Click Patch.
(e) Deselect hexahedron-r0 and select hexahedron-r1 from the Registers to Patch selection list.
(f) Enter -0.2 for Value.
(g) Click Patch and close the Patch panel.
5. Set the reference values used to compute the lift, drag, and moment coefficients. The reference values
are used to non-dimensionalize the forces and moments action on the wall surface.
Report
Reference Values...
(a) Select inlet from the Compute From drop-down list.
FLUENT will update the Reference Values based on the boundary conditions at the inlet boundary.
(b) Click OK to close the Reference Values panel.

171 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

6. Set the monitor for lift coefficient on cylinder wall.


Solve
Monitors
Force...

(a) Select Lift from the Coefficient drop-down list.


(b) Select cylinder from the Wall Zones selection list.
(c) Enable Print, Plot and Write in the Options group box.
(d) Click Apply and close the Force Monitors panel
(e) Repeat the same process for monitoring the Drag Coefficient with the values X = 1 and Y = 0. Set the
Plot Window at level 3.
7. Enable plotting of residuals during the calculation.
Solve
Monitors
Residual...
(a) Enable Plot in the Options group box.
(b) Click OK to close the Residual Monitors panel.

172 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

8. Set animation to visualize vortex shedding.


Display
Contours...

(a) Select Pressure... and Static Pressure from the Contours of drop-down lists.
(b) Enable Filled in the Options group box.
(c) Enter 50 for Levels.
(d) Click Display and close the Contours panel (Figure 4).
(e) Change the background of graphics window to white.
File
Hardcopy...
i. Select Color from the Coloring group box and Vector from the File Type group box.
ii. Click Preview.
A Question dialog box appears. Click No.

173 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

iii. Click Apply and close the Graphics Hardcopy panel.

Figure 4: Contours of Static Pressure


9. Set the animation controls.
Solve
Animate
Define...
(a) Increase the Animation Sequences to 1.
(b) Enter 10 for Every.

(c) Select Time Step from the When drop-down list.


174 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(d) Click Define... for sequence-1 to open the Animation Sequence panel.
i. Increase Window to 2 and click the Set button to open a graphics window.
ii. Select Contours from the Display Type list to open the Contours panel.
iii. Select Velocity... and Velocity Magnitude from the Contours of drop-down lists.
iv. Enter 50 for Levels.
v. Click Display and close the Contours panel.

vi. Adjust the view as shown in Figure 5.


vii. Click OK to close the Animation Sequence panel.
(e) Click OK to close the Solution Animation panel.
This will save .hmf file after every 10 time steps. You can create an animation in the form of movie clip
using these files.

Figure 5: Contours of Velocity Magnitude


10. Save the case and data files (cyl-uns.cas.gz and cyl-uns.dat.gz).
File
Write
Case & Data...

175 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Retain the default enabled Write Binary Files option so that you can write a binary file. The .gz option
will save zipped files, this will work on both, Windows as well as Linux/UNIX platforms.
11. Iterate the solution.
Solve
Iterate..

.
(a) Enter 0.2 for Time Step Size.
The Strouhal number for flow past cylinder is roughly 0.2. In order to capture the shedding correctly, you
should have at least 20 to 25 time steps in one shedding cycle.
The Strouhal Number is defined as: St = 0.2 = (fD)/U
In this case, D = 1 and U = 1. Therefore, f = 0.2 and cycle time, t = 1/f = 1/0.2 = 5. Time step size = 5/25
= 0.2sec.
(b) Enter 30 for Max. Iterations per Time Step.
(c) Enter 600 for Number of Time Steps.
(d) Click Apply.
(e) Click Iterate to start the iterations.
(f) After the iteration completed, close the Iterate panel.
Figure 6 shows a clear sinusoidal pattern, which is a sign of a sustained vortex shedding process. All the
other flow variables also show the asymmetry in the solution. This plot can be used to compute the
176 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

correct value of Strouhal number. The problem is non-dimensionalized (i.e., D = U = 1) and St = f =


1/(shedding cycle time) = 1/6.32 = 0.158. The results matches fairly well with the value (0.183) as
reported in the literature [3].

Figure 6: Lift Coefficient Plot


12. Save the case and data files (cyl-uns.cas.gz and cyl-uns.dat.gz).
File
Write
Case & Data...
13. Create an animation using the .hmf files.
Solve
Animate
Playback

(a) Select MPEG from the Write/Record Format drop-down list.


(b) Click Write and close the Playback panel.
This creates a movie file in the working folder, which can be viewed using Windows Media Player
Step 6: Postprocessing
1. Display the pressure contours (Figure 7).
Display
Contours

177 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(a) Select Pressure... and Static Pressure from the Contours of drop-down lists.
(b) Set the number of Levels to 20.
(c) Click Display (Figure 7).
The contour shows a clear asymmetric pattern in the flow. The local pressure minima are the center of the
vortices.

Figure 7: Contours of Static Pressure


2. Display the contours of vorticity magnitude (Figure 8).
(a) Select Velocity... and Vorticity Magnitude in the Contours of drop-down lists.
(b) Set Levels to 50.
(c) Click Display (Figure 8).

178 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(a) Select Velocity... and Velocity Magnitude in the Contours of drop-down lists.
(b) Enable Auto Range and Clip to Range from the Options group box.
(c) Enable Filled
(c) Set Levels to 50.
(d) Click Display (Figure 8).
The figure shows clear vortex shedding process. Zoom in the view around cylinder.

Figure 8: Contours of Velocity Magnitude


3. The instantaneous streamline can be displayed to see the incipient and shed vortex clearly (Figure 9).

(a) Select Velocity... and Stream Function from the Contours of drop-down lists.
(b) Disable Filled, Auto Range and Clip to Range from the Options group box.
179 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(c) Enter 1800 and 2050 for Min and Max, respectively.
(d) Set Levels to 100.
(e) Click Display (Figure 9).
The contour shows the incipient vortex at the top end and shed vortex at the bottom end in the wake of the
cylinder. Zoom in to get a better view of the shedding process

Figure 9: Contours of Stream Function


4. Close the Contours panel.
Table I. Comparison of mean Drag coefficient and Strouhal number for circular
cylinders at Re = 100.
Body
shape

Circular
cylinder

CD

St

Chang and Sa4

1.233

0.155

Shi et al.5

1.320

0.164

Sengupta et al.6

0.164

Bhattacharyya and Singh7

1.359

0.163

Present

1.369

0.159

180 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Chapter 5
INVISCID COMPRESSIBLE FLOW PAST A FORWARD FACING STEP
5. Two-Dimensional Compressible flow past a Forward Facing Step in a Channel at M = 3
Problem Description
The purpose of this tutorial is to illustrate the setup and solution of two-dimensional compressible flow
for forward facing step in a channel for Mach 3 (Figure 1). The flow is assumed to be inviscid.

Figure 1: Problem Schematic


Preparation
1. Copy the mesh file, fstep.msh to the working folder.
2. Start the 2D double precision (2ddp) solver of FLUENT.
Setup and Solution
Step 1: Grid
1. Read the grid file, fstep.msh.
File
Read
Case...
FLUENT will read the mesh file and report the progress in the console window.
2. Check the grid.
Grid
Check
This procedure checks the integrity of the mesh. Make sure the minimum volume reported is a positive
number.
3. Check the scale of the grid.
Grid
Scale...
Check the domain extents to see if they correspond to the actual physical dimensions. If not, the grid has
to be scaled with proper units. In this case, do not scale the grid.
(c) Close the Scale Grid panel.

4. Display the grid (Figures 2).


Display
Grid...
(a) Click Display and close the Grid Display panel.
181 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Figure 2: Grid Display


Step 2: Models
The problem is steady at M = 3.0.
4. Set up the steady solver settings.
Define
Models
Solver...
(a) Select Steady in the Time group box.
(b) Click OK to close the Solver panel.

2. Open the Energy panel.


Define
Models
Energy
(a) Enable the energy calculation.
182 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(b)Click OK to close the Energy panel panel.

3. Open the Viscous Model panel.


Define
Models
Viscous
(a) Enable the inviscid model.
(b) Click OK to close the Viscous Model panel.

Step 3: Materials
3. Change the material properties.
Define
Materials...

(a) Select ideal gas and remains the default setting.


(d) Click Change/Create and close the Materials panel.
Step 4: Operating Conditions
Define
Operating Conditions...

183 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(a) Check 101325 for operating pressure.


(e) Click OK to close the operating condition panel.
Step 5: Boundary Conditions
Define
Boundary Conditions...

1. Select inlet from the Zone selection list.


The Type will be reported as pressure-far-field.
2. Click the Set... button to open the pressure-far-field panel.

(a) Enter 3 for Mach number.


(b) Click OK to close the pressure-far-field panel.
3. Select outlet from the Zone selection list.
The Type will be reported as pressure-outlet.

184 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

4. Click the Set... button to open the pressure-outlet panel.

(a) Enable Non-Reflecting Boundary and set exit Pressure specification as Pressure at infinity.
(b) Click OK to close the pressure-outlet panel.
5. Close the Boundary Conditions panel.
Step 6: Solution
1. Set the solution controls.
Solve
Controls
Solution...
(a) Select Second Order Upwind from Discretization drop-down list.
(b) Set 0.5 for Courant Number and select Roe-FDS scheme for flux type drop-down list.
(c) Click OK to close the Solution Controls panel.

2. Initialize the flow.


Solve
Initialize

Initialize
185 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(a) Select inlet form Compute Form drop-down list.


(b) Click Init and close the Solution Initialization panel.
3. Enable plotting of residuals during the calculation.
Solve
Monitors
Residual...
(a) Enable Plot in the Options group box.
(b) Click OK to close the Residual Monitors panel.

4. Set animation to visualize vortex shedding.


Display
Contours...

186 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(a) Select Pressure... and Static Pressure from the Contours of drop-down lists.
(b) Enable Filled in the Options group box.
(c) Enter 50 for Levels.
(d) Click Display and close the Contours panel (Figure 4).
(e) Change the background of graphics window to white.
File
Hardcopy...

i. Select Color from the Coloring group box.


ii. Click Preview.
A Question dialog box appears. Click No.
iii. Click Apply and close the Graphics Hardcopy panel.

Figure 4: Contours of Static Pressure


5. Set the animation controls.
Solve
Animate
Define...
(a) Increase the Animation Sequences to 1.
(b) Enter 5 for Every.
(c) Select Iteration from the When drop-down list.

187 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(d) Click Define... for sequence-1 to open the Animation Sequence panel.

i. Increase Window to 2 and click the Set button to open a graphics window.
ii. Select Contours from the Display Type list to open the Contours panel.
iii. Select pressure... and static Pressure from the Contours of drop-down lists.
iv. Enter 50 for Levels.
v. Click Display and close the Contours panel.
vi. Adjust the view as shown in Figure 5.
vii. Click OK to close the Animation Sequence panel.
(e) Click OK to close the Solution Animation panel.
This will save .hmf file after every 5 iterations. You can create an animation in the form of movie clip
using these files.

Figure 5: Contours of Static Pressure


6. Save the case and data files (fstep_std.cas.gz and fstep_std.dat.gz).
File
Write
Case & Data...
Retain the default enabled Write Binary Files option so that you can write a binary file. The .gz option
will save zipped files, this will work on both, Windows as well as Linux/UNIX platforms.
7. Iterate the solution.
Solve
Iterate..

.
188 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(a) Enter 6000 for Number of Time Steps.


(b) Click Apply.
(c) Click Iterate to start the iterations.
(d) After the solution completed, close the Iterate panel.
8. Save the case and data files (fstep_std.cas.gz and fstep_std.dat.gz).
File
Write
Case & Data...
9. Create an animation using the .hmf files.
Solve
Animate
Playback

(a) Select MPEG from the Write/Record Format drop-down list.


(b) Click Write and close the Playback panel.
This creates a movie file in the working folder, which can be viewed using Windows Media Player
Step 6: Postprocessing
1. Display the pressure contours (Figure 6).
Display
Contours

(a) Select Pressure... and Static Pressure from the Contours of drop-down lists.
(b) Set the number of Levels to 100.
(c) Click Display (Figure 6).

189 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Figure 6: Contours of Static Pressure


2. Display the contours of Velocity magnitude (Figure 7).
(a) Select Velocity... and Velocity Magnitude in the Contours of drop-down lists.
(b) Enable Auto Range.
(c) Set Levels to 100.

(d) Click Display (Figure 7).

Figure 7: Contours of Velocity Magnitude


3. The streamlines are shown in Figure 8.
190 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(a) Select Velocity... and Stream Function from the Contours of drop-down lists.
(b) Disable Filled
(d) Set Levels to 100.

(e) Click Display (Figure 8).

Figure 9: Contours of Density


4. Close the Contours panel.

191 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Chapter 6
TURBULENT FLOW PAST A SPHERE
6. Flow Past a Sphere at Re = 1.14E6
Problem Description
The purpose of this tutorial is to illustrate the setup and solution of a turbulent flow past a sphere. Flow
past a sphere is one of the classical problems of fluid mechanics. The Reynolds number is taken to be
1.14 x 106 and is defined as: Re = UD/ .
To obtain Re = 1.14E6, set the values of D = 6m, = 1.225 kg/m 3, V = 2.7754 m/s and = 1.7894E-05
kg/ms. The flow is turbulent at Re = 1.14E6. What will be the velocity profile of this flow? What will be
the drag coefficient of the sphere? What will be the pressure coefficient around sphere? How will the
velocity vectors around sphere look?

Figure 1: Problem schematic


Preparation
1. Copy the mesh file, single_sphere.msh to the working folder.
2. Start the 3D double precision (3ddp) solver of FLUENT.
Setup and Solution
Step 1: Grid
1. Read the grid file, single_sphere.msh.
File
Read
Case...
FLUENT will read the mesh file and report the progress in the console window.

2. Check the grid.


Grid
Check
Any errors in the grid would be reported at this time. Check the output and make sure that there are no
errors reported. Check the grid size:
192 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Grid
Info
Size
The following info should appear (your number of cells might be slightly different because of slight
different mesh criteria used):

3. Check the scale of the grid.


Grid
Scale...
The following info should appear:

4. To view the grid first creates a plane that cuts 3D model in half (otherwise it would be too hard to see a
good profile of the mesh). To do this we go into:
Surface
Plane..
(a) Change the values to: x0 = 0; x1 = 0; x2 = 1, y0 = 0; y1 = 1; y2 = 0 and z0 = 0; z1 = 0; z2 = 0
(b) The New Surface Name set to Plane_Split.

4. Display the grid (Figures 2).


193 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Display
Grid...
(a) Select Plane_split under Surfaces.
(b) Click Display and close the Gr id Display pannel.

Figure 2: Grid display


5. To get white background
File
Hardcopy...
i. Select Color from the Coloring group box and Vector from the File Type group box.
ii. Click Preview.
A Question dialog box appears. Click No.

iii. Click Apply and close the Graphics Hardcopy panel.


194 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Step 2: Models
The problem is unsteady at Re = 1.14E06
5. Set up the unsteady solver settings.
Define
Models
Solver...
(a) Choose Pressur e Based under Solver, Absolute under Velocity For mulation.
(b) Gr een-Gauss Node Based under Gradient Option.
(c) Unsteady under Time, 2nd-Or der Implicit under Unsteady For mulation.
(d) Superficial Velocity under Porous For mulation
(b) Click OK to close the Solver panel.

6. Set up the Turbulence model settings.


Define
Models
Viscous
(a) Choose k-omega Model and leave all other default values.

195 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(b) Click OK to close the Viscous Model panel.


Step 3: Materials
4. Set the material properties.
Define
Materials...

(a) Leave the default values.


(b) Click Change/Create and close the Materials panel.
Step 4: Boundary Conditions
Define
Boundary Conditions...
1. Select inlets from the Zone selection list.
The Type will be reported as velocity-inlet.

196 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

2. Click the Set... button to open the Velocity Inlet panel.

(a) Set Velocity Specification Method to Components


(b) Enter 2.7754 m/s for X-Velocity.
(c) In the Turbulence Ar ea, set Specification Method to Intensity and Length Scale, and
set Turbulent Intensity to 1%.
(b) Click OK to close the Velocity Inlet panel.
3. Close the Boundary Conditions panel.
Step 5: Solution
1. Set the solution controls.
Solve
Controls
Solution...

(a) Select PISO from the Pressure-Velocity Coupling drop-down list and disable Skewness-Correction.
(b) Select PRESTO! from the Pressure drop-down list in the Discretization group box.
(b) Select Second Order Upwind from the Momentum, Turbulent Kinetic Energy and Specific Dissipation
Rate drop-down list in the Discretization group box.
(c) Click OK to close the Solution Controls panel.
2. Initialize the flow.
Solve
Initialize
Initialize
197 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(a) Enter 2.7754 for X-Velocity.


(b) Click Init and close the Solution Initialization panel.
3. Set the reference values used to compute the lift, drag, and moment coefficients. The reference values
are used to non-dimensionalize the forces and moments action on the wall surface.
Report
Reference Values...
(a) Change Ar ea to 28.274, Density to 1.225, Velocity to 2.7754 and Viscosity to 1.7894E-05

(b) Click OK to close the Reference Values panel.


4. Set the monitor for drag coefficient on Sphere.
Solve
Monitors
Force...

(a) Select Drag from the Coefficient drop-down list.


(b) Select sphere from the Wall Zones selection list.
198 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(c) Enable Print, Plot and Write in the Options group box, Click Apply.
(d) Similarly select lift from Coefficient drop-down list.
(e) Select sphere from the Wall Zones selection list.
(e) Click Apply and close the Force Monitors panel

5. Enable plotting of residuals during the calculation.


Solve
Monitors
Residual...

(a) Enable Plot in the Options group box.


(b) Click OK to close the Residual Monitors panel.
6. Save the case and data files (sphere_uns.cas.gz and sphere_uns.dat.gz).
File
Write
Case & Data...
Retain the default enabled Write Binary Files option so that you can write a binary file. The .gz option
will save zipped files, this will work on both, Windows as well as Linux/UNIX platforms.
7. Iterate the solution.
Solve
Iterate..

199 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

.
(a) Enter 1 for the time step
(b) Enter 10000 for number of time steps.
(c) Enter 20 for max iteration per time step
(b) Click Iterate
(c) After complete the iteration, close the Iterate panel.
9. Save the case and data files (cylinder_std.cas.gz and cylinder_std.dat.gz).
File
Write
Case & Data...
Step 6: Postprocessing
1. Display the velocity vector (Figure 6).
Display
Vector

(a) Select Velocity... and Velocity Magnitude from the Contours of drop-down lists.
(b) Set the Scale to 1 and Skip to 0. Click Display.
(c) Click Display (Figure 6).

200 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

Figure 6: Velocity Vector


2. Display the contours of Velocity magnitude (Figure 7).
Display
Contours

(a) Select Velocity... and Velocity Magnitude in the Contours of drop-down lists.
(b) Enable Auto Range.
(c) Set Levels to 100.
(d) Click Display (Figure 7).

Figure 7: Contours of Vorticity Magnitude


201 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

3. Display the contours of turbulence(Figure 8).


Display
Contours

(a) Select Turbulence... and Turbulence Intensity in the Contours of drop-down lists.
(b) Enable Auto Range.
(c) Set Levels to 100.
(d) Click Display (Figure 8).

Figure 8: Contours of Turbulence


4. Plot Pressure coefficient.
Plot
XY Plot..

202 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(a) Change the Y Axis Function to Pressur e..., followed by Pressur e Coefficient.
(b) Select Spher e under Surfaces and click Plot

It is seen from pressure coefficient plot that the data is scatter, so creating a line along the sphere to get a
better picture of the pressure coefficient. To accomplish this create a surface of Z-axis position zero, and
plot the line y^2+(x-12)^2-9, which is the equation of a ring around the sphere in the x-y plane.
5. Surface
Iso-Surface
(a) Select Grid... in Surface of Constant and Z-Coor dinate.
(b) Set 0 for Iso-Values.
This will create a plane in the flow in which the Z coordinate is zero everywhere.

(c) Write Zer o_Plane for New Surface Name and click Cr eate.
6. Define Custom Field Value
Define
Custom Field Function.
(a) Write formula y^2+(x-12)^2 - 9 under Definition.
(b) Select Grid for Field Functions and choose X-Coordinate and Y-Coor dinate for "x" and "y" in the
above formula.

203 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

(c) Write Ring for New Function Name and click Define.
7. Surface
Iso-Surface
(a) Select Custom Field Functions and r ing for Surface of Constant.
(b) Select Zer o_Plane From Surface list
(c) Default Iso-Values to 0.

(d) Write cpline in New Surface Name and click Create.


8. Plot
XY Plot..
(a) Select Pressure and Pressure Coefficient.
(b) Select ring from Surfaces and click Plot.

It is see from the plot that the data is less scatter (this effect, however, is far more significant on a more
refined mesh).
204 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

8. Display coefficient of drag:


Report

Forces

(a) Set 1 for X in Force Vector


(b) Select sphere from Wall Zones.
(c) Click Print

205 | P a g e

Workshop on Computational Methods in Heat and Fluid Flow at MED, AMU ,18-19th February,2012

References
1. J. D. Anderson, Fundamentals of Aerodynamics, 2nd Ed., Ch. 3: pp. 229.
2. I. H. Shames, Mechanics of Fluid, 3rd Ed", Ch. 13: pp. 669-675.
3. C. H. K. Williamson and G. L. Brown, A Series in to represent the Strouhal- Reynolds number
relationship of the cylinder wake, J. Fluids Struct. 12, 1073 (1998).
4. K-S. Chang and J-Y. Sa, The effect of buoyancy on vortex shedding in the near wake of a circular
cylinder, J. Fluid Mech. 220, 253 (1990).
5. J-M Shi, D. Gerlach, M. Breuer, G. Biswas and F. Durst, Heating effect on steady and unsteady
horizontal laminar flow of air past a circular cylinder, Phys. Fluids 16, 4331 (2004).
6. T. K. Sengupta, K. Venkatasubbaiah and S. S. Pawar, Nonlinear instability of mixed convection flow
over a horizontal cylinder, Acta Mech. 201, 197 (2008).
7. S. Bhattacharyya and A. K. Singh, Vortex-shedding and heat transfer dependence on effective
Reynolds number for mixed convection around a cylinder in cross flow, Int. J. Heat and Mass Transfer
53, 3202 (2010).

206 | P a g e

Das könnte Ihnen auch gefallen