You are on page 1of 149

Contents

1 CFD - An Introduction 1
1.1 What is CFD . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Problem Solving in CFD using Equations . . . . . . . . . . . . 2
1.3 Governing (Navier-Stokes) Equations of Fluid Dynamics . . . 4
1.3.1 General - Compressible and Viscous . . . . . . . . . . . 4
1.3.2 Incompressible and Viscous . . . . . . . . . . . . . . . 5
1.4 Applications of CFD . . . . . . . . . . . . . . . . . . . . . . . 5
1.5 FAQs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2 Welcome to CFDTutorTM 11
TM
2.1 Installing CFDTutor . . . . . . . . . . . . . . . . . . . . . . 15
2.2 A First Look At CFDTutor . . . . . . . . . . . . . . . . . . . 16

3 Using Wizard and Interactive 21


3.1 Using the Wizard Step-By-Step Method . . . . . . . . . . . . 21
3.1.1 Viewing Saved Solution Files . . . . . . . . . . . . . . 23
3.1.2 Interpreting CFD Results . . . . . . . . . . . . . . . . 24
3.2 Getting Familiar with CFDTutor Interactive . . . . . . . . . . 25

4 Defining Geometry 29
4.1 Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.1.1 Create Points . . . . . . . . . . . . . . . . . . . . . . . 29
4.1.2 Connect Points . . . . . . . . . . . . . . . . . . . . . . 30
4.1.3 Close Curve . . . . . . . . . . . . . . . . . . . . . . . . 30
4.1.4 Delete All Points and Clear Screen . . . . . . . . . . . 30
4.1.5 Copy Point . . . . . . . . . . . . . . . . . . . . . . . . 31
4.1.6 Move Point . . . . . . . . . . . . . . . . . . . . . . . . 31
4.2 Polylines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

i
ii CONTENTS

4.2.1 Create Polylines . . . . . . . . . . . . . . . . . . . . . . 32


4.2.2 Connect Polylines . . . . . . . . . . . . . . . . . . . . . 33
4.2.3 Close Curve . . . . . . . . . . . . . . . . . . . . . . . . 34
4.2.4 Move Points on a Polyline . . . . . . . . . . . . . . . . 34
4.2.5 Move a Polyline . . . . . . . . . . . . . . . . . . . . . . 35
4.3 Domain creation . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.3.1 Direction of Curve . . . . . . . . . . . . . . . . . . . . 36
4.3.2 Closing Curves for Multiple Entities . . . . . . . . . . . 36
4.3.3 Deleting Entities within a Domain . . . . . . . . . . . . 36

5 Defining Grids 39
5.1 Create Polyline Equal Arc . . . . . . . . . . . . . . . . . . . . 40
5.2 Define Type of Grid . . . . . . . . . . . . . . . . . . . . . . . 40
5.2.1 2D Grid . . . . . . . . . . . . . . . . . . . . . . . . . . 40
5.2.2 Smoothen a Grid . . . . . . . . . . . . . . . . . . . . . 41
5.3 Boundary Type . . . . . . . . . . . . . . . . . . . . . . . . . . 41
5.3.1 Inflow and Outflow . . . . . . . . . . . . . . . . . . . . 41

6 Solver Controls and Flow Conditions 43


6.1 Solver Controls . . . . . . . . . . . . . . . . . . . . . . . . . . 43
6.1.1 Flow Models . . . . . . . . . . . . . . . . . . . . . . . . 43
6.1.2 Fluid Models . . . . . . . . . . . . . . . . . . . . . . . 44
6.1.3 Flow Schemes . . . . . . . . . . . . . . . . . . . . . . . 44
6.2 Flow Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . 45
6.2.1 Initial Conditions . . . . . . . . . . . . . . . . . . . . . 45
6.2.2 Boundary Conditions (BCs) and Convergence Criteria 46
6.2.3 Run Solver . . . . . . . . . . . . . . . . . . . . . . . . 47
6.3 Monitor Simulation . . . . . . . . . . . . . . . . . . . . . . . . 48

7 View Solution 49

A CFDTutor, Menu bar and Tool Bar 53


A.1 The Menu Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
A.1.1 File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
A.1.2 Create . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
A.1.3 Edit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
A.1.4 Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
A.1.5 Display . . . . . . . . . . . . . . . . . . . . . . . . . . 62
CONTENTS iii

A.1.6 Grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
A.1.7 Boundary Type . . . . . . . . . . . . . . . . . . . . . . 63
A.1.8 Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . 64
A.1.9 Visualization . . . . . . . . . . . . . . . . . . . . . . . 65
A.1.10 Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
A.2 Tool bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

B Tutorial - Forward Facing Step 73


B.1 Define Geometry . . . . . . . . . . . . . . . . . . . . . . . . . 73
B.1.1 To Create Points . . . . . . . . . . . . . . . . . . . . . 74
B.1.2 To Connect Points . . . . . . . . . . . . . . . . . . . . 75
B.1.3 To Close Curve . . . . . . . . . . . . . . . . . . . . . . 76
B.2 Define Grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
B.2.1 To Divide Polyline into Equal Arcs and Display Geom-
etry . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
B.2.2 To Define Type of Grid . . . . . . . . . . . . . . . . . . 78
B.2.3 To Select Delaunay Triangulation by Length or Area . 79
B.3 Boundary Type . . . . . . . . . . . . . . . . . . . . . . . . . . 79
B.3.1 To Define Inflow Edge . . . . . . . . . . . . . . . . . . 79
B.3.2 To Define Outflow Edge . . . . . . . . . . . . . . . . . 81
B.4 Select Solver Controls . . . . . . . . . . . . . . . . . . . . . . . 83
B.4.1 To Select Solver Controls . . . . . . . . . . . . . . . . . 83
B.5 Define Flow Conditions and Specify Convergence Criteria . . . 85
B.5.1 Flow Conditions - Boundary Conditions and Initial
Conditions . . . . . . . . . . . . . . . . . . . . . . . . . 85
B.6 Run Solver and Monitor Simulation . . . . . . . . . . . . . . . 85
B.6.1 Run Solver . . . . . . . . . . . . . . . . . . . . . . . . 87
B.6.2 Monitor Simulation . . . . . . . . . . . . . . . . . . . . 87
B.6.3 Save Solution File . . . . . . . . . . . . . . . . . . . . . 87
B.7 View Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
B.7.1 Read Solution File . . . . . . . . . . . . . . . . . . . . 88
B.7.2 Visual Options . . . . . . . . . . . . . . . . . . . . . . 88
B.7.3 Close File . . . . . . . . . . . . . . . . . . . . . . . . . 93

C Tutorial - Flow Past a Cylinder 95


C.1 Define Geometry . . . . . . . . . . . . . . . . . . . . . . . . . 95
C.1.1 To Create the Cylinder . . . . . . . . . . . . . . . . . . 96
C.1.2 To Create the Domain . . . . . . . . . . . . . . . . . . 98
iv CONTENTS

C.2 Define Grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103


C.2.1 To Define Type of Grid . . . . . . . . . . . . . . . . . . 103
C.3 Boundary Type . . . . . . . . . . . . . . . . . . . . . . . . . . 104
C.3.1 To Define Inflow Edge . . . . . . . . . . . . . . . . . . 104
C.3.2 To Define Outflow Edge . . . . . . . . . . . . . . . . . 107
C.4 Select Solver Controls . . . . . . . . . . . . . . . . . . . . . . . 109
C.4.1 To Select Solver Controls . . . . . . . . . . . . . . . . . 109
C.5 Define Flow Conditions and Specify Convergence Criteria . . . 110
C.5.1 Flow Conditions - Boundary Conditions and Initial
Conditions . . . . . . . . . . . . . . . . . . . . . . . . . 110
C.6 Run Solver and Monitor Simulation . . . . . . . . . . . . . . . 111
C.6.1 Run Solver . . . . . . . . . . . . . . . . . . . . . . . . 111
C.6.2 Monitor Simulation . . . . . . . . . . . . . . . . . . . . 111
C.6.3 Save Solution File . . . . . . . . . . . . . . . . . . . . . 111
C.7 View Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
C.7.1 Read Solution File . . . . . . . . . . . . . . . . . . . . 113
C.7.2 Visual Options . . . . . . . . . . . . . . . . . . . . . . 113
C.7.3 Close File . . . . . . . . . . . . . . . . . . . . . . . . . 119

D Exercises in CFDTutor 121


D.1 Exercise - Flow Past a Car . . . . . . . . . . . . . . . . . . . . 121
D.1.1 Aim . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
D.1.2 Problem Description . . . . . . . . . . . . . . . . . . . 121
D.1.3 Using CFDTutorTM . . . . . . . . . . . . . . . . . . . . 121
D.1.4 Interpretation of Results . . . . . . . . . . . . . . . . . 121
D.2 Exercise - Flow Over a Forward Facing Step . . . . . . . . . . 123
D.2.1 Aim . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
D.2.2 Problem Description . . . . . . . . . . . . . . . . . . . 123
D.2.3 Using CFDTutorTM . . . . . . . . . . . . . . . . . . . . 123
D.2.4 Interpretation of Results . . . . . . . . . . . . . . . . . 124
D.3 Exercise - Flow through a Diffuser . . . . . . . . . . . . . . . . 125
D.3.1 Aim . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
D.3.2 Setting up the problem in CFDTutorTM - Subsonic Case 125
D.3.3 Setting up the problem in CFDTutorTM - Supersonic Case126
D.4 Exercise - Flow through a CD Nozzle . . . . . . . . . . . . . . 128
D.4.1 Aim . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
D.4.2 Problem Description . . . . . . . . . . . . . . . . . . . 128
D.4.3 Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
CONTENTS v

D.4.4 Using CFDTutorTM . . . . . . . . . . . . . . . . . . . . 129


D.4.5 Interpretation and Comparison of Results . . . . . . . 129
D.5 Exercise - T Shaped Duct . . . . . . . . . . . . . . . . . . . . 130
D.5.1 Aim . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
D.5.2 Problem Description . . . . . . . . . . . . . . . . . . . 130
D.5.3 Using CFDTutorTM . . . . . . . . . . . . . . . . . . . . 130
D.5.4 Interpretation of Results . . . . . . . . . . . . . . . . . 131
D.6 Exercise - Suddenly Contracted Flow . . . . . . . . . . . . . . 132
D.6.1 Aim . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
D.6.2 Problem Statement . . . . . . . . . . . . . . . . . . . . 132
D.6.3 Theoretical Background . . . . . . . . . . . . . . . . . 132
D.6.4 Using CFDTutorTM . . . . . . . . . . . . . . . . . . . . 132
D.6.5 Interpretation of Results . . . . . . . . . . . . . . . . . 133
D.7 Exercise - Flow around a Bluff Body . . . . . . . . . . . . . . 134
D.7.1 Aim . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
D.7.2 Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
D.7.3 Problem Setup . . . . . . . . . . . . . . . . . . . . . . 134
D.7.4 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
D.7.5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . 135
vi CONTENTS
List of Figures

2.1 Wizard Application . . . . . . . . . . . . . . . . . . . . . . . . 16


2.2 Interactive Application . . . . . . . . . . . . . . . . . . . . . . 18

3.1 Wizard - 6 Step CFD Problem Solving Method . . . . . . . . 21


3.2 To open Interactive, select ‘Quit’ . . . . . . . . . . . . . . . . 25

B.1 Select ‘Quit’ to enter Interactive . . . . . . . . . . . . . . . . . 74


B.2 Point from Coordinates . . . . . . . . . . . . . . . . . . . . . . 75
B.3 Coordinates for the 1st point . . . . . . . . . . . . . . . . . . . 75
B.4 Points for Forward Facing Step . . . . . . . . . . . . . . . . . 75
B.5 Polyline from Points . . . . . . . . . . . . . . . . . . . . . . . 76
B.6 Points connected by Polyline . . . . . . . . . . . . . . . . . . . 76
B.7 Close Curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
B.8 Curve Closed . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
B.9 Polyline Equal Arc . . . . . . . . . . . . . . . . . . . . . . . . 78
B.10 Grid - 2D Unstructured . . . . . . . . . . . . . . . . . . . . . 78
B.11 Delaunay Triangulation by Area . . . . . . . . . . . . . . . . . 79
B.12 Select icon from Tool bar . . . . . . . . . . . . . . . . . . . . . 79
B.13 Select icon from Tool bar . . . . . . . . . . . . . . . . . . . . . 80
B.14 Pick Points for the Inflow Edge . . . . . . . . . . . . . . . . . 80
B.15 Define as Inflow . . . . . . . . . . . . . . . . . . . . . . . . . . 80
B.16 Show Inlet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
B.17 Inlet Edge is highlighted in red . . . . . . . . . . . . . . . . . 81
B.18 Icon from Tool bar . . . . . . . . . . . . . . . . . . . . . . . . 81
B.19 Icon from Tool bar . . . . . . . . . . . . . . . . . . . . . . . . 82
B.20 Pick Points for Outflow Edge . . . . . . . . . . . . . . . . . . 82
B.21 Define as Outflow . . . . . . . . . . . . . . . . . . . . . . . . . 82
B.22 Show Outlet . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83

vii
viii LIST OF FIGURES

B.23 Outlet Edge is highlighted in blue . . . . . . . . . . . . . . . . 83


B.24 Select Solver Controls . . . . . . . . . . . . . . . . . . . . . . . 84
B.25 Select one option from each control . . . . . . . . . . . . . . . 84
B.26 Select Flow Condition . . . . . . . . . . . . . . . . . . . . . . 85
B.27 Check the values and click OK . . . . . . . . . . . . . . . . . . 86
B.28 Trigger the Solver . . . . . . . . . . . . . . . . . . . . . . . . . 87
B.29 Read Solution File . . . . . . . . . . . . . . . . . . . . . . . . 88
B.30 Select Velocity Vector . . . . . . . . . . . . . . . . . . . . . . . 89
B.31 Velocity Vector Plot . . . . . . . . . . . . . . . . . . . . . . . 89
B.32 Select Pressure Plot . . . . . . . . . . . . . . . . . . . . . . . . 89
B.33 Pressure Plot . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
B.34 Select Velocity X Plot . . . . . . . . . . . . . . . . . . . . . . 90
B.35 Velocity X Plot . . . . . . . . . . . . . . . . . . . . . . . . . . 90
B.36 Select Velocity Y Plot . . . . . . . . . . . . . . . . . . . . . . 91
B.37 Velocity Y Plot . . . . . . . . . . . . . . . . . . . . . . . . . . 91
B.38 Select Mach . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
B.39 Mach no. distribution . . . . . . . . . . . . . . . . . . . . . . 92
B.40 Select Temperature Plot . . . . . . . . . . . . . . . . . . . . . 92
B.41 Temperature Plot . . . . . . . . . . . . . . . . . . . . . . . . . 93

C.1 Select - Polyline from Expression . . . . . . . . . . . . . . . . 96


C.2 Values for creating a Cylinder . . . . . . . . . . . . . . . . . . 97
C.3 Cylinder created . . . . . . . . . . . . . . . . . . . . . . . . . 97
C.4 Close Curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
C.5 Curve Closed . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
C.6 Point from Coordinates . . . . . . . . . . . . . . . . . . . . . . 98
C.7 Coordinates of the 1st Point . . . . . . . . . . . . . . . . . . . 99
C.8 Points for the Domain . . . . . . . . . . . . . . . . . . . . . . 99
C.9 Polyline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
C.10 Domain Points connected by Polyline . . . . . . . . . . . . . . 100
C.11 Close Curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
C.12 Curve Closed . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
C.13 Polyline Equal Arc . . . . . . . . . . . . . . . . . . . . . . . . 102
C.14 Points specified . . . . . . . . . . . . . . . . . . . . . . . . . . 102
C.15 Grid - 2D Unstructured . . . . . . . . . . . . . . . . . . . . . 103
C.16 Select Length . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
C.17 Unstructured grid generated . . . . . . . . . . . . . . . . . . . 104
C.18 Select icon from Tool bar . . . . . . . . . . . . . . . . . . . . . 105
LIST OF FIGURES ix

C.19 Boundary points displayed . . . . . . . . . . . . . . . . . . . . 105


