Lab Manual

Download as pdf or txt
Download as pdf or txt
You are on page 1of 84

Computational Aerodynamics

Laboratory Manual
IV YEAR B.TECH

(AERONAUTICAL ENGINEERING)

Department of Aeronautical Engineering


Computational Aerodynamics
Laboratory Manual
IV YEAR B.TECH

(AERONAUTICAL ENGINEERING)

Department of Aeronautical Engineering

Document No: Date of Issue Compiled by


MLRIT/AERO/LAB 04 July 2015 Mr. Sai Kumar A Authorized by
MANUAL/CAD (Assistant Professor)
HOD(AERO)

VERSION 1.2.2 Date of Revision Verified by


07 JULY 2015 Dr. M. Satyanarayana Gupta
MLR Institute of Technology Department of Aeronautical Engineering
PREFACE
Computational Aerodynamics LAB is one of the important subjects included in the
fourth year of B. Tech curriculum by JNTU, Hyderabad. This lab includes the practical
application of the theories studied in Computational Aerodynamics in third year of the
curriculum.

The Computational Aerodynamics Lab Curriculum requires the understanding and


practice of Ansys FLUENT and MATLAB Commercial Software packages. The Fluid
dynamics analysis will be performed using the Ansys Fluent Software and the Code
development experiments will be performed using the MATLAB software

The students must grasp following aspects while doing experiments in CAD lab as given
below.

Understanding the basics of C language to enable writing correct program using


Matlab.
Developing the mathematical model as per the problem definition.
Based on the problem definition provide the input boundary conditions to get the
desired output solution.
Analyzing the results and the other required datas based on the experiments

Students will be in a position to grasp the above aspects while doing lab practicals as defined
in the manual through the following steps.

In Ansys FLUENT: Problem definition, Creating geometry, Mesh, Problem setup and
solution, Result.

In MATLAB: Problem definition, Discretization, Matlab code and Results

This manual will need constant up gradation based on the student feedback and change in the
syllabus.

HOD PRINCIPAL

Computational Aerodynamics Lab


MLR Institute of Technology Department of Aeronautical Engineering

LAB CODE
1. Student should report to the concerned as per the time table.
2. Students who turn up late to the labs will in no case be permitted to the program
schedule for the day.
3. After completion of the program, certification of the concerned staff in-charge in
the observation book is necessary.
4. Student should bring a note book of 100 pages and should enter the
readings/observations into the note book while performing the experiment.
5. The record of observations along with the detailed experiments and the results of
the experiment in the immediate last session should be submitted and certified
staff member in-charge
6. Not more than 2 students in a group are permitted to perform the experiment on
the set.
7. The group-wise division made in the beginning should be adhered to and no mix
up of students among different groups will be permitted.
8. When the experiment is completed, should shut down the systems and arrange the
chairs properly
9. Any damage to the computer system or any missing of the equipment will be
viewed seriously either by putting penalty or by dismissing the total group of
students from the lab for the semester / year.
10. Students should be present in the labs for total scheduled duration.
11. Students are required to prepare thoroughly to perform the experiment before
coming to laboratory.

Computational Aerodynamics Lab


MLR Institute of Technology Department of Aeronautical Engineering
Objectives:
The objective of the module is to study and analyze the internal and external aerodynamic
properties over various aerodynamic profiles using commercial software packages.
To develop a Matlab code to analyze the behavior of the governing equations of
Aerodynamics, Thermodynamics, Heat transfer, Aerospace Propulsion etc., and to
generate different types of the grids over an Aerodynamic profile.

Outcome
Ability to generate Matlab code to analyze the behavior of the governing equations of
Aerodynamics.
Graduate able to write a Matlab code generate grid over an aerodynamic profiles like airfoils,
flat plate, cylinder etc.
Ability to analyze the internal and external aerodynamic properties over various aerodynamic
profiles.

Computational Aerodynamics Lab


MLR Institute of Technology Department of Aeronautical Engineering
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
IV Year - B. Tech. AERO I-SEM L T/P/D C
0 - / 3/ - 2
COMPUTATIONAL AERODYNAMICS LAB
Objectives:

The objective of the module is to study and analyze the internal and external aerodynamic
properties over various aerodynamic profiles using commercial software packages. To develop a
Matlab code to analyze the behavior of the governing equations of Aerodynamics,
Thermodynamics, Heat transfer, Aerospace Propulsion etc., and to generate different types of
the grids over an Aerodynamic profile.

Recommended Systems/Software Requirements:


Intel based desktop PC with minimum of 2.80 GHZ or faster processor with at least 1.8 GB
RAM and 180GB free disk space.
Ansys Workbench Commercial Software.
Matlab Commercial Software

Week1: To study and practice on introduction to Fluent software employed in Modeling And
Simulation of Aerodynamic Problems:
a) Provide a basic introduction to Ansys Fluent software.
b) Provide the introduction and basic understanding of Matlab software.

Week2: To study and analyze the characteristics of Laminar flow through a pipe.

Week3: To study and analyze the boundary layer over a Flat plate

Week 4: To study and analyze the characteristics of the supersonic flow over a wedge.

Week 5: To study and analyze the aerodynamics properties of flow past a cylinder

Week 6: To study and analyze the performance characteristics and aerodynamic properties of the
flow over an Airfoil.

Week 7: MID Exam- I

Week 8: Write MATLAB code to analyze the behavior of 1D wave equation using explicit
method of Lax

Week 9: Write MATLAB code to analyze the behavior of 1D heat conduction equation using
explicit method.

Week 10: Write MATLAB code to generate the algebraic grid over an aerodynamic profile.

Week 11: Write MATLAB code to generate an elliptical grid over an aerodynamic profile.

Week 12: MID Exam-II

Computational Aerodynamics Lab


MLR Institute of Technology Department of Aeronautical Engineering

Table of Contents
Experiment -1:
Introduction To Modelling And Simulation To Aerodynamic Problems 1
1.1 Viva Questions 4

Experiment - 2:
Laminar Flow Through Pipe 5
2.1 Viva Questions 12

Experiment - 3:
Flow Over A Flat Plate 13
3.1Viva Questions 20

Experiment 4:
Supersonic Flow Over A Wedge 21
4.1 Viva Questions 29

Experiment -5:
Flow Past Over A Cylinder 30
5.1Viva Questions 38

Experiment 6:
Flow Over An Airfoil 39
6.1 Viva Questions 46

Experiment -7:
Solution for the One Dimensional Wave Equation Using Explicit Method Of Lax - Code
Development. 47
7.1 Viva Questions 53

Experiment -8:
Solution For The One Dimensional Transient Heat Conduction Equation Using Explicit
Method (Code Development) 54
8.1 Viva Questions 59

Experiment 9:
Generation of The Algebraic Grids (Code Development) 60
9.1 Viva Questions 65

Experiment - 10:
Generation of the Elliptic Grids (CODE DEVELOPMENT) 66
10.1 Viva Questions 76

Computational Aerodynamics Lab


MLR Institute of Technology Department of Aeronautical Engineering

Experiment -1: INTRODUCTION TO MODELLING AND


SIMULATION TO AERODYNAMIC PROBLEMS

Definition: Model
A model is a mathematical object that has the ability to predict the behaviour of a real system
under a set of defined operating conditions and simplifying assumptions

The term modelling refers to the development of a mathematical representation of a physical


situation

WHAT IS MODELING?
Modelling is the process of producing a model.
A model is a representation of the construction and working of some system of
interest.
A model is similar to but simpler than the system it represents.
One purpose of a model is to enable the analyst to predict the effect of changes to the
system. Generally, a model intended for a simulation study is a mathematical model
developed with the help of simulation software.
Mathematical model classifications include
Deterministic (input and output variables are fixed values) or
Stochastic (at least one of the input or output variables is probabilistic);
Static (time is not taken into account) or
Dynamic (time-varying interactions among variables are taken into account).
Typically, simulation models are stochastic and dynamic.

Computational Aerodynamics Lab 1|Page


MLR Institute of Technology Department of Aeronautical Engineering

Definition: Simulation
Simulation is the process of exercising a model for a particular instantiation of the system and
specific set of inputs in order to predict the system response.
Simulation refers to the procedure of solving the equations that resulted from model
development

WHAT IS SIMULATION?
A simulation of a system is the operation of a model of the system.
The operation of the model can be studied, and hence, properties concerning the
behaviour of the actual system or its subsystem can be inferred.
In its broadest sense, simulation is a tool to evaluate the performance of a system, existing
or proposed, under different configurations of interest and over long periods of real time.
Simulation is used before an existing system is altered or a new system built, to
Reduce the chances of failure to meet specifications.
Eliminate unforeseen bottlenecks.
prevent under or over-utilization of resources,
Optimize system performance.

How to select the best simulation software for an application arises?


Metrics for evaluation include
Modelling flexibility
Ease of use
Modelling structure (hierarchical v/s flat; object-oriented v/s nested)
Code reusability
Graphic user interface
Animation, dynamic business graphics, hardware and software requirements
Statistical capabilities
Output reports and graphical plots
Customer support and documentation
Mathematical modelling - Aerospace Applications
Using basic equations from dynamics, mathematical equations are written that
describe how the vehicle will move in response to forces that are applied to the
vehicle. For example, it is pretty easy to describe how a rocket will accelerate when a
constant thrust is provided by the rocket's engine.

Computational Aerodynamics Lab 2|Page


MLR Institute of Technology Department of Aeronautical Engineering

Another type of modelling problem would be to understand and predict, in a


mathematical equation, how an aircraft will respond to hitting an updraft in the
atmosphere, or how the aircraft will respond to the deflection of various control
surfaces at different airspeeds.
An aerodynamic subsystem model describes how the vehicle will respond to forces
caused by motion of the vehicle through the atmosphere, and predicts the effects of
each different control surface (such as the flaps, rudders, ailerons, etc.) upon the
motion of the vehicle.
A propulsion subsystem model describes how any motors or engines will behave and
what forces will act on the vehicle to which they are attached.
A landing gear subsystem model is required when the vehicle is in contact with the
ground in order to model how the ground reaction forces are created and how they
affect the motion of the vehicle.
An inertial properties subsystem model provides details about how the mass and
inertia of the vehicle might change with time.
any electrical, mechanical, or electronic system that assists the pilot in moving the
control surfaces has to be described mathematically

The steps involved in developing a simulation model, designing a simulation experiment, and
performing simulation analysis are:
Step-1 Identify the problem.
Step-2 Formulate the problem.
Step-3 Collect and process real system data.
Step-4 Formulate and develop a model.
Step-5 Validate the model.
Step-6 Document model for future use.
Step-7 Select appropriate experimental design.
Step-8 Establish experimental conditions for runs.
Step-9 Perform simulation runs.
Step-10 Interpret and present results.
Step-11 Recommend further course of action.

