Computation of Potential Flow Around Circular Cylinder

71
Computation of Potential Flow around Circular Cylinder By Finite Element Method By S. M. Rashidul Hasan Student No: 0112013 A Thesis submitted in partial fulfillment of the requirements for the Degree of Bachelor of Science in Naval Architecture & Marine Engineering at the Bangladesh University of Engineering & Technology (BUET) MAY 2007 1

Transcript of Computation of Potential Flow Around Circular Cylinder

Page 1: Computation of Potential Flow Around Circular Cylinder

Computation of Potential Flow around Circular

Cylinder By Finite Element Method

By

S. M. Rashidul Hasan

Student No: 0112013

A Thesis submitted in partial fulfillment

of the requirements for the Degree of

Bachelor of Science in Naval Architecture & Marine Engineering

at the

Bangladesh University of Engineering & Technology (BUET)

MAY 2007

Signature of the Author _______________

Certified by ________________________ Associate Professor Dr. Shahjada Tarafdar

Thesis Supervisor

1

Page 2: Computation of Potential Flow Around Circular Cylinder

Computation of Potential Flow around Circular

Cylinder By Finite Element Methodby

S. M. Rashidul Hasan

Submitted to the Department of Naval Architecture & Marine Engineering in partial

fulfillment of the requirements for the Degree of Bachelor of Science in Naval

Architecture & Marine Engineering

Abstract

This thesis presents the Galerkin method for calculating the potential flow around the

circular cylinder partially submerged in water. Galerkin method is used to formulate a

sequence of potential problems that are solved using a Finite Element method.

The governing equations for the calculation of the stream and potential functions are

derived mathematically, where the theory developed here is for a crude discretization of

the cylindrical body. The velocity and pressure distributions on or above the cylinder

have been calculated for both stream and potential functions and shown graphically for

further analysis.

2

Page 3: Computation of Potential Flow Around Circular Cylinder

Acknowledgements

First of all, I would like to say thanks to the ALL MIGHTY ALLAH for his divine help

in completing this thesis. I am grateful to my parents, who have created my base of this

level, and without their inspiration and guidance, I could not be at this stage now.

I would like to express my sincere gratitude to my thesis supervisor, Dr. Shahjada

Tarafder, Associate Professor of the department of Naval Architecture & Marine

Engineering, BUET for his constant support during the production of this thesis, without

whose continuous supervision, help, suggestions, inspiration, this thesis may not be

completed.

I am very much grateful to all of my friends, especially Md. Mukammilur Rahman, Md.

Touhidul Islam, Tayebul Islam, Md. Monjurur Rahman; those helped and supported me a

lot for bringing out this thesis. I also want to pay thanks to all of those people, who have

helped me that I have not mentioned here.

3

Page 4: Computation of Potential Flow Around Circular Cylinder

ContentsNotation 6

List of Figures 8

Chapter 1 9

Introduction

1.1 History and Motivation 9

1.2 Finite Element Method 10

Chapter 2 11

Confined Flow Around a Circular Cylinder

2.1 Stream Function Formulation 12

2.2 Formation of the Applied Boundary Condition 12

2.3 Stream Function Calculation 12

2.4 Calculation of ANM For All Elements 14

2.5 Velocity Potential Function Formulation 20

2.6 Formation of the Applied Boundary Condition 20

2.7 Potential Function Calculation 21

Chapter 3 24

Result and Discussion 24

3.1 Stream Function 24

3.2 Velocity Potential Function 25

3.3 Error Analysis 26

Chapter 4

Conclusion 28

4

Page 5: Computation of Potential Flow Around Circular Cylinder

References 42

Appendix A 43

Development of the Finite Element Equation 43

Appendix B 44

The Assembly of the Element Matrices 44

Appendix C 47

Modification of the Global Finite Element Equations

for the Boundary Conditions 47

Appendix D 50

Velocity Calculation 50

Appendix E 51

Formation of the Flux vector, FN 51

Appendix F 54

Output of the Program for Calculating Stream and

Velocity Potential Function 54

5

Page 6: Computation of Potential Flow Around Circular Cylinder

Notation

U The Fluid Velocity in the Flow Field

Domain

u ,u The Velocity Components

Potential Function

Stream Function

Operator

n Direction to the Normal of the Surface

a-b-c-d-e-f-g The boundary points of the domain

N Nodal value of

N Interpolation function

A Stream function value at point A

B Stream function value at point B

The Interpolation Function Corresponding to the Boundary

Flux or the Normal Gradient of the Stream Function

A Area of the Element

x1,x3, x2 x Coordinates of the Elementary Triangle