C.20 Select icon from Tool bar . . . . . . . . . . . . . . . . . . . . . 105
C.21 Pick Points for the Inflow Edge . . . . . . . . . . . . . . . . . 106
C.22 Define as Inflow . . . . . . . . . . . . . . . . . . . . . . . . . . 106
C.23 Show Inlet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
C.24 Inlet Edge is highlighted in red . . . . . . . . . . . . . . . . . 107
C.25 Icon from Tool bar . . . . . . . . . . . . . . . . . . . . . . . . 107
C.26 Icon from Tool bar . . . . . . . . . . . . . . . . . . . . . . . . 108
C.27 Pick Points for Outflow Edge . . . . . . . . . . . . . . . . . . 108
C.28 Define as Outflow . . . . . . . . . . . . . . . . . . . . . . . . . 108
C.29 Show Outlet . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
C.30 Outlet Edge is highlighted in blue . . . . . . . . . . . . . . . . 109
C.31 Select Solver Controls . . . . . . . . . . . . . . . . . . . . . . . 109
C.32 Select one option from each control . . . . . . . . . . . . . . . 110
C.33 Select Flow Condition . . . . . . . . . . . . . . . . . . . . . . 111
C.34 Check the values and click OK . . . . . . . . . . . . . . . . . . 112
C.35 Trigger the Solver . . . . . . . . . . . . . . . . . . . . . . . . . 112
C.36 Read Solution File . . . . . . . . . . . . . . . . . . . . . . . . 113
C.37 Select Velocity Vector . . . . . . . . . . . . . . . . . . . . . . . 114
C.38 Velocity Vector Plot . . . . . . . . . . . . . . . . . . . . . . . 114
C.39 Select Pressure . . . . . . . . . . . . . . . . . . . . . . . . . . 115
C.40 Pressure Plot . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
C.41 Select Velocity X Plot . . . . . . . . . . . . . . . . . . . . . . 116
C.42 Velocity X Plot . . . . . . . . . . . . . . . . . . . . . . . . . . 116
C.43 Select Velocity Y Plot . . . . . . . . . . . . . . . . . . . . . . 117
C.44 Velocity Y Plot . . . . . . . . . . . . . . . . . . . . . . . . . . 117
C.45 Select Mach . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
C.46 Mach no. distribution . . . . . . . . . . . . . . . . . . . . . . 118
C.47 Select Temperature Plot . . . . . . . . . . . . . . . . . . . . . 119
C.48 Temperature Plot . . . . . . . . . . . . . . . . . . . . . . . . . 119

D.1 Standard Result: Pressure Plot . . . . . . . . . . . . . . . . . 124


D.2 Converging Diverging Nozzle . . . . . . . . . . . . . . . . . . . 130
x LIST OF FIGURES
Chapter 1

CFD - An Introduction

1.1 What is CFD


Computational Fluid Dynamics or simply CFD is concerned with obtaining
numerical solution to fluid flow problems by using computers. The advent of
high-speed and large-memory computers has enabled CFD to obtain solutions
to many flow problems including those that are compressible or incompress-
ible, laminar or turbulent, chemically reacting or non-reacting.

The equations governing the fluid flow problem are the continuity (con-
servation of mass), the Navier-Stokes (conservation of momentum), and the
energy equations. These equations form a system of coupled non-linear par-
tial differential equations (PDEs). Because of the non-linear terms in these
PDEs, analytical methods can yield very few solutions. In general, closed
form analytical solutions are possible only if these PDEs can be made lin-
ear, either because non-linear terms naturally drop out (e.g., fully developed
flows in ducts and flows that are inviscid and irrotational everywhere) or
because nonlinear terms are small compared to other terms so that they can
be neglected (e.g., creeping flows, small amplitude sloshing of liquid etc.). If
the non-linearities in the governing PDEs cannot be neglected, which is the
situation for most engineering flows, then numerical methods are needed to
obtain solutions.

CFD is the art of replacing the differential equation governing the Fluid
Flow, with a set of algebraic equations (the process is called discretization),

1
2 CHAPTER 1. CFD - AN INTRODUCTION

which in turn can be solved with the aid of a digital computer to get an
approximate solution. The well known discretization methods used in CFD
are Finite Difference Method (FDM), Finite Volume Method (FVM), Finite
Element Method (FEM), and Boundary Element Method (BEM).

FDM is the most commonly used method in CFD applications. Here the
domain including the boundary of the physical problem is covered by a grid
or mesh. At each of the interior grid point the original Differential Equations
are replaced by equivalent finite difference approximations. In making this
replacement, we introduce an error which is proportional to the size of the
grid. This error can be reduced by making the grid size smaller to get an
accurate solution within some specified tolerance.

1.2 Problem Solving in CFD using Equations


Computational Fluid Dynamics (CFD) provides a good example of the many
areas that a scientific computing project can touch on, and its relationship
to Computer Science. Fluid flows are modeled by a set of partial differential
equations, the Navier-Stokes equations. Except for special cases no closed-
form solutions exist to the Navier-Stokes equations, and this fact was one
of the motivations John von Neumann provided for the development of elec-
tronic computers.

Solving a particular problem generally involves first the discretization of


the physical domain that the flow occurs in, such as the interior of turbine
engine or the radiator system of a car. This discretization is straightforward
for very simple geometries such as rectangles or circles, but is a difficult
problem in CAD for more complicated objects. Currently automatic ‘mesh
generators’ are simply not adequate, requiring extensive investment of time
on the part of the scientist or engineer. This leads to problems in human-
computer interfaces (HCI) and CASE tools, as well as fundamental problems
in graph theory since the resulting discretization gives a mesh that is best
dealt with as a graph.

On the discretized mesh the Navier-Stokes equations take the form of a


large system of nonlinear equations; going from the continuum to the dis-
1.2. PROBLEM SOLVING IN CFD USING EQUATIONS 3

crete set of equations is a problem that combines both physics and numerical
analysis; for example, it is important to maintain conservation of mass in the
discrete equations. At each node in the mesh, between 3 and 20 variables
are associated: the pressure, the three velocity components, density, temper-
ature, etc. Furthermore, capturing physically important phenomena such as
turbulence requires extremely fine meshes in parts of the physical domain.
Currently meshes with 20,000 to 2,000,000 nodes are common, leading to
systems with up to 40,000,000 unknowns.

That system of nonlinear equations is typically solved by a Newton-like


method, which in turn requires solving a large, sparse system of equations on
each step. Sparsity here means that the matrix of coefficients for the linear
system consists mainly of zeros, with only a few nonzero entries. With 4.0e7
unknowns, clearly we cannot store the matrix as a 2D array with 1.6e15 en-
tries! Storing the coefficients requires development of efficient data structures
which require little overhead storage but allow the necessary manipulations
to be performed efficiently.

Methods for solving large sparse systems of equations are a hot topic right
now, since that is often the most time-consuming part of the program, and
because the ability to solve them is the limiting factor in the size of problem
and complexity of the physics that can be handled. Direct methods, which
factor the matrices, require more computer storage than is permissible for
all but the smallest problems. Iterative methods use less storage but suffer
from a lack of robustness: they often fail to converge. The solution is to use
preconditioning; that is, to premultiply the linear system by some matrix
that makes it easier for the iterative method to converge.

CFD problems are at the limits of computational power, so parallel pro-


gramming methods are used. That brings in the research problem of how
to partition the data to assign parts of it to different processors; usually
domain decomposition methods are applied. Domain decomposition is often
expressed as a graph partitioning problem, namely finding a minimum edge
cut partitioning of the discrete mesh, with roughly the same number of nodes
in each partition set. This is an NP-hard problem, so rapid heuristics are
used to get quick and dirty solutions. An additional problem with parallel
programming is that the better methods for solving the resultant linear sys-
tems often have inherently sequential characteristics, while parallel solution
4 CHAPTER 1. CFD - AN INTRODUCTION

methods are not robust enough to tackle real world problems.

Once the solution is found, analyzing, validating, and presenting it calls


into play visualization and graphics techniques. Those techniques are useful
for more than just viewing the computed flow field. Visualization can help
with understanding the nature of the problem, the interaction of algorithms
with the computer architecture, performance analysis of the code, and, most
importantly, debugging!.

1.3 Governing (Navier-Stokes) Equations of


Fluid Dynamics
1.3.1 General - Compressible and Viscous
1. Continuity

∂ρ ∂ρ ∂(ρu) ∂(ρv) ∂(ρw)


+ ∇ · (ρV ) = + + + =0 (1.1)
∂t ∂t ∂x ∂y ∂z

2. Momentum

∂(ρu) ∂p ∂τxx ∂τyx ∂τzx


+ ∇ · (ρuV) = − + + + + ρfx (1.2a)
∂t ∂x ∂x ∂y ∂z

∂(ρv) ∂p ∂τxy ∂τyy ∂τzy


+ ∇ · (ρvV) = − + + + + ρfy (1.2b)
∂t ∂y ∂x ∂y ∂z

∂(ρw) ∂p ∂τxz ∂τyz ∂τzz


+ ∇ · (ρwV) = − + + + + ρfz (1.2c)
∂t ∂z ∂x ∂y ∂z

3. Energy
1.4. APPLICATIONS OF CFD 5

V2 V2
        
∂ ∂ ∂T
ρ e+ +∇· ρ e+ V = ρq̇ + k +
∂t 2 2 ∂x ∂x
   
∂ ∂T ∂ ∂T ∂(up) ∂(vp) ∂(wp)
k + k − − − +
∂y ∂y ∂z ∂z ∂x ∂y ∂z
∂(uτxx ) ∂(uτyx ) ∂(uτzx ) ∂(vτxy ) ∂(vτyy )
+ + + + +
∂x ∂y ∂z ∂x ∂y
∂(vτzy ) ∂(wτxz ) ∂(wτyz ) ∂(wτzz )
+ + + + ρf · V (1.3)
∂z ∂x ∂y ∂z

1.3.2 Incompressible and Viscous


1. Continuity

∂u ∂v ∂w
∇·V= + + =0 (1.4)
∂x ∂y ∂z

2. Momentum
 
∂ ∂p
ρ +∇·V u=− + µ∇2 u + ρfx (1.5a)
∂t ∂x
 
∂ ∂p
ρ +∇·V v =− + µ∇2 v + ρfy (1.5b)
∂t ∂y
 
∂ ∂p
ρ + ∇ · V w = − + µ∇2 w + ρfz (1.5c)
∂t ∂z

1.4 Applications of CFD


CFD is interdisciplinary cutting across fields of aerospace, mechanical, civil,
chemical, electrical engineering as well as physics and chemistry. CFD has
been widely used in industry in the past decade. It is certainly fun for fluids
enthusiasts, but where exactly can CFD be applied - the following are areas
of applications of CFD to date.
6 CHAPTER 1. CFD - AN INTRODUCTION

• Automobile and Engine


Aerodynamics, Engines, Turbochargers, Intake/Exhaust Heating/Cooling
Systems, Brakes etc.
• Industrial Manufacturing
Aerospace, Aerodynamics. Gas Turbines, Rockets etc.
• Mechanical
Pumps, Compressors, Heat Exchangers, Furnaces, Nuclear Reactors
etc.
• Chemical
Mixers (multiphase), Chemical Reactors, Separators, Boilers, Condensers
etc.
• Environmental Engineering
Weather prediction, River and Tidal flows, Wind and Water-borne pol-
lution, Fire and Smoke spread, Wind loading etc.
• Physiological
Cardiovascular flows (Heart, major vessels), Flow in Lungs and breath-
ing passages etc.
• Naval Architecture
Ship building etc.
• Others
Glass, Steel and Textile manufacturing , Food processing etc.

1.5 FAQs
• What is CFD?
Computational Fluid Dynamics (CFD) is the science of predicting fluid
flow, heat transfer, mass transfer, chemical reactions, and related phe-
nomena by solving the mathematical equations which govern these pro-
cesses using computational methods.
1.5. FAQS 7

CFD is predicting what will happen, quantitatively, when fluids flow,


often with the complications of :

1. Simultaneous Flow of Heat


2. Mass Transfer (e.g., perspiration, dissolution).
3. Phase Change (e.g., melting, freezing, boiling).
4. Chemical Reaction (e.g., combustion, rusting).
5. Mechanical Movement (e.g., of pistons, fans, rudders).
6. Stresses in and Displacement of immersed or surrounding solids.

• What use is CFD?


The result of CFD analysis is relevant engineering data used in - con-
ceptual studies of new designs, detailed product development, trou-
bleshooting, redesign etc.

Knowing how fluids will flow, and what will be their quantitative effects
on the solids with which they are in contact, assists:-

1. Building-services engineers and architects to provide comfortable


and safe human environments.
2. Power-plant designers to attain maximum efficiency, and reduce
release of pollutants.
3. Chemical engineers to maximize the yields from their reactors and
processing equipment.
4. Land-, air- and marine-vehicle designers to achieve maximum per-
formance, at least cost.
5. Risk-and-hazard analysts, and safety engineers, to predict how
much damage to structures, equipment, human beings, animals
and vegetation will be caused by fires, explosions, and blast waves.

CFD analysis complements testing and experimentation - it reduces


the total effort required in the laboratory.

• What can CFD-based flow simulations enable?


8 CHAPTER 1. CFD - AN INTRODUCTION

1. Metropolitan authorities need to determine where a pollutant-


emitting industrial plant may be safely located, and under what
conditions motor-vehicle access must be restricted so as to preserve
air quality.
2. Meteorologists and oceanographers to foretell winds and water
currents; - hydrologists and others concerned with ground-water
to forecast the effects of changes to ground-surface cover, of the
creation of dams and aqua-ducts on the quantity and quality of
water supplies.
3. Petroleum engineers to design optimum oil-recovery strategies,
and the equipment for putting them into practice.

Within a few years, it is to be expected, surgeons will conduct opera-


tions which may affect the flow of fluids within the human body (blood,
urine, air, the fluid within the brain) only after their probable effects
have been predicted by CFD methods.

• How does CFD make predictions?


CFD uses a computer to solve the relevant science-based mathematical
equations, using information about the circumstances in question. Its
components are therefore:

1. The human being who states the problem.


2. Scientific knowledge expressed mathematically.
3. The computer code (i.e. software) which embodies this knowledge
and expresses the stated problem in scientific terms.
4. The computer hardware which performs the calculations dictated
by the software.
5. The human being who inspects and interprets their results.

• Can CFD be trusted?


CFD-based predictions are never 100 percent -reliable, because :

1. The input data may involve too much guess-work or imprecision.


2. The available computer power may be too small for high numerical
accuracy (this is often the case).
1.5. FAQS 9

3. The scientific knowledge base may be inadequate (so is this).

The reliability is greater :

1. For laminar flows rather than turbulent ones


2. For single-phase flows rather than multi-phase flows.
3. For chemically-inert rather than chemically-reactive materials.
4. For single chemical reactions rather than multiple ones.
5. For simple fluids rather than those of complex composition.

Therefore, coal-fired furnaces represent an extreme of uncertainty; but


CFD is nevertheless used increasingly in their design because the un-
certainties resulting from its non-use is even greater.
10 CHAPTER 1. CFD - AN INTRODUCTION
Chapter 2

Welcome to CFDTutorTM

Welcome to CFDTutorTM ! You now own one of the most educative and ef-
fective Computational Fluid Dynamics (CFD) software tools available for
beginners - and you’ve just taken a big step toward learning CFD.

CFDTutorTM can be used by anyone interested in learning CFD. As a first


time user, you are not expected to have undergone any formal training in
CFD, but it is assumed that you have completed at least one course in Fluid
Mechanics

CFDTutorTM is a unique stand alone end-to-end CFD package available for


students. It is a very versatile software as it provides you with many options
to experiment and learn CFD. This tutor is especially designed to train you
to execute Computational Fluid Dynamics, interpret results and effectively
apply it in industrial problems.

CFDTutorTM is compatible with MS Windows and Linux. Read on to find


out the various facets of CFDTutorTM .

11
12 CHAPTER 2. WELCOME TO CFDTUTORTM

What CFDTutorTMDoes

• CFD ‘Tutor’
CFDTutorTM is a training module designed to help beginners simulate
two dimensional (2D) flows. It decreases the CFD learning curve con-
siderably, while strengthening the fundamentals of fluid dynamics.

• Simulator
CFDTutorTM can be used as a virtual laboratory wherein one can sim-
ulate a fluid flow to ‘see’ the motion of fluid inside or outside a given
shape. Flow patterns, normally referred to as streamlines, can be cre-
ated and analyzed as a function of flow parameters such as Mach num-
ber and / or Reynolds number for any given 2D shape.

• Executes CFD Problems


Many UG and PG engineering students are not provided any option
of studying CFD or even executing CFD. CFDTutorTM can help engi-
neering students learn to identify what goes into executing CFD and
thereby improve their professional skill set. PG students who wish to
undergo self-training can execute CFD problems in CFDTutorTM . They
can use the links provided in the CFDTutorTM reference book to - read
more about CFD, explore the various topics in CFD, and learn while
performing CFD experiments.

• Demonstration and Validation Tool


CFDTutorTM provides multiple options at various levels in grid genera-
tion, simulation, and post-processing. This makes it an excellent tool
for demonstration of flow motion especially as the fluid model changes
from simple to complex. CFDTutorTM can also serve as a source for val-
idating a code written by a novice. This makes it a valuable validating
tool for developers.

• Cost Effective CFD Tool


Most often industrial establishments buy expensive CFD software with-
out the benefit of the training required to use the software. This creates
a mismatch in the pool of trained manpower and the availability of the
13

software. CFDTutorTM can be used as an extremely cost-effective tool


for training manpower in CFD for industry. Hence, highly professional
CFD software can be bought or obtained on lease only when there is a
need to execute and analyze a flow field for a client.
14 CHAPTER 2. WELCOME TO CFDTUTORTM

Who needs CFDTutorTMand Why?


• Students
CFDTutorTM is an ideal learning tool for engineering students while they
are undergoing a Fluid Mechanics course.