Computational Aerodynamics Lab 3|Page


MLR Institute of Technology Department of Aeronautical Engineering

1.1 Viva Questions


1. What do you mean by simulation
Simulation is the process of exercising a model for a particular instantiation of the
system and specific set of inputs in order to predict the system response.
Simulation refers to the procedure of solving the equations that resulted from
model development

2. What are the steps followed in Ansys Fluent to solve the problems
The steps to be followed are as follows
Problem definition
Creating the geometry and domain
Meshing the geometry
Problem setup in fluent and solution
Result Analysis

3. What is the main difference between the Ansys Fluent and Ansys CFX
The ANSYS CFX solver uses finite elements (cell vertex numeric), similar to
those used in mechanical analysis, to discretize the domain. In contrast, the
ANSYS FLUENT solver uses finite volumes (cell centred numerics).
4. What is a Matlab
MATLAB is a high-performance language for technical computing. It integrates
computation, visualization, and programming in an easy-to-use environment
where problems and solutions are expressed in familiar mathematical notation

5. What are the applications of the Matlab Software


Matlab software can be generally used for the following purpose:
Simple calculations
Plotting and analyzing mathematical relationships (2D and 3D)
List & Matrix Operations
Writing script files (a type of programming)
Symbolic manipulation of equations
Advanced visualization, animation and GUI interface tools

Computational Aerodynamics Lab 4|Page


MLR Institute of Technology Department of Aeronautical Engineering

Experiment - 2: LAMINAR FLOW THROUGH PIPE


AIM: To study the characteristics of laminar flow through pipe

DESCRIPTION: Consider a pipe of 0.2m diameter and length of 8m with the free stream
velocity of 1m/s. The fluid exhausts into the ambient atmosphere which is at a pressure of 1
atm. Take density = 1 kg/ m3 and coefficient of viscosity = 2 x 10-3 kg/ (ms).

PROCEDURE:
Start ANSYS FLUENT
Start> All Programs> Ansys 12.1> Workbench
Double click on Fluid Flow (FLUENT) Project Selection

Creating Geometry:
In the Project Schematic of the Workbench window, right click on Geometry and
select Properties,
Under Advance Geometry Options, change the Analysis Type to 2D as shown in the
image below.
Launch Design Modeller
In the Project Schematic, double click on Geometry to start preparing the geometry. Use
the default meter unit and click OK.
Creating a Sketch
Start by creating a sketch on the XY Plane. Under Tree Outline, select XY Plane and
then click on Sketching right before Details View.
In the Sketching toolboxes, select Rectangle. In the Graphics window, create a rough
rectangle by clicking once on the origin and then by clicking once somewhere in the positive
XY plane.
Dimensions
Under Sketching Toolboxes, select Dimensions tab,
Under the Details View table (located in the lower left corner), set V1=0.5m and set H2=8m
Surface Body Creation
In order to create the surface body, first (Click) Concept > Surface From Sketches
This will create a new surface SurfaceSK1. Under Details View, select Sketch1 as Base
Objects. Finally, click Generate to generate the surface.

Computational Aerodynamics Lab 5|Page


MLR Institute of Technology Department of Aeronautical Engineering

At this point, you can close the Design Modeller and go back to Workbench Project
Page. Save your work thus far in the Workbench Project Page.
Creating Mesh:

Go to the Workbench Project Page, then (Double Click) Mesh.

Default Mesh
In this section the default mesh will be generated. In order to generate the default mesh first
click on Mesh, then click on Update
Mapped Face Meshing
In order to incorporate this meshing style (Click) Mesh Control > Mapped Face
Meshing
Now, first click on the surface body (filled rectangle), which should then highlight green.
Next, (Click) Apply in the Details of Mapped Face Meshing table.
Now, generate the mesh by clicking Update.

Edge Sizing
First,(Click) Mesh Control > Sizing as shown below.
Now, the geometry and the number of divisions need to be specified. First (Click) Edge

Selection Filter, . Then hold down the "Control" button and then click the bottom and
top edge of the rectangle. Both sides should highlight green. Next, apply under the Details
of Sizing table as shown below.
Now, set Type to Number of Divisions and Number of Divisions to 400.
Next, set the Behaviour to Hard.
Follow the same procedure as for the edge sizing in the x direction, starting first by
selecting (Click) Mesh Control > Sizing. Select only the left side instead of the top and
bottom and set the number of divisions to 50. Remember to set the Behaviour to Hard.
Then, click Update to generate the mesh with the new specifications.

Computational Aerodynamics Lab 6|Page


MLR Institute of Technology Department of Aeronautical Engineering

Create Named Selections


The left side of the geometry will be called "inlet" and the right side will be called "outlet".
The top side of the rectangle will be called "wall" and the bottom side of the rectangle will be
called "axis" as shown in the image below.

In order to create a named selection first (Click) Edge Selection Filter, . Then click
on the left side of the rectangle and it should highlight green. Next, right click the left side of
the rectangle and choose Create Named Selection. Enter "inlet" and click OK, as shown
below.
Now, create named selections for the remaining three sides and name them according to the
diagram

Save, Exit & Update


First save the project. Next, close the Mesher window. Then, go to the Workbench Project

Page and click the Update Project button, .

Problem setup and solution in fluent:


In Ansys workbench double click Setup to open FLUENT.
Before FLUENT launches, In Options check the box next to Double Precision
Now the Fluent window is open and the mesh has imported into the fluent solver.
Problem setup:
GeneralType as: Pressure based
ModelsEnergy OFF Select Viscous-laminar

Computational Aerodynamics Lab 7|Page


MLR Institute of Technology Department of Aeronautical Engineering

MaterialsAirCreate/EditSet density as: 1 kg/m^3 and set Viscosity to


0.002 kg/m*s Change
Boundary conditionsSelect inletGive type as: velocity-inlet Edit
Set Velocity Specification Method to Components, set X-
Velocity 1m/sok
Boundary conditionsSelect outlet Type as: pressure-outlet
Boundary conditionsSelect far fieldGive type as: symmetry
Boundary conditionsSelect plateGive type as: wall
Problem Setup Reference ValueCompute from : Inlet
Solution:
Select the monitors and change convergence criteria to 10-6(10e-6).
Solution initializationCompute from: inletInitialize
Run calculationsEnter the no. of iterations as: 1000Calculate

RESULT:
Graphics and animations select the required flow parameters in the contours
and vectors.
Save the contours of Velocity, Pressure, and Velocity vector.

Computational Aerodynamics Lab 8|Page


MLR Institute of Technology Department of Aeronautical Engineering

Figure 1: The counters of Velocity vectors at different location

Figure 2: The counters of Static pressure

Figure 3: the counters of Velocity Magnitude

Computational Aerodynamics Lab 9|Page


MLR Institute of Technology Department of Aeronautical Engineering

Sample Experiment with Results Apart from JNTUH curriculum

Experiment - 2 RESULT
Laminar Pipe Flow
Case 1: Consider a
pipe of 0.2m diameter
and length of 8m.
The incoming fluid is
flowing with a
velocity of 0.05 m/s.
The density of the
fluid is 1 kg/m^3 and
the viscosity is 0.001
kg/ (m-s). The fluid
exhausts into the
ambient atmosphere
which is at a pressure Average of Wall Shear on wall: 0.00206983 [Pa]
of 1 atm.
Case 2: Consider a
pipe of 0.2m diameter
and length of 8m.
The incoming fluid is
flowing with a
velocity of 0.5 m/s.
The density of the
fluid is 1.2 kg/m^3
and the viscosity is
0.005 kg/ (m-s).The
fluid exhausts into
the ambient
atmosphere which is Average of Wall Shear on wall: 0.103855 [Pa]
at a pressure of 1 atm.
Case 3: Consider a
pipe of 0.2m diameter
and length of 8m.
The incoming fluid is
flowing with a
velocity of 1 m/s. The
density of the fluid is
1.225 kg/m^3 and the
viscosity is 0.0085
kg/ (m-s). The fluid
exhausts into the
ambient atmosphere
which is at a pressure Average of Wall Shear on wall: 0.353533 [Pa]
of 1 atm.

Computational Aerodynamics Lab 10 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Case 4: Consider a
pipe of 0.2m diameter
and length of 8m.
The incoming fluid is
flowing with a
velocity of 0.01 m/s.
The density of the
fluid is 1.1 kg/m^3
and the viscosity is
0.019kg/ (m-s). The
fluid exhausts into
the ambient
atmosphere which is Average of Wall Shear on wall: 0.00784761 [Pa]
at a pressure of 1 atm.
Case 5: Consider a
pipe of 0.2m diameter
and length of 8m. .
The incoming fluid is
flowing with a
velocity of 0.007 m/s.
The density of the
fluid is 1.2 kg/m^3
and the viscosity is
0.0025 kg/ (m-s). The
fluid exhausts into
the ambient
atmosphere which is Average of Wall Shear on wall: 0.000722881 [Pa]
at a pressure of 1 atm.
Case 6: Consider a
pipe of 0.2m diameter
and length of 8m with
the free stream
velocity of 1m/s. The
fluid exhausts into
the ambient
atmosphere which is
at a pressure of 1 atm.
Take density = 1
kg/ m3 and coefficient
of viscosity = 2 x
10-3 kg/(ms).

Computational Aerodynamics Lab 11 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

2.1 Viva Questions


1. When the flow is said to be laminar flow
The flow is said to be laminar if the Reynolds number is less than 2,000.

2. What is the use of Edge sizing


The edge sizing is used to divide the edge in certain number of points or element
size.

3. What is use of axis symmetric flow model


The Axis of symmetric flow model is used if the domain which is symmetric
about the axis is simplified.

4. What do you mean by convergence criteria


Convergence criteria set the convergence limit, i.e., if the convergence criteria are
set to 10-3, the solution will converge if the error between the current iteration and
previous iteration reaches 10-3 or less.

5. What will be the velocity profile for flow through pipe


For the flow through the pipe, the velocity profile will be parabolic with the
velocity maximum at the centre of the pipe

Computational Aerodynamics Lab 12 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Experiment - 3: FLOW OVER A FLAT PLATE


AIM: To study the characteristics of flow over a flat plate
DESCRIPTION:
Consider a Flat plate of length 1m. The incoming fluid is flowing with a velocity of 1
m/s. The density of the fluid is 1 kg/m3 and the viscosity is 10-4 kg/ (m-s). The plate is an
stationary solid wall having no slip as its boundary condition