y1,y2, y3 y Coordinates of the Elementary Triangle

N Total Number

Residual Value

x Horizontal Direction

y Vertical Direction

ANM The Coefficient Matrix

FN The Flux Vector

G Surface on the Domain

F The Total Number of Nodes

E The Total Number of Elements

e The Boolean matrix

e Local Element

6

Page 7: Computation of Potential Flow Around Circular Cylinder

G The Total Number of Nodes in the Global Domain of Study

Vx Velocity at x

7

Page 8: Computation of Potential Flow Around Circular Cylinder

List of Figures

2.1 Flow Around a Circular Cylinder 29

2.2 The Applied Boundary Conditions on the Domain 29

2.3 Finite Element Discretization for Stream Function Calculation for

Flow around the Circular Cylinder 30

2.4 Crude Discretization 30

2.5 Local and Global Nodes for Elements 1 and 2 31

2.6 Local and Global Nodes for Elements 3 and 4 31

2.7 Local and Global Nodes for Elements 5 and 6 32

2.8 Local and Global Nodes for Elements 7 and 8 32

2.9 Local and Global Nodes for Elements 9 and 10 33

2.10 The Applied Boundary Conditions on the Domain 33

3.1 Stream Function Contours 34

3.2 Velocity Distributions along the Vertical Line above the Crest of Cylinder 34

3.3 Finite Element Discretization for Potential Function Calculation

for Flow around the Circular Cylinder 35

3.4 Velocity Potential Function Contour 35

3.5 Pressure Distributions on the Cylinder 36

3.6 Velocity Profile along Cylinder 36

3.7 Velocity Profile on Crest above Cylinder 37

3.8 Stream Function together with the Velocity Potential

Function, Intersecting themselves Perpendicularly 38

C1 Neumann Boundary Conditions 39

D1 Flow Around a Cylinder. (A) Entire Domain (B) Quadrant Boundaries

(C) Upper Half Boundaries 40

E1 Boundary Velocities for Potential Boundary Conditions 41

8

Page 9: Computation of Potential Flow Around Circular Cylinder

Chapter 1

Introduction

1.1 History and Motivation

The finite-element method originated from the needs for solving complex elasticity,

structural analysis problems in civil engineering and aeronautical engineering. Its

development can be traced back to the work by Hrennikoff.A (1941).While the

approaches used by these pioneers are dramatically different, they share one essential

characteristic: mesh discretization of a continuous domain into a set of discrete sub-

domains. Hrennikoff's work discretizes the domain by using a lattice analogy while

Courant's approach divides the domain into finite triangular sub regions for solution of

second order elliptic partial differential equations (PDEs) that arise from the problem of

torsion of a cylinder. Courant's contribution was evolutionary, drawing on a large body of

earlier results for PDEs developed by Rayleigh, Ritz, and Galerkin. Development of the

finite element method began in earnest in the middle to late 1950s for airframe and

structural analysis and picked up a lot of steam at Berkeley in the 1960s for use in civil

engineering. An analysis of The Finite Element Method, and has since been generalized

into a branch of applied mathematics for numerical modeling of physical systems in a

wide variety of engineering disciplines, e.g., electromagnetism and fluid dynamics.

The main difficulties of the requirements of using the method for the fluid dynamical

problems are because of the requirement to solve Neumann boundary condition for an

inviscid flow problem, and Dirichlet boundary condition in a fourth order partial

differential equation with the stream function.

The development of the finite element method in structural mechanics is often based on

an energy principle, e.g., the virtual work principle or the minimum total potential energy

9

Page 10: Computation of Potential Flow Around Circular Cylinder

principle, which provides a general, intuitive and physical basis that has a great appeal to

structural engineers.

1.2 Finite Element Method

Mathematically, the finite element method (FEM) is used for finding approximate

solution of partial differential equations (PDE) as well as of integral equations such as the

heat transport equation. The solution approach is based either on eliminating the

differential equation completely (steady state problems), or rendering the PDE into an

equivalent ordinary differential equation, which is then solved using standard techniques

such as finite differences, etc.

In solving partial differential equations, the primary challenge is to create an equation

that approximates the equation to be studied, but is numerically stable, meaning that

errors in the input data and intermediate calculations do not accumulate and cause the

resulting output to be meaningless. There are many ways of doing this, all with

advantages and disadvantages. The Finite Element Method is a good choice for solving

partial differential equations over complex domains (like cars and oil pipelines), when the

domain changes (as during a solid state reaction with a moving boundary), or when the

desired precision varies over the entire domain. For instance, in simulating the weather