• Professors
With the capability of visualizing the flow development, CFDTutorTM can
be used as a teaching aid and can potentially replace fluid mechanics
laboratories.

• Engineers
CFDTutorTM provides an excellent solution for the training of human
resources to execute complex CFD problems.
2.1. INSTALLING CFDTUTORTM 15

2.1 Installing CFDTutorTM


SYSTEM REQUIREMENT NOTE: With any luck, you made sure that
you have the necessary system software and hardware before you bought
CFDTutorTM .

For the record, however, you need a Pentium III Computer with a CD
drive, running MS Windows 9x or later, if you received CFDTutorTM on CD.
If you downloaded the CFDTutorTM installer from the CFDTutorTM website, a
CD drive is unnecessary.

Then, when you’re ready:

CFDTutorTM - Microsoft Windows Installation

1. Log in as Administrator or Privileged User.


2. Insert CFDTutorTM Version 1.0 CD in the CD-Rom.
3. Access the CD Rom Drive and double-click on the SETUP icon.
4. The Welcome dialog box appears. Click Next.
5. The Choose Destination Location dialog box appears. Click Next.
6. The Setup Type dialog box appears. Select Typical and click Next.
7. The Select Program Folder dialog box appears. The default Pro-
gram Folder is CFDTutorTM . Click Next.
8. The Setup Complete dialog box appears. Click Finish

Opening CFDTutorTM using the Start menu

1. Click on Start
2. Click on Programs
3. Click on CFDTutorTM
4. Click on CFDTutorTM - 1.0

You now arrive at CFDTutorTM Wizard screen.


16 CHAPTER 2. WELCOME TO CFDTUTORTM

2.2 A First Look At CFDTutor


CFD Tutor - Wizard

Figure 2.1: Wizard Application

• Menu Bar
Application commands are listed in the menu bar. In Wizard, the tutor
mode, the Menu Bar is not active.

• Tool bar
Contains icons of specific application commands. In Wizard mode, the
2.2. A FIRST LOOK AT CFDTUTOR 17

Tool Bar is active. Place your pointer on top of an icon to read the
tool-tip for that icon.

• Wizard Panel
This is a specially designed panel that lists the CFD Cycle as a Step
Method. In addition to this step-by-step solving process, several solved
sample problems are given. On selecting a problem a brief description
of that problem is provided in the Panel. At the bottom of the Panel
there are three buttons - Quit, Back and Next. Selecting Quit will
exit Wizard and open the Interactive application. On selection of a
problem, for example: Backward Facing Step, click Next to start the
CFD solving process. Click Back to revert to the previous step.

• Workspace
The is the graphics area where you create entities. In Wizard mode,
this area is for viewing only.

• Status Bar
Provides feedback of the internal processes.
18 CHAPTER 2. WELCOME TO CFDTUTORTM

CFDTutor - Interactive
This is the expert mode to be used after you have undergone training in
Wizard. In Interactive, you can create any 2-D shape as also the domain in
which the flow field is to be simulated. You have to follow the steps learned in
Wizard to solve your created 2D problem. Given below is a brief description
of the Interactive Application.

Figure 2.2: Interactive Application

• Title Bar
Includes the CFDTutor Control menu button, information about the
application (CFDTutor Version 1.0), and the Minimize/Restore/Close
buttons.

• CFDTutor Control Button


This icon is on the left of the title bar, it allows you to move, size,
2.2. A FIRST LOOK AT CFDTUTOR 19

minimize, maximize, close and move the CFDTutor application.

• Minimize / Restore /Close Buttons


These buttons are on the right side of the title bar of the CFDTutor
application.

• Menu Bar
The Menu bar is directly below the Title bar and displays the menu.
Application commands are listed in the menu bar. Clicking on any of
the words reveal drop-down menus with additional commands.

The menu begins with the word File and continues with the following:
Create, Edit, Tools, Display, Grid, Boundary Type, Analysis,
Visualization, and Help.

You use the menu to give instructions to the software. Point with your
mouse to a menu option and click the left mouse button. A drop-down
menu will appear. You can now use the left and right arrow keys on
your keyboard to move left and right across the Menu bar options. You
can use the up and down arrow keys to move up and down the drop-
down menu. To select an option, highlight the item on the drop-down
menu and press Enter. You can also use your mouse - left-click to select
an option.

• Tool bar
The Tool bar is located below the Menu bar. The Tool bar provides
shortcuts to the menu commands. It contains icons of specific applica-
tion commands.

The Tool bar begins with the icon Open File and continues with the
following: Save File, Zoom In, Zoom Out, Zoom Seleted, Move
Pan, Default View, Pick an Entity, Select an Entity, Deselect
an Entity, Delete Selected, Delete All, Show All Points, Show
Boundary Points, Show Wizard, Stop Slover, and Show Solu-
20 CHAPTER 2. WELCOME TO CFDTUTORTM

tion Values.

Point with your mouse to an icon to read the tool-tip. Use your mouse
- left-click to select an icon.

• Workspace
The workspace is the area located below the Tool bar. This is the
drawing area where you create entities.

• Status Bar
The Status bar appears at the bottom of the screen. Provides feedback
of the internal processes.
Chapter 3

Using Wizard and Interactive

Wizard, the tutor lists the CFD cycle as a step-by-step process, thereby
acquainting you with the CFD solving process. Navigating Interactive - the
expert mode is briefly described here.

3.1 Using the Wizard Step-By-Step Method


Wizard is designed to help you learn the steps involved in solving a CFD
problem. The specially designed Wizard Panel on the left hand side of the
application lists a step-by-step problem solving process (i.e. CFD Cycle). To
view the CFD problem solving process, click on the Next button (located on
the bottom left of the Wizard panel) to take you to the next step. A variety
of flow problems such as backward facing step, airfoil, flow past bump, flow
in a Y shaped duct are solved step-by-step with the help of Wizard.

Figure 3.1: Wizard - 6 Step CFD Problem Solving Method

1. Select Problem
Select a problem from the set of problems provided in the scroll-down

21
22 CHAPTER 3. USING WIZARD AND INTERACTIVE

box and s brief description of the chosen problem appears at the bot-
tom of the panel. Click Next to move to the following step.

2. Define Geometry
You can view the diagram and the parameters of the problem selected.
You can experiment and insert new values for the parameters, however,
default values are provided to guide you. Click Next to move to the
following step.

3. Define Grid
The first step toward grid generation is selecting the type and quality
of grid.
Type of Grid as unstructured or structured.
Quality of the Grid as either Coarse, Medium or Fine.
It is at this stage that the Boundary Type is defined as Inflow and
Outflow. Click Next to move to the following step.

4. Select Solver Controls:


You have reached a step in the CFD cycle called Analysis of the prob-
lem. Here, you have to select the Type of flow and fluid model and also
the type of flow scheme.
Type of Flow Model as Compressible or Incompressible.
Type of Fluid Model as Inviscid or Viscous.
Type of Flow Scheme from the following - Van Leer 1st Order or
Steger.
Also, determine the CFL and Click Next to move to the following step.

5. Define Flow Condition


Next, you have to define the Flow Condition for the problem. This
refers to the Boundary Conditions, Initial Conditions, and Convergence
Criteria.
Boundary Conditions i.e. Inlet Boundary Type as Total Pressure
based or Enthalpy Based. Pressure Inlet, Density, Mach No.Inlet An-
gle of Attack, velocity X, Velocity Y Total Inlet Pressure, Total Outlet
Temperature and Pressure Outlet.
3.1. USING THE WIZARD STEP-BY-STEP METHOD 23

Initial Conditions i.e. Static Pressure, Static Density, Initial Veloc-


ity X, Initial Velocity Y.
Convergence Criteria i.e. total number of iterations the solver has
to run, for the solution to converge and at what number of iteration
interval you would like the converging solution to be displayed.
You can change the values for any of the parameters, however, default
values are provided to guide you. Click Next to move to the following
step

6. View Solution:
In this step you can monitor the solution while the solver is running.
Monitor - select any of the following options to monitor the simulation
- Velocity X, Velocity Y, Pressure, Temperature, or Mach.
Animation - select ON to record the simulation.
Finally, click on Run Solver to trigger the solver and begin the sim-
ulation.

Note: If at anytime you want to quit solving the problem while the
solver is running, click on the Stop Solver icon on the Tool bar. This
will stop the solver and will display the solution at the last display at
iteration. Once the solution has converged you have to save the solu-
tion file.

3.1.1 Viewing Saved Solution Files


To view the saved solution in different contour plots, you have to first read
the solution file. Follow these steps to read the solution file:
1. Click on Visualization in the Menu bar, from the drop-down menu,
click on Read Solution File.
2. Select the previously saved file from the pop-up window and click
Open.

To clear the display, click on Visualization in the Menu bar and from
the drop-down menu, click on Clear Display.
24 CHAPTER 3. USING WIZARD AND INTERACTIVE

To view the converged solution in any one of the following contour plots
such as : Velocity Vector, Pressure Plot, Velocity X Plot, Velocity Y Plot,
Mach or Temperature Plot - follow the example given below:
Velocity Vector

1. Click on Visualization in the Menu bar.

2. From the drop-down menu, click on Velocity Vector.

3. Repeat step 1 to select and view Pressure Plot.

3.1.2 Interpreting CFD Results


CFD results are represented by the use of surface colors. Red ”hot” areas
indicate high values and blue ”cool” areas represent low values. Also the
blue ”cool” colors indicate low speed flow and the red ”hot” indicate high
speed flow. Another interesting method of displaying CFD results is to show
the particular path of particles in the flow. This technique is used when the
flow field away from solid surfaces is of interest.

Contour plots of mach number, pressure, temperature, etc. are often used
to present CFD data so that it can be visually interpreted easily.

We recommend that you go through the sample problems listed in the


Wizard Panel. Once you are familiar with the CFD Cycle step-by-step solv-
ing process, you can move on to the next section of getting familiar with
CFDTutor Interactive.

Note: If you are in Interactive and would like to return to Wizard, click
on Show Wizard icon on the Tool bar.
3.2. GETTING FAMILIAR WITH CFDTUTOR INTERACTIVE 25

3.2 Getting Familiar with CFDTutor Inter-


active
You will learn to open Interactive, navigate the Interactive screen and close
Interactive.
Open Interactive

You have to Quit the Wizard Mode to open the Interactive Mode. Do the
following exercise which demonstrates opening CFDTutor in the Interactive
Mode.

1. To the left of the CFDTutor Wizard application is the Wizard Panel.


Point to the word Quit, located at the bottom of this panel.

2. Click your left mouse button.

Figure 3.2: To open Interactive, select ‘Quit’


26 CHAPTER 3. USING WIZARD AND INTERACTIVE

Navigate the Interactive Screen


Do the following exercise, which demonstrates using the Interactive menu.

• Menu bar

1. Point to the word File, which is located on the Menu bar.


2. Click your left mouse button.
3. Press the right arrow key until Help is highlighted.
4. Press the left arrow key until Create is highlighted.
5. Press the down arrow key until Polyline is highlighted.
6. Press the up arrow key until Point from Coordinates is high-
lighted.
7. Press Enter to select the Point from Coordinates menu option.
8. Point to Cancel and click the left mouse button to close the dia-
log box.

• Tool Bar

1. Point to Zoom In.


2. Click your left mouse button
3. Observe the increase in magnification in the Drawing area
4. Next point to Default View.
5. Click your left mouse button to reset the default view.

• The Status Bar

1. Point to Default View on the Tool bar.


2. Click your left mouse button
3.2. GETTING FAMILIAR WITH CFDTUTOR INTERACTIVE 27

3. Note the Feedback provided on the Status bar.

Close Interactive
To close and exit Interactive:

1. Click on File, which is located on the Menu bar.

2. Press the down arrow key until Exit is highlighted.

3. Press Enter.

4. Click on Yes, when prompted, ”Do you want to Exit?”.

Note: You can use the mouse to select options from the Menu bar and
icons from the Tool bar. Just place the pointer of your mouse over an op-
tion/icon to be selected and left-click your mouse.

You can now move on and define your own problem. In the next Chapter -
Defining Geometry, you will learn the different methods of creating geometry.
28 CHAPTER 3. USING WIZARD AND INTERACTIVE
Chapter 4

Defining Geometry

Defining the geometry for an inflow problem involves creating points or poly-
lines, connecting points with polylines; connecting polylines and closing the
curve(s). Some additional steps are required to draw the geometry for an
outflow problem namely the creation of a domain area.

4.1 Points
Points are used to specify line segment endpoints, grid centers, line and
anchor load positions, and all other data required to define the geometry of
a problem. Points are created when you select the Point command from the
Create Menu if a point does not already exist at the position where you
have clicked.

4.1.1 Create Points


There are two methods to creating points:

• Create Random Points

1. Choose Point from the Create menu on the Menu bar. The
cursor changes from an arrow to a cross-hair and the status bar
indicates that Point is the current mode.
2. Move the cursor to the desired position and click the left mouse
button. A small blue square appears at the point position.

29
30 CHAPTER 4. DEFINING GEOMETRY

3. Repeat Step 2 for all desired points.


4. Click the right mouse button to finish drawing points.

• Create Points using Coordinates

1. Select Point from Coordinates from the Create menu on the


Menu bar.
2. Insert the X and Y coordinates for a point in the dialog box and
click on OK.
3. Repeat Steps 1 and 2 for all desired points.

4.1.2 Connect Points


To connect points, you have to choose the option Polyline from Points.
This option will link points in the direction they were drawn through a series
of connected line segments. To create polylines from points, follow these
steps:

1. Click on Create on the Menu bar and next click on Polyline from
Points.

4.1.3 Close Curve


Closing the curve is the last step in defining the geometry for a problem.
This completes the geometry for a problem.

1. Click on Edit in the Menu bar and next click on Open / Close
Curve.

4.1.4 Delete All Points and Clear Screen


To delete all created points and clear the screen of the selection set:

1. Click on the Delete All icon on the Tool bar, or from Edit in the
Menu bar, click on Delete All.

2. Click on Yes in the dialog box: ‘CFDTutor Warning - Are You Sure?’.
4.1. POINTS 31

4.1.5 Copy Point


To make a copy of a point in a set of points, you have to deselect all and
pick the point you want copied. You can copy a point in any of the 4 ways
given below:

1. Translate
Insert the values for the X and Y axis you want the point to be trans-
lated to.

2. Scale
Insert the values for the X and Y axis you want the point to be scaled
to.

3. Rotate
Insert a value for the Angle of Rotation for the new point.

4. Mirror
Make a mirror copy of a point by either X or Y axis.

Follow the steps given below to copy a point.

1. First you have to deselect all the points. Click on Deselect All from
the Tool bar.

2. Click on Pick an Entity on the Tool bar.

3. Position the cursor over the point to be copied and click the left mouse
button.

4. Click on Tools on the Menu barand from the drop-down menu, click
on Copy.

5. Select any one option from a list of Translate, Scale, Rotate or


Mirror and insert the required values and click on OK.

4.1.6 Move Point


To move a point from a set of points, you have to deselect all, pick the point
to be shifted and select Move. You can move a point by:
32 CHAPTER 4. DEFINING GEOMETRY

1. Translate
Translate any point by inserting values for X and Y axis.

2. Scale
Scale a point by providing the values for X and Y axis.

3. Rotate
Rotate the angle of a selected point by providing an Angle of Rota-
tion

4. Mirror
You can mirror a point to be moved by either X or Y axis.

Follow the steps given below to move a point.

1. First you have to deselect all the points. Click on Deselect All from
the Tool bar.

2. Click on Pick an Entity on the Tool bar.

3. Position the cursor over the point to be moved and click the left mouse
button.

4. Click on Tools on the Menu barand click on Move.

5. Select any one option from a list of Translate, Scale, Rotate or


Mirror. Insert the required values and click on OK

4.2 Polylines
Polylines are used to specify a series of connected line segments. Polylines
are created when you select the Polyline command from the Create Menu,
if a polyline does not already exist at the position where you have clicked.

4.2.1 Create Polylines


There are two methods of creating polylines:

• Create Polyline
4.2. POLYLINES 33

1. Choose Polyline from the Create menu on the Menu bar. The
cursor changes from an arrow to an asterisk and the status bar
indicates that Polyline is the current mode.
2. Move the cursor to the desired position and click the left mouse
button. A small blue square appears at the polyline position.
3. Repeat Step 2 for the desired length of the polyline.
4. Click the right mouse button to finish drawing the polyline.

• Create Polyline from Expression


This command makes a list of all the data required to define the ge-
ometry for a problem. Key-In the required expression to draw the
geometry.
1. Draw points by using Polyline from Expression from the Cre-
ate menu on the Menu bar.A pop-up dialog box Create Poly-
line appears on the screen.
2. Key-In the no. of points desired, U max, U min, the expression
for X and the expression for Y for the geometry in the dialog box
and click on OK.

4.2.2 Connect Polylines