PROCEDURE:
Start ANSYS FLUENT
Start> All Programs> Ansys 12.1> Workbench
Double click on Fluid Flow (FLUENT) Project Selection

Creating Geometry:
In the Project Schematic of the Workbench window, right click on Geometry and
select Properties,
Under Advance Geometry Options, change the Analysis Type to 2D as shown in the
image below.
Launch Design Modeller
In the Project Schematic, double click on Geometry to start preparing the geometry. Use
the default meter unit and click OK.
Creating a Sketch
Start by creating a sketch on the XY Plane. Under Tree Outline, select XY Plane and
then click on Sketching right before Details View.
In the Sketching toolboxes, select Rectangle. In the Graphics window, create a rough
rectangle by clicking once on the origin and then by clicking once somewhere in the positive
XY plane.

Dimensions
Under Sketching Toolboxes, select Dimensions tab,
Under the Details View table (located in the lower left corner), set V1=0.5m and set H2=1m

Surface Body Creation


In order to create the surface body, first (Click) Concept > Surface From Sketches
This will create a new surface SurfaceSK1. Under Details View, select Sketch1 as Base
Objects. Finally, click Generate to generate the surface.

Computational Aerodynamics Lab 13 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

At this point, you can close the Design Modeler and go back to Workbench Project
Page. Save your work thus far in the Workbench Project Page.
Creating Mesh:

Go to the Workbench Project Page, then (Double Click) Mesh.

Default Mesh
In this section the default mesh will be generated. In order to generate the default mesh first
click on Mesh, then click on Update
Mapped Face Meshing
In order to incorporate this meshing style (Click) Mesh Control > Mapped Face
Meshing
Now, first click on the surface body (filled rectangle), which should then highlight green.
Next, apply in the Details of Mapped Face Meshing table.
Now, generate the mesh by clicking Update.

Edge Sizing
First, (Click) Mesh Control > Sizing as shown below.
Now, the geometry and the number of divisions need to be specified. First (Click) Edge

Selection Filter, Then hold down the "Control" button and then click the bottom and
top edge of the rectangle. Both sides should highlight green. Next, apply under the Details
of Sizing table as shown below.
Now, set Type to Number of Divisions and Number of Divisions to 50.
Next, set the Behaviour to Hard.
Follow the same procedure as for the edge sizing in the x direction, starting first by
selecting (Click) Mesh Control > Sizing. Select only the left side instead of the top and
bottom and set the number of divisions to 60. Remember to set the Behaviour to Hard.
Then, click Update to generate the mesh with the new specifications.
Edge Sizing Biasing
First, click on Edge Sizing 2, then click on Bias Type and set it to the first option
Next, set the Bias Factor to 70 as shown below. The Bias Factor is defined in this case to
be the ratio of the longest division and the shortest division.
Repeat the same procedure for right hand side of the geometry

Computational Aerodynamics Lab 14 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Create Named Selections


The left side of the geometry will be called "inlet" and the right side will be called "outlet".
The top side of the rectangle will be called "far field" and the bottom side of the rectangle
will be called "plate" as shown in the image below.

In order to create a named selection first (Click) Edge Selection Filter, . Then click
on the left side of the rectangle and it should highlight green. Next, right click the left side of
the rectangle and choose Create Named Selection. Enter "inlet" and click OK, as shown
below.
Now, create named selections for the remaining three sides and name them according to the
diagram
Save, Exit & Update
First save the project. Next, close the Masher window. Then, go to the Workbench Project

Page and click the Update Project button, .

Problem setup and Solution in FLUENT:


In Ansys workbench double click Setup to open FLUENT.
Before FLUENT launches, In Options check the box next to Double Precision
Now the Fluent window is open and the mesh has imported into the fluent solver.
Problem setup:
GeneralType as: Pressure based

Computational Aerodynamics Lab 15 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

ModelsEnergy OFF Select Viscous-laminar


MaterialsAirCreate/EditSet density as: 1 kg/m^3 and set Viscosity to
0.0001 kg/m*s Change
Boundary conditionsSelect inletGive type as: velocity-inlet Edit
Set Velocity Specification Method to Components, set X-
Velocity 1m/sok
Boundary conditionsSelect outlet Type as: pressure-outlet
Boundary conditionsSelect farfieldGive type as: symmetry
Boundary conditionsSelect plateGive type as: wall
Problem Setup Reference ValueCompute from : Inlet
Solution:
Select the monitors and change convergence criteria to 10^-6.
Solution initializationCompute from: inletInitialize
Run calculationsEnter the no. of iterations as: 1000Calculate
RESULT:
Graphics and animations select the required flow parameters in the contours
and vectors.
Save the contours of Velocity, Pressure, and Velocity vector.
Average of Wall Shear on flat plate is 0.00881094 Pa

Figure 1: contours of Pressure

Computational Aerodynamics Lab 16 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Figure 2: Contours of Velocity Vector

Figure 3: Contours of Velocity Magnitude

Computational Aerodynamics Lab 17 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Sample Experiment with Results Apart from JNTUH curriculum

Experiment 3
RESULTS
Flat Plate Boundary Layer
Case 1: Consider a Flat
plate of length 1m. The
incoming fluid is flowing
with a velocity of 0.05
m/s. The density of the
fluid is 1 kg/m^3 and the
viscosity is 0.001 kg/ (m-
s). The plate is an
stationary solid wall
having no slip as its
Average of Wall Shear on flat plate: 0.0018325 [Pa]
boundary condition
Case 2: Consider a Flat
plate of length 1m. The
incoming fluid is flowing
with a velocity of 0.5 m/s.
The density of the fluid is
1.2 kg/m^3 and the
viscosity is 0.005 kg/ (m-
s). The plate is an
stationary solid wall
having no slip as its Average of Wall Shear on flat plate: 0.0934146 [Pa]
boundary condition
Case 3: Consider a Flat
plate of length 1m. The
incoming fluid is flowing
with a velocity of 1 m/s.
The density of the fluid is
1.225 kg/m^3 and the
viscosity is 0.0085 kg/ (m-
s). The plate is an
stationary solid wall
having no slip as its
boundary condition
Average of Wall Shear on flat plate: 0.225802 [Pa]

Case 4: Consider a Flat


plate of length 1m. The
incoming fluid is flowing
with a velocity of 0.01
m/s. The density of the
fluid is 1.1 kg/m^3 and the
viscosity is 0.019kg/ (m-
s). The plate is an
stationary solid wall
having no slip as its
boundary condition Average of Wall Shear on flat plate: 0.00455638 [Pa]

Computational Aerodynamics Lab 18 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Case 5: Consider a Flat


plate of length 1m. The
incoming fluid is flowing
with a velocity of 0.007
m/s. The density of the
fluid is 1.2 kg/m^3 and the
viscosity is 0.0025 kg/ (m-
s). The plate is an
stationary solid wall
having no slip as its
boundary condition Average of Wall Shear on flat plate: 0.000420125 [Pa]
Case 6: Consider a Flat
plate of length 1m. The
incoming fluid is flowing
with a velocity of 0.1 m/s.
The density of the fluid is
1 kg/m^3 and the viscosity
is 10 ^ (-4) kg/ (m-s). The
plate is an stationary solid
wall having no slip as its
boundary condition
Average of Wall Shear on flat plate is 0.00881094 Pa

Computational Aerodynamics Lab 19 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

3.1Viva Questions
1. What do you mean by no-slip boundary condition
No-slip boundary condition is generally applied at the walls if the fluid flow is
viscous in nature; it means that velocity of the fluid at the wall is zero

2. What is the use of Edge size biasing


Edge size biasing increases or decreases the number of grid points along the edge
in a particular direction.

3. When do we apply symmetry boundary condition


Symmetry boundary condition is applied when the velocity at that boundary is
only in tangential direction, which means that the normal component of velocity is
zero.

4. What is the boundary layer


Boundary layer is the layer of fluid in the immediate vicinity of a bounding
surface where the effects of viscosity are significant.

5. When the solution is said to be converged


The solution is said to be converged when the error between the previous iteration
and current iteration is less than or equal to the desired convergence criteria.

Computational Aerodynamics Lab 20 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Experiment 4: SUPERSONIC FLOW OVER A WEDGE

AIM: To study the characteristics of the Supersonic flow over a Wedge

DESCRIPTION:
Consider air flowing over wedge. The free stream Mach number is 3 and the angle of attack
is 15. Assume standard sea-level values for the free stream properties:

Pressure = 1, 01, 325 Pa


Density = 1.225 kg/m3
Temperature = 300 K

PROCEDURE:
Open ANSYS Workbench

We are ready to do a simulation in ANSYS Workbench! Open ANSYS Workbench by going


to Start > ANSYS > Workbench.

Geometry

Right click the Geometry box and select Properties. Under Advance Geometry
Options change Analysis Type from 3D to 2D.

Select Meter as the standard unit, and click OK.

Sketching

To sketch on the XY plane click the positive Z-Axis.

Click on the Sketching tab and Click on Rectangle in the Sketching Toolboxes window and
draw the rectangle.

Select the line tool in the Sketching Toolboxes window and draw the wedge outline in the
geometry.

In the Sketching Toolboxes window, click the Modify tab, and select trim. Next, trim the
lines that are not needed.

Dimensions

In the Sketching Toolboxes window, select the Dimensions tab. Next, select the general
dimensioning tool and give dimension for horizontal and vertical lines.

Computational Aerodynamics Lab 21 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

In order to add magnitudes to the dimensions in the Details window specify the dimensions
as shown in figure below.

When exact dimensions are given click on Generate .

Create Surface

Select Concept > Surface from Sketches. In the graphics window, select all the lines of the
geometry next in Base Objects > Apply. Finally, press Generate. The geometry should now
look like the figure below.

Now we have completed the geometry. Save the project, and close the Design Modeler.

Meshing:

In the Project Schematic window, double click the Mesh box to launch the mesher.

Generate the mesh by by going to Mesh > Generate Mesh

In order to get regular mesh, select Mesh Control > Mapped Face Meshing. In
the Graphics window select Geometry > Apply.

Computational Aerodynamics Lab 22 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

In the Mesh Menu, select Mesh Control > Sizing. Next, select the left edge click on apply and
in details widow changes type to number of divisions and give it as 100, and set behaviour as
hard.

Repeat the same process for the Right edge.

Repeat the same process for top eged and give number of divisions as 90.

Repeat the same process for bottom edge and give number of division as 30 for symmetry
and 60 for wedge

Now go to Mesh > Generate Mesh.

Named Selections

To create named selections right click on the edge and select Create Named Selection.

A dialogue box will appear where you will enter the desired name of the boundary.

Name all of the boundaries of the geometry as given below:

Left edge: Inlet Right edge: Outlet Top edge: far field Bottom edge: symmetry
and wedge

Once the selections are all named and the mesh is created, update the project save the project
and you may close the Mesher.

Steps Involved in FLUENT:


In Ansys workbench double click Setup to open FLUENT.
Before FLUENT launches, In Options check the box next to Double Precision
Now the Fluent window is open and the mesh has imported into the fluent solver.

Computational Aerodynamics Lab 23 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Problem setup:
GeneralType as: Density based
ModelsEnergy ON Select Viscous-laminarEditSet model as: Inviscid
MaterialsAirCreate/EditSet density as: Ideal-gas Change
Cell zone conditions Type as: fluidSet operating conditionsSet
operating pressure as: 0Pa
Boundary conditionsSelect inletGive type as: pressure-far-
fieldEditGive Gauge pressure as: 101325PaSet Mach as: 3ok
Repeat the same Boundary conditions for outlet and far field
Boundary conditionsSelect symmetryGive symmetry
Boundary conditionsSelect wedgeGive wall
Solution:
Select Solution ControlsSet Courant number as: 0.5
Select the monitors and change convergence criteria to 10^-5.
Solution initializationCompute from: inletInitialize
Run calculationsEnter the no. of iterations as: 1000Calculate
RESULTS:
Graphics and animations select the required flow parameters in the contours
and vectors.
Save the contours of Velocity (Mach number), Pressure, Temperature and
Velocity vector.

Figure 1: Countours of Velocity Vectors

Computational Aerodynamics Lab 24 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Figure 2: Countours of Static Temperature

Figure 3: Countours of Static Pressure

Computational Aerodynamics Lab 25 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Figure 4: Countours of Mach numbers

Computational Aerodynamics Lab 26 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Sample Experiment with Results Apart from JNTUH curriculum


Experiment - 4 RESULT
Supersonic Flow Over
Wedge

Case 1: Consider air


flowing over wedge.
The free stream Mach
number is 2

P2= 200437.41 M2= 1.502026

Case 2: Consider air


flowing over wedge.
The free stream Mach
number is 2.25.

P2= 211940.56 M2= 1.720735

Case 3: Consider air


flowing over wedge.
The free stream Mach
number is 2.5

P2=225770.45 M2= 1.926735

Case 4: Consider air


flowing over wedge.
The free stream Mach
number is 2.75

P2=238295.64 M2= 2.1319849

Computational Aerodynamics Lab 27 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Case 5: Consider air


flowing over wedge.
The free stream Mach
number is 3.25

P2=269932.31 M2= 2.514081

Case 6: Consider air


flowing over wedge.
The free stream Mach
number is 3

P2=279932.31 M2= 2.33

Computational Aerodynamics Lab 28 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

4.1 Viva Questions

1. What type of the solver is used for supersonic flow


Density based or Coupled solver is used to solve the supersonic flow

2. What do you mean by gauge pressure


The gauge pressure is same as that of the total pressure, which is generally used
while solving supersonic flow problems

3. What should be the value of courant number to get stable solution


To obtain the stable solution the courant number should be less than or equal to
one

4. Why do we need to check the energy equation to solve supersonic flows


In supersonic flows to analyse the Aerodynamic heating and other thermal
behaviours we need to check the energy equation

5. When the pressure far field boundary condition is used


Pressure far-field conditions are used in FLUENT to model a free-
stream condition at infinity, with free-stream Mach number and static conditions
being specified. This boundary condition is applicable only when the density is
calculated using the ideal-gas law

Computational Aerodynamics Lab 29 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Experiment -5: FLOW PAST OVER A CYLINDER

AIM: To study the characteristics of flow over a cylinder.


DESCRIPTION:
Consider a cylinder of 1m radius. The free stream velocity considered 1m/s. The
properties of air is =1kg/m3 and dynamic viscosity is 0.05 kg/m*s.

PROCEDURE:
Solution Domain
For an external flow problem like this, one needs to determine where to place the outer
boundary. A circular domain will be used for this simulation. The effects that the cylinder has
on the flow extend far. Thus, the outer boundary will be set to be 40 times as large as the
diameter of the cylinder. That is, the outer boundary will be a circle with a diameter of 64 m.

Open ANSYS Workbench

We are ready to do a simulation in ANSYS Workbench! Open ANSYS Workbench by going


to Start > ANSYS > Workbench.

Geometry:

Right click the Geometry box and select Properties. Under Advance Geometry
Options change Analysis Type from 3D to 2D.
Select Meter as the standard unit, and click OK.
Launch Design Modeller (Double Click) Geometry
Create Inner Circle and Dimension
Create a circle, centred at the origin in the xy plane. Set the diameter of the circle to 1m.
Inner Circle Surface Body Creation Concept > Surfaces from Sketches.
Set the Base Object to Sketch 1 Then click Apply next to Base Object.
Click Generate
Create New Sketch in the XY Plane click on the New Sketch button, .
Create Outer Circle and Dimension
Set the diameter of the circle to 64m.

Computational Aerodynamics Lab 30 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Outer Circle Surface Body Creation. Concept > Surfaces From Sketches.
Set the Base Object to Sketch 2 Then click Apply next to Base Object.
Then set Operation to Add Frozen
Then, click Generate
Carry Out Boolean Operation: Subtraction
Create > Boolean. First, set Operation to Subtract.
Select outer circle surface body as the Target Body and the inner circle surface body as
the Tool Body. Lastly, click Generate
Create a Bisecting Line
Click on XY Plane Then, click the new sketch button, .
In the new sketch draw a line on the y axis that goes through both of the concentric circles.
Then trim the line segments that lay inside of the inner circle and the line segments that lay
outside of the outer circle.
Line Body Creation
Concept > Lines from Sketches.
Set the Base Object to Sketch 3. Click Generate
Projection Tools > Projection.
Apply the two lines that you created to edge and apply the surface body to target.
Click Generate.
Save Project and Close Design Modeler
Mesh generation:
Launch Mesher (Double Click) Mesh
Generate the mesh by going to Mesh > Generate Mesh
In order to get regular mesh, select Mesh Control > Mapped Face Meshing.
Set Geometry to both portions of the surface body. Click Update.

Create edge sizing for left half portion


In the Mesh Menu, select Mesh Control > Sizing. Next, select 2 edges (the left edge of
cylinder and left edge of domain) click on apply and in details widow changes type to number
of divisions and give it as 100, and set behaviour as hard.
Repeat the same process for the Right half portion.
Now go to Mesh > Generate Mesh.
You should get the mesh as shown in figure below

Computational Aerodynamics Lab 31 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Named Selections

To create named selections right click on the edge and select Create Named Selection.
A dialogue box will appear where you will enter the desired name of the boundary.
Name all of the boundaries of the geometry as given below:
Left edge of domain: Inlet
Right edge of domain: Outlet
Both edges of cylinder: cylinder
Once the selections are all named and the mesh is created, update the project save the project
and you may close the masher.

Setup and Solution in FLUENT:


In Ansys workbench double click Setup to open FLUENT.
Before FLUENT launches, In Options check the box next to Double Precision
Now the Fluent window is open and the mesh has imported into the fluent solver.
Problem setup:
GeneralType as: Pressure based
ModelsEnergy OFF Select Viscous-laminar
MaterialsAirCreate/EditSet density as: 1 kg/m3 and set Viscosity to
0.05 kg/m*s Change
Boundary conditionsSelect inletGive type as: velocity-inlet Edit
Set Velocity Specification Method to Components, set X-Velocity to 1
m/s, and set Y-Velocity to 0 m/s ok

Computational Aerodynamics Lab 32 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Boundary conditionsSelect outlet Type as: pressure-outlet


Boundary conditionsSelect cylinderGive type as: wall
Problem Setup Reference ValueCompute from : Inlet
Solution:
Select the monitors and change convergence criteria to 10-6.
Solution initializationCompute from: inletInitialize
Run calculationsEnter the no. of iterations as: 2000Calculate

RESULT:
Graphics and animations select the required flow parameters in the contours
and vectors.
Save the contours of Velocity, Pressure, Streamlines, Velocity (vorticity) and
Velocity vector.
Coefficient of drag, Cd=2.744

Figure 1: Countours of Vorticity Magnitude

Computational Aerodynamics Lab 33 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Figure 2: Countours of Velocity Magnitude

Figure 3: Countours of Velocity Vectors

Computational Aerodynamics Lab 34 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Figure 4: Countours of Static Pressure

Computational Aerodynamics Lab 35 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Sample Experiment with Results Apart from JNTUH curriculum

Experiment 5
RESULTS
Flow Past a Cylinder

Case 1: Consider a
cylinder of 1m radius. The
free stream velocity
considered 1m/s. The
properties of air is
=1kg/m3 and dynamic
viscosity is 0.05 kg/m*s.
Cd=2.744

Case 2: Consider a
cylinder of 1m radius. The
free stream velocity
considered 5m/s. The
properties of air is
=1.2kg/m3 and dynamic
viscosity is 0.05 kg/m*s.
Cd= 1.034

Case 3: Consider a
cylinder of 1m radius. The
free stream velocity
considered 8m/s. The
properties of air is
=1.3kg/m3 and dynamic
viscosity is 0.08 kg/m*s.
Cd= 2.807

Case 4: Consider a
cylinder of 1m radius. The
free stream velocity
considered 12m/s. The
properties of air is
=1.0kg/m3 and dynamic
viscosity is 0.10 kg/m*s.
Cd=4.965

Computational Aerodynamics Lab 36 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Case 5: Consider a
cylinder of 1m radius. The
free stream velocity
considered 15m/s. The
properties of air is
=1.1kg/m3 and dynamic
viscosity is 0.12 kg/m*s.
Cd=8.240

Case 6: Consider a
cylinder of 1m radius. The
free stream velocity
considered 45m/s. The
properties of air is
=1.0kg/m3 and dynamic
viscosity is 0.05 kg/m*s.
Cd=0.8676

Computational Aerodynamics Lab 37 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

5.1Viva Questions
1. What type of the boundary condition is applied on the cylinder
The wall boundary condition is applied on the cylinder

2. What are the different types of inlet boundary conditions used


Flow inlet boundaries are: pressure inlet, velocity inlet, mass flow inlet, inlet vent,
intake fan, pressure far-field, etc.

3. What type of domain will be suitable to generate structured grid over a cylinder
Circular domain will be more suitable to generate structured grid over a cylinder

4. What should be the size of the domain to get accurate results


To get accurate results the size of the domain should be approximately 20 times
the size of the body.

5. When the pressure outlet boundary condition is used in CFD