pattern on Earth, it is more important to have accurate predictions over land than over the

wide-open sea, a demand that is achievable using the finite element method.

10

Page 11: Computation of Potential Flow Around Circular Cylinder

Chapter 2

Confined Flow around a Circular Cylinder

The irrotational flow of an ideal fluid about a circular cylinder, placed with its axis

perpendicular to the plane of the flow between two long horizontal walls as shown in

Figure 2.1, is to be analyzed using the finite element method.

The equation governing the flow is

- U = 0 in

where, U is the fluid velocity in the flow field. The velocity components u and v with

respect to the stream and velocity potential functions andcan be expressed as

,

and

,

Now the problem can be constructed by specifying the following boundary condition.

In either case, the velocity field is not affected by a constant term U. To determine the

constant state of the solution, which does not affect the velocity field, we arbitrarily set

the functions and equal to zero (or a constant) on appropriate boundary lines. We

analyze the problem using both formulations. For both, symmetry exists about the

horizontal and vertical centerlines; therefore, only a quadrant of flow region is used as the

computational domain.

11

Page 12: Computation of Potential Flow Around Circular Cylinder

2.1 Stream Function Formulation

The problem of flow around a circular cylinder with respect to the stream function as

shown in Figure 2.2 can be defined by the Laplace equation

with the following boundary conditions:

(a) = (y) on ab

(b) = 2 on bd

(c) on dc

(d) = 0 on agc

2.2 Formation of the Applied Boundary Condition

he value of stream function a at a particular point a is referenced as zero, we have b =

2 for the free stream velocity Vx = 1, with values of linearly varying from 0 to 2

between a-b and between b-d as shown in Figure 2.2. Thus the values can be

prescribed along the boundaries g-a-b-d to be imposed as Dirichlet boundary conditions.

All Neumann boundary conditions as calculated are zero (n1 =1, n2 = 0) along the

boundaries a-b and c-d

2.3 Stream Function Calculation

Choice of domains in the direction of flow is arbitrary, but the free stream velocity is

considered to prevail at distances sufficiently far from the cylinder. Triangular elements

and nodes are numbered in the shorter direction, rather than longer. Moreover, the

numbering does not zigzag but moves toward the same direction as shown in the Figure

12

Page 13: Computation of Potential Flow Around Circular Cylinder

2.3. These schemes reduce the adjacent nodes number differences to a minimum and

contribute to a narrowly banded matrix such that more stable and accurate solutions may

be obtained. Since the realistic discretization yields a large number of equations, let us

consider a crude approximation represented in Figure 2.4 for numerical demonstration

purposes.

The stream function is considered to vary linearly within an element and is related by

where, N is the nodal value of and N is an interpolation function. The interpolation

function N for the triangular element can be written as,

2.1

where,

(2.2)

with A, the area of the triangular element. The finite element equation is of the form of

ANMM = FN (see Appendix-A) (2.3)

in which ANM and FN the are called the coefficient matrix and the flux vector

respectively.

and

Expanding the finite element equation (2.3) we obtain,

(2.4)

where,

For unit thickness perpendicular to the x-y plane, we obtain

13

Page 14: Computation of Potential Flow Around Circular Cylinder

(2.5)

All the other coefficients can be determined similarly and we have

(2.6)

To calculate ANM for all elements, it is necessary first to number the element nodes

arbitrarily but counterclockwise. The counterclockwise numbering of the element nodes

is required as the area A becomes negative in the equation 2.1 otherwise.

2.4 Calculation of ANM for All Elements

Element 1

The coordinate values of element 1 and 2, as shown in the Figure2.5, are

x1 = 0 x2 = 0 x3 = 2.5

y1 = 2 y2 = 1 y3 = 2

and

b1 = -0.4 b2 = 0 b1 = 0.4

c1 = 1 c2 = -1c3 = 0

Element 2

x1 = 0 x2 = 2.5x3 = 2.5

y1 = 1 y2 = 1 y3 = 2

and

b1 = -0.4 b2 = 0.4 b3 = 0

c1 = 0 c2 = -1 c3 = 1

14

Page 15: Computation of Potential Flow Around Circular Cylinder

Element 3

The coordinate values of element 3 and 4, as shown in the Figure2.6, are

x1 = 0 x2 = 2.5 x3 = 2.5

y1 = 1 y2 = 0 y3 = 1

and

b1 = -0.4 b2 = 0 b3 = 0.4

c1 = 0 c2 = -1 c3 = 1

Element 4

x1 = 0 x2 = 0 x3 = 2.5

y1 = 1 y2 = 0 y3 = 0