Unlike connecting points, you don’t have to connect a single drawn polyline
as they are a series of connected line segments especially if the geometry can
be drawn by a single polyline. If, however, two or more polylines are to be
connected, you can choose one from the following options:
• Stitch Curve
You can use this option only if the distance between two curves is
almost non-existent for example: .05mm NOTE: For this operation
to succeed, both the curves must follow the same direction.
1. Click on Edit from the Tool bar and click on Stitch Curves.
• Join Curve
Use this option to join any two curves regardless of their distance from
each other. NOTE: For this operation to succeed, both the
curves must follow the same direction.
34 CHAPTER 4. DEFINING GEOMETRY

1. Click on Edit from the Tool bar and click on Join Curves.

4.2.3 Close Curve


Closing the curve is the last step in defining the geometry for a problem. To
close the curve follow these steps:
1. Click on Edit in the Menu bar and click on Open / Close Curve.
NOTE: Close Curve in ‘Polyline from Expression’ only if the expression
keyed-in does not specify a closed geometry for the problem.

4.2.4 Move Points on a Polyline


Points on a polyline can be moved using the Move Point command on the
Edit Menu. To move a point using the mouse, choose the Move Point
using Mouse command on the Edit Menu.

• Move Point using Coordinates

1. Click on Pick a Point on the Tool bar.


2. Position the cursor on the curve over the point (on a polyline) to
be moved and click the left mouse button.
3. Click on Edit from the Tool bar and click on Move Point.
4. In the dialog box titled Move Point, insert the X and Y coordi-
nates for the new position of the picked point.
5. Click on OK.

• Move Point using Mouse

1. Click on Display on the Menu bar and click on Boundary


Points.
2. Next select Pick a Point from the Tool bar.
3. Click on any boundary point of the polyline.
4. Click on Edit from the Tool bar and click on Move Point using
Mouse. You can now move the selected point using your mouse.
5. To fix the point, click your left mouse button.
4.3. DOMAIN CREATION 35

4.2.5 Move a Polyline


Polylines can be moved using the Move Polyline command in the Edit
Menu to change the x-y coordinates of a polyline. You can also choose
Move Polyline using Mouse command to move the polyline.

• Move Polyline using Coordinates

1. Click on Display on the Menu bar and click on Boundary


Points.
2. Next select Pick a Point from the Tool bar.
3. Position the cursor on any point on the polyline and click the left
mouse button.
4. Click on Edit from the Tool bar and click on Move Polyline.
5. In the dialog box titled Move Polyline insert the new X and Y
coordinates for the polyline.
6. Click on OK.

• Move Polyline using Mouse

1. Click on Display on the Menu bar and click on Boundary


points.
2. Next select Pick a Point from the Tool bar.
3. Click on any boundary point.
4. Click on Edit from the Tool bar and click on Move Polyline
using Mouse. You can now move the polyline using your mouse.
5. To fix the polyline, click your left mouse button.

4.3 Domain creation


In order to simulate a flow past an entity, you need to create a boundary, as
in a domain area within which the flow movement can be ’seen’. To learn
how to create a domain for an entity, refer to Tutorial - Flow Past A
Cylinder in the Appendix section of this CFDTutorTM .
36 CHAPTER 4. DEFINING GEOMETRY

4.3.1 Direction of Curve


Creation of the curve for both the domain and the entity/entities within the
domain must follow the same direction. This is very important from the
point of grid generation. So, for example, if you create an entity - drawing
from the left to right in the Workspace, then you must necessarily create the
domain in the same direction - drawing from left to right.

4.3.2 Closing Curves for Multiple Entities


You can choose to close the curve for a single entity as soon as it is created or
you can create entities and close the curve of each entity after all the entities
have been created.

4.3.3 Deleting Entities within a Domain


You can delete all the geometry on the screen or select and delete a single
entity from two or more entities created or only delete the last entity you
have worked on.

• Delete All and Clear Screen


To delete all the geometry on the screen and clear the selection set, you
have to choose the delete all option explained below.

1. Click on the Delete All icon on the Tool bar, or click on Edit in
the Menu bar and click on Delete All.
2. Click on Yes in the dialog box: ‘CFDTutor Warning - Are You
Sure?’.

• Delete a Selected Entity


To select an entity to be deleted from a set of two or more entities
(for example, a domain and several entities within that domain) , you
have to deselect all the entities. Next, pick the entity to be deleted and
finally, delete the selected entity. To select and delete an entity, follow
these steps:

1. Click Deselect All on the Tool bar.


4.3. DOMAIN CREATION 37

2. Click on Pick an Entity on the Tool bar and click on the entity
to be deleted.
3. Click on Edit on the Menu bar and click on Delete Selected
4. Repeat steps 1 to 3 if there is more than one entity to be selected
and deleted.

• Delete the Last Selected Entity


This option deletes the most recently worked on entity. For example, in
a hypothetical Domain X, there are four entities A, B, C and D created
in alphabetical order. The most recent or the last entity created being -
Entity D. However, if some changes were made to Entity C after Entity
D was created, then the most recent or last selected entity will now be
Entity C. To delete the last selected entity, follow these steps:

1. Click on Edit on the Menu bar and click on Delete Last Se-
lected
2. Repeat the above-mentioned step to delete the next recently worked
on entity.

• Delete All and Clear Screen


To delete all the geometry on the screen and clear the selection set, you
have to choose the delete all option explained below.

1. Click on the Delete All icon on the Tool bar, or click on Edit in
the Menu bar and next click on Delete All.
2. Click on Yes in the dialog box: ‘CFDTutorTM Warning - Are You
Sure?’.

In this chapter, we learnt to define the geometry for a problem. In the


following chapter, you will learn to define and generate grids.
38 CHAPTER 4. DEFINING GEOMETRY
Chapter 5

Defining Grids

Simulation of field equations in science and engineering require discretization


of space. The space variables for example - pressure, velocity, density, and
temperature are point variables and are calculated at specific points in space.
In the parlance of of CFD this discretization of space is called mesh generation
or grid generation. This refers to the creation of discrete points and their
connectivity (neighbourhood information) so as to input the geometry of the
domain to the simulation codes.
The most important quality of a computational grid is that it must de-
fine enough points to capture everything that is going on of interest in the
domain. If there are too few points, some of the critical information about
the flow may be lost. Specific computational points are generated using a
grid generation technique. Some approaches are rather simplistic and involve
dividing the region into equally spaced regions. For complex geometries this
is not possible and the grid generation techniques usually involve the solution
to more differential equations. The solutions to these are actually somewhat
similar to those used to solve the fluid flow equations themselves. In this
chapter you will use a relatively simple type of grid generation technique -
2D Unstructured Grid. The quality of the grid is also important and can
strongly influence the solution - including whether or not a solution can be
found at all. This chapter discusses how to generate a grid and define the
boundary edges.
Having defined the geometry for a problem, the next step is to define a
grid. To do so you have to:

1. Create Polyline Equal Arcs and Display Geometry

39
40 CHAPTER 5. DEFINING GRIDS

2. Define Type of Grid


3. Define Quality of Grid
4. View Quality of Grid

5.1 Create Polyline Equal Arc


This option allows you create an equi-arc polyline, such that the points on
the polyline are separated from each other by the identical distances. For
example, a regular polygon can be considered as an equi-arc polyline, how-
ever, a rectangle is not an equi-arc polyline. To create an equi-arc polyline,
follow these steps:
1. Click on Tools on the Menu bar, from the drop-down menu click on
Polyline Equal Arc
2. In the dialog box titled:PLC Equal Arc: Specify Number of Points
you want to be created on the polyline and click on OK.
3. To Display the PLC Equal arcs created, click on the Show Boundary
Points icon on Tool bar.

5.2 Define Type of Grid


Given any planner region 2D (two dimensional) domain, it is possible to fill
it completely with non-overlapping polygons. The polygons, its boundaries,
and its points are called cells, edges, and vertices respectively. Collectively
the cells (polygons), edges, and vertices are called unstructured grids or un-
structured mesh.

5.2.1 2D Grid
You can generate a 2D (two dimensional) unstructured grid using the 2D
Delaunay Triangulation method of triangulation. In this method most of
the triangles turn out to be equilateral in shape. Points can be clustered
according to length or area of the triangles to calculate flow details. Selecting
Length, allows you to adjust the edge ratio by length. Similarly choosing
Area, allows you to adjust the triangle ratio by area.
5.3. BOUNDARY TYPE 41

1. Click on Grid in the Menu bar, from the drop-down menu, click on
2D Unstructured.

2. In the dialog box titled:Delaunay Triangulation, select Length and


click on Preview.

3. In the same dialog box, select Area and click on Preview.

4. Select either Length or Area and click on OK in the dialog box.

5.2.2 Smoothen a Grid


Smoothens a grid.
1. Click on Grid and from the drop-down menu, click on Smoothen a
Grid.

5.3 Boundary Type


The cells adjoining the boundary of the domain, may not have a neighbour
across one of its edges. Such edges, may form a part of wall constraining
the motion of the fluid, or a boundary between the domain (region where
properties are being simulated) and region where flow conditions are assumed
to be known. There are two types of boundary edges that have to be defined
- inflow edge and outflow edge.

5.3.1 Inflow and Outflow


In a domain, you have to select and define the edge through which the flow
has to enter the domain. This is known as the ‘inflow edge’. The edge
through which the flow has to exit the domain is known as the ‘outflow edge’
has to be selected and defined as such.
To select the edge as Inflow, do the following :
1. Click on Display and from the drop-down menu, click on Boundary
Points.

2. Click on Pick a Point from the Tool bar.

3. Pick the 1st, Next and Last points of the edge selected as inflow.
42 CHAPTER 5. DEFINING GRIDS

4. Click on Boundary Type from the drop-down menu, click on Define


as Inflow.

To view the selected edge defined as Inflow, click on Boundary Type


from the drop-down menu, click on Show Inlet. The edge will be high-
lighted.
To select the edge as as Outflow, do the following :

1. Click on Pick a Point from the Tool bar.

2. Pick the 1st, Next and Last points on the edge selected as outflow.

3. Click on Boundary Type and from the drop-down menu, click on


Define as Outflow.

To view the selected edge defined as Outflow, click on Boundary Type


from the drop-down menu, click on Show Outlet. The outflow edge will be
highlighted.
Note: Use the Reset Inlet-Outlet option from the Boundary Type
menu to reset the edges defined as inlet and outlet.

1. Click on Boundary Type from the drop-down menu, click on Reset


Inlet- Outlet.

This chapter discussed defining grids and boundary edges for a problem.
The next chapter discusses solver controls and flow conditions for a problem.
Chapter 6

Solver Controls and Flow


Conditions

6.1 Solver Controls


Solver Controls comprise of numerical tools such as flow models, fluid models,
and flow schemes. The flow models and fluid models are required to change
the governing Partial Differential Equations (PDEs) to Algebraic Equations
for various types of flows (inviscid, incompressible, viscous, compressible or
a combination of the above) and the equations governing the flow are solved
with the aid of flow schemes.

6.1.1 Flow Models


The fluid flow equations solved in CFD use properties of fluid such as den-
sity, viscosity, gas constant, specific heat constant volume, specific heat at
constant pressure, etc. If all these properties are included in the flow equa-
tions the accuracy of the simulation is enhanced. But this increases the
computations as the fluid flow equations have to be solved for each property
as well as for the interdependence of the properties on each other. In CFD
therefore, some properties of the fluid are neglected so that equations become
less cumbersome to solve and are made manageable within limits of existing
computers. The following fluid flow equations, often called ‘flow models’ are
popular. There are several types of flow models, some of which are listed
below.

43
44 CHAPTER 6. SOLVER CONTROLS AND FLOW CONDITIONS

• Incompressible Inviscid Model


In this model, the flow equation assume that density changes are neg-
ligible and viscosity can be assumed to be zero. This model is quite
unrealistic for most of the simulations. However, for air with velocities
in the range of several tens of m/s or so and shapes extremely thin
aligned in the direction of flow, (viz, high Reynolds number flow past
airfoils) this model gives results away from the boundary.

• Incompressible Model
In this model, the flow equations assume that the density changes are
negligible. The terms with coefficient involving coefficient of viscosity
are not out to be zero. This model is quite realistic for simulation of
liquids.

6.1.2 Fluid Models


• Compressible Inviscid Model
In this model, the fluid is assumed to have zero viscosity. However,
the fluid is assumed to obey the gas law, i.e., its density is allowed to
change as a function of pressure and temperature. This is a popular
model in aerospace applications as viscosity is fairly small and viscous
effects are less important as compared to effects of compressibility.

• Compressible Viscous Model


This is the most comprehensive model that CFD addresses. Here, the
effects due to viscosity and compressibility are modeled. In fluid me-
chanics this model is regarded as the ultimate model to simulate in
order to obtain the most realistic data.

6.1.3 Flow Schemes


The equations governing the flow can be solved in a number of schemes.
Very good representations of the inviscid transonic flows can be obtained
using Van Leer and Steger-Warming scheme for the Euler equations. Most
of these schemes are known by the names of the scientists who have invented
them.
6.2. FLOW CONDITIONS 45

• Van Leer 1st Order


Van Leer developed a finite volume scheme which bases it’s flux split-
ting on Mach number.

• Steger Warming
Steger and Warming used an approach where fluxes are split based on
the signs of the Eigenvalues.

To Select Solver Controls:

1. Click on Analysis in the Menu bar, from the drop-down menu, click
on Solver Controls.

2. In the dialog box titled: Solver Controls- there are two or more
options for each solver control:

Flow Model : Compressible / Incompressible


Fluid Model: Inviscid / Viscid
Flow Scheme: Van Leer 1st Order / Steger Warming

3. Select the required options and click on OK

6.2 Flow Conditions


6.2.1 Initial Conditions
Initial conditions for the solver is a numerical procedure of correcting values
for mass, momentum in x direction, momentum in y direction, and of flow
in each and every cell using guessed values of the respective quantities in the
the cell and its neighbouring cells. For this purpose, an initial guess for all
the four quantities is required, which is called the ‘initial conditions’. Note
that these quantities can be found out from other variables such as pressure,
density, temperature and velocity components.
In CFDTutorTM Initial Conditions are given in terms of Pressure Inlet,
Density, Temperature and Velocity components.
46 CHAPTER 6. SOLVER CONTROLS AND FLOW CONDITIONS

6.2.2 Boundary Conditions (BCs) and Convergence Cri-


teria
Two types of Boundary Condition implementation are possible in CFDTutor
- Total Pressure Based and Enthalpy Based. Both options are provided in
CFDTutorTM to make the user aware of the importance of inlet BC.

• Total Pressure Based


Compressible flow is governed by wave like hyperbolic equations. There-
fore, the mathematical nature of these equations allows us to hold:

1. Two properties constant at inlet and one at the outlet for subsonic
flow.
2. Three properties constant at inlet and none at outlet in case of
supersonic flow.
The above statements can be exemplified by the fact that a supersonic
flow in a Converging Diverging Nozzle remain unaffected from change
in value of back pressure. The properties that would be held constant
is decided by taking into account the stability of the numerical scheme.

It is widely accepted that static pressure specified by the user should be


held constant at the outlet. However, at inlet, Total Pressure Based BC
implementation is the most widely used implementation and is found
to be stable with very large range of flow conditions. It holds con-
stant the values of total pressure and total temperature at the inlet.
In CFDTutor, user needs to specify inlet static pressure, static density
and inlet mach number. These are the values that come from a par-
ticular state of flow and should, therefore, be consistent. Observe how,
if you change the above values, the values of total pressure and total
temperature also change in the lower text boxes. Also, instantaneous
velocities can be seen. These values are shown in order to make it easier
for you to specify inlet BCs.

• Enthalpy Based
The second type of BC implementation is based on enthalpy, where en-
6.2. FLOW CONDITIONS 47

thalpy and density are held constant at the inlet. This implementation
is not very stable mathematically. However, the solutions can diverge
in some cases.

Under Boundary Conditions it assumed that a flow enters and exits the
domain of interest. Normally Mach No.Inlet, Pressure Inlet, Density,
Angle of Attack of the flow as it enters the domain are specified as the
Boundary condition. In addition to the above parameters, for a flow
exiting the domain, the exit pressure or Pressure Outlet must also be
specified as the Boundary Condition.
To determine the Flow Conditions:

1. Click on Analysis in the Menu bar, from the drop-down menu, click
on Flow Conditions.

2. In the dialog box titled: Flow Conditions- default values are provided
for Initial Condition, Boundary Condition and Convergence
Criteria*. Click on OK.

*Note: You can change any of the default values provided to guide you.
You can also specify the Total Number of Iteration as well as the Display at
Iteration.

6.2.3 Run Solver


Once you have defined the Flow Condition, the next step is firing the solver.
A Solver is essentially a numerical tool, which uses finite volume or finite dif-
ference or in some cases finite element approximations to change the govern-
ing Partial Differential Equations (PDEs) to Algebraic Equations for various
types of flows (inviscid, incompressible, viscous, compressible or a combina-
tion of the above). Before firing a solver, we need to fix a few inputs which
include:

1. Geometry of the problem domain.

2. Discretization of the physical domains through grids.