The pressure outlet boundary condition is used when flow at the outlet is
exhausting in the atmosphere and that region has an standard atmospheric value.

Computational Aerodynamics Lab 38 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Experiment 6: FLOW OVER AN AIRFOIL

AIM: To study the characteristics of flow over a NACA 0012 Airfoil.

DESCRIPTION: Consider a NACA 0012 Airfoil. The free stream velocity considered
80m/s. The properties of air is =1kg/m3 and dynamic viscosity is 0.05 kg/m*s.

PROCEDURE:
Geometry:
Download the Airfoil Coordinates

In this step, we will import the coordinates of the airfoil and create the geometry we will use
for the simulation. This file contains the points of a NACA 0012 airfoil.
Open ANSYS Workbench

We are ready to do a simulation in ANSYS Workbench! Open ANSYS Workbench by going


to Start > ANSYS > Workbench.
Geometry

Right click the Geometry box and select Properties. Under Advance Geometry
Options change Analysis Type from 3D to 2D.
Select Meter as the standard unit, and click OK.
Launch Design Modeler (Double Click) Geometry
Airfoil

Concept > 3D Curve. In the Details View window, click Coordinates File and select the
ellipsis to browse to a file. Once you have selected the desired geometry file, click Generate
to create the curve.
Concept > Surfaces From edges.
Set the Base Object to airfoil edge then click Apply next to Base Object.
Click Generate
Domain
Create New Sketch in the XY Plane click on the New Sketch button, .
In sketching select polygon and set n=4 (for square) and generate square from the origin and
give to dimension to it as 40m.

Computational Aerodynamics Lab 39 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Concept > Surfaces From Sketches.


Set the Base Object to Sketch 2 Then click Apply next to Base Object.
Then set Operation to Add Frozen
Then, click Generate
Carry Out Boolean Operation: Subtraction
Create > Boolean. First, set Operation to Subtract.
Select outer square domain as the Target Body and the inner airfoil surface as the Tool
Body. Lastly, click Generate
Save Project and Close Design Modeller

MESH GENERATION:
Launch Mesher (Double Click) Mesh
Generate the mesh by going to Mesh > Generate Mesh
In mesh details > sizing > relevance center = fine, growth rate = 1.05
In mesh details > inflation > growth rate = 1.05
In the Mesh Menu, select Mesh Control > Sizing. Next, select Airfoil edge click on apply
and in details widow changes type to number of divisions and give it as 500, and set
behaviour as hard.
Now go to Mesh > Generate Mesh.
You should get the mesh as shown in figure below

Named Selections

To create named selections right click on the edge and select Create Named Selection.
A dialogue box will appear where you will enter the desired name of the boundary.
Name all of the boundaries of the geometry as given below:

Computational Aerodynamics Lab 40 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Left edge of domain: Inlet


Right edge of domain: Outlet
Both top and bottom edges: wall
Airfoil edge: Airfoil
Once the selections are all named and the mesh is created, update the project save the project
and you may close the mesher.

Setup and Solution in FLUENT:


In Ansys workbench double click Setup to open FLUENT.
Before FLUENT launches, In Options check the box next to Double Precision
Now the Fluent window is open and the mesh has imported into the fluent solver.
Problem setup:
GeneralType as: Pressure based
ModelsEnergy OFF Select Viscous-laminar
MaterialsAirCreate/EditSet density as: 1 kg/m^3 and set Viscosity to
0.05 kg/m*s Change
Boundary conditionsSelect inletGive type as: velocity-inlet Edit
Set Velocity Specification Method to Components, set X-Velocity to
79.56m/s, and set Y-Velocity to 8.36m/s ok
Boundary conditionsSelect outlet Type as: pressure-outlet
Boundary conditionsSelect airfoilGive type as: wall
Problem Setup Reference ValueCompute from : Inlet
Solution:
Select the monitors and change convergence criteria to 10^-6.
Solution initializationCompute from: inletInitialize
Run calculationsEnter the no. of iterations as: 1000Calculate

RESULT:
Graphics and animations select the required flow parameters in the contours
and vectors.
Save the contours of Velocity, Pressure, Streamlines, Velocity (vorticity) and
Velocity vector.
At 4 degrees angle, Cd=0.09979 and Cl=0.1777

Computational Aerodynamics Lab 41 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Figure 1: Countours of Velocity Magnitude

Figure 2: Countours of Velocity Streamlines

Computational Aerodynamics Lab 42 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Figure 3: Countours of Static Pressure

Figure 4: Countours of Vorticity Magnitude

Computational Aerodynamics Lab 43 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Sample Experiment with Results Apart from JNTUH curriculum


Experiment 6
FLOW OVER AN RESULTS
AIRFOIL
Case 1: Consider a
NACA 0012
Airfoil. The free
stream velocity
considered 80m/s.
The properties of
air is =1kg/m3 and
dynamic viscosity is
0.05 kg/m*s.
AoA=00
Cl= 0.0143 Cd = 0.101

Case 2: Consider a
NACA 0012
Airfoil. The free
stream velocity
considered 80m/s.
The properties of
air is =1kg/m3 and
dynamic viscosity is
0.05 kg/m*s.
AoA=20
Cl= 0.066 Cd = 0.1026

Case 3: Consider a
NACA 0012
Airfoil. The free
stream velocity
considered 80m/s.
The properties of
air is =1kg/m3 and
dynamic viscosity is
0.05 kg/m*s. AoA=
60

Cl= 0.1777 Cd = 0.0997

Computational Aerodynamics Lab 44 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Case 4: Consider a
NACA 0012
Airfoil. The free
stream velocity
considered 80m/s.
The properties of
air is =1kg/m3 and
dynamic viscosity is
0.05 kg/m*s. AoA
= 80

Cl= 0.2385 Cd = 0.0964

Case 5: Consider a
NACA 0012
Airfoil. The free
stream velocity
considered 80m/s.
The properties of
air is =1kg/m3 and
dynamic viscosity is
0.05 kg/m*s.
AoA=100

Cl= 0.3200 Cd =0.0912

Consider a NACA
0012 Airfoil. The
free stream velocity
considered 80m/s.
The properties of
air is =1kg/m3 and
dynamic viscosity is
0.05 kg/m*s.

Cl= 0.1777 Cd =0.09919

Computational Aerodynamics Lab 45 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

6.1 Viva Questions


1. What does NACA 4 digit airfoil indicates
In NACA 4 digit airfoil for example 2412,
The first digit indicates the maximum chamber in percentage of chord (0.02c)
The second digit indicates the position of the maximum chamber from the
leading edge in tenth of the chord (0.4c)
The last 2 digit indicates the maximum thickness in percentage of the chord
(0.12c)

2. In fluent simulation to vary the angle of attack what changes should be made in
boundary condition
To change the angle of attack (), at the velocity inlet boundary the velocity
component should be changed.
That is the X- component = V* Cos () and the Y-component = V*Sin ()

3. What are the different types of Outlet boundary conditions


Flow outlet boundaries are: pressure outlet, pressure far-field, out flow, outlet
vent, exhaust fan, etc

4. Why do we use the Boolean operation in flow over an airfoil


In the flow over an airfoil, the Boolean operation is used to subtract the body from
the domain or enclosure which may be overlapping it.

5. What is difference between symmetric and cambered airfoil


Difference between symmetric and cambered airfoil:
Symmetric airfoil Cambered airfoil
The cambered line and the chord line The camber line and the chord line

coincide with each other. represent two different lines.

Only produces the lift at positive angle Can also produce the lift at zero angle of

of attack attack

Computational Aerodynamics Lab 46 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Experiment -7: SOLUTION FOR THE ONE DIMENSIONAL


WAVE EQUATION USING EXPLICIT METHOD OF LAX -
CODE DEVELOPMENT.
The one dimensional scalar wave equation is given as

This equation represents a linear advection process with wave speed c = constant, which is
the speed of the travelling wave or the speed of propagation. u(x,t) is the signal or wave
information. The wave propagates at constant speed to the right if c > 0 and to the left if c <
0. The spatial domain can vary from - to .

Numerical Solution

Method of descretisation finite difference form

Replace the spatial partial derivative with a central difference expression

Where n is the temporal index and j is the spatial index.


Replace the time derivative with a forward difference formula

We then have

Now let us replace by an average value between grid points j+1 and j-1 as

Substituting this in equation (1) we get the explicit method of Lax for the 1D scalar wave
equations as,

PROBLEM: Test Case for the numerical solution

Computational Aerodynamics Lab 47 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Solve the one dimensional wave equation in the spatial domain of [0, 2*pi] with an initial
step function condition given by
U0(x,0) = 1 for x pi-1
= 0 otherwise

Choose 100 grid points with and find the wave form at t = 0.2 s.

MATLAB CODE for the one dimensional wave equation

% Solves the one dimensional scalar wave equation du/dt + du/dx = 0 [0,2*pi]
% Using LAX METHOD
clc;
clear;
t0 = 0; tf = 1;
M = 100; % number of points in x direction
N = 100; % number of points in y direction

% define the mesh in space


dx = 2*pi/M;
x = 0:dx:2*pi;

% define the mesh in time


dt = (tf-t0)/N;
t = t0:dt:tf;

% calculate value for lamda


c = 1;
lambda = c*dt/dx
display('lambda should be less than 1 for stability:')

% choose the wave number of the initial data and give its decay rate
u0 = x<=(pi-1);
u = zeros(M+1,N+1);
u(:,1) = u0;

Computational Aerodynamics Lab 48 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

% Implement the time marching Lax scheme:


for n=1:N
for i=2:M
u(i,n+1) = (u(i+1,n)+u(i-1,n))/2-(lambda/2)*(u(i+1,n)-u(i-1,n));
end
% Introduce exact values at the endpoints.
u(1,n+1)=1;
u(M+1,n+1)=0;
end

% plot the result in 21 intervals


for j=0:20
plot(x,u(:,1+5*j),'LineWidth',2);
axis([0,2*pi,-0.5,1.5]);
title('1D wave equation using explicit Lax Method','FontSize',12)
xlabel('x');
ylabel('u');
pause(1)
end %plot(x,u(:,101));

Computational Aerodynamics Lab 49 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

RESULTS:

1D wave equation using explicit Lax Method


1.5

0.5
u

-0.5
0 1 2 3 4 5 6
x

Figure: wave form at t = 0.2 s

Computational Aerodynamics Lab 50 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Sample Experiment with Results Apart from JNTUH curriculum


Experiment 7
RESULTS
1D Wave Equation
Test Case 1 1.5
1D wave equation using explicit Lax Method

Solve the one dimensional wave


equation in the spatial domain of [0, 1
50] with an initial step function
condition given by