and

b1 = 0 b2 = -0.4 b3 = 0.4

c1 = 1 c2 = -1 c3 = 0

Element 5

The coordinate values of element 5 and 6, as shown in the Figure2.7, are

x1 = 2.5 x2 = 3 x3 = 3.5

y1 = 2 y2 = 1.5 y3 = 2

and

b1 = -1 b2 = 0 b3 = 1

c1 = 1 c2 = -2 c3 = 1

15

Page 16: Computation of Potential Flow Around Circular Cylinder

Element 6:

x1 = 2.5 x2 = 2.5 x3 =3

y1 = 2 y2 = 1 y3 = 1.5

and

b1 = -1 b2 = -1 b3 = 2

c1 = 1 c2 = -1 c3 = 0

Element 7

The coordinate values of element 7 and 8, as shown in the Figure2.8 are

x1 = 3 x2 = 3.5 x3 = 3.5

y1 = 1.5 y2 = 1.5 y3 = 2

and

b1 = -2 b2 = 2 b3 = 0

c1 = 0 c2 = -2 c3 = 2

Element 8

x1 = 3 x2 = 3.5 x3 = 3.5

y1 = 1.5 y2 = 1 y3 = 1.5

and

b1 = -2 b2 = 0 b3 = 2

c1 = 0 c2 = -2 c3 = 2

16

Page 17: Computation of Potential Flow Around Circular Cylinder

Element 9

The coordinate values of element 9 and 10, as shown in the Figure2.9, are

x1 = 2.5 x2 = 3.5 x3 = 3

y1 = 1 y2 = 1 y3 = 1.5

and

b1 = -1 b2 = 1 b3 = 0

c1 = -1 c2 = -1 c3 = 2

Element 10:

x1 = 2.5 x2 = 2.5 x3 = 3.5

y1 = 1 y2 = 0 y3 = 1

and

b1 = -1 b2 = 0 b3 = 1

c1 = 1 c2 = -1 c3 = 0

These element matrices are now to be assembled with the help of the following equation

F (see Appendix-B)

(2.7)

where,

17

Page 18: Computation of Potential Flow Around Circular Cylinder

and,

with N, M = 1,2,3 and 1,2,……….10 . Since, the line 8-9-10 is the constant

streamline, we may set along this line. Thus we must have , at node 4 and

at nodes 1,2 and 3 as calculated from the equation D2 of Appendix-D. These are

the Dirichlet Boundary conditions. All the Neumann boundary conditions are satisfied by

setting ini = 0 or FN = 0 for the entire vertical boundary nodes. The assembled global

finite element equations (2.7) must now be modified for the boundary conditions. Now

we can write using the method described at Appendix-C,

=

Discarding the first four equations, we only need to solve

=

(2.9)

From the matrix above, we get the following equations,

4.9 (2.10)

3 2.11

2.12

Solving the above equations, we get,

= 0.845

= 1.241

= 1.120

Since the stream function is assumed to be linear between the nodes, velocity is constant.

Therefore, we may use the formula as described in the Appendix-D

18

Page 19: Computation of Potential Flow Around Circular Cylinder

(2.13)

Putting the values of stream function for different points we get

(Vx)3-7 = 1.76

(Vx)7-10 = 2.24

(Vx)4-8 = 1

(Vx)9-10 = 0

where,

0.8451.2411.12

0

2.5 Velocity Potential Function Formulation

Calculation with the velocity potential formulation differs very slightly from those of

stream function formulation. The globally assembled coefficient matrix is identical. Only

the boundary conditions are different. The problem of flow around a circular cylinder

with respect to the stream function as shown in Figure 2.10 can be defined by the Laplace

equation

with the following boundary conditions:

a) on ab

b) on bd

c) on dc

d) on agc

19

Page 20: Computation of Potential Flow Around Circular Cylinder

2.6 Formation of the Applied Boundary Condition

If the velocity function used in the finite element equations, the apparent boundary

conditions is that is constant along a-b and d-c (only a quadrant is used). The reference

values may be specified as Dirichlet conditions along d-c. However, the entrance face

subject to the Neumann condition of the type. The condition = constant along a-b need

not to be applied because the Neumann condition must be applied here to introduce the

input information. Along the boundaries b-d and a-g-c, the Neumann conditions ,ini =

Vini = 0 are automatically satisfied by setting

FN = 0.

If the entire upper- half domain is used, then must also be applied along e-f.

2.7 Potential Function Calculation

For the problem of the potential function calculation shown in Figure 2.4, we may set 3

= 7 = 10 = 0, or any convenient number for a reference value. We now have the