3. Type of flow to be analyzed.

4. Boundary conditions specified.


48 CHAPTER 6. SOLVER CONTROLS AND FLOW CONDITIONS

The governing PDE is a mathematical relation involving the dependence


of the gradients of the dependent variables (i.e pressure, velocity, temperature
and density) on the independent space-time coordinates. Using the finite
difference / finite volume methods, a set of algebraic equations are obtained
from the PDEs.
After having triggered the solver into action, the routines calculate these
equations iteratively and update the values of the dependent variables on the
spatial-time coordinates. This process is called marching. The correspond-
ing solutions, which is a distribution of the sought dependent variables (i.e
pressure, velocity, temperature and density) over the geometry are displayed
interactively as the solver converges to the final equilibrium.
Note: You can choose a specific contour plot to monitor the simulation
while the solver is running. There is also an option to record the simulation
by selecting Animation ON. This will capture the simulation process and
later run it as a video clip.
To trigger the solving process:
1. Click on Analysis in the Menu bar, from the drop-down menu, click
on Run Solver to trigger the solver and start the simulation.
Note: If at anytime you want to stop solving the problem while the solver
is running, click on Stop Solver icon on the Tool bar. This will stop the
solver and display the solution at the last Display at Iteration.

6.3 Monitor Simulation


You can monitor the simulation while the solver is running. Choose a par-
ticular contour plot from a list provided on monitoring panel (situated to
the left of the screen). For example, when a simulation is in process, click
on Pressure in the monitoring panel, to view the Pressure plot for the flow
simulation.

• Save Solution File


On completion of the total number of iteration specified, a pop-up
window enquires if you want to save the solution file. Click on Yes to
save and enter a file name. If no, then select Cancel.

To learn how to view the converged solution, refer to the next chapter on
View Solution.
Chapter 7

View Solution

To view a saved solution, you have to first read the solution file ( saved earlier
at the iteration completed message - refer to Chapter 6 - section on Monitor
Simulation).
1. Click on Visualization in the Menu bar,from the drop-down menu,
click on Read Solution File.
2. From the pop-up window, select the previously saved file, for example
- File1 and Click on Open.

• Read Solution File

1. Click on Visualization in the Menu bar,from the drop-down


menu, click on Read Solution File.
2. From the pop-up window, select a previously saved file, for exam-
ple - Forward Facing Step and Click on Open.

• Clear Display
Clears the display of the previous view on screen. For example, if
you were viewing a velocity vector plot and would like to view the
temperature plot for the same problem, use a clear display or else the
vector arrows will be superimposed on the visual of the temperature
plot. To clear the display:
1. Click on Visualization in the Menu bar,from the drop-down
menu, click on Clear Display.

49
50 CHAPTER 7. VIEW SOLUTION

• Velocity Vector
Velocity is a vector quantity. As such, velocity is ‘direction-aware’.
This means that velocity is speed with direction. When evaluating
the velocity of an object, you must keep track of its direction. The
direction of the velocity is speed with a direction, velocity vector is the
same as the direction in which an object is moving. It does not matter
whether the object is speeding up or slowing down, if the object is
moving rightwards, then its velocity is described as being rightwards.
If an object is moving downward, then its velocity is described as being
downward. To ‘view’ the converged solution in terms of the velocity
vector contour plot, do the following:

1. Click on Visualization in the Menu bar, from the drop-down


menu, click on Velocity Vector.

• Colour Plots
You have an option of viewing the CFD results through five colour plots
-Pressure, Temperature, Mach No., Velocity X, and Velocity
Y. Red ”hot” areas indicate high values and blue ”cool” areas represent
low values. The values corresponding to the different colours can be
seen in a dialog box of the selected plot.
Note: To view the solution in any of the five colour plots - you have
to first read the solution file. See View Solution.

• Pressure Plot
Red ”hot” areas indicate ”high” pressure areas and blue ”cool” areas
represent low pressure areas. To view the Pressure Plot for a saved file:

1. Click on Visualization in the Menu bar, from the drop-down


menu, click on Pressure Plot.

• Temperature Plot
Red ”hot” areas indicate ”high” temperature areas and blue ”cool”
areas represent low temperature areas. To view the Temperature Plot
for a saved file:

1. Click on Visualization in the Menu bar, from the drop-down


menu, click on Temperature Plot.
51

• Mach No.
Red ”hot” areas indicate ”high” Mach number and blue ”cool” areas
represent low Mach number. To view the Mach No. for a saved file:

1. Click on Visualization in the Menu bar, from the drop-down


menu, click on Mach.

• Velocity X Plot
To view the Velocity X Plot for a saved file:

1. Click on Visualization in the Menu bar, from the drop-down


menu, click on Velocity X Plot.

• Velocity Y Plot
To view the Velocity Y Plot for a saved file:

1. Click on Visualization in the Menu bar, from the drop-down


menu, click on Velocity Y Plot.
52 CHAPTER 7. VIEW SOLUTION
Appendix A

CFDTutor, Menu bar and Tool


Bar

This chapter explains the commands on the Menu bar and the Tool bar.

A.1 The Menu Bar


A.1.1 File
• Open
Opens a saved geometry files and grid files for example .plc / .trsp file
formats.

1. Click on File and from the drop-down menu, click Open.


2. Select the required file from the pop-up window, double-click on
the file name or click on Open .

Note: If you want to open a Saved Solution File (.cgns file format),
click on the Visualization menu and select the Read Solution File
command. Select the file you want to view and click Open.

• Save
Saves files containing only geometry or girds.

1. Click on File and from the drop-down menu, click on Save.

53
54 APPENDIX A. CFDTUTOR, MENU BAR AND TOOL BAR

2. Select the required file from the pop-up window and double-click
on the file name or click on Open .

• Exit
Closes and exits CFDTutor Interactive application.

1. Click on File and from the drop-down menu, click on Exit.


2. Select the appropriate response from the pop-up window.

A.1.2 Create
Create defines the geometry for a problem. Creating geometry is always
a challenge. Create offers you four options to choose from to define your
geometry.

1. Point

2. Point from Coordinates

3. Polyline

4. Polyline from Expression

Plot free points using the Points option, next, join the vertices with
Polyline from Points or draw Polylines and if you would like to view the
only the points on the polyline, choose the Points from Polyline option.

• Point
A Point marks a single set of coordinates in space. Using Point you
can place markers and construct objects. You can view the coordinates
for your pointer on the top left hand corner of CFDTutor Interactive
screen.

1. Click on Create and from the drop-down menu, click on Point.


2. To plot a point, left click in the drawing area. Move your mouse
and left click to plot the next point.
3. To stop plotting points, right click your mouse.
A.1. THE MENU BAR 55

To connect the points, choose the option Polyline from Points. This
option connects the points with a polyline, but, it will not close the
curve. Go to the Open / Close Curve option under Edit. To draw
polylines from points, follow these steps:
1. Click on Create and from the drop-down menu, click on Polyline
from Points.

• Point from Coordinates


To plot points by using Point from Coordinates, insert values for
the X and Y coordinates for each point.
1. Click on Create and from the drop-down menu, click on Point
from Coordinates.
2. Insert the X and Y coordinates for a single point and click OK.
Repeat Steps 1and 2 until you have constructed enough points to create
your geometry.
• Points from Polyline
Shows the plotted points created on a polyline without the connecting
polyline.
1. Draw a polyline. (To stop drawing the polyline, right click with
your mouse).
2. Click on Create and from the drop-down menu, select Points
from Polyline.

• Polyline The Polyline function draws a series of line segments by


connecting the points in the specified array.
1. Draw any number of free points using the Point option from the
Create menu.
2. Click on Create and from the drop-down menu, select Polyline.

• Polyline from Points This option allows you to connect free


points with line segments. To use this option you will have to create
free points from the Point option from the Create menu. To connect
the points with polylines :
56 APPENDIX A. CFDTUTOR, MENU BAR AND TOOL BAR

1. Click on Create and from the drop-down menu, click on Polyline


from Points.

• Polyline from Expression Defines the geometry for an object


by using an algebraic expression. For example, to create a circle using
an expression, follow these steps :

1. Click on Create and from the drop-down menu, click on Polyline


from Expression.
2. In the dialog box Create Polyline, insert the required values.
To create a circle insert the following values and expressions.
No. of Points : 60
U max : 0
U min : 2*pi
Expression for x : 30*sin(u)
Expression for y : 30*cos(u)

3. Click OK.

A.1.3 Edit
• Open / Close Curve
Opens or closes a curve.

1. Click on Edit and from the drop-down menu, click on Open /


Close Curve.

• Delete Selected
Deletes the selected geometry. Deselect the entities not to be deleted,
before using this command.

1. Click on Tools and from the drop-down box, click on Deselect.


2. Pick the entities to be deselected, so as not to delete them.
3. Next Click on Edit and from the drop-down box, select Delete
Selected.
A.1. THE MENU BAR 57

• Delete Last Selected


Deletes this most recent entity created and not the entities you have
worked on before. You can use this option if you have two or more
entities on screen and you would like to delete the most recently created
entity.

1. Click on Edit and from the drop-down menu, click on Delete


Last Selected.

• Delete All
This option clears and refreshes the screen.

1. Click on Edit and from the drop-down menu, click on Delete


All.

• Move Point(on a Polyline)


Moves a point on a polyline on inserting the coordinates for the new
point location. To execute this option, make sure that all the points
on the polyline are visible.

1. Click on Pick a Point on the Tool bar.


2. Position the cursor on the curve over the point to be moved and
click the left mouse button.
3. Click on Edit and from the drop-down menu click on Move
Point.
4. Insert the X and Y coordinates for the new position of the picked
point and click OK.

• Move Point using Mouse(on a Polyline)


This command uses the mouse to move a polyline. To execute this
option, make sure that all the points on the polyline are visible.

1. Click on Display, from the drop-down menu, click on All Points.


2. Next select Pick a Point from the Tool bar.
3. Click on any boundary point.
58 APPENDIX A. CFDTUTOR, MENU BAR AND TOOL BAR

4. Click on Edit and from the drop-down menu click on Move Point
using Mouse. You can now move the selected point using your
mouse.
5. To fix the point, click your left mouse button.

• Move Polyline
Moves a polyline on inserting the coordinates for the new polyline lo-
cation. To execute this option, make sure that all the points on the
polyline are visible.

1. Click on Display, from the drop-down menu, click on All Points.


2. Next, select Pick a Point from the Tool bar.
3. Position the cursor on any point on the polyline and click the left
mouse button.
4. Click on Edit and from the drop-down menu click on Move Poly-
line
5. Insert the X and Y coordinates for the new position of the polyline.
6. Click on OK.

• Move Polyline using Mouse


Moves a polyline using the mouse. To execute this option, make sure
that all the points on the polyline are visible.

1. Click on Display and from the drop-down menu, click on All


Points.
2. Next select Pick a Point from the Tool bar.
3. Click on any boundary point.
4. Click on Edit and from the drop-down menu click on Move Poly-
line using Mouse. You can now move the polyline using your
mouse.
5. To fix the entity, click your left mouse button.

• Split Curve
Splits a polyline into two curves.
A.1. THE MENU BAR 59

1. Click on Display and from the drop-down menu, click on All


Points.
2. Next, select Pick a Point from the Tool bar.
3. Click on the point where you want to split the curve.
4. Click on Edit and from the drop-down menu click on Split Curve

• Stitch Curves
Use this option only if the distance between two curves is almost non-
existent (approximately .05mm).
NOTE: Both curves must follow the same direction.
1. Click on Edit and from the drop-down menu click on Stitch
Curves

• Join Curves
Joins any two curves regardless of their distance from each other.
NOTE: Both curves must follow the same direction.
1. Click on Edit and from the drop-down menu click on Join Curves

A.1.4 Tools
• Select
Selects an entity.

1. To select an entity, from the Tools Menu, first, click on Deselect


All
2. Click on Tools and from the drop-down menu, click on Select.
3. Click on the entity to be selected.

• Select All
Selects all the entities in the workspace.

Note: If you have used the Deselect All option, then, using the
Select All option, you can reselect all the geometry.
60 APPENDIX A. CFDTUTOR, MENU BAR AND TOOL BAR

1. Click on Tools and from the drop-down menu, click on Select


All

• Deselect
Deselects a picked entity.

1. Click on Tools and from the drop-down menu, click on Deselect


2. Click on the entity to be deselected.

• Deselect All
Deselects all the entities in the workspace. Use ‘deselect all’ to select
a particular entity to work on.

1. Click on Tools and from the drop-down menu, click on Deselect


All

• Copy
Makes a copy of a selected point polyline or entity.

1. Copy using Translate by inserting values for X and Y axis


2. Copy using Scale by X and Y axis
3. Copy using Rotate by providing an Angle of Rotation
4. Copy using Mirror by either X or Y axis

Follow the steps given below to make a copy of a point, polyline or


entity.

1. From the Tool bar, click on Deselect All.


2. Next, once again from the Tool bar, click on Select an Entity.
3. Position the cursor over the point, polyline or entity to be copied
and click the left mouse button.
4. Click on Tools and from the drop-down menu, click on Copy.
5. Select any one option from a list of Translate, Scale, Rotate
or Mirror. Insert the required values and click OK.
A.1. THE MENU BAR 61

• Move
Moves a selected point, polyline or an entity.
1. Move using Translate by inserting values for X and Y axis
2. Move using Scale by X and Y axis
3. Move using Rotate by providing an Angle of Rotation
4. Move using Mirror by either X or Y axis
Follow the steps given below to move a point, polyline or an entity.
1. From the Tool bar,click on Deselect All.
2. Next, once again from the Tool bar, click on Pick an Entity.
3. Position the cursor over the point, polyline or entity to be moved
and click the left mouse button.
4. Click on Tools and from the drop-down menu, click on Move.
5. Select any one option from a list of Translate, Scale, Rotate
or Mirror. Insert the required values and click OK

• Reverse Curve
Reverses the direction of a curve.
1. Click on Tools and from the drop-down menu, click on Reverse
Curve

• Polyline Equal Arc


Divides a polyline into equal arcs.
1. Click on Tools on the Menu bar, from the drop-down menu,
click on Polyline Equal Arc
2. In the dialog box titled:PLC Equal Arc: Specify Number of
Points(Put in the number of equal arc you want to be created on
the polyline).

• Summary
Provides information of the geometry created in the workspace such as
the number of - entities, points, plcs, and polygons.
62 APPENDIX A. CFDTUTOR, MENU BAR AND TOOL BAR

1. Click on Tools and from the drop-down menu, click on Sum-


mary.
2. Click Next to read the entity details.
3. Click Close to close the window.

A.1.5 Display
• Default View
Shows the default view. It is used in conjunction with Zoom Out,
Zoom In, Zoom to Window or Pan.
1. Click on Display and from the drop-down menu, click on Default
View.

• Boundary Points
Displays the boundary points of an entity in the workspace.
1. Click on Display and from the drop-down menu, click on Bound-
ary Points.

• All Points
Displays all the points on an entity in the workspace.
1. Click on Display and from the drop-down menu, click on All
Points.

• Direction of Curve ON/OFF


Displays the direction of a curve.
Note: Curves for both the domain and the entity/entities within the
domain must follow the same direction. This is very important for grid
generation. If, for example, you create a square domain curve starting
from the left to right in the workspace, then you must necessarily create
the entity curve also starting from the left to right within that domain.
1. Click on Display and from the drop-down menu, click on Direc-
tion of Curve ON/OFF.
2. Repeat the above step to turn the direction of the curve off.
A.1. THE MENU BAR 63

A.1.6 Grid
• 2D Unstructured
Generates a two dimensional (2D) unstructured grid for an entity by
selecting the Delaunay Triangulation by either length or area

1. Click on Grid and from the drop-down menu, click on 2D Un-


structured.
2. Select Delaunay Triangulation by either Area or Length and
click OK.

• Smoothen a Grid
Smoothens a grid.

1. Click on Grid and from the drop-down menu, click on Smoothen


a Grid.

A.1.7 Boundary Type


• Define As Inflow
Defines a boundary edge as inflow.

1. Click on Display and from the drop-down menu, click on Bound-


ary Points.
2. Click on Pick a Point from the Tool bar.
3. Pick the 1st, Next and Last points of the edge selected as
inflow.
4. Click on Boundary Type from the drop-down menu, click on
Define as Inflow.

Note : To view if the selected edge has been defined as Inflow, click
on Boundary Type from the drop-down menu, click on Show Inlet.
The edge will be highlighted.

• Define As Outflow
Defines a boundary edge as outflow.
64 APPENDIX A. CFDTUTOR, MENU BAR AND TOOL BAR

1. Click on Pick a Point from the Tool bar.


2. Pick the 1st, Next and Last points on the edge selected as
outflow.
3. Click on Boundary Type and from the drop-down menu, click
on Define as Outflow.

Note : To view if the selected edge has been defined as Outflow, click on
Boundary Type from the drop-down menu, click on Show Outlet.
The edge will be highlighted.

• Show Inlet
Highlights the selected edge defined as Inflow,