velocity (u)
0.5
U0(x,0) = 1 for x 5
= 0 otherwise
Choose 100 grid points and find the 0

wave form at t = 10 s.
-0.5
0 5 10 15 20 25 30 35 40 45 50
direction (x)

Test Case 2 1D wave equation using explicit Lax Method


1.5
Solve the one dimensional wave
equation in the spatial domain of [0,
20] with an initial step function
1
condition given by
U0(x,0) = 1 for x 10
velocity (u)

= 0 otherwise
0.5
Choose 200 grid points and find the
wave form at t = 5 s.
0

-0.5
0 2 4 6 8 10 12 14 16 18 20
direction (x)

Test Case 3 1D wave equation using explicit Lax Method


5
Solve the one dimensional wave
4
equation in the spatial domain of [0,
100] with an initial step function 3

condition given by 2

U0(x,0) = 3 for x 35 1
velocity (u)

= -2 otherwise 0
Choose 200 grid points and find the
-1
wave form at t = 90 s.
-2

-3

-4

-5
0 10 20 30 40 50 60 70 80 90 100
direction (x)

Computational Aerodynamics Lab 51 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Test Case 4 1D wave equation using explicit Lax Method


5
Solve the one dimensional wave
equation in the spatial domain of [0, 4

150] with an initial step function


3
condition given by
U0(x,0) = 4 for x 75 2

velocity (u)
= -2 otherwise
1
Choose 150 grid points and find the
wave form at t = 60 s. 0

-1

-2

-3
0 50 100 150
direction (x)

Test Case 5
2
Solve the one dimensional wave
equation in the spatial domain of [0,
1.5
3*pi] with an initial step function
condition given by
1
U0(x,0) = 2 for x pi
= -1 otherwise
0.5
Choose 100 grid points and find the
wave form at t = 30s. 0

-0.5

-1
0 1 2 3 4 5 6 7 8 9 10

Test Case 6 1D wave equation using explicit Lax Method


1.5
Solve the one dimensional wave
equation in the spatial domain of [0,
2*pi] with an initial step function
1
condition given by
U0(x,0) = 1 for x pi-1
= 0 otherwise 0.5
u

Choose 100 grid points and find the


wave form at t = 0.2s.
0

-0.5
0 1 2 3 4 5 6
x

Computational Aerodynamics Lab 52 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

7.1 Viva Questions


1. What is the Mathematical Behaviour of 1D wave equation
1D Wave equation is a hyperbolic partial differential equation

2. How many boundary conditions and initial conditions are required to solve 1D wave
equation
Zero boundary condition and only one initial condition is required to solve 1D
Wave equation

3. What do you mean by explicit method


In explicit method the partial differential equation is Discretize explicitly and the
resulting equation contains only one Unknown

4. What are the restrictions in using explicit method


In explicit method the courant number should be less than or equal to one to get
stable results that is for a particular value to time step (t) there is the restriction
for the space step(x).

5. What are the application of the Wave equation


Special type of the wave equations are used to predict the behaviour of Tsunami,
Earthquakes magnitude, wavelength etc with respect to time

Computational Aerodynamics Lab 53 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Experiment -8: SOLUTION FOR THE ONE DIMENSIONAL


TRANSIENT HEAT CONDUCTION EQUATION USING
EXPLICIT METHOD (CODE DEVELOPMENT)

The one dimensional transient (unsteady) heat conduction equation is given as

Where is the thermal diffusivity.

This equation represents the conduction of heat energy in time and space. Transient nature of
this equation is represented in the dependence of temperature with time as opposed to a
steady state condition.

Numerical Solution

Method of discretization finite difference form

Replace the time derivative with a forward difference expression

Where n is the temporal index and j is the spatial index.


Replace the second order spatial derivative on the RHS with a central difference formula

We then have

i.e., (2)

Where,

Equation (2) is the final explicit update equation for the one dimensional transient heat
conduction equation.

Computational Aerodynamics Lab 54 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

PROBLEM: Test Case for the numerical solution


A country rock has a temperature of 300oC and the dike a width of 5m, with a magma
temperature of 1200oC. Total length of the rock formation is 100m. Initial conditions are
temperatures of 300oC and 1200oC for the rock and dike respectively. Boundary conditions at
x = -L/2 and x = L/2 are at 300oC (see figure). Find the temperature distribution after 100
days. Use 200 grid points in the x direction with a 1 day time interval.
ROCK DIKE ROCK
300oC 1200oC 300oC
L
MATLAB CODE for the one dimensional transient heat conduction equation

% Solves the 1D heat equation with an explicit finite difference scheme


clear all
clc
%Physical parameters
L = 100; % Length of modeled domain [m]
Td = 1200; % Temperature of magma [C]
Tr = 300; % Temperature of country rock [C]
kappa = 1e-6; % Thermal diffusivity of rock [m2/s]
W = 5; % Width of dike [m]
day = 3600*24; % # seconds per day
dt = 1*day; % Timestep [s]
% Numerical parameters
nx = 200; % Number of gridpoints in x-direction
nt = 100; % Number of timesteps to compute
dx = L/(nx-1); % Spacing of grid
x = -L/2:dx:L/2;% Grid
% Setup initial temperature profile
T = ones(size(x))*Tr;
T(abs(x)<=W/2) = Td;
time = 0;
for n=1:nt % Timestep loop
% Compute new temperature
Tnew = zeros(1,nx);
for i=2:nx-1

Computational Aerodynamics Lab 55 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Tnew(i) = T(i) + (kappa*dt/(dx)^2)*(T(i+1)-(2*T(i))+T(i-1));


end
% Set boundary conditions
Tnew(1) = T(1);
Tnew(nx) = T(nx);
% Update temperature and time
T = Tnew;
time = time+dt;
end
% Plot solution
plot(x,Tnew);
xlabel('x [m]')
ylabel('Temperature [oC]')
title(['Temperature evolution after ',num2str(time/day),' days'])

% draw the dike boundaries


x1 = -2.5;
x2 = 2.5;
y = linspace(300,800);
% Plot the dike boundaries
hold on
plot(x1,y, x2, y);
RESULTS:
Temperature evolution after 100 days
800

750

700

650
Temperature [oC]

600

550

500

450

400

350

300
-50 -40 -30 -20 -10 0 10 20 30 40 50
x [m]

Figure: temperature distribution after 100 days

Computational Aerodynamics Lab 56 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Sample Experiment with Results Apart from JNTUH curriculum


Experiment - 8
RESULTS
1D Heat Conduction equation
Test Case 1 Temperature evolution after 100 days
100
A country rock has a temperature of
30oC and the dike a width of 20m, 90
with a magma temperature of
100oC. Total length of the rock 80

formation is 100m. Initial

Temperature [oC]
conditions are temperatures of 30oC 70

and 100oC for the rock and dike 60


respectively. Boundary conditions
at x = -L/2 and x = L/2 are at 30oC 50

(see figure). Find the temperature


40
distribution after 60 days. Use 200
grid points in the x direction with a 30
1 day time interval. -50 -40 -30 -20 -10 0
x [m]
10 20 30 40 50

Test Case 2 Temperature evolution after 100 days


90
A country rock has a temperature of
30oC and the dike a width of 5m,
80
with a magma temperature of
150oC. Total length of the rock
70
formation is 100m. Initial
Temperature [oC]

conditions are temperatures of 30oC


60
and 150oC for the rock and dike
respectively. Boundary conditions
50
at x = -L/2 and x = L/2 are at 30oC
(see figure). Find the temperature 40
distribution after 100 days. Use 150
grid points in the x direction with a 30
1 day time interval. -100 -80 -60 -40 -20 0
x [m]
20 40 60 80 100

Test Case 3 Temperature evolution after 365 days


1000
A country rock has a temperature of
300oK and the dike a width of 25m, 900

with a magma temperature of 800


1000oK. Total length of the rock
700
formation is 500m. Initial
Temperature [oC]

conditions are temperatures of 600

300oK and 1000oL for the rock and 500


dike respectively. Boundary 400
conditions at x = -L/2 and x = L/2
are at 300oK (see figure). Find the 300

temperature distribution after 365 200

days. Use 300 grid points in the x 100


direction with a 1 day time interval. -300 -200 -100 0
x [m]
100 200 300

Computational Aerodynamics Lab 57 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Test Case 4 Temperature evolution after 120 days

A country rock has a temperature of 120


15oC and the dike a width of 15m,
with a magma temperature of 100
130oC. Total length of the rock
formation is 100m. Initial

Temperature [oC]
80

conditions are temperatures of 15oC


and 130oC for the rock and dike 60

respectively. Boundary conditions


at x = -L/2 and x = L/2 are at 15oC 40

(see figure). Find the temperature


20
distribution after 120 days. Use 200
grid points in the x direction with a 0
1 day time interval. -50 -40 -30 -20 -10 0
x [m]
10 20 30 40 50

Test Case 5 Temperature evolution after 90 days


90
A country rock has a temperature of
25oC and the dike a width of 35m, 80
with a magma temperature of 85oC.
Total length of the rock formation 70

is 200m. Initial conditions are


Temperature [oC]

temperatures of 25oC and 85oC for 60

the rock and dike respectively. 50


Boundary conditions at x = -L/2
and x = L/2 are at 25oC (see figure). 40

Find the temperature distribution


30
after 90 days. Use 200 grid points
in the x direction with a 1 day time 20
interval -100 -80 -60 -40 -20 0
x [m]
20 40 60 80 100

Test Case 6 Temperature evolution after 100 days


800
A country rock has a temperature of
300oC and the dike a width of 5m, 750

with a magma temperature of 700

1200oC. Total length of the rock 650

formation is 100m. Initial


Temperature [oC]

600
conditions are temperatures of
550
300oC and 1200oC for the rock and
500
dike respectively. Boundary
conditions at x = -L/2 and x = L/2 450

are at 300oC (see figure). Find the 400

temperature distribution after 100 350


days. Use 200 grid points in the x 300
direction with a 1 day time interval. -50 -40 -30 -20 -10 0
x [m]
10 20 30 40 50

Computational Aerodynamics Lab 58 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

8.1 Viva Questions


1. What is the Mathematical Behaviour of 1D Heat Conduction Equation
1D Heat condition equation is Parabolic in nature

2. How many boundary conditions and initial conditions are required to solve 1D Heat
Conduction Equation
To solve 1D Heat conduction equation one Initial condition and two boundary
conditions will be required

3. Differentiate between the explicit and implicit method

S.No Explicit Approach Implicit Approach


1 It is easy to set up and program It is complicated to setup and
program
2 The approach gives one equation with The approach gives one equation
only one unknown with more than one unknown
3 For particular value of x there is There is no restriction for value of
restriction on the value of t. x and t
4 The Approach is Conditionally stable The Approach is Unconditionally
stable