Neumann boundary condition FN 0

(See Appendix-E)

(2.14)

From the equation 2-35 with Vx = 1, Vy = 0, n1 = 1, n2 = 0, and l = 1 for boundaries 1-4

and 4-8, we obtain

(See Appendix-E)

For all other boundaries FN = 0 and thus the assembled input vector is of the form

20

Page 21: Computation of Potential Flow Around Circular Cylinder

F =

or,

Thus the global equations take the form

Because 3 = 7 = 10 =0, we may either zero the 3rd, 7th, and 10th rows and columns with

one’s at the diagonal or leave them out completely and solve the remaining 77

equations. Thus the 77 matrix becomes,

The equations are

1.45 1 –0.22 –1.254 = 0.5 (2-16)

-0.21 + 2.452 –1.255 –6 = 0 (2-17)

-1.251 +2.94 - 0.45 –1.258 = 1 (2-18)

-1.252 – 0.44 + 4.95 –6 –1.759 = 0 (2-19)

-2 – 5 + 46 = 0 (2-20)

-1.254 +1.458 –0.29 = 0.5 (2-21)

-1.755 – 0.28 +1.959 = 0 (2-22)

Solving the above equations, we get

21

Page 22: Computation of Potential Flow Around Circular Cylinder

From these values, the average x-velocity between the nodes 6 and 7 is calculated as

(Vx)6-7 = = = 1.2322

Chapter 3

Result and Discussion

According to the theory developed in chapter two, programs have been done using the

FORTRAN 90 language for the calculation of stream function and velocity potential

function and the output of the program, has been shown in the appendix-F. With the help

22

Page 23: Computation of Potential Flow Around Circular Cylinder

of the program, the stream and potential function contours, velocity and pressure of the

flow for all nodes have been calculated, those have been shown graphically bellow.

3.1 Stream Function

The program for stream function formulation has been developed for the discretization,

as shown in the Figure 2.3. The section has been subdivided into 100 elements and 67

nodes in the form of a triangle for the calculation of stream function. Calculation is

carried out for the one-fourth side of the circular cylinder, where the circle radius is a

unit. Total length and height have been taken 3.5 units and 2.0 units respectively and the

height above the cylinder is 1.0 unit. A uniform flow of 1unit length/sec is flowing from

the left side of the cylinder, as show in the Figure 2.3. The elements are taken in the form

of a triangular and for the convenience of discretization, thus the edge of the circle here

in this discretization may not appear as a circle.

Two curves has been drawn for stream function calculation, found from the output of the

program, namely stream function contours and velocity distribution. The velocities along

the vertical line above the crest of the cylinder calculated by the equation D2 of the

appendix-D.

It is unfair to compare the results of the present example with the exact solution because

the problem has been solved for the flow around a circular cylinder without discretization

with the help of the interpolation function; rather it has been discretized linearly. The

curve will be farer, if the discretization has been done with the help of interpolation

function.

Figure 3.1 shows us the stream function contours, in which the values have been plotted

in the y-axis against the x coordinate of the node The values of the stream function have

been started from 0.0 to 2.0 at the interval of 0.2. If we need the value of stream function

for other streamline against the x –axis, we can find that value by interpolating.

23

Page 24: Computation of Potential Flow Around Circular Cylinder

Figure 3.2 shows us the velocity diagram has been drawn against height of the flow point

above the cylinder, where the velocity is plotted in x-axis, and the height is plotted in the

y-axis. The value of velocities has been found here on the crest of the cylinder.

3.2 Velocity Potential Function

The program for the velocity potential function formulation has done for the

discretization as shown in the Figure 3.3. The section has been subdivided into 50

elements and 67 nodes in the form of a quadruple for the calculation of velocity potential

function. Calculation is done for the one-fourth side of the circular cylinder, where the

circle radius is a unit. Total length and height have been taken 3.5 units and 2.0 units

respectively and the height above the cylinder is 1.0 unit. A uniform flow of 1unit

length/sec is flowing from the left side of the cylinder, as show in the figure below. The

elements are taken in the form of a rectangle and for the convenience of discretization;

the edge of the circle here in this figure may not appear as a circle.

Figure 3.4 shows the velocity potential function contour. The potential function values

have started from 0.0 to 3.5 at the interval of 0.32. The other values of the velocity

potential function contour can be found by interpolating the two given contour here. The

contours of the velocity potential function are perpendicular to the streamline function

contours.

Figure 3.5 shows us the pressure distribution on the cylinder. The curve is drawn by the

nodal pressure values, found by calculation. The values of pressure is plotted in the x-axis