1. Click on Boundary Type from the drop-down menu, click on


Show Inlet.

• Show Outlet
Highlights the selected edge defined as Outflow,

1. Click on Boundary Type from the drop-down menu, click on


Show Outlet.

• Reset Inlet-Outlet
Resets the edges defined as inlet and outlet.

1. Click on Boundary Type from the drop-down menu, click on


Reset Inlet- Outlet.

A.1.8 Analysis
• Solver Controls
Displays the Solver controls and their options.

1. Click on Analysis and from the drop-down menu, click on Solver


Controls. In the pop-up window, the three solver controls and
their options are displayed as follows :
A.1. THE MENU BAR 65

Flow Model : Compressible


Fluid Model: Inviscid / Viscid
Flow Scheme: Van leer 1st Order / Steger Warming

2. Default value for CFL is set to 0.9.


3. Select one option for each solver control and click OK

• Flow Condition
Displays the default values for Boundary Conditions and Initial Con-
ditions.

1. Click on Analysis and from the drop-down menu, click on Flow


Conditions.
2. A pop-up window with default values are provided for Boundary
Conditions, Initial Conditions, and *Convergence Crite-
ria. Change values, if required and click OK.

*Note: You can specify the Number of Iterations for the simulation
to converge, as well as the Display at Iteration.

• Run Solver
Triggers the solver and begins the simulation process.

1. Click on Analysis and from the drop-down menu, click on Run


Solver.

On completion of the total number of iteration specified, a pop-up


window enquires if you want to save the solution file. Click on Yes to
save and enter a file name. If no, then select Cancel.

A.1.9 Visualization
• Read Solution File
Reads the solution file of a saved saved solution.

1. Click on Visualization and from the drop-down menu, click on


Read Solution File.
66 APPENDIX A. CFDTUTOR, MENU BAR AND TOOL BAR

2. From the pop-up window, select the name of the saved file and
click OK.

• Clear Display
Displays a clear visualization of the entity.

1. Click on Visualization and from the drop-down menu, click on


Clear Display.

• Velocity Vector
Displays the Velocity vector plot of a saved solution.

1. Click on Analysis and from the drop-down menu, click on Ve-


locity Vector.

• Pressure Plot
Displays the Pressure colour plot of a saved solution.

1. Click on Visualization and from the drop-down menu, click on


Pressure Plot.

• Velocity X Plot
Displays the Velocity X colour plot of a saved solution.

1. Click on Visualization and from the drop-down menu, click on


Velocity X Plot.

• Velocity Y Plot
Displays the Velocity Y colour plot of a saved solution.

1. Click on Visualization and from the drop-down menu, click on


Velocity Y Plot.

30*sin(u)

• Mach
Displays the Mach distribution colour plot of a saved solution.
A.2. TOOL BAR 67

1. Click on Visualization and from the drop-down menu, click on


Mach.

• Temperature Plot
Displays the Temperature colour plot of a saved solution.

1. Click on Visualization and from the drop-down menu, click on


Temperature Plot.

A.1.10 Help
• About CFDTutor
Provides information about CFDTutor.

• Generate Host ID
Generates a Host ID on keying in a User-name and the name of the
Institute. Send these details to the CFDTutor.

• Manual Opens the CFDTutor Manual

A.2 Tool bar


• Open File
Open File opens a saved geometry file or grid file.
Note : It does not open a saved solution file.

1. Click on Open File


2. From the pop-up window, select the directory, select the file and
click Open.

Note: If you want to open a completed iteration file or a Saved So-


lution File, click on the Read Solution File command from the
Visualization menu on the Menu bar. Select the file you want to
view and click on Open.
68 APPENDIX A. CFDTUTOR, MENU BAR AND TOOL BAR

• Save File
Saves geometry files and grid files. It save an incomplete file up to the
geometry or grid stage.

1. Click on Save File.


2. In the pop-up window titled Save As, select the directory, input
a file name and click Save.

• Zoom in
Magnifies the view by zooming in on an object in the workspace.

1. Click on Zoom In to magnify the view of the geometry created


in the workspace.

• Zoom Out
Reduces the view by zooming out on an object in the workspace.

1. Click on Zoom Out to reduce the view of the geometry created


in the workspace.

• Zoom to Window
Magnifies a selected portion in the workspace.

1. Click on Zoom to Window


2. Left click and drag your mouse to draw a window around the
section you want to magnify. To stop, release left mouse button.
3. To reset the default view, click on Reset Default View.

• Move Pan
Moves or Pans the mouse across the workspace.

1. Click on Move Pan.


2. Move across the screen, click and hold left mouse button, move
geometry with the mouse to view the desired section and release
mouse button.
A.2. TOOL BAR 69

3. Repeat step 2 as many times as you like.


4. To stop panning and pick a point, select Pick a Point from the
Tool bar.
5. To quit Pan and revert to the default view, click on Reset De-
fault View.

• Reset Default View


Resets the default view of the workspace.

1. Click on Reset Default View.

• Pick a Point
Selects or picks point/s.

1. Click on Pick a Point.


2. Place the pointer over the desired point to be picked and left click
mouse.
3. Repeat steps 1 and 2 as many times as required.
4. The Pick a Point option remains active until another tool has
been picked from the Tool bar.

Picking points one after another in sequence, in the same direction to


follow a curve, can change the direction of the curve. Picking points to
follow a sequence, will ensure that the direction of the curve is main-
tained. Select the Direction of Curve ON / OFF from the Display
on the Menu bar to check if a curve follows the required direction.
Pick a Point is usually used to define edges for inflow and outflow.
Pick the 1st, Next and Last points along the edge to be defined
as Inflow. Repeat the same along the edge to be defined as Outflow.
These three points must be picked along the same line on same edge.
If you pick points from bottom to top along one edge, repeat the same
bottom to top direction to define any other edges.

• Select an Entity
Selects an entity in the workspace.
70 APPENDIX A. CFDTUTOR, MENU BAR AND TOOL BAR

1. Click on Select an Entity

2. Place pointer over the desired entity to be selected and left click
mouse.

• Deselect an Entity
Deselects an entity or entities.

1. Click on Deselect an Entity.


2. Place pointer over the desired entity to be selected and left click
mouse.

• Delete Selected
Deletes selected entity or entities.
Deselect all the geometry and select only the geometry you wish to
delete.You can use this option If you have created two or more entities
and would like to delete one or more of these entities except the most
recently created one.

1. Click on Deselect an Entity. .


2. Click on the entity or entities to be deselected.
3. Next, click on Delete Selected, the entity/ entities not deselected
will be deleted.

• Delete All
This option clears and refreshes the screen.

1. Click on Delete All.

• Show All Points


Shows all the grid points on an entity.

1. Click on Show All Points

• Show Boundary Points


Shows only the boundary points on an entity,
A.2. TOOL BAR 71

1. Click on Show Boundary Points.

Note: If there is more than one entity, then Select an Entity from
the Tool bar and click on the desired entity and follow the above-
mentioned step 1.
72 APPENDIX A. CFDTUTOR, MENU BAR AND TOOL BAR
Appendix B

Tutorial - Forward Facing Step

In this tutorial, you will learn to use CFDTutorTM to simulate a flow through a
Forward Facing Step. This problem is normally solved using a compressible
flow model for supersonic speeds. The shape and standoff distance of the
shock is of interest in this problem.
The 6 steps involved are as follows:

1. Define Geometry

2. Define Grid

3. Define Boundary Edges

4. Select Solver Controls

5. Define Flow Conditions and Specify Convergence Criteria

6. Run Solver

7. View Solution

To begin this tutorial, you must first open CFDTutor in the Interactive
mode. Click on the word Quit, located at the bottom of the Wizard panel
as shown in figure B.1.

B.1 Define Geometry


To create the geometry for a Forward Facing Step, you have to:

73
74 APPENDIX B. TUTORIAL - FORWARD FACING STEP

Figure B.1: Select ‘Quit’ to enter Interactive

1. Create Points.

2. Connect Points.

3. Close Curve.

B.1.1 To Create Points


1. Click on Create in the Menu bar.

2. From the drop-down menu, click on Point from Coordinates as


shown in figure B.2.

3. In the dialog box titled:Coordinates of Point, insert values(x = -


75 and y = 50) for the first point as shown in figure B.3.

4. Click on OK in the dialog box.

Having created the 1st point, repeat steps 1-4 five times to create the
next 5 points for a Forward Facing Step. Insert the following coordinates:
B.1. DEFINE GEOMETRY 75

Figure B.2: Point from Coordinates

Figure B.3: Coordinates for the 1st point

2nd point x = 75 : y = 50
3rd point x = 75 : y = 5
4th point x = - 45 : y = 5
5th point x = - 45 : y = 0
6th point x = - 75 : y= - 0

The geometry created should appear as shown in figure B.4.

B.1.2 To Connect Points


1. Click on Create in the Menu bar.

Figure B.4: Points for Forward Facing Step


76 APPENDIX B. TUTORIAL - FORWARD FACING STEP

Figure B.5: Polyline from Points

Figure B.6: Points connected by Polyline

2. From the drop-down menu, click on Polyline from Points as shown


in figure B.5.

The connected points should appear as a polyline as shown in figure B.6.

B.1.3 To Close Curve


1. Click on Edit in the Menu bar.

2. From the drop-down menu, click on Open / Close Curve as shown


in figure B.7.

The closed curve figure should appear as shown in figure B.8.

B.2 Define Grid


To define a grid for the Forward Facing Step, you have to:
1. Divide Polyline into Equal Arcs and Display Geometry.

2. Define Type of Grid.


B.2. DEFINE GRID 77

Figure B.7: Close Curve

Figure B.8: Curve Closed


78 APPENDIX B. TUTORIAL - FORWARD FACING STEP

Figure B.9: Polyline Equal Arc

3. Select Delaunay Triangulation by Length or Area.

B.2.1 To Divide Polyline into Equal Arcs and Display


Geometry
1. Click on Tools in the Menu bar.

2. From the drop-down menu, click on Polyline Equal Arc as shown in


figure B.9.

3. Specify Number of Points in the pop-up window as 150.

B.2.2 To Define Type of Grid


1. Click on Grid in the Menu bar.

2. From the drop-down menu, click on 2D Unstructured as shown in


figure B.10.

B.2.3 To Select Delaunay Triangulation by Length or


Area
1. In the dialog box titled:Delaunay Triangulation, select Length and
click on Preview.
B.3. BOUNDARY TYPE 79

Figure B.10: Grid - 2D Unstructured

Figure B.11: Delaunay Triangulation by Area

2. In the same dialog box, select Area and click on Preview.

3. Select Area and click on OK in the dialog box.

See figure B.11.

B.3 Boundary Type


1. Define as Inflow.

2. Define as Outflow.

B.3.1 To Define Inflow Edge


To define a boundary edge as inflow or outflow, you must be able to see and
pick the boundary points along an edge.

1. Click on Show Boundary Points icon in the Tool bar see figure B.12.
This will display only the boundary points.

2. Next, click on Pick an Entity icon in the Tool bar see figure B.13.
This will enable you to pick points to define the inflow and outflow
edges.
80 APPENDIX B. TUTORIAL - FORWARD FACING STEP

Figure B.12: Select icon from Tool bar

Figure B.13: Select icon from Tool bar

3. Pick the 1st, Next and Last points as shown in figure B.14 on the
left-hand vertical edge of the Forward Facing Step, (i.e) the edge to be
defined as Inflow.
Important : These three points must be picked along the same line
on same edge. Do not pick a corner point that maybe common to two
edges.

4. Click on Boundary Type in theMenu bar and from the drop-down


menu, click on Define as Inflow as shown in figure B.15.

To check if the edge is defined as inflow:

1. Click on Boundary Type in the Menu bar and from the drop-down
menu, click on Show Inlet as shown in figure B.16.

2. The image should appear as shown in figure B.17.

Figure B.14: Pick Points for the Inflow Edge


B.3. BOUNDARY TYPE 81

Figure B.15: Define as Inflow

Figure B.16: Show Inlet

Figure B.17: Inlet Edge is highlighted in red


82 APPENDIX B. TUTORIAL - FORWARD FACING STEP

Figure B.18: Icon from Tool bar

Figure B.19: Icon from Tool bar

B.3.2 To Define Outflow Edge


1. Click on Show Boundary Points icon in the Tool bar see figure B.18.
This will display only the boundary points.

2. Next, click on Pick an Entity icon in the Tool bar see figure B.19.
This will enable you to pick points to define the outflow edge.

3. Next, pick the 1st, Next and Last points as shown in figure B.20 on
the right-hand vertical edge of the Forward Facing Step, (i.e) the edge
to be defined as Outflow.

4. Click on Boundary Type in the Menu bar and from the drop-down
menu, click on Define as Outflow as shown in figure B.21.

5. To check if the edge is defined as outflow, click on Boundary Type in


the Menu bar and from the drop-down menu, click on Show Outlet
as shown in figure B.22.

6. The image should appear as shown in figure B.23.

Figure B.20: Pick Points for Outflow Edge


B.3. BOUNDARY TYPE 83

Figure B.21: Define as Outflow

Figure B.22: Show Outlet

Figure B.23: Outlet Edge is highlighted in blue


84 APPENDIX B. TUTORIAL - FORWARD FACING STEP

Figure B.24: Select Solver Controls

Figure B.25: Select one option from each control

B.4 Select Solver Controls


1. Select Solver Control

B.4.1 To Select Solver Controls


To Select the Solver Controls, follow these steps:

1. Click on Analysis in the Menu bar. See figure as shown in figure B.24.

2. From the drop-down menu, click on Solver Controls.

3. In the dialog box titled: Solver Controls- select the following options
as shown in figure B.25 and click on OK.
B.5. DEFINE FLOW CONDITIONS AND SPECIFY CONVERGENCE CRITERIA85

Figure B.26: Select Flow Condition

B.5 Define Flow Conditions and Specify Con-


vergence Criteria
1. Flow Conditions - Boundary Conditions and Initial Conditions

B.5.1 Flow Conditions - Boundary Conditions and Ini-


tial Conditions
1. Click on Analysis in the Menu bar.

2. From the drop-down menu, click on Flow Conditions as shown in


figure B.26.

3. In the dialog box titled: Flow Conditions- default values are provided
for Boundary Condition Initial Condition, and *Convergence
Criteria. Click on OK - as shown in figure B.27.

*You can specify the Total Number of Iterations and also the Display at
Iteration.

B.6 Run Solver and Monitor Simulation


1. Run Solver

2. Monitor Simulation

3. Save Solution File


86 APPENDIX B. TUTORIAL - FORWARD FACING STEP

Figure B.27: Check the values and click OK


B.7. VIEW SOLUTION 87

Figure B.28: Trigger the Solver

B.6.1 Run Solver


1. Click on Analysis in the Menu bar.

2. From the drop-down menu, click on Run Solver as shown in fig-


ure B.28.

B.6.2 Monitor Simulation


There is a list of visuals you can choose from to monitor the simulation while
the solver is in process. For example, in the Interactive monitoring panel,
(located to the left of the work area) click on Pressure and view the Pressure
plot flow simulation.

B.6.3 Save Solution File


On completion of the iteration process, you must save the solution file as a
.cgns file.

1. In the pop-up window, enter the File Name as Forward Facing Step
and click on Save.

B.7 View Solution


1. Read Solution File

2. Visual Options

3. Close File
88 APPENDIX B. TUTORIAL - FORWARD FACING STEP

Figure B.29: Read Solution File

B.7.1 Read Solution File


1. Click on Visualization in the Menu bar.

2. From the drop-down menu, click on Read Solution File as shown in


figure B.29.

3. From the pop-up box, go to the CGNS file directory, select file - For-
ward Facing Step and Click on Open.

B.7.2 Visual Options


Velocity Vector

1. Click on Visualization in the Menu bar.

2. From the drop-down menu, Select and click on Velocity Vector as


shown in figure B.30.

The effect of step on the direction of flow can be viewed from velocity
vector. Also, the color of the arrows show the value of the total velocity at
each cell as shown in figure B.31.

Pressure

1. Click on Visualization in the Menu bar.


B.7. VIEW SOLUTION 89

Figure B.30: Select Velocity Vector

Figure B.31: Velocity Vector Plot

2. From the drop-down menu, Select and click on Pressure as shown in


figure B.32.

As expected we find high pressure just before the step. This is because
the flow has stagnated in that region as shown in figure B.33.

Velocity X

Figure B.32: Select Pressure Plot


90 APPENDIX B. TUTORIAL - FORWARD FACING STEP

Figure B.33: Pressure Plot

Figure B.34: Select Velocity X Plot

1. Click on Visualization in the Menu bar.


2. From the drop-down menu, Select and click on Velocity X as shown
in figure B.34.

Since the step is an obstruction in the flow, the flow tends to stagnate
just in front of the step. This stagnation or minimum value of velocity X is
shown by blue color in the plot as shown in figure B.35.

Velocity Y

1. Click on Visualization in the Menu bar.

Figure B.35: Velocity X Plot


B.7. VIEW SOLUTION 91