4. What is the Marching direction to solve 1D Heat Conduction Equation


To solve 1D heat conduction equation the marching direction is the Time direction

5. What are the application of the 1D Heat Conduction Equation


Heat conduction equation is applied to study the heat transfer and temperature
distribution in the rod, plates, in the rock or from any one part of the body to the
other part.

Computational Aerodynamics Lab 59 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Experiment 9: GENERATION OF THE ALGEBRAIC GRIDS


(CODE DEVELOPMENT)
PROBLEM
Generate an algebraic grid about the upper surface of the NACA 0015 airfoil. Points are
clustered in j direction near the lower surface (using =1.05 in algebraic grid). Make sure the
number of points in i and j are flexible.
Introduction, Theory, & Formulations
A key component of grid generation is the conversion from the physical domain to the
computational domain, in order to allow for equidistant grid lines in rectangular form. In
considering a simple two dimensional case, physical coordinates x and y must be converted
to computational coordinates and . These computational coordinates are furthermore
known via the rectangular grid relations. As a result, they must be converted back into
physical coordinates in order to be of use. For the particular case concerning an airfoil placed
on the x axis, the following relationships exist:

As can be seen, Eq. (1) simply states that the x coordinate is the coordinate, as there exists
no irregularities to alter that axis. The precise relationship in Eq. (2) is due to a required
clustering near the bottom surface. Here, represents the clustering parameter, which is
given, and H represents the total height along the y axis. However, this does not account for
the geometry of the airfoil, wherein its top surface coordinate is a function of the distance
along the x axis. The exact equation is:

Here, y represents the max height of the airfoil, which would thus be the correspond to y=0 in
Eq.(2). Height is determined by subtracting this value from maximum height. This allows a
total expression for the grid y coordinative can be obtained. Note that the x used in Eq. (3)
assumes 0 at the nose of the airfoil and 1 at the tail. The previous equations effectively define
all that is needed to generate an algebraic grid. However, this grid will simply be used as a
starting point for the generation of an elliptic grid. Thus, once x and y are obtained
algebraically, they will be set as initial conditions for the x and y values used in order to
perform iterations of the developed finite difference equations.
MATLAB code for Algebraic Grid Generation

Computational Aerodynamics Lab 60 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

%Algebraic Grid Generation


clear;
clc;
%Assign values for t and beta
t=0.15;
beta=1.05;
%Prompt user for number of grid points
n=input('Enter the number of grid points in the i direction: ');
m=input('Enter the number of grid points in the j direction: ');
%Create zeroes matrix for surface plots
z=zeros(n,m);
%Assign lengths and values for eta and xi
L=3;
eta=linspace(0,1,m);
xi=linspace(0,L,n);
%x is equal to xi
X=xi;
%Find height
ytop=2;
for i=1:n
if X(i) < 1
ybottom(i)=0;
elseif X(i) > 2
ybottom(i)=0;
else
x2(i)=X(i)-1;
ybottom(i)=(t/.2)*(0.2969*x2(i)^.5-0.126*x2(i)-0.3516*x2(i)^2+0.2843*x2(i)^3-
0.1015*x2(i)^4);
end
H(i)=ytop-ybottom(i);
end
%Loop to calculate coordinates
zeta=beta+1;
gamma=beta-1;

Computational Aerodynamics Lab 61 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

alpha=zeta/gamma;
for i=1:n
for j=1:m
chi=1-eta(j);
y(i,j)=H(i)*(zeta-gamma*alpha^chi)/(alpha^chi+1)+ybottom(i);
x(i,j)=X(i);
end
end
surface(x,y,z);
xlabel ('x');
ylabel ('y');
title ('Algerbraic Grid');
RESULTS:
Enter the number of grid points in the i direction: 50
Enter the number of grid points in the j direction: 50
Algerbraic Grid
2

1.8

1.6

1.4

1.2

1
y

0.8

0.6

0.4

0.2

0
0 0.5 1 1.5 2 2.5 3
x

Figure: Algebraic grid generated over the NACA 0015 airfoil (=1.05)
Figure shows the algebraic grid generation with the growth rate =1.05 the grids are very fine
at y=0 and it gets coarser as the y increases.
The value of growth rate can be varied and you can see the difference in the growth rate of
the grid.

Computational Aerodynamics Lab 62 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Sample Experiment with Results Apart from JNTUH curriculum


Experiment 9
RESULTS
Algebraic grid generation
Algerbraic Grid
2

1.8
Test Case 1 1.6
Generate an algebraic
1.4
grid about the upper
surface of the NACA 1.2

0025 airfoil. Points are 1

y
clustered in j direction 0.8
near the lower surface
(using =1.05 in 0.6

algebraic grid) with 100 0.4

grid points. 0.2

0
0 0.5 1 1.5 2 2.5 3
x

Algerbraic Grid
2

1.8
Test Case 2
Generate an algebraic 1.6

grid about the upper 1.4


surface of the NACA 1.2
0020 airfoil. Points are
1
y

clustered in j direction
near the lower surface 0.8

(using =1.10 in 0.6

algebraic grid) with 50 0.4


grid points
0.2

0
0 0.5 1 1.5 2 2.5 3
x

Algerbraic Grid
2

Test Case 3 1.8

Generate an algebraic 1.6

grid about the upper 1.4


surface of the NACA 1.2
0010 airfoil. Points are
1
y

clustered in j direction
near the lower surface 0.8

(using =1.05 in 0.6

algebraic grid) with 70 0.4


grid points 0.2

0
0 0.5 1 1.5 2 2.5 3
x

Computational Aerodynamics Lab 63 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Algerbraic Grid
2

1.8

Test Case 4 1.6

Generate an algebraic 1.4


grid about the upper 1.2
surface of the NACA
1

y
0015 airfoil. Points are
clustered in j direction 0.8

near the lower surface 0.6


(using =1.5 in algebraic
0.4
grid) with 60 grid points.
0.2

0
0 0.5 1 1.5 2 2.5 3
x

Algerbraic Grid
2

1.8
Test Case 5
Generate an algebraic 1.6

grid about the upper 1.4


surface of the NACA 1.2
0020 airfoil. Points are
1
y

clustered in j direction
near the lower surface 0.8

(using =1.01 in 0.6


algebraic grid) with 65 0.4
grid points.
0.2

0
0 0.5 1 1.5 2 2.5 3
x

Algerbraic Grid
2

1.8
Test Case 6
Generate an algebraic 1.6

grid about the upper 1.4


surface of the NACA 1.2
0015 airfoil. Points are
1
clustered in j direction
y

near the lower surface 0.8

(using =1.05 in 0.6


algebraic grid) with 50 0.4
grid points.
0.2

0
0 0.5 1 1.5 2 2.5 3
x

Computational Aerodynamics Lab 64 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

9.1 Viva Questions


1. What do you mean by grids generation
Grids are the points at which the physical variables will be calculated and the
process of generation this grid structure is known as grid generation

2. What are the types of grids used in CFD


There are basically two types of the grids used in CFD namely Structured grids
and Unstructured grid. These grids are further classified as H- grid, O-grid, Body
fitted grid, tetrahedral grid, triangular grid etc.

3. What is the use of cluster parameter


The cluster parameter is used to cluster the points near the body in a particular
required direction

4. What type of grid is the Algebraic grid


Algebraic grid is the structured body fitted stretched grid

5. What are the application of the Algebraic grid


Algebraic grid is generally used for flow over flat plate, Airfoil etc

Computational Aerodynamics Lab 65 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Experiment - 10: GENERATION OF THE ELLIPTIC GRIDS


(CODE DEVELOPMENT)

PROBLEM
Starting with an algebraic grid, generate an elliptic grid about the upper surface of the airfoil.
Points are clustered in j direction near the lower surface (using =1.05 in algebraic grid).
Make sure the number of points in i and j are flexible.
Using a predetermined algebraic grid, an elliptic grid can be generated in order to fine tune
the results for airfoil flow. Coding an algebraic grid necessitates an accounting for the
geometry of the airfoil, as well as clustering via appropriate equations. Once these issues are
addressed, partial differential equations can be utilized in order to generate an elliptic grid.

Introduction, Theory, & Formulations


A key component of grid generation is the conversion from the physical domain to the
computational domain, in order to allow for equidistant grid lines in rectangular form. In
considering a simple two dimensional case, physical coordinates x and y must be converted
to computational coordinates and . These computational coordinates are furthermore
known via the rectangular grid relations. As a result, they must be converted back into
physical coordinates in order to be of use. For the particular case concerning an airfoil placed
on the x axis, the following relationships exist:

As can be seen, Eq. (1) simply states that the x coordinate is the coordinate, as there exists
no irregularities to alter that axis. The precise relationship in Eq. (2) is due to a required
clustering near the bottom surface. Here, represents the clustering parameter, which is
given, and H represents the total height along the y axis. However, this does not account for
the geometry of the airfoil, wherein its top surface coordinate is a function of the distance
along the x axis. The exact equation is:

Computational Aerodynamics Lab 66 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Here, y represents the max height of the airfoil, which would thus be the correspond to y=0 in
Eq.(2). Height is determined by subtracting this value from maximum height. This allows a
total expression for the grid y coordinative can be obtained. Note that the x used in Eq. (3)
assumes 0 at the nose of the airfoil and 1 at the tail. The previous equations effectively define
all that is needed to generate an algebraic grid. However, this grid will simply be used as a
starting point for the generation of an elliptic grid. Thus, once x and y are obtained
algebraically, they will be set as initial conditions for the x and y values used in order to
perform iterations of the developed finite difference equations.

Two elliptic partial differential equations must be solved in order to fully define the desired
grid. In doing this, boundary conditions are required. For this case, x and y values along the
edges of the defined physical domain will be left in place. These being predefined allows all
interior coordinates to be developed. The following system of elliptic partial differential
equations can be used to define the domain:

Here, the subscripts denote second order derivative of that variable. Notice that these
equations do not express x and y as dependent variables. Rather, they are treated as the
independent variables, requiring a transformation. When such a mathematical transformation
is preformed Eqs. (4) And (5) become, respectively:

Where,

Computational Aerodynamics Lab 67 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

The previously stated equations must all be expressed in terms of finite differences. Once this
is done, x and y at each grid point can be found through iterations. Expanding Equation (8)
through (10) explicitly in central space yields:

Here, the superscript, n, indexes the iteration, where n is the current iteration and n+1 is the
following iteration. These equations are written this way due to the fact that points above and
to the right of the point being evaluated are unknown, and, thus, old values must be used. The
same procedure of finite differencing can be applied to Eqs. (6) and (7). However, results
from these will be of the same form; that is, only the terms x and y will be different.
Considering the expansion of Eq. (6) yields:

Considering,

This equation can then be explicitly solved for the value which is the coordinate of
interest.
Doing so yields:

Computational Aerodynamics Lab 68 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Similarly,
Considering the expansion of Eq.(7) and solving it for value of :

This formula can then be implemented through coding in order to find all values of x. The
formulation is exactly the same for the y value. Through code, multiple iterations will occur
until convergence is reached; that is, the desired x values will be found once the difference
between and is below tolerance and the desired y values will be found once the
difference between and falls below said tolerance. These values, when plotted,
should produce an elliptic grid that can be utilized to determine flow within the domain
containing the airfoil.

Computational Aerodynamics Lab 69 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

MATLAB code for Elliptic Grid Generation

%Elliptic Grid Generation


clear;
clc;
%Assign values for t and beta
t=0.15;
beta=1.05;
%Prompt user for number of grid points
n=input('Enter the number of grid points in the i direction: ');
m=input('Enter the number of grid points in the j direction: ');
%Create zeroes matrix for surface plots
z=zeros(n,m);
%Assign lengths and values for eta and xi
L=3;
eta=linspace(0,1,m);
xi=linspace(0,L,n);
%x is equal to xi
X=xi;
%Find height
ytop=2;
for i=1:n
if X(i) < 1
ybottom(i)=0;
elseif X(i) > 2
ybottom(i)=0;
else
x2(i)=X(i)-1;
ybottom(i)=(t/.2)*(0.2969*x2(i)^.5-0.126*x2(i)-0.3516*x2(i)^2+0.2843*x2(i)^3-
0.1015*x2(i)^4);
end
H(i)=ytop-ybottom(i);
end
%Loop to calculate coordinates

Computational Aerodynamics Lab 70 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

zeta=beta+1;
gamma=beta-1;
alpha=zeta/gamma;
for i=1:n
for j=1:m
chi=1-eta(j);
y(i,j)=H(i)*(zeta-gamma*alpha^chi)/(alpha^chi+1)+ybottom(i);
x(i,j)=X(i);
end
end

%Elliptic initial conditions


xold=x;
yold=y;
%Calculate computational step sizes
delta_eta=1/(m-1);
delta_xi=L/(n-1);
dx=1; %Conditions to start loop
dy=1; %Conditions to start loop
%Assign tolerance value
tol=.0001;

%Nested loop to determine elliptic grid


xdiff=0;
ydiff=0;
count=0;
while dy > tol || dx > tol
for i=2:n-1
for j=2:m-1
a1=(xold(i,j+1)-x(i,j-1))/(2*delta_eta);
a2=(yold(i,j+1)-y(i,j-1))/(2*delta_eta);
a=a1^2+a2^2;
c1=(xold(i+1,j)-x(i-1,j))/(2*delta_xi);
c2=(yold(i+1,j)-y(i-1,j))/(2*delta_xi);

Computational Aerodynamics Lab 71 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

c=c1^2+c2^2;
b=a1*c1+a2*c2;

alpha=a/delta_xi^2;
beta=-2*b/(4*delta_xi*delta_eta);
gamma=c/delta_eta^2;
theta=1/(2*alpha+2*gamma);

phi_1=beta*(xold(i+1,j+1)-xold(i+1,j-1)-xold(i-1,j+1)+x(i-1,j-1));
x(i,j)=theta*(alpha*(xold(i+1,j)+x(i-1,j))+gamma*(xold(i,j+1)+x(i,j-1))+phi_1);
xdiff=x(i,j)-xold(i,j)+xdiff;
phi_2=beta*(yold(i+1,j+1)-yold(i+1,j-1)-yold(i-1,j+1)+y(i-1,j-1));
y(i,j)=theta*(alpha*(yold(i+1,j)+y(i-1,j))+gamma*(yold(i,j+1)+y(i,j-1))+phi_2);
ydiff=y(i,j)-yold(i,j)+ydiff;
end
end
dx=xdiff;
dy=ydiff;
xdiff=0;
ydiff=0;
xold=x;
yold=y;
count=count+1;
end
fprintf('The solution took %i iterations to converge. \n \n', count);
surface(x,y,z);
xlabel ('x');
ylabel ('y');
title ('Elliptic grid over an Airfoil');

Computational Aerodynamics Lab 72 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

RESULT AND DISCUSSION


In the plot of an Elliptical, the Grid lines have been smoothed out due to the elliptic
equations, eliminating extreme jaggedness resulting from the algebraic grid. This would
ensure a more accurate flow model.

Enter the number of grid points in the i direction: 50


Enter the number of grid points in the j direction: 50
The solution took 2434 iterations to converge.

Elliptic grid over an Airfoil


2

1.8

1.6

1.4

1.2

1
y

0.8

0.6

0.4

0.2

0
0 0.5 1 1.5 2 2.5 3
x

Figure: Elliptic grid generated over the NACA 0015 airfoil (=1.05)

Overall, an elliptic grid was shown to provide desired results for discretization. It succeeded
in smoothing out otherwise rough edges created through algebraic grid generation. At the
same time, the algebraic grid provided a suitable starting point for the generation of the
elliptic grid.

Computational Aerodynamics Lab 73 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Sample Experiment with Results Apart from JNTUH curriculum


Experiment 10
RESULTS
Elliptic grid generation
Elliptic grid over an Airfoil
2
Test Case 1
Starting with an 1.8

algebraic grid, 1.6

generate an elliptic 1.4


grid about the upper 1.2
surface of the NACA
1

y
0015 airfoil. Points are
clustered in j direction 0.8

near the lower surface 0.6

(using =1.5 in 0.4


algebraic grid) with 60 0.2
grid points
0
0 0.5 1 1.5 2 2.5 3
x

Elliptic grid over an Airfoil


2
Test Case 2
1.8
Starting with an
algebraic grid, 1.6

generate an elliptic 1.4


grid about the upper 1.2
surface of the NACA
1
y

0025 airfoil. Points are


clustered in j direction 0.8

near the lower surface 0.6

(using =1.2 in 0.4


algebraic grid) with 75
0.2
grid points
0
0 0.5 1 1.5 2 2.5 3
x

Elliptic grid over an Airfoil


2
Test Case 3
Starting with an 1.8

algebraic grid, 1.6

generate an elliptic 1.4


grid about the upper 1.2
surface of the NACA
1
y

0010 airfoil. Points are


clustered in j direction 0.8

near the lower surface 0.6

(using =1.05 in 0.4


algebraic grid) with 0.2
100 grid points
0
0 0.5 1 1.5 2 2.5 3
x

Computational Aerodynamics Lab 74 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Elliptic grid over an Airfoil


2
Test Case 4
1.8
Starting with an
algebraic grid, 1.6

generate an elliptic 1.4


grid about the upper 1.2
surface of the NACA
1

y
0030 airfoil. Points are
clustered in j direction 0.8

near the lower surface 0.6

(using =1.10 in 0.4


algebraic grid) with 60
0.2
grid points
0
0 0.5 1 1.5 2 2.5 3
x

Elliptic grid over an Airfoil


2
Test Case 5
Starting with an 1.8

algebraic grid, 1.6


generate an elliptic
1.4
grid about the upper
surface of the NACA 1.2

0020 airfoil. Points are 1


y

clustered in j direction 0.8


near the lower surface
(using =1.01 in 0.6

algebraic grid) with 65 0.4

grid points 0.2

0
0 0.5 1 1.5 2 2.5 3
x

Elliptic grid over an Airfoil


2
Test Case 6
1.8
Starting with an
algebraic grid, 1.6

generate an elliptic 1.4


grid about the upper 1.2
surface of the NACA
1
y

0020 airfoil. Points are


clustered in j direction 0.8

near the lower surface 0.6


(using =1.01 in
0.4
algebraic grid) with 65
0.2
grid points
0
0 0.5 1 1.5 2 2.5 3
x

Computational Aerodynamics Lab 75 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

10.1 Viva Questions


1. What type of the grid is the Elliptical grid
Elliptical grid is the structured body fitted Curvilinear grid

2. What type of equations are solved to obtain elliptical grids


Elliptical partial differential equation are solved to obtain the elliptical grids

3. What is the pattern of the grid lines in elliptical grids


In an elliptical grid, the grid lines are curvilinear lines

4. What will happen if the cluster parameter is equal to one


If the cluster parameter is equal to one, the grid lines will be equidistance from
each other.

5. What are the applications of the Elliptical grids


The elliptical grids are generally used for flow over a Airfoil, cylinder or any
other blunt bodies.

Computational Aerodynamics Lab 76 | P a g e


MLR Institute of Technology Department of Aeronautical Engineering

Table of Contents
Experiment -1: INTRODUCTION TO MODELLING AND SIMULATION TO AERODYNAMIC
PROBLEMS............................................................................................................................................ 1

1.1 Viva Questions .............................................................................................................................. 4

Experiment - 2: LAMINAR FLOW THROUGH PIPE .......................................................................... 5

2.1 Viva Questions ............................................................................................................................ 12

Experiment - 3: FLOW OVER A FLAT PLATE ................................................................................. 13

3.1Viva Questions ............................................................................................................................. 20

Experiment 4: SUPERSONIC FLOW OVER A WEDGE ................................................................ 21

4.1 Viva Questions ............................................................................................................................ 29

Experiment -5: FLOW PAST OVER A CYLINDER ........................................................................... 30

5.1Viva Questions ............................................................................................................................. 38

Experiment 6: FLOW OVER AN AIRFOIL ..................................................................................... 39

6.1 Viva Questions ............................................................................................................................ 46

Experiment -7: SOLUTION FOR THE ONE DIMENSIONAL WAVE EQUATION USING
EXPLICIT METHOD OF LAX - CODE DEVELOPMENT. .............................................................. 47

7.1 Viva Questions ............................................................................................................................ 53

Experiment -8: SOLUTION FOR THE ONE DIMENSIONAL TRANSIENT HEAT CONDUCTION
EQUATION USING EXPLICIT METHOD (CODE DEVELOPMENT) ........................................... 54

8.1 Viva Questions ............................................................................................................................ 59

Experiment 9: GENERATION OF THE ALGEBRAIC GRIDS (CODE DEVELOPMENT) .......... 60

9.1 Viva Questions ............................................................................................................................ 65

Experiment - 10: GENERATION OF THE ELLIPTIC GRIDS (CODE DEVELOPMENT) .. 66

10.1 Viva Questions .......................................................................................................................... 76

Computational Aerodynamics Lab 77 | P a g e

You might also like