against the height, in the y-axis

Figure 3.6 shows the velocity profile along the cylinder. The curve is drawn by the nodal

values, found by calculation. The value of the velocity is plotted in the x-axis against the

height, in the y-axis.

24

Page 25: Computation of Potential Flow Around Circular Cylinder

The velocity profile on crest above cylinder is drawn in Figure 3.7. The curve is drawn by

the nodal values, found by calculation. The values of velocity is plotted in the x-axis

against the height, in the y-axis

As now we have drawn the stream function and velocity potential function contour, we

can now show that, the streamlines and velocity potential lines cut themselves

perpendicularly, as shown in the Figure 3.8.

3.3 Error Analysis

The results found by the above calculation may be compared with an approximate

analytical solution via the method of images.

Formulation

(3.1)

Formulation

25

Page 26: Computation of Potential Flow Around Circular Cylinder

in which x and y are the coordinates with origin at the centers of the cylinder, b is the

radius and H is the vertical distance between the two plates

Chapter 4

Conclusions

The objectives of this paper were met with mixed success. In this case, a decent result

was obtained for stream function contour, velocity distributions along the vertical line

above the crest for stream function, velocity potential function contour, pressure

distribution on the cylinder, velocity profile along the cylinder, velocity profile on crest

above cylinder.

26

Page 27: Computation of Potential Flow Around Circular Cylinder

Generally, the accuracy of the finite element solution is expected to improve with finer

mesh and higher order interpolation functions. Irregular mesh configurations with needle-

like elements contribute to deterioration of the accuracy.

Figures

27

Page 28: Computation of Potential Flow Around Circular Cylinder

Figure 2.1 Flow around a Circular Cylinder

Figure 2.2 The Applied Boundary Conditions on the Domain

28

Page 29: Computation of Potential Flow Around Circular Cylinder

Figure 2.3 Finite Element Discretization for Stream Function Calculation

for Flow around the Circular Cylinder

Figure 2.4 Crude discretization

29

Page 30: Computation of Potential Flow Around Circular Cylinder

Figure 2.5 Local and Global Nodes for Elements 1 and 2

Figure 2.6 Local and Global Nodes for Elements 3 and 4

30

Page 31: Computation of Potential Flow Around Circular Cylinder

Figure 2.7 Local and Global Nodes for Elements 5 and 6

Figure 2.8 Local and Global Nodes for Elements 7 and 8

31

Page 32: Computation of Potential Flow Around Circular Cylinder

Figure 2.9 Local and Global Nodes for Elements 9 and 10

Figure 2.10 The Applied Boundary Conditions on the Domain

32

Page 33: Computation of Potential Flow Around Circular Cylinder

Figure 3.1 Stream Function Contours

Figure 3.2 Velocity Distributions along the Vertical Line above the Crest of Cylinder

33

Page 34: Computation of Potential Flow Around Circular Cylinder

Figure 3.3 Finite Element Discretization for Potential Function Calculation

for Flow around the Circular Cylinder

Figure 3.4 Velocity Potential Function Contour

34

Page 35: Computation of Potential Flow Around Circular Cylinder

Figure 3.5 Pressure Distributions on the Cylinder

Figure 3.6 Velocity Profile along Cylinder

35

Page 36: Computation of Potential Flow Around Circular Cylinder

Figure 3.7 Velocity Profile on Crest above Cylinder

36

Page 37: Computation of Potential Flow Around Circular Cylinder

Figure 3.8 Stream Function together with the Velocity Potential Function,

Intersecting Themselves Perpendicularly Boundary Conditions

37

Page 38: Computation of Potential Flow Around Circular Cylinder

Figure C1 Neumann Boundary Conditions

38

Page 39: Computation of Potential Flow Around Circular Cylinder

Figure D1 Flow around a Cylinder. (a) Entire Domain (b) Quadrant Boundaries

(c) Upper Half oundaries

39

Page 40: Computation of Potential Flow Around Circular Cylinder

Figure E1 Boundary Velocities for Potential Boundary Conditions

40

Page 41: Computation of Potential Flow Around Circular Cylinder

References:

Anon (1982): Finite Element Methods in Engineering, 1982, CP

Arfken, G. (1985): Mathematical Methods for Physicists, 3rd ed. Orlando, FL: Academic

Press, pp. 502~504

Bose T. K. (1988): Computational Fluid Dynamics, Wigley Eastern Limited,

pp.186~189.

Chung, T.J: Finite Element Analysis in Fluid Dynamics: pp. 68~79, 103~110, 171~184.