Figure B.36: Select Velocity Y Plot

Figure B.37: Velocity Y Plot

2. From the drop-down menu, Select and click on Velocity Y as shown


in figure B.36.

The red spot in the plot signifies the region where velocity in Y direction
is maximum. In order to satisfy the mass balance, the flow moves upward in
the region near the step as shown in figure B.37.

Mach

1. Click on Visualization in the Menu bar.

2. From the drop-down menu, Select and click on Mach as shown in


figure B.38.

At such high values, Mach number is an important parameter to look for.


Here, the red colour shows the maximum value and blue colour shows the
minimum as shown in figure B.39.
Temperature
92 APPENDIX B. TUTORIAL - FORWARD FACING STEP

Figure B.38: Select Mach

Figure B.39: Mach no. distribution

1. Click on Visualization in the Menu bar.

2. From the drop-down menu, Select and click on Temperature as shown


in figure B.40.

In the Temperature plot, since, there is no external heat transfer, the


temperature distribution is a result of compressible fluid dynamics as shown
in figure B.41.

Figure B.40: Select Temperature Plot


B.7. VIEW SOLUTION 93

Figure B.41: Temperature Plot

B.7.3 Close File


1. Click on File in the Menu bar.

2. From the drop-down menu, click on Exit.

END OF TUTORIAL
94 APPENDIX B. TUTORIAL - FORWARD FACING STEP
Appendix C

Tutorial - Flow Past a Cylinder

In this tutorial, you will learn to simulate a flow past a cylinder. This is a
very special problem as interesting results not usually seen by students are
obtained. In this simulation it is easy to ’see’ the separation of the flow.
The steps involved are as follows:

1. Define Geometry

2. Define Grid

3. Define Boundary Edges

4. Select Solver Controls

5. Define Flow Conditions and Specify Convergence Criteria

6. Run Solver

7. View Solution

C.1 Define Geometry


To Define the Geometry for the Cylinder,

1. Create the Cylinder

2. Create a Domain for the flow past the Cylinder.

95
96 APPENDIX C. TUTORIAL - FLOW PAST A CYLINDER

Figure C.1: Select - Polyline from Expression

C.1.1 To Create the Cylinder


1. Click on Create in the Menu bar.

2. From the drop-down menu, click on Polyline from Expression as


shown in figure C.1 .

3. In the dialog box titled:Create Polyline, insert values as listed below.

No. of Points : 20
U min : 0
U max : 2*pi
Expression for x : 5*sin(u)
Expression for y : 5*cos(u)

4. Click on OK in the dialog box. See figure C.2.

The geometry will appear as shown in figure C.3

To Close Curve
1. Click on Edit in the Menu bar.

2. From the drop-down menu, click on Open / Close Curve as shown


in figure C.4.

The closed curve figure should appear as shown in figure C.5.


C.1. DEFINE GEOMETRY 97

Figure C.2: Values for creating a Cylinder

Figure C.3: Cylinder created

Figure C.4: Close Curve


98 APPENDIX C. TUTORIAL - FLOW PAST A CYLINDER

Figure C.5: Curve Closed

Figure C.6: Point from Coordinates

C.1.2 To Create the Domain


1. Click on Create in the Menu bar.

2. From the drop-down menu, click on Point from Coordinates as


shown in figure C.6.

3. In the dialog box titled:Coordinates of the Point, insert values(x


= - 50 and y = 50) for the first point as shown in figure C.7.

4. Click on OK in the dialog box.

Having created the 1st point, repeat steps 1-4 three times to create the
next 3 points to create the domain. Insert the following coordinates:

2nd point : X = 50, Y = 50


C.1. DEFINE GEOMETRY 99

Figure C.7: Coordinates of the 1st Point

Figure C.8: Points for the Domain

3rd point : X = 50, Y = -50


4th point : X = -50, Y = -50

See figure C.8 - the direction of the curve indicated by the numbering of
the points.

To Connect Points
1. Click on Create in the Menu bar.

2. From the drop-down menu, click on Polyline from Points as shown


in figure C.9.

The connected points should appear as a polyline as shown in figure C.10.

To Close Curve
1. Click on Edit in the Menu bar.
100 APPENDIX C. TUTORIAL - FLOW PAST A CYLINDER

Figure C.9: Polyline

Figure C.10: Domain Points connected by Polyline


C.1. DEFINE GEOMETRY 101

Figure C.11: Close Curve

Figure C.12: Curve Closed

2. From the drop-down menu, click on Open / Close Curve as shown


in figure C.11.

The closed curve figure should appear as shown in figure C.12.

Divide Polyline into Equal Arcs


1. Click on Tools in the Menu bar.

2. From the drop-down menu, click on Polyline Equal Arc as shown in


figure C.13.

3. In the dialog box titled:PLC Equal Arc : Specify Number of Points


as 150 as shown in figure C.14 .
102 APPENDIX C. TUTORIAL - FLOW PAST A CYLINDER

Figure C.13: Polyline Equal Arc

Figure C.14: Points specified


C.2. DEFINE GRID 103

Figure C.15: Grid - 2D Unstructured

Figure C.16: Select Length

C.2 Define Grid


To define a grid for the Cylinder, you have to:

1. Define a Type of Grid.

2. Select Delaunay Triangulation by Length or Area.

C.2.1 To Define Type of Grid


1. Click on Grid in the Menu bar.

2. From the drop-down menu, click on 2D Unstructured as shown in


figure C.15.

To Select Delaunay Triangulation by Length or Area


1. In the dialog box titled:Delaunay Triangulation, select Length and
click on OK. See figure C.16

The meshed geometry will appear as shown in figure C.17


104 APPENDIX C. TUTORIAL - FLOW PAST A CYLINDER

Figure C.17: Unstructured grid generated

C.3 Boundary Type


1. Define as Inflow.

2. Define as Outflow.

To define a boundary type edge as inflow or outflow, you have to pick the
boundary points along an edge. You must begin by displaying the boundary
points. This will enable you to pick points along the edges to be defined as
Inflow and Outflow. To define an edge, three points are picked along that
edge in the order of 1st, Next and Last points along the edge. After the
points are picked, you can go ahead and define that edge as either inflow or
outflow. Always define one edge at a time.

C.3.1 To Define Inflow Edge


To define the Inflow edge, follow the instructions listed below.

1. Click on Show Boundary Points icon in the Tool bar see figure C.18.
This will display only the boundary points.
Boundary points are highlighted as shown in figure C.19.

2. Next, click on Pick an Entity icon in the Tool bar see figure C.20.
This will enable you to pick points to define the inflow and outflow
edges.
C.3. BOUNDARY TYPE 105

Figure C.18: Select icon from Tool bar

Figure C.19: Boundary points displayed

Figure C.20: Select icon from Tool bar


106 APPENDIX C. TUTORIAL - FLOW PAST A CYLINDER

Figure C.21: Pick Points for the Inflow Edge

Figure C.22: Define as Inflow

3. Pick the 1st, Next and Last points as shown in figure C.21 on the
left-hand vertical edge of the domain, (i.e) the edge to be defined as
Inflow.
Important : These three points must be picked along the same line
on same edge. Do not pick a corner point that maybe common to two
edges.

4. Click on Boundary Type in theMenu bar and from the drop-down


menu, click on Define as Inflow as shown in figure C.22.

To check if the edge is defined as inflow:

1. Click on Boundary Type in the Menu bar and from the drop-down
menu, click on Show Inlet as shown in figure C.23.

2. The image should appear as shown in figure C.24.


C.3. BOUNDARY TYPE 107

Figure C.23: Show Inlet

Figure C.24: Inlet Edge is highlighted in red

C.3.2 To Define Outflow Edge


1. Click on Show Boundary Points icon in the Tool bar see figure C.25.
This will display only the boundary points.

2. Next, click on Pick an Entity icon in the Tool bar see figure C.26.
This will enable you to pick points to define the outflow edge.

3. Next, pick the 1st, Next and Last points as shown in figure C.27 on
the right-hand vertical edge of the domain, (i.e) the edge to be defined
as Outflow.

Figure C.25: Icon from Tool bar


108 APPENDIX C. TUTORIAL - FLOW PAST A CYLINDER

Figure C.26: Icon from Tool bar

Figure C.27: Pick Points for Outflow Edge

4. Click on Boundary Type in the Menu bar and from the drop-down
menu, click on Define as Outflow as shown in figure C.28.

5. To check if the edge is defined as outflow, click on Boundary Type in


the Menu bar and from the drop-down menu, click on Show Outlet
as shown in figure C.29.

6. The image should appear as shown in figure C.30.

Figure C.28: Define as Outflow


C.4. SELECT SOLVER CONTROLS 109

Figure C.29: Show Outlet

Figure C.30: Outlet Edge is highlighted in blue

C.4 Select Solver Controls


1. Select Solver Control

C.4.1 To Select Solver Controls


To Select the Solver Controls, follow these steps:

1. Click on Analysis in the Menu bar. See figure as shown in figure C.31.

2. From the drop-down menu, click on Solver Controls.

Figure C.31: Select Solver Controls


110 APPENDIX C. TUTORIAL - FLOW PAST A CYLINDER

Figure C.32: Select one option from each control

3. In the dialog box titled: Solver Controls- select the following options
as shown in figure C.32 and click on OK.

C.5 Define Flow Conditions and Specify Con-


vergence Criteria
1. Flow Conditions - Boundary Conditions and Initial Conditions

C.5.1 Flow Conditions - Boundary Conditions and Ini-


tial Conditions
1. Click on Analysis in the Menu bar.

2. From the drop-down menu, click on Flow Conditions as shown in


figure C.33.

3. In the dialog box titled: Flow Conditions- default values are provided
for Boundary Condition, Initial Condition, and *Convergence Criteria.
Click on OK - as shown in figure C.34.
C.6. RUN SOLVER AND MONITOR SIMULATION 111

Figure C.33: Select Flow Condition

*You can specify the Total Number of Iterations and also the Display at
Iteration.

C.6 Run Solver and Monitor Simulation


1. Run Solver
2. Monitor Simulation
3. Save Solution File

C.6.1 Run Solver


1. Click on Analysis in the Menu bar.
2. From the drop-down menu, click on Run Solver as shown in fig-
ure C.35.

C.6.2 Monitor Simulation


There is a list of visuals you can choose from to monitor the simulation while
the solver is in process. For example, in the Interactive monitoring panel,
(located to the left of the work area) click on Pressure and view the Pressure
plot flow simulation.

C.6.3 Save Solution File


On completion of the iteration process, you must save the solution file as a
.cgns file.
1. In the pop-up window, enter the File Name as Cylinder and click on
Save.
112 APPENDIX C. TUTORIAL - FLOW PAST A CYLINDER

Figure C.34: Check the values and click OK

Figure C.35: Trigger the Solver


C.7. VIEW SOLUTION 113

Figure C.36: Read Solution File

C.7 View Solution


1. Read Solution File

2. Visual Options

3. Close File

C.7.1 Read Solution File


1. Click on Visualization in the Menu bar.

2. From the drop-down menu, click on Read Solution File as shown in


figure C.36.

3. From the pop-up box, go to the CGNS file directory, select file - Cylin-
der and Click on Open.

C.7.2 Visual Options


Velocity Vector

1. Click on Visualization in the Menu bar.

2. From the drop-down menu, Select and click on Velocity Vector as


shown in figure C.37.
114 APPENDIX C. TUTORIAL - FLOW PAST A CYLINDER

Figure C.37: Select Velocity Vector

Figure C.38: Velocity Vector Plot


C.7. VIEW SOLUTION 115

Figure C.39: Select Pressure

Figure C.40: Pressure Plot

The effect of the cylinder on the direction of flow can be viewed from
velocity vector. Also, the color of the arrows show the value of the total
velocity at each cell as shown in figure C.38.

Pressure

1. Click on Visualization in the Menu bar.

2. From the drop-down menu, Select and click on Pressure as shown in


figure C.39.

As expected we find high pressure just before the cylinder. This is be-
cause the flow has stagnated in that region as shown in figure C.40.
116 APPENDIX C. TUTORIAL - FLOW PAST A CYLINDER

Figure C.41: Select Velocity X Plot

Figure C.42: Velocity X Plot

Velocity X

1. Click on Visualization in the Menu bar.

2. From the drop-down menu, Select and click on Velocity X as shown


in figure C.41.

Since the cylinder is an obstruction in the flow, the flow tends to stagnate
just in front of the it. This stagnation or minimum value of velocity X is
shown by blue color in the plot as shown in figure C.42.

Velocity Y

1. Click on Visualization in the Menu bar.


C.7. VIEW SOLUTION 117

Figure C.43: Select Velocity Y Plot

Figure C.44: Velocity Y Plot

2. From the drop-down menu, Select and click on Velocity Y as shown


in figure C.43.

The red spot in the plot signifies the region where velocity in Y direction
is maximum. In order to satisfy the mass balance, the flow moves upward in
the region near away from the cylinder as shown in figure C.44.

Mach

1. Click on Visualization in the Menu bar.

2. From the drop-down menu, Select and click on Mach as shown in


figure C.45.

At such high values, Mach number is an important parameter to look for.


Here, the red colour shows the maximum value and blue colour shows the
118 APPENDIX C. TUTORIAL - FLOW PAST A CYLINDER

Figure C.45: Select Mach

Figure C.46: Mach no. distribution


C.7. VIEW SOLUTION 119

Figure C.47: Select Temperature Plot

Figure C.48: Temperature Plot

minimum value as shown in figure C.46.

Temperature

1. Click on Visualization in the Menu bar.

2. From the drop-down menu, Select and click on Temperature as shown


in figure C.47.

In the Temperature plot, since, there is no external heat transfer, the


temperature distribution is a result of compressible fluid dynamics as shown
in figure C.48.

C.7.3 Close File


1. Click on File in the Menu bar.
120 APPENDIX C. TUTORIAL - FLOW PAST A CYLINDER

2. From the drop-down menu, click on Exit.

END OF TUTORIAL
Appendix D

Exercises in CFDTutor

D.1 Exercise - Flow Past a Car


D.1.1 Aim
To analyze air flow over a car using CFDTutorTM .

D.1.2 Problem Description


Flow past a car is a complex problem. The domain in wizard simulates a
car kept in a wind tunnel. It is assumed that the car is moving at 30 m/s.
Such an exercise is usually done to calculate the drag and lift coefficient of
the car. Since, it is comparatively low speed flow, it is appropriate to model
the physics as a viscous flow.

D.1.3 Using CFDTutorTM


Select the ‘Viscous’ flow model with either of the flow schemes. Keep the
default CFL = 0.9. Change the Inlet Mach number to 0.1, to obtain velocity
value near 30 m/s. Also, set the initial Velocity X = 30 m/s.

D.1.4 Interpretation of Results


Some important observations :

121
122 APPENDIX D. EXERCISES IN CFDTUTOR

1. A boundary layer can be seen on the top and lower walls of the bound-
ary. Hence, grids were made very fine near the solid surfaces in order
to capture the correct boundary layer.

2. Value of velocity near the solid surface is close to zero.

3. A boundary layer envelops the whole car.

4. Observe a wake behind the car. The lower range of X-velocity shows a
negative value, which points toward a wake behind the car.

5. It takes more time to run viscous problem since extra calculations are
required to be done for the calculation of stresses.
D.2. EXERCISE - FLOW OVER A FORWARD FACING STEP 123

D.2 Exercise - Flow Over a Forward Facing


Step
D.2.1 Aim
In this exercise, we shall investigate supersonic flow over a forward-facing
step.

D.2.2 Problem Description


This is a standard test case for high-resolution scheme. However, lower order
methods usually work well. The geometry is 1 unit wide and 3 units long.
The step is 0.2 units high and is located 0.6 units from the left hand end of
the tunnel.

D.2.3 Using CFDTutorTM


Select the Default Geometry. Make fine quality grids on it. Select Flow
Model as ‘Inviscid’. Any of the two inlet boundary types can be selected.

• Inlet Mach 3.0

• Pressure 101300 Pa

• Density = 1.125 Kg/m3

• Angle of Attack = 0.

• Outlet Pressure is 101300 Pa

Initial Conditions are :

• Vel X = 1000 m/s

• Vel Y = 0 m/s

• Pressure = 101300 Pa

• Density = 1.125 Kg/m3

Run for 5000 iterations to obtain a steady state.


124 APPENDIX D. EXERCISES IN CFDTUTOR

D.2.4 Interpretation of Results


1. Observe that the Mach number distribution (due to reflection at the
walls), give rise to a Lambda Shock.

2. Compare the standoff distance (place from where the shock originates).
The standoff distance should be of the same order of that of step.

3. Results from CFDTutorTM can be compared with the figure shown below.

Figure D.1: Standard Result: Pressure Plot


D.3. EXERCISE - FLOW THROUGH A DIFFUSER 125

D.3 Exercise - Flow through a Diffuser


D.3.1 Aim
Diffuser is a very interesting problem to study. There are two cases to study, a
subsonic case and a supersonic case. We’ll note how the boundary conditions
get implemented in all the cases. Also, observe the rate of convergence of
the solution.