Hrennikoff, A. (1941): Solution of problems of elasticity by the frame-work method,

ASME Journal, Applied Mechanics, Vol. 8, A619–A715.

Morse, P. M. and Feshbach H. (1953): Boundary Conditions and Eigen functions,

Chapter 6 in Methods of Theoretical Physics, Part I. New York: McGraw-Hill, pp. 495-

498 and 676-790

Reddy, J. N. (1993): An Introduction to the Finite Element Method, McGraw-Hill, Inc.

pp.355-364

Vallentine H. R (1963): Applied Hydrodynamics, Butterworth & Co. Limited.

41

Page 42: Computation of Potential Flow Around Circular Cylinder

Appendix –A

Development of the Finite Element Equation

In the potential flow problem, either stream functions or velocity potentials are

calculated. Velocity distributions then follow from

(A1)

The stream function may be approximated from the Laplace equation within a finite

element in the form

(A2)

with N = 1, 2, 3…….r (r is the total number of nodes in the elements). Let the residual be

equated to a residual . Then we have

A2)

Let us now consider an orthogonal projection of the residual space (equation A2), onto a

subspace spanned by the interpolation function acting as weighting function in the

sense of Galerkin. This process is represented by

(A3)

Using Green-Gauss theorem in the equation A3, we get,

(A4)

where, is the interpolation function corresponding to the boundary flux or the normal

gradient of the stream function. Using the simplified notations, we write

ANMM = FN (A5)

in which ANM and FN the are called the coefficient matrix and the flux vector

respectively.

and

42

Page 43: Computation of Potential Flow Around Circular Cylinder

Appendix-B

The assembly of the element matrices

Consider the second order partial differential equations of the form:

in (B1)

u = 0 on G1 (B2a)

u = u0 on G2 (B2b)

on G3

(B3a)

on G4

(B3b)

Recall that equation (B2) and (B3) are Dirichlet (essential) and Neumann (natural)

boundary conditions, respectively. Using index notations, we re-write equation (B1) as

u,ii + f = 0 (B4a)

and the normal derivative takes the form

(B4b)

where i = 1,2 for two-dimensional problems and i = 1,2,3 for three dimensional problems,

and ni denotes the component of a vector normal to the boundary surface.

The local and global interpolation functions N(e) and for the variable u are related

by

(B5a)

or, (B5b)

(B5c)

43

Page 44: Computation of Potential Flow Around Circular Cylinder

where N = 1,2,3…………..F and =1,2……….G with F = the total number of nodes in

a local element e and G = the total number of nodes in the global domain of study (),

E is the total number of elements and e is the Boolean matrix.

If approximations of equation B5 are inserted into B4, then B4 may not be satisfied. Thus

we introduce residual such that

U,ii + f =

The Galerkin finite element equation takes the form

Integrating by parts yields

(B6)

Here the interpolation function , which interpolates u in, changes its role on the

boundaries. Namely, by virtue of the Green-Gauss theorem, the variation of g = u, ini is

to be interpolated along the boundary surface G, not within the domain . Thus xis

changed to s), which regard as an interpolation function for u,ini.

The local boundary interpolation function e is related by

It should be noted that the indices and N refer only the boundary nodes and the

summation also involves only boundary surface elements. An example of es)

for a linear variation of g = u,ini between the two boundary nodes in two dimensional

problems may taken as

Where l is the length of the boundary line within an element. With these in mind and in

view of equation (B5c), we obtain global finite element equations

44

Page 45: Computation of Potential Flow Around Circular Cylinder

Where, (B8a)

(B8b)

(B9a)

(B9b)

Equation B6 can be replaced by

Proceeding similarly, we obtain

In view of equation B5 we arrive at the local finite element equations as

(B10)

The equation B10 can be written in the form

F B11

where,

and,

45

Page 46: Computation of Potential Flow Around Circular Cylinder

Appendix –C

Modification of the Global Finite Element Equations

for the Boundary Conditions

According to the Galerkin methods, the natural boundary conditions automatically appear

in the resulting local finite element equation in the form

(C1)

For two-dimensional problems, this integral takes the form as

(C2)

which has schematically shown in the Figure C1

If g = u,ini = 0 , then this boundary integral is simply dropped. For the case of ideal flow

(Laplace equation), u is the velocity potential and we have ,ini = Vini representing

the velocity normal to the boundary surface or prescribed free stream velocity.

Often in the boundary value problems, there are instances in which the Dirichlet and

Neumann boundary conditions are combined at the same location. For example, in the

heat transfer problems with a resistance layer on the boundary, we may specify

(C3)

This is referred to as Cauchy boundary condition and can be handled by substituting

u,ini = -u - q into equation C1

Since calculating equation C1 and C2 as a part of the finite element equations

automatically satisfies the Neumann boundary conditions, we describe below how to

impose Dirichlet boundary conditions by modifying the global equation. To ward this

end, let us consider global equations of the type.

Aijuj = Fi I,j = 1,2,…………………n (C4)

46

Page 47: Computation of Potential Flow Around Circular Cylinder

With n being the total number of nodes in the entire domain of study . Let us take the

44 equations given by

= (C5)

Assuming that the given boundary conditions requires u2 = 0. Substituting u2 = 0 into

equation C5 and replacing the second equation by u2 = 0, we obtain

= (C6)

It is quite obvious that the values of u1, u3, u4 are not affected if we strike out the second

row and second column and write

=

(C7)

We may now solve either equation 6 and equation 7. A set of equations can also be

modified if u2 is not zero but u2 = a. The same operations as above lead to

= (C8)

Once again, if desired, the second equation may be discarded such that

47

Page 48: Computation of Potential Flow Around Circular Cylinder

=

(C9)

48

Page 49: Computation of Potential Flow Around Circular Cylinder

Appendix –D

Velocity Calculation

Because of the symmetry as shown in the Figure D1 below, the quadrant a-b-c-d-e-f-g is

used. By inspection we note that the boundaries a-g-c and b-d are streamlines and they

are constants. For the purpose of reference, let along a-g-c. Since the input free

stream velocity is constant along a-b, we may set

(D1)

Integrating between the limits indicated, we obtain

(D2)

Since a is referenced as zero, we have b = 2 for the free stream velocity Vx = 1

with values of linearly varying from 0 to 2 between a-b and between b-d.

Thus the values can be prescribed along the boundaries g-a-b-d to be imposed as

Dirichlet boundary conditions. All Neumann boundary conditions as calculated are zero

(n1 =1, n2 = 0) along the boundaries a-b and c-d.

If the free stream velocity is not constant but still perpendicular to the entrance face, then

the integral from equation 1 must be evaluated with Vx as a function of y. If the free

stream velocity is not perpendicular to the entrance face, then F, representing the

Neumann boundary conditions is nonzero. In both of these cases, the symmetry is no

longer maintained and the entire domain must be analyzed. Thus Dirichlet boundary

conditions such as = 0 can be specified along either the top or bottom plate.

Appendix – E

Formation of the Flux vector, FN

49

Page 50: Computation of Potential Flow Around Circular Cylinder

Let us consider the inclined boundary nodes 1 and 2, as shown in the Figure E1.

Assuming that the velocity distribution between the two nodes is linear, for unit

thickness, we have the following equation of the flux vector,

(E1)

In this case, FN vanishes regardless of the orientations of the boundary entrance surface.

Physically, FN represents the amount of flow parallel to the boundary surface. Obviously

such a flow quantity does not exist. For example parallel to the boundary entrance when

the incoming flow is perpendicular to the entrance.

For boundary velocities with variable magnitude and arbitrary angles to the entrance, we

may approximate where and . Then

or (E2)

Integration gives

(E3)

Here the direction cosines n1 and n2 corresponds to the associated nodal velocity. When

the velocity potential is used, we have .

Velocity distributions then follow from

Vi = ,i (for potential function)

The stream function may be approximated from the Laplace equation within a finite

element in the form

. (E4)

with N = 1,2,3…….r (r is the total number of nodes in the element), are the

interpolation functions, and N are the nodal values of . Let the residual be equated to a

residual . Then we have

50

Page 51: Computation of Potential Flow Around Circular Cylinder

2 (E5)

Let us now consider an orthogonal projection of the residual space (equation E5), onto a

subspace spanned by the interpolation function acting as weighting function in the

sense of Galerkin. This process is represented by

( , N) òiid

(E6)

Using Green-Gauss theorem in the equation E6, we get,

ini dG ii dG

or, (E7)

Here, is the interpolation function corresponding to the boundary flux or the normal

gradient of the stream function.

Using the simplified notations, we write

(E8)

Where, ANM and FN the are called the coefficient matrix and the flux vector respectively.

Thus

ANM = òi id

And

(E9)

It should be noted that represents the component of the boundary velocities normal

to the surface as shown in the figure E1.Therefore, may be approximated by

and we have

51

Page 52: Computation of Potential Flow Around Circular Cylinder

Appendix F

52

Page 53: Computation of Potential Flow Around Circular Cylinder

Output of the Program for Calculating Stream and Velocity Potential

Function

53