D.3.2 Setting up the problem in CFDTutorTM - Subsonic


Case
Change the geometry a bit from the default values: Length = 100, Width =
20, and Angle = 5o . That gives us A1 = 20, and A2 = 37.48. i.e. A1 /A2 =
0.534. Now let say, we want Mach = 0.3 at the Inlet. From the Isentropic
Flow Properties Table: Po /P1 = 1.064 and A1 /A∗ = 2.035. Here Po is Total
Pressure and P is static pressure, A denotes Area and A∗ is the critical Area.
So, A2 /A∗ becomes 3.81. From the tables, Mach number at Outlet is 0.15 and
Po /P2 = 1.016. which implies, P1 /P2 = 0.955. Remember the flow is subsonic
at the exit and hence the static pressure given in CFDTutorTM Wizard is held
fixed at the outlet and therefore P1 = 96741.5.
Create the geometry for the Diffuser and input the following Boundary
Condition values:

• Inlet Mach = 0.3

• Pressure Inlet = 96741.5 Pa

• Density and Angle of Attack remain unchanged.

• Outlet Pressure = 101300 Pa

• Initial Velocity = 100 m/s.

• Next, ‘Run Solver’ for 20000 iterations on ‘Fine’ grid.

Results
1. Note that the solution matches exactly with literature.
126 APPENDIX D. EXERCISES IN CFDTUTOR

2. Compare the Outlet Mach no. = 0.15 and the Mach and Pressure
distribution in the domain, notice how pressure wave move to and fro
several times before settling down. This is a typical characteristic of a
Subsonic Flow.

3. Also, the Convergence will be very slow. Compare this convergence


rate with Supersonic case discussed in next section.

D.3.3 Setting up the problem in CFDTutorTM - Super-


sonic Case
For the Supersonic case, change the geometry: Length = 150, Width = 50,
Angle = 10o . This gives A1 = 50, A2 = 102.90, and A2 /A1 = 2.06. Look at
the table, and you will realize that we can’t have exit Mach number less than
2.23 which corresponds to the A2 /A∗ = 2.06. Therefore, lets take the Exit
Mach to be 2.25 (a bit higher value than 2.23). A2 /A∗ = 2.096 =¿ A1 /A∗ =
1.01846. =¿ M1 = 1.15 at inlet.
Create the geometry for the Diffuser and input the following Boundary
Condition values :

• Inlet Mach = 1.15.

• Pressure Inlet = 101300.0 Pa

• Density and Angle remain unchanged

• Outlet Pressure = 101300. Pa

• Initial Velocity X is 400m/s.

Notes on Boundary Conditions

Since the flow is Supersonic at the Outlet, changing any value of the Outlet
Pressure does not make any effect in the flow. In fact, Inlet values decide the
value of the Mach number. Flow at Inlet is supersonic, which means that
the Pressure Specified at the Inlet will be held constant. Po /P1 = 2.27 and
Po /P2 = 11.56 =¿ P2 /P1 = 2.27/11.56 = 0.19637 =¿ P2 = 19891 Pa.
D.3. EXERCISE - FLOW THROUGH A DIFFUSER 127

Results
1. Look out for the Outlet Mach and Outlet Pressure.

2. Observe that properties are fixed at the inlet. Convergence is very fast;
it converges in 4000 Iterations only. The signal doesn’t reflect back into
the domain, and hence convergence is faster than the Subsonic case.
128 APPENDIX D. EXERCISES IN CFDTUTOR

D.4 Exercise - Flow through a CD Nozzle


D.4.1 Aim
To achieve shock wave at A/A* =1.5 in the diverging portion of a Converging-
Diverging Nozzle.

D.4.2 Problem Description


The problem is to attain a shock wave in the nozzle with dimensions with
Inlet area (A1 ) = 26, outlet area (A2 ) = 28.28 and throat area (A*) = 13.18.

D.4.3 Theory
The CD nozzle comes under a quasi one-dimensional flow, where variables
such as velocity, pressure, temperature, and density are the function of Area
(and time only if the flow is unsteady).

• Area-Velocity relation

1. If the flow is subsonic, an increase in velocity corresponds to de-


crease in area.
2. If the flow is supersonic, an increase in velocity corresponds to
increase in area.
3. If the flow is sonic, the area is at the local minimum.

• Area-Mach number relation


 2    γ+1
A 1 2 γ − 1 γ−1
= 2 1+ (D.1)
A∗ M γ+1 2M 2

A* refers to area at Mach number 1.


From the above equation, please note that the local Mach number is a
function of A/A* and γ.
D.4. EXERCISE - FLOW THROUGH A CD NOZZLE 129

D.4.4 Using CFDTutorTM


In the ‘Flow’ boundary condition input the following values :

• Mach number = 0.5

• Inlet pressure = 101300 Pa.

• Outlet pressure = ? Pa. (To Be Determined)

• No of iterations = 20000

D.4.5 Interpretation and Comparison of Results


Value to outlet pressure in CFDTutorTM would be evaluated from theory.
A2 A2
Ab
=A a
= AA2t × A
A∗
a
= 28.78
13.18
1
× 1.5 = 1.456
Now, for Aa /A∗ = 1.5, we have corresponding Ma = 1.854. This comes from
Isentropic tables. From normal shock tables we find out that for Ma = 1.854,
Mb is 0.6049.
Ab
For Mb = 0.6049, we get Ab /A∗ = 1.188. Now A2 /A∗ = A2 Ab A∗
= 1.456 ∗
1.188 = 1.729.

From Isentropic table for A2 /A∗ = 1.729; M2 = 0.36.


Po2 /P2 = 1.094 (From Isentropic table for M2 = 0.36)
Po2 /Po1 = 0.7954 (from normal shock table for M2 = 0.36)

Po1 is Total pressure before shock and Po2 is Total pressure after shock.
P1 and P2 static pressure at inlet and outlet respectively.

From A1 /A∗ = 1.972, the inlet Mach number is M1 = 0.31 and Po1 /P1 =
1.069.
P2 P
Po1
= PPo2 Poo2 = .7954/1.094 = 0.7270
2 1
So, P2 = Po1 *0.7270 = 80777.697 Pa

Run the problem in CFDTutorTM with above back pressure and get a shock
at A/A* = 1.5.
Note : Change the outlet pressure P2 to 11415 Pa and M1 to 0.31. The
shock wave will go entirely out of the nozzle (the flow will be fully supersonic
in the divergent section)
130 APPENDIX D. EXERCISES IN CFDTUTOR

Figure D.2: Converging Diverging Nozzle

D.5 Exercise - T Shaped Duct


D.5.1 Aim
In this tutorial we will visualize flow in a T-shaped duct and illustrate how
to change the Boundary condition i.e. Inlet to Outlet and Vice-versa.

D.5.2 Problem Description


Flow enters the vertical T-Duct from the bottom at Mach number: 0.5 and
leaves the duct from other two sides of the duct. We will then change the
inlet and outlets.

D.5.3 Using CFDTutorTM


• Case 1

1. Select the T Duct problem from Wizard.


2. Select the default conditions and run the solver.

• Case 2

1. Select the T Duct problem from Wizard.


2. At the Boundary conditions panel quit Wizard.
3. In the Menu bar click Boundary type and click Reset Input-
Output. This will delete the boundary conditions already ap-
plied.
4. Next, select the edge other than bottom edge and set as Inlet and
the other two edges as Outlet.
D.5. EXERCISE - T SHAPED DUCT 131

5. Now change the angle of attack depending on the side set as inlet.
If inlet is toward the Left end of the duct, then angle of entry
must be Deg. If it is toward the Right end of the duct, then the
angle of entry must be 180 Deg
6. Finally, run the solver.

D.5.4 Interpretation of Results


Compare the results of both the cases and now we can clearly see how the
flow changes depending on the boundary conditions.
132 APPENDIX D. EXERCISES IN CFDTUTOR

D.6 Exercise - Suddenly Contracted Flow


D.6.1 Aim
To understand the effect of CFL.

D.6.2 Problem Statement


A Suddenly Contracted Duct would be run with different initial conditions
but with same boundary conditions.

D.6.3 Theoretical Background


In an explicit time marching scheme, CFL is used to restrict the time step
that can be taken between iterations. It also does not allow numerical in-
stability to rise beyond a limit and restrict it to very small values. Initial
Conditions are usually specified close to the expected steady state results.
This allows the solution to converge quickly. Also numerical error is mini-
mal in such cases. However, if initial conditions are put away from expected
steady state results, for e.g. stagnant conditions, the simulation has a ten-
dency to diverge. In order to allow the solution to converge, CFL is made
less. We’ll show these fundamentals with the help of a numerical experiment
on suddenly contracted duct.

D.6.4 Using CFDTutorTM


Choose suddenly contracted duct from the wizard. Choose fine grids for
better solution. Three cases can be attempted :

1. Run the problem for 10000 iteration with 0.5 Mach number with default
initial conditions.

2. Change initial velocity X to 0m/s. And run the solver

3. Change the CFL to 0.1 and set initial velocity X to 0m/s. And run the
solver.
D.6. EXERCISE - SUDDENLY CONTRACTED FLOW 133

D.6.5 Interpretation of Results


Observe the convergence history of the three runs:

1. Solution converges.

2. The ‘run’ diverges after 950 iterations after we changed the initial con-
ditions. This is attributed to the numerical instability.

3. The reduced CFL restricts instabilities and the solution converges.


134 APPENDIX D. EXERCISES IN CFDTUTOR

D.7 Exercise - Flow around a Bluff Body


D.7.1 Aim
To understand the importance of bounding domain in case of flow around
bluff body.

D.7.2 Theory
Flow around a square body, dimension 40X40, is discussed in this worksheet.
Effect of three different bounding domain on the convergence of solution is
studied here. It is very important to model appropriate domain around the
bluff body to capture essential physics involved in the case. For eg. the
domain should be long enough so that eddies can be captured. Also space
should be provided on the sides of the domain. The experiment is run on the
standard conditions with inlet Mach number of 0.1.

D.7.3 Problem Setup


The bluff body is a square with corners at (-20,20), (-20,-20), (20,-20) and
(20,20). Three bounding domains cases can be considered. The left edge of
domain is always tagged inflow, whereas right edge is always outflow. While
making grids, put plc equal arc = 100 for bluff body and 200 for bounding
domain.

• Case 1
A domain with corners at (-50,50), (-50,-50), (50,-50), (50,50). Two
cases are possible :

1. When the side edges are tagged as walls.


2. When the side edges are tagged as outflow. This allows the fluid to
escape through the sides, when it finds a obstruction in between.

• Case 2
A domain with corners at (-80,50), (-80,-50), (150,-50), (150, 50). Two
cases are possible :

1. When the side edges are wall.


2. When the side edges are outflow.
D.7. EXERCISE - FLOW AROUND A BLUFF BODY 135

• Case 3
A domain with corners at (-80,80), (-80,-80), (150,-80), (150,80). Run
this case with side edges tagged as walls.

D.7.4 Results
Observations :

• Case 1 : Diverges with both type of BCs.

• Case 2 : Diverges when edges are wall but converges when edges are
outflow.

• Case 3 : Converges even when edges are wall.

D.7.5 Conclusion
We conclude that a flow over a bluff body simulation will converge only when
the appropriate space is provided on all the direction.
Index

Analysis, 45, 64 Point from Coordinates, 55


Flow Conditions, 65 Points from Polyline, 55
Run Solver, 65 Polyline, 32, 55
Solver Controls, 64 Polyline from Expression, 56
Polyline from Points, 55
Boundary Conditions, 47 Create Menu, 54
Boundary Edges, 41 Create Points, 29
Inflow, 41 Create Polyline, 32
Outflow, 41 Create Random Points, 29
see Grid, 41 Curve
Boundary Type, 63 Close, 30
Define as Inflow, 63 Close Polyline, 34
Define as Outflow, 63 Join, 33
Stitch, 33
CFD, 1
What is, 1 Define Geometry, 29
CFD Cycle, 21 Delete
CFDTutor, 16 All, 37
Interactive, 18 Clear Screen, 30
Wizard, 16 Entities, 36
Clear Last Selected Entity, 37
Display, 49 Selected Entity, 36
Clear Screen, 30 Delete All, 30, 70
Close Curve, 30, 34 Delete Selected, 70
Multiple Entities, 36 Deselect an Entity, 70
Connect Points, 30 Direction of a Curve, 69
Connect Polylines, 33 Direction of Curve, 35
Convergence Criteria, 47 Display, 49, 62
Copy Point, 31 All Points, 62
Create Boundary Points, 62
Point, 54 Default View, 62

136
INDEX 137

Direction of Curve, 62 2D Grid, 40


Domain, 35 2D Smoothen a Grid, 41
Direction of Curve, 35 2D Unstructured, 63
Boundary Edges, 41
Edit, 56 Inflow, 41
Delete All, 57 Outflow, 41
Delete Last Selected, 57 Create, 39
Delete Selected, 56 Polyline Equal arc, 40
Join Curves, 59 Type, 40
Move Point, 57 Unstructured, 40
Move Point using Mouse, 57
Move Polyline, 58 Help, 67
Move Polyline using Mouse, 58 About CFDTutor, 67
Open/Close Curve, 56 Generate Host ID, 67
Split Curve, 58 Manual, 67
Stitch Curves, 59
Equations, 4 Incompressible Model, 44
Inflow
File, 53 see Boundary Edges, 41
Exit, 54 Initial Conditions, 45
Open, 53 Interactive, 18
Save, 53 Application, 18
Flow Conditions, 45 Close, 27
Boundary Conditions, 47 Navigate Screen, 26
Convergence Criteria, 47 Open, 25
Initial Conditions, 45 Start, 25
Flow Models, 43 Inviscid Model, 43
Flow Schemes, 44
Jameson, 44 Join Curve, 33
Steger, 44
Van Leer, 44 Mach, 51
Fluid Models, 44 Mach No., 49
Compressible, 44 Monitor, 48, 49
Incompressible, 44 Mach No., 49
Inviscid, 44 Pressure Plot, 49
Viscous, 44 Simulation, 49
Temperature Plot, 49
Geometry, 29 Velocity X Plot, 49
Grid, 39, 62 Velocity Y Plot, 49
138 INDEX

Monitor Simulation, 48, 49 Move Points, 34


Move Pan, 68 Coordinates, 34
Move Point, 31 With Mouse, 34
Move Points Polyline from Expression, 33
On Polyline, 34 Pressure Plot, 49, 50
On Polyline with Mouse, 34
Move Points on Polyline, 34 Read Solution File, 49
Move Polyline, 35 Reset Default View, 69
By Coordinates, 35 Run Solver, 47
By Mouse, 35 Save File, 67
Save Solution, 48
Open Wizard, 24 Select an Entity, 69
Outflow Show All Points, 70
see Boundary Edges, 41 Show Boundary Points, 70
Simulation, 48, 49
Pick a Point, 69
Solution, 48, 49
Points, 29
Mach No., 49
Close Curve, 30
Pressure Plot, 49
Connect, 30
Read File, 49
Copy Point, 31
Save File, 48
Create, 29
Temperature Plot, 49
Coordinates, 30
Velocity X Plot, 49
Random, 29
Velocity Y Plot, 49
Delete All, 30
Solver, 47
Move Point, 31
Solver Control
Points from Coordinates, 30
Analysis, 45
Polyline, 32
Solver Controls, 43
Close Curve, 34
Flow Models, 43
Connect, 33
Flow Schemes, 44
Join Polylines, 33 Fluid Models, 44
Stitch Polylines, 33 Steger Warming, 45
Create, 32 Stitch Curve, 33
Expression, 33
Delete Temperature Plot, 49, 51
All, 36 Tool bar, 67
Move, 35 Delete All, 70
Coordinates, 35 Delete Selected, 70
With Mouse, 35 Deselect an Entity, 70
INDEX 139

Move Pan, 68 Temperature Plot, 67


Open File, 67 Velocity Vector, 66
Pick a Point, 69 Velocity X Plot, 66
Reset Default View, 69 Velocity Y Plot, 66
Save File, 67
Select an Entity, 69 Wizard, 16
Show All Points, 70 Application, 16
Show Boundary Points, 70 CFD Cycle, 21
Zoom In, 68 Open, 24
Zoom Out, 68 Start, 21
Zoom to Window, 68 Steps, 21
Tools, 59 Zoom In, 68
Copy, 60 Zoom Out, 68
Deselect, 60 Zoom to Window, 68
Deselect All, 60
Move, 60
Polyline Equal Arc, 61
Reverse Curve, 61
Select, 59
Select All, 59
Summary, 61

Van Leer Ist Order, 44


Velocity Vector, 50
Velocity X Plot, 49, 51
Velocity Y Plot, 49, 51
View, 49
Mach No., 49
Pressure Plot, 49
Solution, 49
Temperature Plot, 49
Velocity X Plot, 49
Velocity Y Plot, 49
Visualization, 50, 65
Clear Display, 66
Mach, 66
Pressure Plot, 66
Read Solution File, 65

You might also like