a newtonia… · acknowledgments thanks to allah, the creator of heavens and earth thanks to allah...

114
University of Baghdad College of science Department of Mathematics A Thesis Submitted to the College of Science University of Baghdad in Partial Fulfillment of the Requirements for the Degree of Master of Science in Mathematics. By Mohammed Sabah Hussein Al-Marsomi October 2006

Upload: lyquynh

Post on 12-Apr-2018

218 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

University of Baghdad

College of science Department of Mathematics

A Thesis Submitted to the College of Science University of Baghdad

in Partial Fulfillment of the Requirements for the Degree of Master of Science

in Mathematics.

By

Mohammed Sabah Hussein Al-Marsomi

October 2006

Page 2: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

ل أ ـ مــس◌◌◌◌◌◌◌◌◌◌◌◌◌◌◌◌◌◌ ب مـ يــــح الر ن م ــــحالر◌

"Ã م ت ل óÜك ر óÜ ض يفÜ ر óÈ Ã ثم هللا óÜ م ل ك الÜ ب ي ط ةÜ ج ش ك ةÜ ر òÉ ب ي طÜ ة

Ãصل õÜÜ ا ثهÜ ت اب óæ فرعÜ ا ف هÜ ◌◌◌◌◌◌◌◌مي السÜÜآ öÁ"

يم ظ ل الع أ ق د ص

Page 3: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Acknowledgments

thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed.

I would also like to thank my supervisor Dr. Ahmad M.

Abdul Hadi for suggestion the topics of the thesis and for the

advice, guidance and encouragement he gave me throughout

the time I worked under him.

I also wish to express may thanks to all the staff of

Department of Mathematics. Finally, I would also like to

extend my thanks to any everyone how help me to complete

this work.

Mohammed S. Hussaeen

October 2006

Page 4: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Contents

Abstract

Introduction

Chapter One Elementary Concepts and Basic Definitions

Introduction 1

1.1 Fluid Mechanics 1

1.2 Mass Density 2

1.3 Pressure 2

1.4 Viscosity 2

1.5 Coefficient of Dynamic Viscosity 3

1.6 Kinematics Viscosity 3

1.7 Classification of Fluids 3

1.7.1 Ideal Fluid 3

1.7.2 Real Fluid 4

1.7.3 Newtonian Fluid 4

1.7.4 Non- Newtonian Fluid 4

1.8 Reynolds Number 4

1.9 Type of Fluid Flow 4

1.9.1 Study and Unsteady Flow 5

1.9.2 Compressible and Incompressible Flow 5

1.9.3 Laminar and Turbulent Flow 5

1.10 Continuity Equation 6

1.11 Motion Equations 6

1.12 Classification of Flow

Page 5: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

1.13 Finite Difference Method (FDM) 7

1.14 Local Truncation Error 9

1.15 Rounding Error 9

1.16 Consistency of FDM 10

1.17 Stability of FDM 10

1.18 Control Volume 10

1.18.1 Finite Volume Method (FVM) 11

1.18.2 Advantages of using FVM 13

1.18.3 Chosen of Control Volume 13

1.18.4 Effect of the Mesh on the Numerical 15

Solution

1.19 Thomas Algorithm for Tridiagonal System 17

1.20 Gauss-Sidel Method 19

1.21 No – Slip condition 20

Chapter Two Formulation of the problem

Introduction 21

2.1 A mathematical Formulation 21

2.2 The Motion Equations and Continuity 24

Equation in Curvilinear Coordinates

2.3 Stress and Strain Components 25

2.4 Non-Dimensional Form of Continuity 26

and Motion Equations

2.5 The Naiver-Stokes Equations in Primitive 27

Variables

Page 6: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter Three MAC and SIMPLE Algorithm

Introduction 30

3.1 MAC Formulation 30

3.1.1 Staggered Grid 31

3.1.2 Discretization of MAC 31

3.1.3 The Lax Equivalence Theorem 35

3.1.4 Stability Restriction on Time step 35

3.1.5 Treatment of Boundary Conditions 38

3.1.6 Outline of MAC 42

3.2 SIMPLE Formulation 44

3.2.1 Discretization of SIMPLE Formulation 44

3.2.2 Modify Pressure and Velocity 52

3.2.3 Logic of SIMPLE Method 57

3.2.4 The SIMPLE Algorithm 58

3.2.5 Principle behind SIMPLE 58

3.2.6 Some Important Note about SIMPLE 59

Chapter Four Results and Discussion

Introduction 61

4.1 Discussion the results from MAC method 61

4.2 Discussion the results from SIMPLE method 64

4.3 Further study 66

References

Page 7: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr
Page 8: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

List of Symbol s

Symbol Description

ijT Shear Stress Components

ije Rate of strain Components

h Coefficient of dynamic Viscosity

Re Reynolds’s number

P Pressure

r Mass Density

t Time

τ Dimensionless Time

VU , Dimensional velocities in the x,y directions

vu, Dimensionless velocities in the x,y directions

u Kinematics’ viscosity 2Ñ Laplacian operator

321 ,, hhh Lame's parameters

δp Pressure correction δu Velocity correction

u velocity MAC Marker And Cell

SIMPLE Semi-Implicit Method for Pressure Linked Equations

FDM Finite Difference Method FVM Finite Volume Method

Page 9: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Abstract In this study consideration is given to viscose, incompressible,

and Newtonian fluid flowing in a pipe with square cross-section

under the action of pressure gradient. In particular consideration is

given to first order fluid flow which can be represented by the

equation of state of the form:

i,j = 1,2ijij eT 2 h=

Where η is constant of fluid, Tij and eij are the stress and rate

of strain respectively. Cartesian coordinate has been used to describe

the fluid motion and it found that motion equations are controlled by

Reynolds number.

The motion equations are solved by two algorithms namely

MAC and SIMPLE. Where the first of these two algorithms is an

explicit, while the second one is semi – implicit method.

QBASIC language is used to make the numerical computation

of these solutions, while the MATLAB package is used to draw

the figures velocity components in the plane. Our study is ended

with studying the effect time and Reynolds number on the secondary

flow.

Page 10: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Introduction

I

Introduction

A fluid is that state of matter which capable of changing shape

and is capable of flowing. Both gases and liquids are classified as

fluid, each fluid characterized by an equation that relates stress

to rate of strain, known as "State Equation ".And the number of

fluids engineering applications is enormous: breathing, blood flow,

swimming, pumps, fans, turbines, airplanes, ships, pipes... etc. When

you think about it, almost every thing on this planet either is a fluid

or moves with respect to a fluid

Fluid mechanics is considered a branch of applied mathematics

which deal with behavior of fluids either in motion (fluid dynamics)

or at rest (fluid statics).

The first one who worked in the flow analysis of Newtonian

fluids in curved pipes is Dean, (1927) [10]. He introduced a toroidal

coordinate system to show that the relation between pressure

gradient and the rate of flow through a curved pipe with circular

cross-section of incompressible Newtonian fluid is dependent on the

curvature. But he couldn't show this dependence and he will show in

second paper (1928) [11].In his paper Dean modified his analysis

by including higher order terms to be able to show that the rate of

flow is slightly reduced by curvature.

Page 11: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Introduction

II

Dean and Harst (1959)[12] obtained an approximate solution

of Newtonian fluid flow in a curved pipe with rectangular cross-

section assuming that the secondary motion is a uniformly moving

stream from inner to outer bend. They used a cylindrical coordinates

to write continuity and motion equation.

In paper [19], Jones (1960) makes a theoretical analysis of the

flow of incompressible non-Newtonian viscose liquid in curved

pipes with circular cross-section keeping only the first order terms.

He shows that the secondary motion consists of two symmetrical

vortices and the distance of the stream lines from the

central plan decreases as the Non-Newtonian parameters increase.

In (1961) Kawaguti [20] studied the flow of viscous fluid in a

two-dimensional rectangular cavity. He assumed that the cavity is

bounded by three rigid plan walls, and by a flat plate moving in its

own plan. The Reynolds number of the flow is varied as 0 , 1, 2 ,4 ,

8 , 16 , 32 , 62 , 128 and he find that in every case , there exits a

circulation flow extending the whole length of the cavity, also he

observed that no secondary flow seems to occur in the shallow

cavities when the Reynolds number less than 64.

In (1966) Pan.F and Acrivos [23].Consider that the flow is

steady flow in a rectangular translation of the top wall. They show

that the high Reynolds number flow should consist essentially of a

single inviscid core of uniform vorticity with viscose effects can

fined to thin shear layer near the boundaries.

Page 12: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Introduction

III

Greenspan, D. (1968) [17] he used a new numerical method

which is developed for the Navier-Stokes equation. Finite

differences smoothing and a special boundary technique are

fundamental. And this method is converges for all Reynolds

numbers, he shows that the resulting stream curves exhibit only

primary vortices.

Yakhot A. et al (1999) [33] studied pulsating laminar flow of a

viscose, incompressible liquid in a rectangular duct. The motion

equation is induced under an imposed pulsating pressure difference

the problem solved numerically. Difference flow reigns are

characterized by Non-dimensional parameters based on the

frequency of the imposed pressure gradient oscillation and the width

of the duct.

Ahmed.Z.H (2004) [1]. Studied the flow of Non-Newtonian

fluid in a curved duct with varying aspect ratio. And he solved the

Navier-Stokes equations in two methods first is Galerkin method

and other is finite difference.

Ali M. M. (2005) [2] concerned with the study of unsteady

flow of Non-Newtonian, viscose, incompressible fluid in a curved

pipe with rectangular cross-section, under the action of pressure

gradient. He used variational method namely, Galerkin method after

eliminating the dependence term on time.

Fathil A.A (2006)[15] concerned with the study of steady and

unsteady flow of Newtonian incompressible fluid in a curved annuls.

Consideration is given to two cases, steady and unsteady flow. An

orthogonal (toroidal) coordinates system has been used to describe

the fluid motion for each case.

Page 13: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Introduction

IV

This thesis contains four chapters:-

In chapter one we introduced an elementary concepts and

basic definitions that we will use in our work.

Chapter two deals with the mathematical formulation for two

dimensional, unsteady, viscose, incompressible, Newtonian fluid

flows. An orthogonal coordinates are used to describe the flow.

Chapter three contains the detail of the numerical methods,

which are used to solve our problem namely; MAC and SIMPLE

algorithms. These two algorithms are based on a finite volume

discretization on a staggered grid of the governing equations. Both

algorithms are iterative methods, but the first of these algorithms is

explicit method, while the second is semi- implicit method also this

chapter contains the stability of MAC.

The last chapter of these is concerned with study the effect of

Reynolds number and time on the fluid flow in the cross section. In

the end of this chapter we give some problem as further study.

Page 14: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter one

۱

Elementary concepts and Basic definitions

Introduction

In this chapter we give some elementary concepts and basic

definitions that we will use in our work latter on.

]22Mechanics [1.1 Fluid The subject of fluid mechanics deal with the behavior of fluids

when subjected to a system of forces. The subject of fluid mechanics

can be divided into three fields:

I – Statics: which deal with the fluid elements which are

rest relative to each other.

II – Kinematics: which deals with the effect of motion. i.e translation, rotation, and deformation on the fluid elements III – Dynamics: which deals with the effect of applied

forces on fluid elements.

The applications of fluid mechanics are in various fields of

engineering like hydraulics, chemical engineering, metrology, bio-

engineering etc.

Page 15: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter one

۲

]22] [32[ 1.2 Mass Density It is defined as mass per unit volume of fluid, and denoted by ρ

.................................. (1-1) 3 m kgv m

r æ ö= ç ÷è ø

Where kg is kilo gram and m3 is the unit of volume. ]32] [22[Pressure 1.3

The pressure is normal compressive force per unit area.

AreaForceP =

Where force equals mass times acceleration, and its unit is kg / m.s2

]32] [30] [4Viscosity [ 1.4

A viscosity of fluid is a characteristic of real fluid which

exhibits a certain resistance to change of form. Some of viscous

fluids is called "Newtonian fluids" if they obeys the linear

relationship given by Newton's law of viscosity.

………………... (1-2) dyduT h=

Where T is the shear stress (force per unit area),

du/dy is called as velocity gradient and η is the coefficient of

dynamics viscosity, or simply called viscosity.

Page 16: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter one

۳

velocity profile y u(y) du

dy

u

o no slip at wall

Fig (1) shows the Newtonian shear distribution in shear layer near a wall

4][ iscosityV 1.5 Dynamic The viscosity is defined as the tangential force required

per unit area to sustain a unit velocity gradient.

matics Viscosity [4]Kine 1.6 Is defined as the ratio of dynamic viscosity to mass

density and denoted by ν

....................................... (1-3) ÷÷ø

öççè

æ=

Tl 2

rhu

where l standing for lengh.

[22] sluidClassification of F 1.7

The fluid may be classified into the following types depending

up on the presence of viscosity.

luid (In viscid) .1 Ideal F1.7

Such a fluid, will not offer any resistance to displacement of surface in contact (i.e T = 0) where τ is shear stress.

Page 17: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter one

٤

luid .2 Real F1.7

Such fluid will always resist displacement.

luid Newtonian F .31.7

A real fluid in which shear stress is directly proportional to the

rate of shear strain. i.e (obeys the Newton's law of viscosity).

luid Newtonian F-Non.4 1.7 A real fluid in which shear stress is not directly proportional to

the rate of shear strain (non linear relation). i.e dose not obey the

Newton's law of viscosity.

30]] [22[ umberNReynold's 1.8

The Reynold's number, denoted by Re, is dimensionless and

represents the ratio of inertia forces to the viscous forces and is

given by:

.................................. (1-4) nmr VdVd

==Re

where d is standing for distance.

][22low Types of Fluid F 1.9 A Fluid flow consists of flow of number of small particles

grouped together. These particles may group themselves in variety

of ways and type of flow depends on how these groups behave. The

following are important types of fluid flow:

Page 18: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter one

٥

low .1 Steady and Unsteady F1.9 A flow is considered to be steady when conditions at any

point in the fluid flow do not change with time i.e

.0=¶¶

tV

And also the properties do not change with time; i.e

0,0 =¶¶

=¶¶

ttp r

Otherwise the flow is unsteady.

lowompressible and Incompressible FC .21.9

A flow is considered to be compressible if the mass density of

fluid (ρ) changes from point to point, or ρ ≠ constant. In case of

incompressible flow the change of mass density in the fluid is

neglected or density is assumed to be constant.

low.3 Laminar and Turbulent F1.9 Laminar flow in which fluid particles move along smooth

paths in laminar or layers, with one layer gliding smoothly over an

adjacent layer and it occurs for values of Reynold's number from 0

to 2000. And we say that the flow is turbulent flow if the fluid

particles move in very Irregular parts and when Reynold's number is

greater than 4000,and we say that the flow is translation if the values

of Reynold's number between 2000 and 4000.

Page 19: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter one

٦

]14[ quationsEotion M 1.10

It is a system of partial differential equations that describe the

fluid motion. The general technique for obtaining the equations

governing fluid motion is to consider a small control volume through

which the fluid moves, and require that mass and energy are

conserved , and that the rate of change of the two components of

linear momentum are equal to the corresponding components of the

applied force.

]n [14quatio1.11 Continuity E

The continuity equation simply expresses the law of

conservation of mass (the mass per unit time entering the tube must

be flow out at same rate ) in mathematical form. For an arbitrary

control volume V fixed in space and time, conservation of mass

requires that the rate of change of mass with in the control volume is

equal to the mass flux crossing the surface S of V, i.e.

..................... (1-5) ò ò ×-=V S

dSnVdVdtd rr

Where n is the unit (outward) normal vector. Using the

divergence theorem, the surface integral may be replace by a volume

integral (1-5) become

........................ (1-6)

( ) 0 t

=úûù

êëé ×Ñ+

¶¶

ò dVVV

rr

Page 20: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter one

۷

Since equation (1-6) is valid for any size of V it implies that

........................ (1-7) ( ) 0 t

=×Ñ+¶¶ Vrr

]14low [F Classification of 1.12

There are three kinds of flow with respect to its dimension:

1. Three dimension, V=V (u, v, w) where u = u(x,y,z,t), v= v(x,y,z,t)

w = w(x, y, z, t)

2. Two dimension V = V (u, v) where u = u(x,y,t) , v = v(x,y,,t)

3. One dimension u = u(t)

]32] [6] [5[ )Finite Difference Method (FDM 1.13 The idea of FDM is to approximate the partial derivatives in

physical equation by "differences" between nodes values spaced and

finite distance apart.

The process of replacing the partial derivatives with algebraic

difference is called the finite-difference approximation or

discretization of differential equation. These methods are powerful

and play major role in problem solutions.

To explain this concept, let ψ(x, y) be a function defines in the

Regin D, where D= {(x, y): 0≤x≤a, 0 ≤y≤c}.

The first step in finite -differences technique is divide the flow

filed into spaced nodes (not necessary of equal distance), let Δx, Δy

be the increment in x and y direction respectively and given by:

Δx = a / n Δy = c/m, where n and m are integer numbers

Page 21: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter one

۸

The grid points may be defined as;

xi=i Δ x i=0, 1,..., n yj = j Δy j=0, 1,..., m

By using Tayler expansion in the variable x about xj to generate

an algebraic approximation for the derivative ∂ψ∕∂x in the form of

................................ (1-8) )(),(),( xox

yxyxxx

D+D

-D+»

¶¶ yyy

Similar procedure one can obtain an approximation difference

formula for the second derivative in the form of

......... (1-9)

The subscript notation makes these expressions more compact let ψ(xi,yj) = ψi,j

..................... (1-10)

.......................... (1-11) 2,1,,1

2

2 2

xxjijiji

D

+-»

¶¶ -+ yyyy

)o(),(),(2),( 2

22

2

xx

yxxyxyxxx

D+D

D-+-D+»

¶¶ yyyy

xxjiji

D-

»¶¶ + ,,1

yyy

Page 22: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter one

۹

The above differences formula is known as central difference

formula.

And similarly a finite differences formula to ∂ψ∕∂y and ∂2ψ∕∂y2

can be written as:

...................... (1-12) yyjiji

D

¶¶ + ,1, yyy

................... (1-13) 21,.1,

2

2 2yy

jijiji

D

+-»

¶¶ -+ yyyy

r [8]Local Truncation Erro 1.14

Assume that H(X)=0 represent the finite difference equation

approximating the partial differential equation Q(x)=0 where X and

x are denoted the numerical and the exact solution of the PDE

respectively .The function L which define as L(x)=(H-Q)(x) is

called the local truncation error (L.T.E.) of the finite difference

scheme H. and the L.T.E. depend on time and space step .

]8Rounding Error [ 1.15 The type of discretize error which depends on the word-length

of the computer that has been used, and on the type of arithmetic

operation at each step is called rounding error (R.E).

Page 23: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter one

۱۰

]293] [[Consistency of FDM 1.16

The accuracy of a numerical computation based on a FDM

depends on the size of the grid spacing and time step, which are the

control parameters of numerical method. Then the FDM is said to be

consistent if the limiting value of the local truncation error approach

to zero as time and space step size goes to zero.

]29] [3[ Stability of FDM 1.17

A FDM is said to be stable if no rounding errors where

introduced into process of finding numerical solution. Thus the exact

solution of the FDM would be obtained at each mesh point, or when

cumulative effect of all rounding errors is negligible.

]32] [24[ Control Volume 81.1 A control volume is a finite region, chosen carefully by the

analyst, with open boundaries through which mass, momentum and

energy are allowed to cross, and it must be make a balance between

the incoming and outgoing fluid and the resultant changes with in

the control volume

The computational domain is divided into a number of non

overlapping control volumes such that there is one control volume

surrounding each grid point. Indeed driving the control volume

discretization equation by integrating the differential equation over a

finite control volume. And this process is commonly known as

Finite Volume Method (FVM).

Page 24: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter one

۱۱

][13] [14 .1 Finite Volume Method (FVM)1.18 Here the finite volume method will be illustrated for general

first-order partial differential equation,

....................... (1-14). 0=¶¶

+¶¶

+¶¶

yG

xF

tq

GFq ,, Which by appropriate choice of

represent the various equations of motion for example:

We have vGuFq rrr === ,, if

..................... (1-15).

This is two-dimensional version of the continuity equation,

then by using control volume concept to find the control volume

discretization equation

We integrate the equation (1-14) over a finite control volume

and by applying Green's theorem we get

.................. (1-16) 0=×+ òò dsnHdvqdtd

ABCD

. In Cartesian Coordinate )G,F(H = Where

dxGdyFndsH -=×

Where n is a normal unit vector see Fig (2).

0)()(=

¶¶

¶+

¶¶

yv

xu

trrr

Page 25: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter one

۱۲

j+1 j j-1

k+1 C D

k A B

k-1

Control volume Fig (2)

Consequently the FVM is discretization of governing equation

in integral form. In contrast to FDM, this usually applied to the

governing equation in differential form.

Then an approximation evaluation of (1-16) we have;

............... (1-17) å =D-D+WCD

ABkj xGyFqdtd 0)()( ,

Where Ω is the area of quadrilateral ABCD in Fig (2),qj,k is

the average value of q over quadrilateral , and from Fig(2) we see

that;

ΔyAB=yB-yA, ΔxAB=xB-xA, FAB=0.5(Fj,k-1+Fj,k), GAB=0.5(Gj,k-1+Gj,k)

and we also note that

ΔyAB=0, ΔxBC=0, ΔyCD=0, ΔxDA=0

Page 26: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter one

۱۳

Where the coordinate of the points A, B, C and D is:

A=(xA,yA), B=(xB,yB), C=(xC,yC), D=(xD,yD)

Then the equation (1-17) can be simplified as

0)(5.0)(5.0

)(5.0)(5.0

,,11,,

,1,,1,,

=D+-D++

D++D+-DD

-+

+-

yFFxGG

yFFxGGdt

dqyx

kjkjkjkj

kjkjkjkjkj

.............. (1-18) After eliminate the similar term and divide on ΔxΔy we have

........... (1-19) 022

1,1,,1,1, =D

-+

D

-+ -+-+

yGG

xFF

dtdq kjkjkjkjkj

This coincides with a central difference representation for the

spatial form in (1-14).

]24FVM [sing U .2 Advantages of1.18 The FVM which has been used for both incompressible and

compressible flow has two major advantages:

I- It has good conservation (of mass, energy, etc...) properties.

II-It allows complicate computational domains to be discredited in a

simpler.

][24 .3 Chosen of control volume1.18 There are two ways to choose the control volume faces as

fallows:

I-The faces located midway between the grid points.

II-Grid points placed at center of control volumes.

Page 27: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter one

۱٤

It should be noted that there are two kinds (in general) of

control volume first is the uniform control volume (when the grid

spacing are equal) and the other is non- uniform control volume

(when the grid spacing are not equal).

The above two ways will be identical if the control volume is

uniform hence we assume that in this place that is non-uniform.

For (I) is to place their faces midway between neighboring grid

points See Fig (3)

Control volume

N n E e P w W

Fig (3) s S

With respect to way (II), we draw the control volume first and

then place a grid point at the geometric center of each control

volume; hence in this way the faces do not lie midway between the

grid points. See Fig (4)

N y E n e p w W x s S

Fig (4) location of the control volume faces for way (II)

Page 28: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter one

۱٥

When we fixing the control volumes by using the methods I,II

some control volumes located near boundaries, to over come this

problem ;if we use the method (I) it lead us to use the " half " control

volumes .while in the method (II) it convenient to completely fill the

calculation domain with regular control volumes .

on olutiS umericalN thesh on of the Me s.4 Effect18.1

]24] [32[

There are three types of distribution of the velocity and the

pressure over mesh on the computational domain:

(I)-The velocity and the pressure are defined at the nodes of

the mesh see fig (5). In this type we have an advantages it is

simplicity and the fact that the velocity is defined on the boundary

Γ, but on the other hand have a disadvantages It is the pressure is

also defined on Γ, since there is generally on boundary condition for

pressure, and this type used by (Chorin, 1967)[9].

Γ

v u p

Γ

Fig (5)

Page 29: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter one

۱٦

(II)- The pressure is defined at nodes, and the velocity at the

center of point of control volume but the boundary Γ dose not pass

through the nodes see fig (6).therefore, the pressure is no longer

defined on the boundary Γ and we can use same formulas to

compute the whole pressure filed and this type used by (Fortin et, al

1971) [16].

Γ

P p

Fig (6) , v u *

P p

(III)- The Marker and Cell mesh or simply (MAC), on this type

we see that the pressure is defined at the nodes and the velocity

around it see fig (7)

A small disadvantages of this mesh is that only one of the

velocity components is defined on each side of the boundary Γ; so it

necessary to employ noncentered differences near the boundary Γ.

and this type used by(Harlaw and Welsh, 1965)[18]

Page 30: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter one

۱۷

Γ

P u p u v v

p u p u v v

Γ

Fig (7)

for Tridiagonal System AlgorithmThomas 1.19

]27[ ]8[

The use of Thomas algorithm is to solve a system of equation

Ax=S with a Tridiagonal matrix A, where

Ai,i-1= ci , Ai,i= ai , Ai,i+1= bi i= 1,2,...,N

The first part reduces the original system to the upper

bidiagonal system Ux= y, where

Ui,i = 1 and Ui,i+1 = di i=1,2,...,N

Page 31: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter one

۱۸

The second part performs the back-substiution, we summarize

in two steps as follows;

Step 1:

1 1

1 11

i+1 1

i+1 1 1i+1 1

1 = a

Do i = 1,N-1 d 1 = y a

End Do

i

i i ii i

d by s

bs c yc d

+

+ ++

é ù é ùê ú ê úë û ë û

é ù é ùê ú ê ú--ë û ë û

Step 2:

xN = yN

Do i = N-1 , 1 , -1

xi = yi – di xi+1

End Do

Remarks: 1 – The Thomas algorithm is special case of the Gauss

elimination algorithm for arbitrary systems.

2 – To get a unique solution for the system Ax= S, the matrixT

must be diagonally dominate, that is

i i > b cia +

for all i , the algorithm will not fail

Page 32: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter one

۱۹

3- The magnitudes of di determine the behavior of the round –

off error . If, for example, the elements di are constant equal to d,

the algorithm will be stable if the absolute value of d is less than

unity and otherwise is unstable.

4 - Clearly we see that Thomas algorithm is similar to LU

decomposition but when the matrix A is Tridiagonal.

]8[ ethodMSidel –Gauss 1.20

The simplest of all iterative methods is the Gauss-sidel method

in which the values of the variable are calculated by visiting each

grid point in certain order.

If the discretization equation is written as

..................... (1-20)å += bGaGa nbnbpp

Where the subscript nb denoted to a neighbour point, then Gp

at the visited grid point is calculated from

(1-21).................... p

nbnbp a

bGaG å +=

*

Where G*nb stand for the neighbor-point value from the

previous iteration.

In any case G*nb is the latest available value for the neighbor-

point. When all grid points have been visited in this manner, one

iteration of the Gauss-sidel method is complete.

Page 33: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter one

۲۰

]8Condition [Slip -1.21 No

The layers adjoins to the boundary have the same velocity as

the wall of the boundary.

Page 34: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter two

۲۱

Formulation of Problem

Introduction In this chapter we give the mathematical formulation for two

dimensional, unsteady, viscose, incompressible, Newtonian fluid

flow.

Actually, the class of problems to be studied called eddy

problems in a rectangle, an orthogonal coordinate is used to describe

the flow.

]21[ Formulation2.1 A mathematical Unsteady flow of fluid in the xy- plane is considered,

The Newtonian fluid is characterized by equation of state of the

form:

........... (2-1) i, j=1,2 ijij eT 2 h=

Where Tij , eij and η are stress , rate of strain and viscosity

coefficient respectively.

Page 35: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter two

۲۲

y

(1, 1) 1

x 1 0

Fig (8) illustrates the flow region of coordinate system and the flow in the xy-

plane.

The coordinate systems in the cross-section are related to

coordinates (x, y) by the equations:

X = x

............... (2-2) Y = y

And the line element is (ds)2 = (dx)2 + (dy)2 ............(2-3)

To drive the line element, let us denoted these by yi to distinguish

them from the general curvilinear coordinate xi .where y1,y2,x1 and

x2 is X,Y, x and y respectively .

The distance between two points P and Q with coordinate yi and

yi+dyi is ds where

........... (2-4)

å=

=2

1

2 )(k

kkdydyds

Page 36: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter two

۲۳

However

.

Hence we get

ji

jj

k

k

ii

k

dxdx

dxxydx

xyds

ij

2

1

2

g

)(

=

÷÷ø

öççè

涶

÷÷ø

öççè

涶

= å=

Where

........ (2-5)

And gij is called the metric tensor. Since it relates distance to the

infinitesimal coordinate increment.

Where only the diagonal terms are nonzero i.e (gii) the

coordinate system are orthogonal.

Then (ds)2= g11(dx1)2+g22(dx2)2 ..................................... (2-6)

We can compute g11,g22 which is g11=1,g22=1, if we put it in

(2-6) we get (2-3).

Since any line element ds in any curvilinear coordinates may be

written in the form:

........... (2-7)

ii

kk dx

xydy

¶¶

=

÷÷ø

öççè

涶

÷÷ø

öççè

涶

= å=

j

k2

1 i

k yy xx

gk

ij

2222

2121

2 )()( )( dxhdxhds +=

Page 37: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter two

۲٤

Where hi are called scale factor.

The comparison equation (2-7) with (2-3) gives us that;

h1=h2=1

2.2 The Motion Equations and Continuity Equation

][21 oordinatesin Curvilinear C The motion equations for two dimensional flow in curvilinear

coordinates can be written as:

9)-(2 .............................................

)(

)2(

)2()(

)2(

8)-(2 ......................................... .

)(

)1(

)1()(

)1(

2)1(

1)2(

21)2(

*

2

2

1)2(2)1(

22)(

21)2(

12)1(

21)1(

*

1

2

1)1(1)(

11)(

)2()1()2()2(

)2()1()1()1(

úû

ùêë

é

¶¶

+¶¶

-=úúû

ù

êêë

é÷÷ø

öççè

æ

¶-

¶¶

+¶¶

úû

ùêë

é

¶¶

+¶¶

-=úúû

ù

êêë

é÷÷ø

öççè

æ

¶-

¶¶

+¶¶

å

å

=

=

hT

xhT

x

hhxPh

xh

jVhxh

Vhx

VjVht

V

hhT

xhhT

x

hhxPh

xh

jVhxh

Vhx

VjVht

V

xxxx

j

jjj

xxxx

j

jjjj

r

r

And the continuity equation is

( ) ( ) 10)-(2 ................ 0)2(

)1(

1 1)2(2)1(

21

=úûù

êëé

¶¶

¶+

¶¶ hV

xhV

xhhtrrr

Here x(1),x(2) are coordinate x1 ,y1 respectively and V (1), V(2)

are the velocities components in the x1,y1 direction respectively.

In our problem U and V denoted the velocities in the direction

x1,y1 respectively.

Page 38: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter two

۲٥

If we put in the equations (2-8)-(2-10) for h1=h2=1 one can

obtain the motion equations and continuity equation for unsteady

Incompressible flow in two dimensions.

13)-(2 .................. 0

12)-.....(2..........

11)-(2 ............

11

111

*

11

111

*

11

1111

1111

=¶¶

+¶¶

¶+

¶+

¶¶

-=÷÷ø

öççè

涶

+¶¶

+¶¶

¶+

¶+

¶¶

-=÷÷ø

öççè

涶

+¶¶

+¶¶

yV

xU

xT

yT

yP

yVV

xVU

tV

yT

xT

xP

yUV

xUU

tU

yxyy

xyxx

r

r

In the above equations, we assume that the fluid is

incompressible (ρ = constant).

]28Components [2.3 Stress and Strain Let U and V be the velocity component in the direction

coordinates x1 and y1 respectively. Then physical components of the

rate of strain can be considered as:

÷÷ø

öççè

涶

+¶¶

==¶¶

=¶¶

=111

yy1 2

1e e 11111111 y

UxVe

yV

xUe xyyxxx

Using these components of strain to find the stress components

can be written as:

14)-(2 ....... 2 21111

11111111 ÷÷ø

öççè

涶

+¶¶

==¶¶

=¶¶

=yU

xVTT

yVT

xUT xyyxyyxx hhh

By using equations (2-14) the motion and continuity equations

in dimensional form can be written as:

Page 39: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter two

۲٦

( )

( )

17)-(2 ............................... 0

16)-(2 ..................... 1

15)-(2 .................... 1

11

2

1

*

11

2

1

*

11

=¶¶

+¶¶

Ñ=¶¶

+¶¶

+¶¶

+¶¶

Ñ=¶¶

+¶¶

+¶¶

+¶¶

yV

xU

VyP

yVV

xVU

tV

UxP

yUV

xUU

tU

rh

r

rh

r

21

2

21

22

yx ¶¶

+¶¶

=Ñ Where

And the boundary conditions that associated with equations

(2-15) and (2-16) are U = V = 0 on the boundary (which is Dirichelt

boundary condition).

Continuity and Motion ofdimensional Form -2.4 Non

squationE We can write down the motion and continuity equation (2-15)

- (2-17) in non-dimensional form through using scaling and order-

of- magnitude analysis. See [4] [14]

This is can be done through introduce the following new

quantities;

20

*

00

011

P

V

VP

VVv

VUu

at

ayy

axx

r

t

===

===

Page 40: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter two

۲۷

The substituting of these quantities into equations (2-15)- (2-17)

gives the motion and continuity equations in dimensionless form

which are:

( )

( )

20)-(2 ............................ 0

19)-(2 ....................... Re1

18)-.(2.................... Re1

2

2

=¶¶

+¶¶

Ñ=¶

¶+

¶¶

+¶¶

+¶¶

Ñ=¶

¶+

¶¶

+¶¶

+¶¶

yv

xu

vy

Pyvv

xvuv

ux

Pyuv

xuuu

t

t

The above equations are controlled by a parameter namely

the Reynold's Number Re = a V0 / ν, where ν is kinamtic viscosity.

The equations (2-18), (2-19) are known as Navier-stokes

equations and these equations describe the motion of Newtonian

flow.

Stokes Equations in Primitive -2.5 The Navier

][26] [31 Variables

The Navier-stokes equations for vector form can be written in

dimensionless form:

( )22)-(2 .......................... 0

21)-(2 ................... Re1)( 2

=×Ñ

Ñ=Ñ++¶¶

V

VPVAV

v

vvvv

t

Page 41: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter two

۲۸

is expressed by one of the following )(VAv

Where

equations according to the choice of conservative or non-

conservative form of the convective form:

24)-(2 .................. )()(23)-(2 ................... )()(

VVVAVVVA

vvv

vvv

×Ñ×=

×Ñ=

In Cartesian coordinate (x, y) the two components a (u, v), b

(u, v) of A (V) =a i+b j where V= (u, v) are given respectively,

................. (2-25)

( )

( )y

vx

uvvub

uvx

uvua

,

y

,

2

2

¶¶

+¶¶

=

¶¶

¶=

For equation (2-23) and by

.................... (2-26)

( )

( )yvv

xvuvub

yuv

xuuvua

¶¶

+¶¶

=

¶¶

+¶¶

=

,

,

For equation (2-24).

Atypical problem associated with equations (2-21) and (2-22)

as follows:

Find V, P solution of equations (2-21) and (2-22) in abounded

domain Ω with the boundary Γ such that V is given on the boundary

Γ by the equation V=VΓ and V is given at initial time t = 0

00 =×Ñ V by V= V0 and V0 must satisfy

Page 42: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter two

۲۹

If we use the form in equation (2-23) with equation (2-25)

In equations (2-21)-(2-22) we have:

( )

( )

29)-(2 ......................... 0

28)-(2 ....................... Re1

27)-(2 ..................... Re1

22

22

=¶¶

+¶¶

Ñ=¶

¶+

¶¶

¶+

¶¶

Ñ=¶

¶+

¶¶

+¶¶

+¶¶

yv

xu

vy

Pyv

xuvv

ux

Pyuv

xuu

t

t

Page 43: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter three

۳۰

MAC and SIMPLE Algorithms

Introduction In this chapter we will give in detail the numerical methods,

which will be used to solve our problem.This family of algorithms is

based on a finite volume discretization on a staggered grid of the

governing equations.

The first of these methods is called Marker And Cell (MAC)

[18] [14].The second method is the Semi-Implicit Method for

Pressure Linked Equations (SIMPLE) [25].

]143.1 MAC Formulation [ One of the earliest, and most widely used method for solving

(2-27)-(2-29) is the MAC method which is due to Harlaw and Welch

(1965) [18].The method is characterized by use the staggered grid

see (3.1.1) and the solution of a Poisson equation for pressure at

every time-step.

The MAC method was initially devised to solve problems

with free surfaces, but it can be applied to any incompressible fluid

flow.

Page 44: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter three

۳۱

]143.1.1 Staggered Grid [ Computational solutions of equations (2-27)-(2-29) are often

obtain on a staggered grid, this implies that different dependent

variables are evaluated at different grid point; in Sec (1.18.4)

compare various staggered grids for the treatment of pressure.

The preferred staggered grid configuration is that shown in

Fig (9).

vj+1,k+1/2 vj,k+1/2

uj+3/2,k Pj+1,k uj+1/2,k Pj,k uj-1/2,k

Vj+1,k-1/2 vj,k-1/2

Fig (9) Staggered Grid It can be seen that pressures are defined at the center of each

cell and that velocity components are defined at the cell faces.

Which is the prototype of MAC mesh distribution.

]26] [143.1.2 Discretization of MAC [ The spatial discretization makes use of the staggered grid

(MAC mesh). We consider a very simple explicit discretization in

time. We choose the conservative form of Navier-Stokes equations

(2-25)

Page 45: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter three

۳۲

In discrediting (2-27) finite difference expressions centered at

grid point (j+1/2, k) are used. This allows ∂P/∂x to be discredited as

(Pj+1,k-Pj,k)/Δx which is a second-order discretization about grid point

(j+1/2,k).Similarly equation (2-28) is discredited with finite

difference expressions centered at grid point (j,k+1/2)and ∂P/∂x is

represented as (Pj,k+1-Pj,k)/Δy .

The use of the staggered grid primits coupling of the u,v and P

solutions at adjacent grid points.This in turn prevents the appearance

of oscillatory solutions, particularly for P ,that can occur if centered

difference are used to discretize all derivatives on anon-staggered

grid. The oscillatory behavior is usually worse at high Reynolds

number where the dissipative terms which do introduce adjacent

grid point coupling for u and v ,are small.

The following finite differences expressions are utilized:

......(3-1)

( ) ( )

( ) ( )

( ) ( ) ( )

( ) ( )22

,2/1,2/1,2/3

,2/12

2

22/1,2/12/1,2/1

,2/1

22,

2,2/1

,2/1

2

,2/11

,2/1

,2/1

2xO

xuuu

xu

yOy

uvuvyuv

xOx

uux

u

Ouuu

kjkjkj

kj

kjkj

kj

kjkj

kj

nkj

nkj

kj

D+D

+-=ú

û

ùêë

鶶

D+D-

=úû

ùêë

鶶

D+D

-=ú

û

ùêë

é¶

D+D-

=úûù

êë鶶

-++

+

-+++

+

+

+

+++

+

ttt

Page 46: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter three

۳۳

( ) ( )

( ) ( )2,,1

,2/1

22

1,2/1,2/11,2/1

,2/12

2

xOx

PPxP

yOy

uuuyu

kjkj

kj

kjkjkj

kj

D+D

-=úû

ùêëé

¶¶

D+D

+-=ú

û

ùêë

鶶

+

+

+++-+

+

In the above expressions terms like uj+1,k appears, which are

not defining in Fig (9). To evaluate such terms averaging is

employed i.e

uj+1,k= 0.5(uj+1/2,k+uj+3/2,k)

Similarly (uv)j+1/2,k+1/2 is evaluated as;

(uv)j+1/2,k+1/2 = 0.25( uj+1/2,k+uj+1/2,k+1)(vj+1,k+1/2+vj,k+1/2)

In the MAC formulation the discretizations (3-1) allow the

following explicit algorithm to be generated from (2-27) (2-28):

............... (3-2) [ ]1,

1,1,2/1

1,2/1

++++

++ -

DD

-= nkj

nkj

nkj

nkj PP

xFu t

Where

( ) ( )úúúúúúúú

û

ù

êêêêêêêê

ë

é

D-

-D-

-D

+-

-D

+-

D+=

-++++

+++-+

-++

++

yuvuv

xuu

yuuu

xuuu

uF

nkj

nkj

nkj

nkj

kjn

kjn

kjn

kjn

kjn

kjn

nkj

nkj

2/1,2/12/1,2/1,2

,12

2

1,2/1,2/11,2/1

2

,2/1,2/1,2/3

,2/1,2/1

)()()(Re)(

)()(2)()(Re)(

)()(2)(

t

........................ (3-3)

Page 47: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter three

۳٤

Similarly the discredited form of equation (2-28) can be

written as

..................... (3-4)[ ]1,

11,2/1,2/1,

+++++ -

DD

-= nkj

nkj

nkj

nkj PP

yGv t

Where

( ) ( )

úúúúúúúúúú

û

ù

êêêêêêêêêê

ë

é

D-

-D-

-D

+-+

D+-

D+=

+

+-++

-++

+-+++

++

yvv

xuvuv

yvvv

xvvv

vG

nkj

nkj

nkj

nkj

nkj

nkj

nkj

nkj

nkj

nkj

nkj

nkj

,2

1,2

2/1,2/12/1,2/1

2

2/1,2/1,2/3,

2

2/1,12/1,2/1,1

2/1,2/1,

)()(

)Re)(()()(2)(

)(Re)()()(2)(

t

...................... (3-5)

In equations (3-2) and (3-4) the pressure appears implicitly;

however, Pn+1 is obtained before equations (3-2) and (3-4) are used,

as follows.

The continuity equation (2-29) is discredited as;

................ (3-6)

( ) ( ) 0

12/1,

12/1,

1,2/1

1,2/1 =

D-

+D- +

-+

++-

++

yvv

xuu n

kjn

kjn

kjn

kj

Page 48: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter three

۳٥

, from (3-2) (2-4) 1

2/1,1

,2/1 , ++

++

nkj

nkj vu Substitution for

allows (3-6) to be rewritten as a discrete Poisson equation for

pressure, i.e

( ) ( )

{ } { }úúû

ù

êêë

é

D

-+

D

-

D=

úû

ùêë

éD

+-+

D

+-

-+-+

++-+-

yGG

xFF

yPPP

xPPP

nkj

nkj

nkj

nkj

nkjkjkjkjkjkj

2/1,2/1,,2/1,2/1

1

21,,1,

2,1,,1

1

22

t

...................... (3-7)

equation (3-7) is solved at each time step, either using iterative

techniques[30]or the direct Poisson solvers[13].for us we will use

the Gauss-sidel which is describes in section (1.20) once a solution

for Pn+1 has been obtained from (3-7), substitution in to equations

to be computed. 1

2/1,1

,2/1 , ++

++

nkj

nkj vu (3-2)(3-4) permits

][26 ]143.1.3 The Lax Equivalence Theorem [ For a well-posed initial value problem associated with a

linear equation of evolution and approximated with a consistent

scheme, stability is a necessary and sufficient condition for

convergence.

]P.148] [26Stability Restriction on time step [ 3.1.4

Since (3-2) and (3-4) are explicit algorithm for un+1 and vn+1

there is a restriction on the maximum time step for stable solution.

We will drive this restriction below;

the equation (3-2) and (3-4) can be rewritten as:

Page 49: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter three

۳٦

( ) ( )nkj

nkjx

nkj

nkj

nkj uPauu ,2/1

2,2/1

1,2/1,2/1

1,2/1 Re

11++++

++ Ñ=D++-

Dt

................... (3-8)

( ) ( )nkj

nkjy

nkj

nkj

nkj vPbvv 2/1,

22/1,

12/1,2/1,

12/1, Re

11++++

++ Ñ=D++-

Dt

................... (3-9)

are defined by; 2 Ñ and 1y

1 , DD x Where the difference operators

......... (3-10)

( )

( )

( )

( )2

1,,1,,

2,1,,1

,

,,,2

2/1,2/1,,1

,2/1,2/1,1

2

2

1

1

yfff

f

xfff

f

fff

ffx

f

ffx

f

mlmlmlmlyy

mlmlmlmlxx

mlyymlxxml

mlmjmly

mlmlmlx

D

+-=D

D

+-=D

D+D=Ñ

-D

=D

-D

=D

-+

-+

-+

-+

n

kjb 2/1, + and n

kja ,2/1+ Where l,m are integers or not.The terms

are the approximations of a(u,v) and b(u,v) as defined in (2-25)

In the case where the non conservative form (2-26) is used, we

have;

Page 50: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter three

۳۷

............ (3-11) nkjy

nkj

nkjx

nkj

nkj

nkjy

nkj

nkjx

nkj

nkl

vvvub

uvuua

2/1,0

2/1,2/1,0

2/1,2/1,

,2/10

,2/1,2/10

,2/1,2/1

ˆ

ˆ

+++++

+++++

D+D=

D+D=

Where

.......... (3-12)

All these approximations are of second-order accuracy.

In order to establish stability an approximate linear system is

made. In the linearization process approximations (3-11) so we

consider only the assumption;

.......... (3-13) )constant ( ˆ)constant ( ˆ

0,2/12/1,

02/1,,2/1

vvvuuu

kjkj

kjkj

==

==

++

++

A first study is made by neglecting the pressure term in (3-8)

(3-9). the result equations for each the two momentum equations are

of the advection-diffusion type [26] [p.65]:

( ) nkjyx

nkj fvuIf ,

200

00

1, Re

1úû

ùêë

é÷øö

çèæ Ñ-D+DD-=+ t

............................ (3-14)

( )

( )

( )

( )1,1,,0

,1,1,0

2/1,12/1,2/1,2/1,1,2/1

,2/11,2/11,2/1,2/12/1,

21

21

41ˆ

41ˆ

-+

-+

-+-++++

-+-++++

-D

=D

-D

=D

+++=

+++=

mlmlmly

mlmlmlx

kjkjkjkjkj

kjkjkjkjkj

ffy

f

ffx

f

vvvvv

uuuuu

Page 51: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter three

۳۸

Where I is the identity operator.

the condition of stability of this difference equation is

where Δx=Δy

( )

( )( ) 1Re

4

1Re 41

2

200

£D

D

£D+

x

vu

t

t

............... (3-15)

][26] [14 3.1.4 Treatment of Boundary Conditions

Let Γ be the boundary of the computational domain and

assume that the velocity V is given on Γ; i.e VΓ = (uΓ,vΓ) there is

no condition for the pressure P. But in our problem there is a

boundary conditions for velocity which is Dirichelt boundary

condition i.e u = v = 0 on Γ.

Hence we tray to find a formulation for the pressure P on the

boundary Γ. where the computational domain is a square-cross

section named as ABCD see Fig (10). The grid is arranged so that

boundaries pass through velocity points but not pressure points. from

Fig (10) clearly

v1,1/2 = v2,1/2 = . . . = 0 since BC is a solid wall and also

u1/2,1 = u1/2,2 = . . . = 0 since AB is a solid wall or in

general form

Page 52: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter three

۳۹

vj,1/2 = 0 for each j = 1,2,3,. . . ,n on BC

u1/2,k = 0 for each k = 1,2,3,. . . ,m on AB

And vj,m+1/2 = 0 for each j = 1,2,3,. . . ,n on AD

un+1/2,k = 0 for each k = 1,2,3,. . . ,m on CD

............ (3-16)

The evaluation of the Poisson equation for pressure (3-7)

requires values of the pressure out side of the domain, when (3-7)

is evaluated centered at node (2,1) values of P2,0 and v2,-1/2 are

required.

The P2,0 can be calculated by expand equation (2-28) at the

center of the wall, since V at the boundary is not a function of time

that implies ∂v/∂τ = 0 and also ∂v2/∂y = 0 (by using boundary

conditions (3-16)). And ∂uv/∂x, ∂2v/∂x2 will be vanish at the wall,

hence the equation (2-28) will be

17)-(3 ........................... Re1

2

2

yv

yP

¶¶

=¶¶

In discredited form this becomes;

( )18)-(3 ................

2Re1

21,,1,1,,

y

vvvyPP kjkjkjkjkj

D

+-=

D

- -+-

We have

( ) 19)-(3 .............. Re2 1,,1,

,1, yvvv

PP kjkjkjkjkj D

+--= -+

-

Page 53: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter three

٤۰

We apply equation (3-19) at the node (2, 1)

( ) 20)-(3 .............. Re2 2/1,22/1,22/3,2

1,20,2 yvvv

PPD

+--= -

For equation (3-20), we put v2,1/2 = 0 by using boundary

conditions (3-16) , but we need the value of v2,-1/2 , the continuity

equation (2-29) is satisfied at boundary, this implies that ∂v/∂y = 0

(Since ∂u/∂x = 0) which may be written in difference form as:

01,1, =D

- -+

yvv kjkj

From which, we obtain vj,k+1 = vj,k-1 ; for example at (2,1/2)

we have

v2,3/2 = v2,-1/2 ........... (3-21)

The substitution of equation (3-21) in to (3-20) gives

..................... (3-22)( ) Re2

2/3,21,20,2 y

vPP

D-=

In general we have

................ (3-23) ( ) Re2

2/1,,1, y

vPP kj

kjkj D-= +

-

This is the pressure formulation at the boundary i.e at the wall

BC.

Page 54: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter three

٤۱

By similar technique we can find the pressure formulation at

the wall BC, CD and AD which are:-

.......................... (3-24)( ) Re2

,2/1,,1 x

uPP kj

kjkj D-= +

-

...................... (3-25) ( ) Re2

,2/1,,1 x

uPP kj

kjkj D+= -

+

....................... (3-26)( ) Re2

2/1,,1, y

vPP kj

kjkj D+= -

+

Respectively.

]183.1.5 Outline of MAC [

The following sequences of events by which the configuration

is advanced from one time step to the next

1. The complete filed of velocities is known at the beginning

of the cycle, either as a result of the previous cycle of calculation or

from the prescribed initial conditions.

2. The corresponding filed of pressure is calculated in such a

way as to assume that the rate of change of the velocity divergence

also vanishes every where. this requires the solution of a Poisson's

equation (3-7), which may be accomplished by relaxation technique

or any other suitable procedure sec. (1.20)

Page 55: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter three

٤۲

3. The two components of acceleration are calculated; the

products of these with the time increment per cycle then give the

changes in velocity to be added to the old values.

4. The marker particles are moved according to the velocity

Components in their vicinities.

Page 56: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter three

٤۳

-3.2 SIMPLE Formulation:

]14] [13Formulation [3.2.1 Discretization of SIMPLE On staggered grid, difference control volumes are used to

difference equations. Thus the physical location of Pj+1/2,k and uj,k

are the same physical location of Pj,k+1/2 and vj,k . For sake of

simplification, we will use equidistance grid points.

In order to obtain discrete equation corresponding to the

continuity equation (2-29) we will apply the FVM over the control

volume that shown in Fig (11)

n vj,k

e uj,k Pj,k uj-1,k w

s vj,k-1

Fig (11) control volume for continuity equation

The continuity equation (2-29) is

0 =¶¶

+¶¶

yv

xu

The integration of the first term gives

( ) ( ) ( ) tttttt

t

D-=DD-DD=÷øö

çèæ

¶¶

ò ò òD+

wewe

n

s

e

w

FFyuyuddydxxu

1

................. (3-27)

Page 57: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter three

٤٤

Where (u)ew = ue-uw and Fe= ue Δy , Fw= uw Δy

similarly , for the second term

( ) ( ) ( ) tttttt

t

D-=DD-DD=÷÷ø

öççè

涶

ò ò òD+

snsn

e

w

n

s

FFxvxvddxdyyv

1

.................. (3-28) Where (v)n

s = vn-vs and Fn= vn Δx , Fs = vs Δx

substitute in to the continuity equation we obtain:-

( Fe – Fw )+( Fn – Fs) = 0 ........................ (3-29)

the last equation can be written as;

( ue – uw ) Δy + ( vn – vs ) Δx = 0 ....................... (3-30)

from the Fig (11) we have

ue = uj,k , uw = uj-1,k , vn = vj,k and vs = vj,k-1

Then the equation (3-30) becomes

( ) ( ) 0 11,

1,

1,1

1, =D-+D- +

-++

-+ xvvyuu n

kjn

kjn

kjn

kj

............... (3-31)

The a application of the FVM to the x- momentum equation

(2-27), using the control volume shown in Fig (11) leads to the

following discrete equation

( ) ( ) ( )( ) 0 1

,1,1

)1(2/1,

)1(2/1,

)1(,2/1

)1(,2/1,

1,

=D-+

D-+D-+-÷øö

çèæ

DDD

+++

-+-++

yPP

xGGyFFuuyx

nkj

nkj

kjkjkjkjn

kjn

kjt

................. (3-32)

Page 58: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter three

٤٥

The last equation can be obtained by applying the equation

(1-14) when we choose

yuuvG

¶¶

-=Re1

and

And through equation (1-19) we will obtain the above

discretization (3-32) where

34)-(3 .................. Re1

33)-(3 .................. Re1

)1(

2)1(

yuuvG

xuuF

¶¶

-=

¶¶

-=

)1(GG = and PFF += )1(

Thus

Then the discretization form corresponding to(3-33)and (3-34)

are

( )( )

( )( ) 36)-(3 ......... Re125.0

35)-(3 ....... Re125.0

1,1

1,1

,1,1,,1

)1(,2/1

1,

1,11

,11

,,1,)1(

,2/1

xuu

uuuuF

xuu

uuuuF

nkj

nkjn

kjn

kjn

kjn

kjkj

nkj

nkjn

kjn

kjn

kjn

kjkj

D

--++=

D

--++=

+-

+++

---

++++

++

++

Re1 , 2

xuPuFuq

¶¶

-+==

Page 59: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter three

٤٦

( )( ) 37)-(3 ..... Re1 25.0

1,

11,1

1,1

,,1,)1(

2/1, yuu

uuvvGn

kjn

kjnkj

nkj

nkj

nkjkj D

--++=

++++

++

-+

( )( ) 38)-(3 .... Re1 25.0

11,

1,1

,1

1,1,11,)1(

2/1, yuu

uuvvGn

kjn

kjnkj

nkj

nkj

nkjkj D

--++=

+-

+++

-----

The substitution of (3-35)-(3-38) into (3-32) and rearranging

the terms, leads to the discrete equation in the x- direction , this is

given by

( )

] [ ( )

] ( ) 0

Re225.0

Re225.0

1,

1,1

11,1,

11,1,

1,1,11,

1,1,1

1,1,1

1,

1,1

1,1

1,

=D-+

++÷÷ø

öççè

æD

D+D--++

+êë

é÷øö

çèæ

DD

+D-++D

DD

+++

+--

+++

+-+-

+--

+++

++-

++

+

yPPua

uauy

xxvvua

uaux

yyuubuyx

nkj

nkj

nkj

ukj

nkj

ukj

nkj

nkj

nkj

nkj

ukj

nkj

ukj

nkj

nkj

nkj

unkjt

.......................... (3-39)

Equation (3-39) can be rearranged as

( ) 0 1,

1,1

11,1,

11,1,

1,1,1

1,1,1

1,,

=D-++

++++÷øö

çèæ +

DDD

+++

+--

+++

+--

+++

+

yPPua

uauauabuayx

nkj

nkj

nkj

ukj

nkj

ukj

nkj

ukj

nkj

ukj

unkj

ukjt

..................... (3-40)

Page 60: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter three

٤۷

Where

( ) ( )

( )

( )

( )

( ) ÷÷ø

öççè

æDD

-D+-=

÷÷ø

öççè

æDD

-D+=

÷øö

çèæ

DD

-D+-=

÷øö

çèæ

DD

-D+=

÷÷ø

öççè

æDD

+DD

+D--+D-=

--

++

--

++

-+--+

yxxvva

yxxvva

xyyuua

xyyuua

xy

yxxvvyuua

nkj

nkj

ukj

nkj

nkj

ukj

nkj

nkj

ukj

nkj

nkj

ukj

nkj

nkj

nkj

nkj

ukj

Re125.0

Re125.0

Re125.0

Re125.0

Re225.025.0

1,,1,

1,,1,

,,1,1

,,1,1

1,11,,1,1,

And n

kju uyxb ,tD

DD-=

The above equation can be written in more convent form by

use of summation

( )

01,

1,1

11,, =D-+++÷

øö

çèæ +

DDD ++

+++ å yPPbuauayx n

kjn

kjun

nbunb

nkj

ukjt

........................ (3-41)

Page 61: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter three

٤۸

denoted all the convection and diffusion å +1nnb

unbua Where

contributions form neighboring nodes denoted by nb .The

depend on the grid sizes and the solution unba and u

kja , coefficients

u, v at the n-th time level. It may be noted that some terms in F(1)

and G(1) have been evaluated at the n-th time level to ensure that

(3-41) is linear in un+1 .

Using the FVM, the discredited form of the y- momentum

equation (2-28) can be written by applying the equation (1-19)

when we choose

yvPvG

¶¶

-+=Re12

and

We have

( ) ( ) ( )( ) 0 1

,11,

)2(2/1,

)2(2/1,

)2(,2/1

)2(,2/1,

1,

=D-+

D-+D-+-÷øö

çèæ

DDD

+++

-+-++

xPP

xGGyFFvvyx

nkj

nkj

kjkjkjkjn

kjn

kjt

................ (3-42)

Where

Re1

Re1 2)2()2(

yvvG

xvuvF

¶¶

-=¶¶

-=

PGG += )1(

and )1(FF = thus

Re1 ,

xvuvFvq

¶¶

-==

Page 62: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter three

٤۹

The discretization form for F(2) and G(2) are :

( )( )

( )( ) 44)-(3 ........ Re125.0

43)-(3 ....... Re125.0

1,1

1,

1,11,1

1,

1,1

)2(,2/1

1,

1,1

1,,1,1

1,

)2(,2/1

xvv

uuvvF

xvv

uuvvF

nkj

nkjn

kjn

kjn

kjn

kjkj

nkj

nkjn

kjn

kjn

kjn

kjkj

D

--++=

D

--++=

+-

+

+-+-

++--

+++

+++

++

( )( ) 45)-(3 ..... Re1 25.0

1,

11,

1,,1

1,1

,)2(

2/1, yvv

vvvvGn

kjn

kjnkj

nkj

nkj

nkjkj D

--++=

+++

++

++

+

( )( ) 46)-(3 ..... Re1 25.0

11,

1,

,1,1

,1

1,)2(

2/1, yvv

vvvvGn

kjn

kjnkj

nkj

nkj

nkjkj D

--++=

+-

+

-++

--

The substitution of (3-43)-(3-46) into (3-42) we have

( )

] [ ( )

] ( ) 0

Re225.0

Re225.0

1,

11,

11,1,

11,1,

1,1,1,

1,1,1

1,1,1

1,

11,1

1,1

1,

=D-+

++÷÷ø

öççè

æD

D+D-++

+êë

é÷øö

çèæ

DD

+D--++D

DD

+++

+--

+++

+-+

+--

+++

++--

+-

+

xPPva

vavy

xxvvva

vavx

yyuubvyx

nkj

nkj

nkj

vkj

nkj

vkj

nkj

nkj

nkj

nkj

vkj

nkj

vkj

nkj

nkj

nkj

vnkjt

........................ (3-47) Equation (3-47) can be rearranged as

( ) 0 1,

11,

11,1,

11,1,

1,1,1

1,1,1

1,,

=D-++

++++÷øö

çèæ +

DDD

+++

+--

+++

+--

+++

+

xPPva

vavavabvayx

nkj

nkj

nkj

vkj

nkj

vkj

nkj

vkj

nkj

vkj

vnkj

vkjt

.................... (3-48)

Page 63: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter three

٥۰

Where

( ) ( )

( )

( )

( )

( ) ÷÷ø

öççè

æDD

-D+-=

÷÷ø

öççè

æDD

-D+=

÷øö

çèæ

DD

-D+-=

÷øö

çèæ

DD

-D+=

÷÷ø

öççè

æDD

+DD

+D-+D--=

--

++

+---

++

-++--

yxxvva

yxxvva

xyyuua

xyyuua

xy

yxxvvyuua

nkj

nkj

vkj

nkj

nkj

vkj

nkj

nkj

vkj

nkj

nkj

vkj

nkj

nkj

nkj

nkj

vkj

Re125.0

Re125.0

Re125.0

Re125.0

Re225.025.0

1,,1,

1,,1,

1,1,1,1

1,,,1

1,1,1,1,1,

And n

kjv vyxb ,tD

DD-=

The above equation can be written in more convent form by

use of summation

( )

01,

11,

11,, =D-+++÷

øö

çèæ +

DDD ++

+++ å xPPbvavayx n

kjnkj

vnnb

vnb

nkj

vkjt

....................... (3-49)

Page 64: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter three

٥۱

At any intermediate stage of the SIMPLE iterative procedure

the solution is to advance from the (n)th time level to the (n+1)th.

the velocity solution is advanced in two stage .First the momentum

equation (3-41) and (3-49) are solved to obtain an approximation

u*and v* of un+1 and vn+1 that dose not satisfy continuity ; hence we

must modify the pressure and velocities.

][24] [25 3.2.2 Modify Pressure and Velocity The solution of equations(3-41)and (3-49)is an approximation

solution u*and v* of un+1 and vn+1 respectively. This velocity

components (u*, v*) will not satisfy the continuity equation (3-31).

Hence using the approximate velocity u*, a pressure correction δP

is sought which will both give Pn+1 = Pn + δP and provide a velocity

correction uc , such that un+1 = un + uc where un+1 satisfies the

continuity in the form (3-31) and similarly for velocity v*.

The equations (3-41) and (3-49) can be written as:

( ) yPPbuauayx nkj

nkj

unnb

unb

nkj

ukj D---=+÷

øö

çèæ +

DDD ++

+++ å 1

,1,1

11,,

t

.................... (3-50)

( ) xPPbvavayx nkj

nkj

vnnb

vnb

nkj

vkj D---=+÷

øö

çèæ +

DDD ++

+++ å 1

,11,

11,,

t

....................... (3-51)

Page 65: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter three

٥۲

To obtain u* and v* equations (3-50) and (3-51) are

approximated as

( ) yPPbuauayx nkj

nkj

unb

unbkj

ukj D---=+÷øö

çèæ +

DDD

+å ,,1**

,,t

............... (3-52)

( ) xPPbvavayx nkj

nkj

vnb

vnbkj

vkj D---=+÷

øö

çèæ +

DDD

+å ,1,**

,,t

........................ (3-53)

Subsequently equations (3-50) and (3-51) are written as scalar

tridiagonal systems along each y grid line (j constant) and solved

using the Thomas algorithm sec (1.19)

To obtain equation for subsequent velocity correction uc

equation (3-50) is subtracted from (3-41) to give

( ) yPPuauayxkjkj

cnb

unb

ckj

ukj D---=÷

øö

çèæ +

DDD

+å ,,1,, ddt

...................... (3-54)

Page 66: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter three

٥۳

And equation (3-51) is subtracted from (3-49) to give a

corresponding equation for vc which is

( ) xPPvavayxkjkj

cnb

vnb

ckj

vkj D---=÷

øö

çèæ +

DDD

+å ,1,,, ddt

...................... (3-55)

However to make the link between uc and δP and vc and δP as

å- cnb

vnbva , å- c

nbunbua explicit as possible we will drop the quantity

for closer approximation.

The SIMPLE algorithm approximates equations (3-54)and

(3-55) as

.................. (3-56) ( )kjkjxkj

ckj PPdu ,1,

)(,, +-= dd

Where

yxa

Eu

kj

DDD

= , t and { }u

kj

xkj aE

yEd,

)(, )1( +

D=

An equivalent expression can be obtained to link vj,kc with

(δPj,k – δPj,k+1) which is

........... (3-57) ( )1,,)(

,, +-= kjkjykj

ckj PPdv dd

Page 67: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter three

٥٤

Where

yxa

Ev

kj

DDD

= , t and

To obtain an equation that link δP with the velocity u* and v*,

introducing the velocity correction in the form

........................ (3-58)c

kjkjn

kj uuu ,*

,1

, +=+

And

......................... (3-59)

Substituting equations (3-58) and (3-59) into (3-31) we

obtain ;

( ) ( ) 01,*

1,,*

,,1*

,1,*

, =--+D+--+D ----c

kjkjc

kjkjc

kjkjc

kjkj vvvvxuuuuy

................... (3-60)

From (3-56) and (3-57) we have ,

( )1,,)(

,, +-= kjkjykj

ckj PPdv dd , ( )kjkj

xkj

ckj PPdu ,1,

)(,, +-= dd

And as a consequence (3- 60) becomes

{ }vkj

ykj aE

yEd,

)(, )1( +

D=

ckjkj

nkj vvv ,

*,

1, +=+

Page 68: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter three

٥٥

{ }{ }

( ) ( )*1,

*,

*,1

*,

,1,)(

1,1,,)(

,

,,1)(,1,1,

)(,

)()(

)()(

--

--+

--+

-D--D-=

---D

+---D

kjkjkjkj

kjkjykjkjkj

ykj

kjkjx

kjkjkjxkj

vvxuuy

PPdPPdx

PPdPPdy

dddd

dddd

...................... (3- 61)

( ) ( )*1,

*,

*,1

*, -- -D--D-= kjkjkjkj

P vvxuuyb Let

rearrange the terms in equation (3-61) we have

Pkj

Pkjkj

Pkjkj

Pkjkj

Pkjkj

Pkj bPaPaPaPaPa ++++= --++--++ 1,1,1,1,,1,1,1,1,, ddddd

................... (3-62)

Where

( ) ( )

)(1,1,

)(,1,

)(,1,1

)(,,1

)(1,

)(,

)(,1

)(,,

, ,ykj

Pkj

ykj

Pkj

xkj

Pkj

xkj

Pkj

ykj

ykj

xkj

xkj

Pkj

xdaxda

ydayda

ddxddya

--+

--+

--

D=D=

D=D=

+D++D=

Equation (3-62) can be put in summation form as fallows:

.............................. (3-63) ,,P

nbPnbkj

Pkj bPaPa += å dd

Equation (3-63) is a disguised discrete Poisson equation that

can be written symbolically as

.............................. (3-64) 1 *2 uP dd ×ÑD

=Ñt

d

Page 69: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter three

٥٦

To explain the last equation; let

and

Then equation (3-61) reduces to

( ) ( )( ) ( ) yvvxuu

yPPPkxPPPk

kjkjkjkj

kjkjkjkjkjkj

D--D--=

D+--D+--

--

-+-+

//

/ 2 / 2 *

1,*

,*

,1*

,

21,,1,

2,1,,1 dddddd

........................... (3-65)

The LHS of (3-65) is a discredited form of

( ) ( )þýü

îíì

¶¶

+¶¶

- kjkj Py

Px

k ,2

2

,2

2

dd

and this shows that (3-65) is a discredited form of the Poisson

equation.

]253.2.3 Logic of SIMLPE Method [

We have a system of equation which is (3-41) (3-49) the x,y

momentum equations respectively and (3-31) the continuity

equation. The logic of SIMPLE method is a follows:

1. Assuming pressure, velocities are obtained from (3-41)

(3-49)

2. If velocities are correct, velocities must satisfy the

continuity equation (3-31).

3. If the continuity equation is not satisfies, pressure is

modified so that the continuity equation is satisfied.

4. Using modified pressure, velocities are modified.

5. Again, check whether the continuity equation is satisfied.

xkdd x

kjx

kj D==-

)(,

)(,1 y

kdd ykj

ykj D

==-)(

,)(

1,

Page 70: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter three

٥۷

if not pressure is modified.

6. Continue until the continuity equation is satisfied.

]25] [133.2.4 The SIMLPE Algorithm [ The complete SIMPLE algorithm can be summarized as

follows:

1. u* and v* is obtain from (3-52) and (3-53)

2. δP is obtaining from (3-63)

3. uc and vc is obtain from (3-58) and (3-59) respectively.

4. Pn+1 is obtain from Pn+1=Pn+αP δP , where αP is relaxation

parameter.

The SIMPLE algorithm contain two relaxation parameters αP

and E(≡Δτ), in our work we take E=1 and αP = 0.8 (Patankar

1980)[24] to a chive a stable convergence.

]25SIMPLE [ behind3.2.5 Principle The principle behind SIMPLE is quite simple, it is based on

the premise that fluid flows from region with high pressure to law

pressure.

- Start with an initial pressure filed.

- Look at a cell.

- If continuity is not satisfied because there is more mass

flowing into that cell than out of the cell, the pressure in that cell

compared to the neighboring cells must be too low.

- Thus the pressure in that cell must be increased relative to the

neighboring cells.

Page 71: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter three

٥۸

- The reverse is true for cells where move mass flows out than

in.

- Repeat this process iteratively for all cells.

]24[ SIMLPE aboute important Notes om3.2.6 S 1- The words Semi-implicit in the name SIMPLE have

å cnb

unbua used to acknowledge that omission of the term .

This term represents an indirect or implicit influence å cnb

vnbva

of the pressure correction on velocity; pressure corrections at

nearby locations can alter the neighboring velocities and thus cause a

velocity correction at the point under consideration.

2- The omission of any term would, of course, be unacceptable

if it meant that the ultimate solution would not be the true solution

of the discretize forms of momentum and continuity equations. It

so happens that the converged solution given by SIMPLE dose not

å cnb

unbua contain any error resulting from the omission of

. å cnb

vnbva

Page 72: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter three

٥۹

3. The mass source bP in the equation (3-63) that serves a

useful indicator of the convergence of the fluid flow solution. The

iterations should be continued, until the value of bP every where

becomes sufficiently small.

4. In many problems, the value of the absolute pressure is

much larger than the local differences in pressure that are

encountered. If the absolute value of pressure were used for p,

round-off errors would arise in calculations, hence is best to set

P= 0 as a references value at suitable grid point and to calculate all

other values of P as pressures relative to the reference value.

Page 73: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter four

٦۱

Discussion and Results

Introduction In the previous chapter we found the solutions for Newtonian

fluid flow in rectangular eddy, in this chapter we analyze the results

that we get from MAC and SIMPLE algorithm, in addition to that

the effect of Reynolds number on the secondary motion in the cross

–section of the pipe will be given.

Qbasic language was used in both methods to get the

computations and used the matlab program to draw the figures of

velocities. And in the end of this chapter we will give the list of

program for MAC and SIMPLE algorithm.

-Discussion the Results from MAC Method: 4.1

In this section we will discuss the results that obtained from

MAC method for a various value of Reynolds number which is; 12,

24 , 48 , 96 , 192 , 200 and 300 and some special cases (high

Reynolds number ) which is 1000, 5000, 10000 and 1000000.

Page 74: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter four

٦۲

From all the figures (12-22) we see that the line stream is not

very smooth because the mesh grid is not enough, and the primary

vortex will extend particularly throughout the whole region of a

cavity with square cross-section provided the Reynolds number is

made sufficiently large and although the presence of the corner

eddies cannot contain at present ,that these will truly vanish as

Reynolds number becomes very high i.e RE = 1000000.

Fig (12) shows that the cross-section contains two eddy

vortexes the right vortex is primary and the left is secondary vortex

it noted that the intensity of the eddy vortex is stronger in the meddle

or center of eddy vortex in the cross-section and will becomes

weaker when moving towered boundary and central plane.

In fig (12-13) when RE = 12 and RE = 24 it observed that

there are two eddy vortex in the cross-section and we also see that it

have the range [9e-008 – 1e-008] with decreasing rate is 1e-008

these fore primary vortex while for secondary vortex is symmetrical

with primary vortex and it is parallel to Y axis ,the layer that near

from the boundary is approximately zero ,actually because the effect

of the No-Slip condition and also in our problem we use the

boundary condition for velocity is zero at the boundary.

Fig (14-16) illustrated the effect of increase on Reynolds

number on the eddy vortex, since in fig (14) when RE = 48 we see

that the right eddy vortex complete while the other is decay near the

boundary.

Page 75: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter four

٦۳

But when RE = 96 the right eddy will be grow and the other

seen weak, this mean that the Reynolds number proportional with

kinematics viscosity oppositely and it is lead to that Reynolds

number proportional with velocity oppositely.

Fig (16) we see that the left eddy vortex are become weaker

than from previous cases i.e in fig (14-15) because it's range

(2e-009 – 1e-009) wither the range in figure (14-15) is (4e-009 –

2e-009) and (1e-008 – 5e-009) respectively. And also we note that

the left eddy vortex still decay for the value of Reynolds number is

200, 300.

In fig (19) we note that the left eddy becomes very small while

the right eddy grow rapidly with range (6e-009 – 5e-010) when

RE = 1000.

When the Reynolds number take the values 5000, 10000,

1000000, see fig (20 – 22) we observed that there are only single

eddy vortex that extended the whole cross-section with range

(5.5e-009 – 5e- 010).

Page 76: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter four

٦٤

-Method:SIMPLE Discussion the Results from 24. In this section we will explain the relationship between

Reynolds number and time increment (dt) and it's effect on the eddy

vortices from grow or decay i.e disappear and vanish the eddy vortex

in the cross-section, we study this for Reynolds number takes the

various values which is 12, 24, 48, and 96 at time increment 0.01,

0.03 and 0.05.

In the fig (23 – 25) we note that when time increment increase

the eddy vortex take varies shapes this mean; when dt = 0.01 we see

that there is a single eddy vortex in the center of cross-section while

when dt = 0.03 it observed that a new eddy vortex are created and

the original eddy is shifting toward boundary with range (0.003 –

0.001) on other hand from fig (25) we see that the new eddy vortex

are shifting toward boundary; and the original eddy have the range

(0.003 – 0.0015) near the boundary and the corner of cross – section

have a new eddy vortex generate with range (0.0005 – 0.001)

The above explanation exhibited that the flow of fluid is

unsteady and flow field influence by time, but if we set time equal to

zero we certainly get the steady flow.

Fig (26 – 28) shows that the eddy vortex shifting toward

boundary from the left side and we also observed that when RE=24

and dt = 0.01 the range of eddy vortex have (0.005 – 0.001) while at

dt = 0.03 it have the range ( 0.003 – 0.0005) and last figure(28) at

Page 77: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter four

٦٥

dt = 0.05 we will see that the range is (0.0012 – 0.0002).At

RE = 48 and dt = 0.01 ,see fig (29), is observed that there is a single

eddy vortex in the middle of cross-section and parallel to y axis, it

see that at the corner an eddy become generate. Fig (30) explain that

this corner becomes a new eddy vortex with range (0.0035 – 0.0005)

and the original eddy have (0.003 – 0.0005) when dt = 0.03 but in

the case dt = 0.05 fig (31) we will see that the eddy vortex are

shifting toward boundary from right side and it note that the two

vortex have the range (0.002 – 0.005) and (0.003 – 0.0005)

respectively

Finally, fig (32 – 34) shows that there are two eddy vortex

near boundary with range (0.0014 – 0.0004) and (0.001 – 0.0004)

at d t= 0.01 while at dt = 0.03 and dt = 0.05 we observe that these

vortexes are shifting up towered boundary, the stream line in the

corner will be vanish

We also observed that the results of velocity components

for both algorithms at the same grid point are agreements at least for

6th order after comma, see the table (1)

SIMPLE algo.

u-velocity

MAC algo.

u-velocity Nods

4.276527700410209D-07 1.27763114075921D-08 (2,1)

1.800055277335116D-08 2.114706876664628D-08

(2,2)

4.914686462099622D-07 3.824229649399331D-08 (4,3)

1.829727040563524D-09 1.584561723175645D-08 (4,5)

Page 78: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter four

٦٦

Further Study 4.3

In what follow we give some suggestions for further study:

1- We solve the problem in two dimension one can resolve it in three

dimension.

2- The boundary condition in our problem (for velocity) is equal

zero at boundaries; one can use variable boundary condition (moving

boundaries).

3- We use the Newtonian fluid; one can use Non- Newtonian fluid.

4- Our problem can be resolving by boundary layer method.

Page 79: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter four

٦۷

1e-0

081e

-008

1e-008

1e-0081e-008

1e-0

08

1e-0

08

1e-0081e-008

1e-008

1e-0

08

1e-0

08

2e-0

08

2e-0

08

2e-008

2e-008

2e-008

2e-0

08

2e-0

08

2e-0

082e-008

2e-008

2e-0

08

2e-0

08

3e-0

08

3e-0

08

3e-008

3e-008

3e-008

3e-0

08

3e-0

08

3e-008

3e-008

3e-008

3e-0

08

3e-0

08

4e-008

4e-0

08

4e-0

08

4e-008

4e-0

08

4e-0

08

4e-008

4e-0

08

4e-008

4e-008

5e-008

5e-008

5e-0

08

5e-008

5e-0

085e-008

5e-0

08

5e-008

5e-008

5e-0

08

6e-008

6e-0

08

6e-008

6e-0

08

6e-008

6e-0

08

6e-008

6e-0

08

7e-008

7e-0

08

7e-008

7e-0

08 7e-008

7e-0

08

7e-0

08

8e-008

8e-008

8e-0

08

8e-008

8e-008

9e-0

08

9e-0

08 9e-008

MAC Method At RE=12

1 1.5 2 2.5 3 3.5 4 4.5 51

1.5

2

2.5

3

3.5

4

4.5

5

Fig (12) Paths particles projected on the cross-section

5e-0

09

5e-0

09

5e-009

5e-009

5e-009

5e-0

09

5e-0

095e

-009

5e-009

5e-0095e-009

5e-0

09

1e-0

08

1e-0

08

1e-008

1e-008

1e-008

1e-0

08

1e-0

08

1e-0

081e-008

1e-008

1e-008

1e-0

081.5e-008

1.5e

-008

1.5e-008

1.5e-008

1.5e

-008

1.5e

-008

1.5e

-008

1.5e-008

1.5e-008

1.5e-008

2e-0

08

2e-0

08

2e-008

2e-008

2e-008

2e-0

08

2e-008

2e-008

2e-008

2e-0

08

2.5e-008

2.5e

-008

2.5e-008

2.5e-008

2.5e

-008

2.5e-008

2.5e-008

2.5e

-008

3e-008

3e-0

08

3e-008

3e-008

3e-0

08

3.5e-008

3.5e

-008

3.5e-008

3.5e

-008 4e-008

4e-0

08

4e-008

4e-0

08

4.5e-008

4.5e-0

08

4.5e

-008

5e-0

085e-008

MAC Method At RE=24

1 1.5 2 2.5 3 3.5 4 4.5 51

1.5

2

2.5

3

3.5

4

4.5

5

Fig (13)

Paths particles projected on the cross-section

Page 80: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter four

٦۸

5e-009

5e-0

09

5e-009

5e-009

5e-0

09

5e-0

095e

-009

5e-009

5e-0095e-009

5e-0

09

1e-0

08

1e-0

08

1e-008

1e-0081e-008

1e-0

08

1e-008

1e-0

08

1.5e-008

1.5e

-008

1.5e-008

1.5e-008

1.5e

-008

2e-008

2e-0

082e-008

2e-0

08

2.5e-008

2.5e-0

08

2.5e

-008

3e-0

08

MAC Method At RE=48

1 1.5 2 2.5 3 3.5 4 4.5 51

1.5

2

2.5

3

3.5

4

4.5

5

Fig (14)

Paths particles projected on the cross-section

2e-009

2e-0

09

2e-009

2e-009

2e-0

092e

-009

2e-009

2e-0092e-009

2e-0

09

4e-0

09

4e-0

09

4e-009

4e-0094e-009

4e-0

09

4e-009

4e-0

09

6e-00

9

6e-0

09

6e-009

6e-009

6e-009

6e-0

09

8e-009

8e-0

09

8e-009

8e-009

8e-0

09

1e-008

1e-0

08

1e-008

1e-008

1e-0

08

1.2e-008

1.2e

-0081.2e-008

1.2e

-008

1.4e-008

1.4e-008

1.4e

-008 1.6e-0081.6e-008

MAC Method At RE=96

1 1.5 2 2.5 3 3.5 4 4.5 51

1.5

2

2.5

3

3.5

4

4.5

5

Fig (15)

Paths particles projected on the cross-section

Page 81: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter four

٦۹

1e-00

9

1e-00

9

1e-009

1e-00

9

1e-00

91e

-009

1e-009

1e-0091e-009

1e-00

9

2e-00

9

2e-00

92e-009

2e-0092e-009

2e-00

9

2e-009

3e-00

9

3e-00

93e-009

3e-0093e-009

3e-00

9

4e-00

9

4e-00

9

4e-009

4e-009

4e-009

4e-00

95e-009

5e-00

9

5e-00

9

5e-009

5e-00

9

6e-009

6e-00

96e

-009

6e-009

6e-00

9

7e-009

7e-00

9

7e-009

7e-00

9

8e-009

8e-00

9

8e-009

8e-00

9

9e-009

9e-009

9e-00

9

1e-0081e-00

81.1

e-00

8

MAC Method At RE=192

1 1.5 2 2.5 3 3.5 4 4.5 51

1.5

2

2.5

3

3.5

4

4.5

5

Fig (16)

Paths particles projected on the cross-section

1e-009

1e-00

9

1e-009

1e-00

9

1e-00

91e

-009

1e-009

1e-0091e-009

1e-00

9

2e-00

9

2e-00

92e-009

2e-0092e-009

2e-00

9

2e-009

3e-00

9

3e-00

9

3e-009

3e-0093e-009

3e-00

9

4e-00

9

4e-00

9

4e-009

4e-009

4e-009

4e-00

9

5e-009

5e-00

9

5e-009

5e-009

5e-00

96e-009

6e-00

9

6e-009

6e-009

6e-00

9

7e-009

7e-00

9

7e-009

7e-00

9

8e-009

8e-00

9

8e-009

8e-00

9

9e-009

9e-009

9e-00

9

1e-008

1e-00

8

MAC Method At RE=200

1 1.5 2 2.5 3 3.5 4 4.5 51

1.5

2

2.5

3

3.5

4

4.5

5

Fig (17)

Paths particles projected on the cross-section

Page 82: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter four

۷۰

1e-0

09

1e-009

1e-0

09

1e-0

091e

-009

1e-009

1e-0091e-009

1e-0

09

2e-0

09

2e-0

09

2e-009

2e-0092e-009

2e-0

09

3e-00

9

3e-0

09

3e-009

3e-009

3e-009

3e-0

094e-009

4e-0

09

4e-00

9

4e-009

4e-0

09

5e-009

5e-0

09

5e-009

5e-0096e-009

6e-0

09

6e-009

6e-0

09

7e-009

7e-0

09

7e-0

09 8e-009 8e-0

09

MAC Method At RE=300

1 1.5 2 2.5 3 3.5 4 4.5 51

1.5

2

2.5

3

3.5

4

4.5

5

Fig (18)

Paths particles projected on the cross-section

5e-0

10

5e-0

10

5e-0

105e

-010

5e-010

5e-0105e-010

5e-0

10

1e-0

09

1e-0

09

1e-009

1e-0091e-009

1e-0

09

1.5e

-009

1.5e

-009

1.5e-009

1.5e-0091.5e-009

1.5e

-009

2e-00

9

2e-0

09

2e-009

2e-009

2e-009

2e-0

09

2.5e-009

2.5e

-009

2.5e-0092.5e-009

2.5e

-0093e-009

3e-0

09

3e-009

3e-009

3e-0

09

3.5e

-009

3.5e

-009

3.5e-009

3.5e

-009

4e-009

4e-0

09

4e-009

4e-0

09 4.5e-009

4.5e-009

4.5e

-009

5e-0

095e

-009

5.5e

-009

MAC Method At RE=1000

1 1.5 2 2.5 3 3.5 4 4.5 51

1.5

2

2.5

3

3.5

4

4.5

5

Fig (19)

Paths particles projected on the cross-section

Page 83: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter four

۷۱

5e

-010

5e

-010

5e

-010

5e

-010

5e

-010

5e

-010

1e-0

09

1e

-009

1e

-009

1e

-009

1e

-009

1e

-009

1.5e

-009

1.5

e-0

09

1.5

e-0

09

1.5e-009

1.5

e-0

09

1.5

e-0

09

2e

-009

2e

-009

2e-009

2e

-009

2e

-009

2.5

e-0

09

2.5

e-0

09

2.5e-009

2.5

e-0

093

e-0

09

3e

-009

3e

-009

3e-0

093.5

e-0

09

3.5e

-009

3.5

e-0

09

4e

-009

4e

-009

MAC Method At RE=5000

3 3.2 3.4 3.6 3.8 4 4.2 4.4 4.6 4.8 51

1.5

2

2.5

3

3.5

4

4.5

5

Fig (20) Paths particles projected on the cross-section

Page 84: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter four

۷۲

5e-0

10

5e-0

10

5e-010

5e-0105e-010

5e-0

10

1e-0

09

1e-0

09

1e-009

1e-009

1e-009

1e-0

09

1.5e

-009

1.5e

-009

1.5e-009

1.5e-009

1.5e-009

1.5e

-009

2e-009

2e-0

09

2e-00

9

2e-009

2e-0

09

2.5e-009

2.5e

-009

2.5e-009

2.5e

-009

3e-0093e

-009

3e-009

3e-0

09

3.5e-009

3.5e-009

3.5e

-009

4e-0094e-0

09

MAC Method At RE=10000

3 3.5 4 4.5 51

1.5

2

2.5

3

3.5

4

4.5

5

Fig (21) Paths particles projected on the cross-section

Page 85: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter four

۷۳

5e

-010

5e

-010

5e

-010

5e

-010

5e

-010

5e

-010

1e-0

09

1e

-009

1e

-009

1e-009

1e

-009

1e

-009

1.5e

-009

1.5

e-0

09

1.5

e-0

09

1.5e-009

1.5

e-0

09

1.5

e-0

092

e-0

09

2e

-009

2e-0

092e

-009

2e

-009

2.5

e-0

09

2.5

e-0

09 2

.5e-0

09

2.5

e-0

09

3e

-009

3e

-009

3e-009

3e-0

09 3.5

e-0

09

3.5e-009

3.5

e-0

09

4e

-009

4e

-009

MAC Method At RE=1000000

3 3.2 3.4 3.6 3.8 4 4.2 4.4 4.6 4.8 51

1.5

2

2.5

3

3.5

4

4.5

5

Fig (22) Paths particles projected on the cross-section

Page 86: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter four

۷٤

0.002 0.002

0.00

2

0.002

0.002

0.004

0.00

4

0.0040.

004

0.00

6

0.006

0.00

60.

008

0.00

8

0.01

SIMPLE Method At RE=12

1 2 3 4 5 61

1.2

1.4

1.6

1.8

2

2.2

2.4

2.6

2.8

3

Fig (23)

Paths particles projected on the cross-section

0.0005

0.0005

0.00050.0005

0.0005

0.0005

0.0005

0.0005 0.000

5

0.00050.0005

0.00050.001 0.001 0.001

0.0010.001 0.001 0.001

0.001

0.001

0.001

0.001

0.001

0.001

0.0015 0.0015

0.00150.0015 0.0

020.002

0.00

25

0.003

SIMPLE Method At RE=12 & dt=0.03

1 2 3 4 5 61

2

3

4

5

6

7

Fig (24) Paths particles projected on the cross-section

Page 87: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter four

۷٥

0.000

5

0.00050.0005

0.0005

0.0005

0.0005 0.0005 0.000

5

0.00050.0005

0.00

1

0.001

0.001

0.001

0.00101

0.001 0.001 0.001

0.001

0.0010.001

0.00150.0015

0.0015 0.00150.0015

0.0015 0.0015

0.00

15

0.0015

0.00150.0020.002

0.00250.003

SIMPLE Method At RE=12 &dt=0.05

1 2 3 4 5 61

1.5

2

2.5

3

3.5

4

4.5

5

5.5

Fig (25)

Paths particles projected on the cross-section

0.001

0.001

0.00

10.001

0.00

10.002

0.00

2

0.002

0.00

2

0.003

0.003

0.00

3

0.004

SIMPLE Method At RE=24 & dt=0.01

1 2 3 4 5 61

1.5

2

2.5

3

Fig (26)

Paths particles projected on the cross-section

Page 88: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter four

۷٦

0.0005

0.0005

0.00

05

0.00050.0005

0.00

050.

001

0.001

0.00

1

0.001

0.0015

0.00

15

0.0015

0.002

0.002

0.00

2

0.00250.00

25

0.003

SIMPLE Method At RE=24 & dt=0.03

1 2 3 4 5 61

1.2

1.4

1.6

1.8

2

2.2

2.4

2.6

2.8

3

Fig (27)

Paths particles projected on the cross-section

0.0002

0.0002

0.000

2

0.0002

0.0002

0.0002

0.000

2

0.0004

0.0004

0.00

04

0.000

4

0.0004

0.000

4 0.0006

0.0006

0.0006

0.0006

0.0008

0.0008

0.0008

0.001

0.001

0.001

2

SIMPLE Method At RE=24& dt=0.05

100.4

100.5

100.6

1

1.5

2

2.5

3

Fig (28) Paths particles projected on the cross-section

Page 89: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter four

۷۷

0.00

05

0.00

05

0.000

5

0.0005

0.00

05

0 0005

0005

0.001

0.00

1

0.001

0.00

10.

0015

0.00

15

0.002

SIMPLE Method At RE=48 & dt=0.01

1 2 3 4 5 61

1.5

2

2.5

3

Fig (29) Paths particles projected on the cross-section

0.000

5

0.000

5

0.0005

0.000

5

0 0005

0.00

05

0.00050.0005

0.0005

0.0005

0.0010.001

0.001

0.001

0.001

0.001

0.001

0.0015

0.0015

0.0015

0.001

50.0015

0.002

0.002

0.002

0.00250.0025 0.003

0.0035

SIMPLE Mehtod At RE=48 & dt=0.03

1 1.5 2 2.5 3 3.5 4 4.5 51

1.5

2

2.5

3

3.5

4

4.5

5

Fig (30)

Paths particles projected on the cross-section

Page 90: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter four

۷۸

0.000

5

0.00050.0005

0 0005

0.00

05

0.0005

0.0005

0.00050.0005

0.001

0.0010.001

0.001

0.001

0.001

0.0015

0.0015

0.00150.0015

0.0020.002

0.00

20.0025

0.003

SIMPLE Method At RE=48 & dt=0.05

1 2 3 4 5 61

1.5

2

2.5

3

3.5

4

4.5

5

Fig (31) Paths particles projected on the cross-section

0.0003

0.0004

0.000

0.00040.0004

0.0004

0.0005

0.0005 0

0.00050.0005

0.0005 0.00050.0005

0.00060.0006

0.000

0.0006

0.0006 0.0006 0.0006

0.0007

0.0007

0.0007

0.0007

0.00

0.0007 0.0007 0.00070.0

0.0008 0.00080.0008

0.0008

0.0008

0.00080.00

0.0009 0.00090.0009

0.0009

0.0009

0.0009

0.001 0.001

0.0010.0010.0011

SIMPLE Method At RE=96 & dt=0.01

1 1.5 2 2.5 3 3.51

1.5

2

2.5

3

3.5

Fig (32) Paths particles projected on the cross-section

Page 91: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

Chapter four

۷۹

0.0005

0.000

5

0.0005

0.00

05

0.0005

0.00050.0005

0.0005

0.0005

0.001

0.001

0.001

0.00

1

0.001

50.00150.002

X

Y

SIMPLE Method At RE=96 & dt=0.03

1 1.5 2 2.5 3 3.5 4 4.5 51

1.5

2

2.5

3

3.5

4

4.5

5

Fig (33)

Paths particles projected on the cross-section

0.0005

0.00

05

0.0005

0.000

5

0.0005

0.0005 0.0005

0.000

50.0005

0.001

0.001

0.001

0.001

0.001

50.0015 0.002

SIMPLE Method At RE=96 & dt=0.05

1 1.5 2 2.5 3 3.5 4 4.5 51

1.5

2

2.5

3

3.5

4

4.5

5

Fig (34) Paths particles projected on the cross-section

Page 92: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

۸۰

CLS REM " this is MAC programm " in$ = "MAC3.dat" inm$ = "MAC4.dat"

OPEN in$ FOR OUTPUT AS #1 OPEN inm$ FOR OUTPUT AS #2

im$ = "MAC1.dat" imm$ = "MAC2.dat"

OPEN im$ FOR INPUT AS #3 OPEN imm$ FOR INPUT AS #4 n1 = 5 n2 = 5 a = 0: b = 1: c = 1 L1 = 1 RE = 24 ep = .0001 ep1 = .001 ep2 = .001 dx = (b - a) / n1 dy = (c - a) / n2 dt = (.125) * (RE * dx ^ 2) t = .6 FOR j = 1 TO n1 v(j, 1 / 2) = 0 'PRINT "v("; j; ","; 1 / 2; ")="; v(j, 1 / 2)

'INPUT ss NEXT j FOR j = 1 TO n1 v(j, n2 + (1 / 2)) = 0 'PRINT "v("; j; ","; n2 + (1 / 2); ")="; v(j, n2 + (1 / 2))

'INPUT ss NEXT j FOR k = 1 TO n2 u(1 / 2, k) = 0 'PRINT "u("; 1 / 2; ","; k; ")="; u(1 / 2, k)

'INPUT ss NEXT k FOR k = 1 TO n2 u(n2 + (1 / 2), k) = 0 'PRINT "u("; n2 + (1 / 2); ","; k; ")="; u(n2 + (1 / 2), k)

'INPUT ww NEXT k FOR k = 1 TO n2

Page 93: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

۸۱

FOR j = 1 TO n1 u(j + 1, k) = (.5) * (u(j + (1 / 2), k) + u(j + (3 / 2), k)) NEXT j: NEXT k FOR j = 1 TO n1 FOR k = 1 TO n2 v(j, k + 1) = (.5) * (v(j, k + (1 / 2)) + v(j, k + (3 / 2))) NEXT k: NEXT j FOR k = 1 TO n2 FOR j = 1 TO n1 uv(j + (1 / 2), k + (1 / 2)) = (.25) * ((u(j + (1 / 2), k) + u(j + (1 / 2), k +

1)) * (v(j + 1, k + (1 / 2)) + v(j, k + (1 / 2(((( NEXT j: NEXT k j = 1 FOR k = 1 TO n2

p(j - 1, k) = p(j, k) - ((2 / (dx * RE)) * u(j + (1 / 2), k(( 'PRINT "p("; j - 1; ","; k; ")="; p(j - 1, k(

'INPUT tt NEXT k j = n1 FOR k = 1 TO n2

p(j + 1, k) = p(j, k) + ((2 / (dx * RE)) * u(j - (1 / 2), k(( 'PRINT "p("; j + 1; ","; k; ")="; p(j + 1, k(

'INPUT tt NEXT k k = 1 FOR j = 1 TO n1

p(j, k - 1) = p(j, k) - ((2 / (dy * RE)) * v(j, k + (1 / 2((( 'PRINT "p("; j; ","; k - 1; ")="; p(j, k - 1(

'INPUT tt NEXT j k = n2 FOR j = 1 TO n1

p(j, k + 1) = p(j, k) + ((2 / (dy * RE)) * v(j, k - (1 / 2((( 'PRINT "p("; j; ","; k + 1; ")="; p(j, k + 1(

'INPUT tt NEXT j p(2, 1) = .01 FOR j = 1 TO n1 FOR k = 1 TO n2

'INPUT #3, u(j, k( NEXT k NEXT j FOR k = 1 TO n1

Page 94: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

۸۲

FOR j = 1 TO n2 'INPUT #4, v(j, k(

NEXT j NEXT k

۳۰۰ FOR k = 1 TO n2 FOR j = 1 TO n1 F(j + (1 / 2), k) = u(j + (1 / 2), k) + (t / (RE * dx ^ 2)) * (u(j + (3 / 2), k) - 2 * u(j + (1 / 2), k) + u(j - (1 / 2), k)) + (t / (RE * dy ^ 2)) * (u(j + (1 / 2), k - 1) - 2 * u(j + (1 / 2), k) + u(j + (1 / 2), k + 1)) - (t / dx) * (u(j + 1, k) ^ 2 - u(j, k) ^ 2) - (t / dy) * (uv(j + (1 / 2), k + (1 / 2)) - uv(j + (1 / 2),

k - (1 / 2((( F(j - (1 / 2), k) = u(j - (1 / 2), k) + (t / (RE * dx ^ 2)) * (u(j + (1 / 2), k) - 2 * u(j - (1 / 2), k) + u(j - (3 / 2), k)) + (t / (RE * dy ^ 2)) * (u(j - (1 / 2), k - 1) - 2 * u(j - (1 / 2), k) + u(j - (1 / 2), k + 1)) - (t / dx) * (u(j, k) ^ 2 - u(j - 1, k) ^ 2) - (t / dy) * (uv(j - (1 / 2), k + (1 / 2)) - uv(j - (1 / 2), k - (1

/ 2((( 'PRINT "F("; j + (1 / 2); ","; k; ")="; F(j + (1 / 2), k(

'PRINT "F("; j - (1 / 2); ","; k; ")="; F(j - (1 / 2), k( 'INPUT tt

NEXT j NEXT k FOR k = 1 TO n2 FOR j = 1 TO n1 G(j, k + (1 / 2)) = v(j, k + (1 / 2)) + (t / (RE * dx ^ 2)) * (v(j + 1, k + (1 / 2)) - 2 * v(j, k + (1 / 2)) + v(j - 1, k + (1 / 2))) + (t / (RE * dy ^ 2)) * (v(j, k + (3 / 2)) - 2 * v(j, k + (1 / 2)) + v(j, k - (1 / 2)) - (t / dx) * (uv(j + (1 / 2), k + (1 / 2)) - uv(j - (1 / 2), k + (1 / 2))) - (t / dy) * (u(j, k + 1) ^ 2 -

u(j, k) ^ 2(( G(j, k - (1 / 2)) = v(j, k - (1 / 2)) + (t / (RE * dx ^ 2)) * (v(j + 1, k - (1 / 2)) - 2 * v(j, k - (1 / 2)) + v(j - 1, k - (1 / 2))) + (t / (RE * dy ^ 2)) * (v(j, k + (1 / 2)) - 2 * v(j, k - (1 / 2)) + v(j, k - (3 / 2)) - (t / dx) * (uv(j + (1 / 2), k - (1 / 2)) - uv(j - (1 / 2), k - (1 / 2))) - (t / dy) * (u(j, k) ^ 2 - u(j, k -

1) ^ 2(( 'PRINT "G("; j; ","; k + (1 / 2); ")="; G(j, k + (1 / 2((

'PRINT "G("; j; ","; k - (1 / 2); ")="; G(j, k - (1 / 2(( 'INPUT ty

NEXT j NEXT k FOR k = 1 TO n2 FOR j = 1 TO n1 MM = (1 / (dx * t)) * (F(j + (1 / 2), k) - F(j - (1 / 2), k)) + (1 / (dy * t)) *

(G(j, k + (1 / 2)) - G(j, k - (1 / 2((( NEXT j

Page 95: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

۸۳

NEXT k LL = 1

۳۰ FOR k = 1 TO n2 FOR j = 1 TO n1 p(j, k) = (1 / (2 + 2 * (dx / dy) ^ 2) * ((p(j - 1, k) + p(j + 1, k)) + (dx /

dy) ^ 2 * (p(j, k - 1) + p(j, k + 1)) - (dx ^ 2) * MM(( NEXT j NEXT k IF LL = 1 THEN GOTO 10 FOR k = 1 TO n2 FOR j = 1 TO n1

L = L + ABS(p(j, k) - h(j, k(( NEXT j NEXT k PRINT "L=", L

'INPUT tt IF L < ep THEN 20

۱۰ FOR k = 1 TO n2 FOR j = 1 TO n1

h(j, k) = p(j, k( NEXT j NEXT k LL = LL + 1 L = 0 GOTO 30

۲۰ FOR k = 1 TO n2 FOR j = 1 TO n1

PRINT "p("; j; ","; k; ")="; p(j, k،( NEXT j NEXT k

'INPUT tt FOR k = 1 TO n2 FOR j = 1 TO n1 u(j + (1 / 2), k) = F(j + (1 / 2), k) - (t / (RE) * (dx)) * (p(j + 1, k) - p(j,

k(( NEXT j NEXT k FOR j = 1 TO n1 FOR k = 1 TO n2 v(j, k + (1 / 2)) = G(j, k + (1 / 2)) - (t / (RE) * (dy)) * (p(j, k + 1) - p(j,

k(( NEXT k NEXT j

Page 96: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

۸٤

IF L1 = 1 THEN GOTO 100 FOR k = 1 TO n2 FOR j = 1 TO n1

q = q + ABS(u(j + (1 / 2), k) - uu(j + (1 / 2), k(( NEXT j NEXT k PRINT "q=", q FOR j = 1 TO n1 FOR k = 1 TO n2

qq = qq + ABS(v(j, k + (1 / 2)) - vv(j, k + (1 / 2((( NEXT k NEXT j PRINT "qq=", qq INPUT rr IF q < ep1 AND qq < ep2 THEN GOTO 200

۱۰۰ FOR k = 1 TO n2 FOR j = 1 TO n1

uu(j + (1 / 2), k) = u(j + (1 / 2), k( NEXT j NEXT k FOR j = 1 TO n1 FOR k = 1 TO n2

vv(j, k + (1 / 2)) = v(j, k + (1 / 2(( NEXT k NEXT j L1 = L1 + 1 t = t + dt GOTO 300

۲۰۰ FOR k = 1 TO n2 FOR j = 1 TO n1

PRINT "u("; j; ","; k; ")="; u(j, k،( PRINT #1, u(j, k(

NEXT j NEXT k FOR j = 1 TO n1 FOR k = 1 TO n2

PRINT "v("; j; ","; k; ")="; v(j, k،( PRINT #2, v(j, k(

NEXT k NEXT j END

Page 97: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

۸٥

CLS REM "here we are used the boundary conditions" REM "this is part1 to calculate the velocity u"

DEFDBL A-Z in$ = "simpl1.dat" inn$ = "simpl2.dat" inm$ = "simpl3.dat"

OPEN in$ FOR OUTPUT AS #1 OPEN inn$ FOR OUTPUT AS #2 OPEN inm$ FOR OUTPUT AS #3 n1 = 11 n2 = 11

'PRINT " n1 " = 'INPUT n1

'PRINT " n2 " = 'INPUT n2

DIM u(20, 20) DIM v(20, 20) DIM p(20, 20) DIM vv(20, 20) DIM uu(20, 20) DIM uc(20, 20) DIM vc(20, 20) DIM h1(20, 20) DIM p1(20, 20) DIM dp(20, 20) DIM aa(20, 20) DIM a(50) DIM b(50) DIM c(50) DIM d(50) DIM a1(50) DIM b1(50) DIM c1(50) DIM d1(50) DIM bta(50) DIM gama(50) DIM w(50) DIM ww(50) DIM bb(300) epi = .0001 ep = .0001 aa = 0

Page 98: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

۸٦

bb = 1 cc = 1 Re = 96 dx = (bb - aa) / n1 dy = (cc - aa) / n2 dt = .01 PRINT "dx=", dx PRINT "dy=", dy PRINT "dt=", dt

'INPUT yy FOR k = 1 TO n2 FOR j = 0 TO n1 u(j, k) = 0

'PRINT "u("; j; ","; k; ")="; u(j, k) 'INPUT tt

NEXT j NEXT k FOR j = 1 TO n1 FOR k = 0 TO n2 v(j, k) = 0

'PRINT "v("; j; ","; k; ")="; v(j, k) 'INPUT tt

NEXT k NEXT j

٥۰۰ FOR k = 1 TO n2 - 1 FOR j = 1 TO n1 - 1 a = ((dx * dy) / dt) + .25 * dy * (u(j + 1, k) - u(j - 1, k)) - .25 * dx * (v(j,

k - 1) + v(j + 1, k - 1)) + (2 / Re) * ((dx / dy) + (dy / dx(( 'PRINT "j,k,a=", j, k, a

'input rr b = .25 * dy * (u(j + 1, k) + u(j, k)) - (1 / Re) * (dy / dx)

'PRINT "j,k,b=", j + 1, k, b 'input rr

c = -.25 * dy * (u(j - 1, k) + u(j, k)) - (1 / Re) * (dy / dx) 'PRINT "j,k,c=", j - 1, k, c

'input rr d = (dy * .25 * (v(j, k) + v(j, k + 1)) - (1 / Re) * (dx / dy)) * (u(j, k + 1))

'PRINT "j,k,d=", j, k + 1, d 'input rr

IF k = 1 THEN 11 e = (dy * .25 * (v(j, k - 1) + v(j, k)) - (1 / Re) * (dx / dy)) * (u(j, k – 1)) GOTO 12

Page 99: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

۸۷

۱۱ e = (dy * .25 * (v(j, k - 1) + v(j, k)) - (1 / Re) * (dx / dy)) * (-1) * (u(j, k((

'PRINT "j,k,e=", j, k - 1, e 'input rr

۱۲ f = -((dx * dy) / (dt)) * u(j, k( 'PRINT "f=", j, f

'input rr g = dy * (p(j + 1, k) - p(j, k((

'PRINT "g=", j, g 'input rr

'PRINT "****************************************************"

'INPUT uu IF k = 1 THEN 14 IF j = 1 THEN 10 IF j > 1 AND j < n1 - 1 THEN 20 IF j = n1 - 1 THEN 30

'PRINT "*******j=1"****** ۱۰ b(j) = a

'PRINT "b("; j; ")="; b(j( c(j) = b

'PRINT "c("; j; ")="; c(j( d(j) = -c - d - e + f + g

'PRINT "d("; j; ")="; d(j( 'INPUT rr

GOTO 40 'PRINT "******j="; j"******" ؛

۲۰ a(j) = c 'PRINT "a("; j; ")="; a(j(

b(j) = a 'PRINT "b("; j; ")="; b(j(

c(j) = b 'PRINT "c("; j; ")="; c(j(

d(j) = -d - e + f + g 'PRINT "d("; j; ")="; d(j(

'INPUT rr GOTO 40

'PRINT "******j="; j"******" ؛ ۳۰ a(j) = c

'PRINT "a("; j; ")="; a(j( b(j) = a

'PRINT "b("; j; ")="; b(j( d(j) = -b - d - e + f + g

Page 100: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

۸۸

'PRINT "d("; j; ")="; d(j( 'INPUT rr

GOTO 40 ۱٤ IF j = 1 THEN 101

IF j > 1 AND j < n1 - 1 THEN 201 IF j = n1 - 1 THEN 301

'PRINT "*******j=1"****** ۱۰۱ b(j) = a + e

'PRINT "b("; j; ")="; b(j( c(j) = b

'PRINT "c("; j; ")="; c(j( d(j) = -c - d + f + g

'PRINT "d("; j; ")="; d(j( 'INPUT rr

GOTO 40 'PRINT "******j="; j"******" ؛

۲۰۱ a(j) = c 'PRINT "a("; j; ")="; a(j(

b(j) = a + e 'PRINT "b("; j; ")="; b(j(

c(j) = b 'PRINT "c("; j; ")="; c(j(

d(j) = -d + f + g 'PRINT "d("; j; ")="; d(j(

'INPUT rr GOTO 40

'PRINT "******j="; j"******" ؛ ۳۰۱ a(j) = c

'PRINT "a("; j; ")="; a(j( b(j) = a + e

'PRINT "b("; j; ")="; b(j( d(j) = -b - d + f + g

'PRINT "d("; j; ")="; d(j( ٤۰ NEXT j

'INPUT rr 'PRINT "*****************THE SYSTEM

IS"****************** j = 1

'PRINT b(j); c(j); d(j( FOR j = 2 TO n1 - 2

'PRINT a(j); b(j); c(j); d(j( NEXT j j = n1 - 1

Page 101: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

۸۹

'PRINT a(j); b(j); d(j( 'INPUT rr

N = n1 - 1 bta(1) = b(1(

'PRINT "bta(1)="; bta(1( 'INPUT rr

gama(1) = d(1) / bta(1( 'PRINT "gama(1)="; gama(1(

'INPUT rr FOR i = 2 TO N

'PRINT b(i), a(i), c(i - 1( 'INPUT yy

bta(i) = b(i) - ((a(i) * c(i - 1)) / (bta(i - 1((( 'PRINT "bta("; i; ")="; bta(i(

'INPUT rr NEXT i FOR i = 2 TO N

gama(i) = (d(i) - a(i) * gama(i - 1)) / (bta(i(( 'PRINT "gama("; i; ")="; gama(i(

'INPUT rr NEXT i w(N) = gama(N(

'PRINT "w("; N; ")="; w(N( FOR i = N - 1 TO 1 STEP -1

'PRINT "gama("; i; ")="; gama(i( 'PRINT "c("; i; ")="; c(i(

'PRINT "w("; i + 1; ")="; w(i + 1( 'PRINT "bta("; i; ")="; bta(i(

w(i) = gama(i) - ((c(i) * w(i + 1)) / (bta(i((( 'PRINT "w("; i; ")="; w(i(

'INPUT rr NEXT i

'INPUT tt FOR i = 0 TO n1 u(i, k) = w(i(

'PRINT "u("; i; ","; k; ")="; u(i, k،( NEXT i

'INPUT rr NEXT k

REM "this is part2 to calculate the velocity v" 'PRINT "*****THIS IS PART TWO TO CALCULATE v-

VELOCITY"***** FOR j = 1 TO n1 - 1

Page 102: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

۹۰

FOR k = 1 TO n2 - 1 a1 = ((dx * dy) / dt) + .25 * dx * (v(j, k + 1) - v(j, k - 1)) - .25 * dy *

(u(j - 1, k) + u(j - 1, k + 1)) + (2 / Re) * ((dy / dx) + (dx / dy(( d1 = (.25 * dx * (u(j, k) + u(j + 1, k)) - (1 / Re) * (dy / dx)) * (v(j + 1,

k(( IF j = 1 THEN 23 e1 = ((.25 * dx * (u(j - 1, k) + u(j, k)) - (1 / Re) * (dy / dx)) * (v(j - 1,

k((( GOTO 24

۲۳ e1 = ((.25 * dx * (u(j - 1, k) + u(j, k)) - (1 / Re) * (dy / dx)) * (-1) * (v(j, k(((

۲٤ b1 = .25 * dx * (v(j, k - 1) + v(j, k)) - (1 / Re) * (dx / dy( c1 = -.25 * dx * (v(j, k - 1) + v(j, k)) - (1 / Re) * (dx / dy( f1 = -((dx * dy) / dt) * v(j, k( g1 = dx * (p(j, k + 1) - p(j, k((

IF j = 1 THEN 25 IF k = 1 THEN 100 IF k > 1 AND k < n2 - 1 THEN 200 IF k = n2 - 1 THEN 300

PRINT "*******k=1"****** ۱۰۰ b(k) = a1

'PRINT "b("; k; ")="; b(k( c(k) = b1

'PRINT "c("; k; ")="; c(k( d(k) = -c1 - d1 - e1 + f1 + g1

'PRINT "d("; k; ")="; d(k( 'INPUT rr

GOTO 400 'PRINT "******k="; k"******" ؛

۲۰۰ a(k) = c1 'PRINT "a("; k; ")="; a(k(

b(k) = a1 'PRINT "b("; k; ")="; b(k(

c(k) = b1 'PRINT "c("; k; ")="; c(k(

d(k) = -d1 - e1 + f1 + g1 'PRINT "d("; k; ")="; d(k(

'INPUT rr GOTO 400

'PRINT "******k="; k"******" ؛ ۳۰۰ a(k) = c1

'PRINT "a("; k; ")="; a(k( b(k) = a1

Page 103: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

۹۱

'PRINT "b("; k; ")="; b(k( d(k) = -b1 - d1 - e1 + f1 + g1

'PRINT "d("; k; ")="; d(k( GOTO 400

۲٥ IF k = 1 THEN 1001 IF k > 1 AND k < n2 - 1 THEN 2001 IF k = n2 - 1 THEN 3001

PRINT "*******k=1"****** ۱۰۰۱ b(k) = a1 + e1

'PRINT "b("; k; ")="; b(k( c(k) = b1

'PRINT "c("; k; ")="; c(k( d(k) = -c1 - d1 + f1 + g1

'PRINT "d("; k; ")="; d(k( 'INPUT rr

GOTO 400 'PRINT "******k="; k"******" ؛

۲۰۰۱ a(k) = c1 'PRINT "a("; k; ")="; a(k(

b(k) = a1 + e1 'PRINT "b("; k; ")="; b(k(

c(k) = b1 'PRINT "c("; k; ")="; c(k(

d(k) = -d1 + f1 + g1 'PRINT "d("; k; ")="; d(k(

'INPUT rr GOTO 400

'PRINT "******k="; k"******" ؛ ۳۰۰۱ a(k) = c1

'PRINT "a("; k; ")="; a(k( b(k) = a1 + e1

'PRINT "b("; k; ")="; b(k( d(k) = -b1 - d1 + f1 + g1

'PRINT "d("; k; ")="; d(k( ٤۰۰ NEXT k

N = n2 - 1 bta(1) = b(1(

'PRINT "bta(1)="; bta(1( 'INPUT rr

gama(1) = d(1) / bta(1( 'PRINT "gama(1)="; gama(1(

'INPUT rr FOR i = 2 TO N

Page 104: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

۹۲

'PRINT b(i), a(i), c(i - 1( 'INPUT yy

bta(i) = b(i) - ((a(i) * c(i - 1)) / (bta(i - 1((( 'PRINT "bta("; i; ")="; bta(i(

'INPUT rr NEXT i FOR i = 2 TO N

gama(i) = (d(i) - a(i) * gama(i - 1)) / (bta(i(( 'PRINT "gama("; i; ")="; gama(i(

'INPUT rr NEXT i ww(N) = gama(N(

'PRINT "ww("; N; ")="; ww(N( FOR i = N - 1 TO 1 STEP -1

'PRINT "gama("; i; ")="; gama(i( 'PRINT "c("; i; ")="; c(i(

'PRINT "ww("; i + 1; ")="; ww(i + 1( 'PRINT "bta("; i; ")="; bta(i(

ww(i) = gama(i) - ((c(i) * ww(i + 1)) / (bta(i((( 'PRINT "ww("; i; ")="; ww(i(

'INPUT rr NEXT i

'INPUT tt FOR i = 0 TO n2 v(j, i) = ww(i(

'PRINT "v("; j; ","; i; ")="; v(j, i،( NEXT i

'INPUT rr NEXT j FOR k = 1 TO n2 FOR j = 0 TO n1

'PRINT "u("; j; ","; k; ")="; u(j, k( NEXT j

'INPUT rr NEXT k FOR j = 1 TO n1 FOR k = 0 TO n2

'PRINT "v("; j; ","; k; ")="; v(j, k( NEXT k

'INPUT rr NEXT j i = 1 FOR k = 1 TO n2 - 1

Page 105: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

۹۳

FOR j = 1 TO n1 - 1 'PRINT "u("; j; ","; k; ")="; u(j, k،(

'PRINT "u("; j - 1; ","; k; ")="; u(j - 1, k،( 'PRINT "v("; j; ","; k; ")="; v(j, k،(

'PRINT "v("; j; ","; k - 1; ")="; v(j, k - 1،( bb(i) = (u(j, k) - u(j - 1, k)) * dy + (v(j, k) - v(j, k - 1)) * dx

'PRINT "dx="; dx, "dy="; dy 'PRINT "bb("; i; ")="; bb(i،(

'INPUT rr i = i + 1 NEXT j NEXT k q = bb(1(

FOR m = 2 TO i g = bb(m(

IF q > g THEN 2000 q = g

۲۰۰۰ NEXT m PRINT "q="; q

'INPUT rr IF q < epi THEN 4000 FOR k = 1 TO n2 FOR j = 1 TO n1 dp(j, k) = 0 NEXT j NEXT k L1 = 1 ee = 1

۳۰۰۰ FOR k = 1 TO n2 FOR j = 1 TO n1 aa(j, k) = ((dy) ^ 2 * ee) / ((1 + ee) * a) + ((dy) ^ 2 * ee) / ((1 + ee) * c) + ((dx) ^ 2 * ee) / ((1 + ee) * a1) + ((dx) ^ 2 * ee) / ((1 + ee) * c1( aa(j + 1, k) = (((dy) ^ 2 * ee) / ((1 + ee) * a)) * dp(j + 1, k( aa(j - 1, k) = (((dy) ^ 2 * ee) / ((1 + ee) * c)) * dp(j - 1, k( aa(j, k + 1) = (((dx) ^ 2 * ee) / ((1 + ee) * a1)) * dp(j, k + 1( aa(j, k - 1) = (((dx) ^ 2 * ee) / ((1 + ee) * c1)) * dp(j, k - 1( bp = -1 * (((u(j, k) - u(j - 1, k)) * dy) + (v(j, k) - v(j, k - 1)) * dx(

dp(j, k) = (1 / aa(j, k)) * (aa(j + 1, k) + aa(j - 1, k) + aa(j, k + 1) + aa(j, k - 1) + bp(

'PRINT "dp("; j; ","; k; ")="; dp(j, k،( NEXT j NEXT k

'INPUT TT

Page 106: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

۹٤

IF L1 = 1 THEN GOTO 350 FOR k = 1 TO n2 FOR j = 1 TO n1

L = L + ABS(dp(j, k) - h1(j, k(( NEXT j NEXT k

'PRINT "L="; L 'INPUT rr

IF L < ep THEN 600 ۳٥۰ FOR k = 1 TO n2

FOR j = 1 TO n1 h1(j, k) = dp(j, k(

'PRINT "h1("; j; ","; k; ")="; h1(j, k،( NEXT j NEXT k

'INPUT tt L1 = L1 + 1 L = 0 GOTO 3000

'PRINT "******************************************" ٦۰۰ FOR k = 1 TO n2

FOR j = 1 TO n1 - 1 'PRINT "dp("; j; ","; k; ")="; dp(j, k،(

'PRINT "dp("; j + 1; ","; k; ")="; dp(j + 1, k،( 'INPUT TT

uc(j, k) = (dt / 2) * (dp(j, k) - dp(j + 1, k(( 'PRINT "uc("; j; ","; k; ")="; uc(j, k،(

'INPUT tt NEXT j NEXT k FOR j = 1 TO n1 FOR k = 1 TO n2 - 1

vc(j, k) = (dt / 2) * (dp(j, k) - dp(j, k + 1(( 'PRINT "vc("; j; ","; k; ")="; vc(j, k،(

'INPUT tt NEXT k NEXT j alfa = .8 FOR k = 1 TO n2 FOR j = 1 TO n1 - 1 uu(j, k) = u(j, k) + uc(j, k(

'PRINT "u("; j; ","; k; ")="; u(j, k،( 'PRINT "uc("; j; ","; k; ")="; uc(j, k،(

Page 107: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

۹٥

'PRINT "uu("; j; ","; k; ")="; uu(j, k،( NEXT j NEXT k

'INPUT tt FOR j = 1 TO n1 FOR k = 1 TO n2 - 1 vv(j, k) = v(j, k) + vc(j, k(

'PRINT "v("; j; ","; k; ")="; v(j, k،( 'PRINT "vc("; j; ","; k; ")="; vc(j, k،( 'PRINT "vv("; j; ","; k; ")="; vv(j, k،(

NEXT k NEXT j

'INPUT tt FOR k = 1 TO n2 FOR j = 1 TO n1 p1(j, k) = p(j, k) + (alfa) * dp(j, k(

'PRINT "p("; j; ","; k; ")="; p(j, k،( 'PRINT "dp("; j; ","; k; ")="; dp(j, k،( 'PRINT "p1("; j; ","; k; ")="; p1(j, k،(

NEXT j NEXT k

'INPUT tt FOR k = 1 TO n2 FOR j = 1 TO n1 - 1 u(j, k) = uu(j, k(

'PRINT "u("; j; ","; k; ")="; u(j, k،( 'INPUT tt

NEXT j NEXT k FOR j = 1 TO n1 FOR k = 1 TO n2 - 1 v(j, k) = vv(j, k(

'PRINT "v("; j; ","; k; ")="; v(j, k،( 'INPUT tt

NEXT k NEXT j FOR k = 1 TO n2 FOR j = 1 TO n1 p(j, k) = p1(j, k(

'PRINT "p("; j; ","; k; ")="; p(j, k،( 'INPUT tt

NEXT j NEXT k

Page 108: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

۹٦

GOTO 500 ٤۰۰۰ IF dt > .03 THEN 4500

dt = dt + .01 PRINT "dt="; dt INPUT rr GOTO 500

٤٥۰۰ FOR k = 1 TO n2 FOR j = 0 TO n1 PRINT "u("; j; ","; k; ")="; u(j, k( PRINT #1, u(j, k(

'INPUT tt NEXT j NEXT k

'PRINT #1"****************************" ، FOR j = 1 TO n1 FOR k = 0 TO n2 PRINT "v("; j; ","; k; ")="; v(j, k( PRINT #2, v(j, k(

'INPUT tt NEXT k NEXT j

'PRINT #1"****************************" ، FOR k = 1 TO n2 FOR j = 1 TO n1 PRINT "p("; j; ","; k; ")="; p(j, k( PRINT #3, p(j, k(

NEXT j NEXT k END

Page 109: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr
Page 110: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

[1] Ahmed .Z.H (2001) [Flow of Non-Newtonian Fluid in

Curved Duct with Vary Aspect Ratio] M.Sc.Thesis submitted

to the University of Baghdad.

[2] Ali M. M. (2005) [Unsteady Flow of Non- Newtonian

Fluid in Curved Pipe with Rectangular Cross-

section] M.Sc.Thesis submitted to the University of

Baghdad.

[3] Ames, W.F (1992) [Numerical Methods for PDE] 3rd ed.

Academic, Inc.

[4] Anderas, A. (2001) [Principle of Fluid Mechanics], Printice -

Hall, Inc.

[5] Buchanan J.L and Turner P.R (1992) [Numerical Methods

and Analysis], McGraw-Hill

[6] Burden R.L and Faires J.D (1985) [Numerical Analysis] 3rd

Edition, Prindle, Waber & Schmidt.

[7] Burggraf .O.R (1966) [Analytical and Numerical Studies of

Steady Separated Flows] J.Fluid Mech.Vol. 24, Part 1, PP.133-

151.

[8] Chapra S.C (2005) [Applied Numerical Methods] McGraw-

Hill, Inc, Higher Education.

[9] Chorin A.J (1967) [Numerical Method for Solving

Incompressible Viscous Problems] J.Comput.Phys. 2, 12-26.

[10] Dean, W.R (1927) [Note on the Motion of Fluid in A curved

Pipe] Philos, Mag.Vol 20, P.P 208.

[11] Dean, W.R (1928) [The Stream Line Motion of Fluid in A

curved Pipe] Philos, Mag.Vol 30, P.P 673.

Page 111: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

[12] Dean, W.R and Hurst J.M (1959) [Note on the motion of

fluid in curved pipe] Mathematica Vol.6 P.77

[13] Fletcher C.A.J (1988) [Computational Techniques for Fluid

Dynamics 1], Springer – Verlag.

[14] Fletcher C.A.J (1988) [Computational Techniques for Fluid

Dynamics 2], Springer – Verlag.

[15] Fathil A.A (2006) [Flow of Non-Newtonian Fluid in A

Curved Duct with Different Aspect Ratio] M.Sc.Thesis

submitted to the University of Baghdad.

[16] Fortin. M, Peyret. R, (1971) Lecture Notes in Physics,

Vol 8, PP, 337-342.

[17] Greenspan .D, (1968) [Numerical Studies of Prototype

Cavity Flow Problems] J. Phys. Fluids Vol.11, Num.5,P.254

[18] Harlow F.H, and Welsh J.E (1965) [Numerical calculation of

Time-Dependent Viscous Incompressible Flow of Fluid with

Free Surface] J. Phys. Fluids Vol.8, Num.12, P 2128- 2189.

[19] Jones J.R. (1960) [Note on the Motion of Fluid in Curved

Pipe] Quart.Jour.Mech.Appl.Math, Vol.XIII, Part 4, P.428.

[20] Kawaguti M. (1961) [Numerical Solution of the Navier-

Stokes Equations for the Flow in a Two dimensional Cavity]

J.phy.Soc.Japan Vol.16, No 12, P 2307-2318.

[21] Loue, A.E.H (1960) [A treatise on the Mathematical theory

of Elasticity], Donver Publications.

[22] Mathur M.L. and Mehta F.S. (2004) [Fluid Mechanic and

Heat Transfer] New Delhi, Jain Brothers.

Page 112: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

[23] Pan F. and Acrivos A. (1967) [Steady Flows in Rectangular

Cavities] J.Fluid Mech.Vol. 28, Part 4, PP.643-655.

[24] Patankar S.V (1980) [Numerical Heat Transfer and Fluid

Flow] McGraw-Hill Book Company.

[25] Patankar S.V (1980) [Numerical Calculation of Fluid Motion

Based on SIMPLE Method] J .Numerical Heat Transfer

Vol.7, 147-163.

[26] Peyret R. and Taylor .D (1983) [Computational Methods for

Fluid Flow] Springer Series in Computational Physics.

[27] Pozrikidis E. (1998) [Numerical Computation in Science and

Engineering], Oxford University Press.

[28] Sachdeva B.k. and Sharma B.D. (1991)[Elementary Hydro

Dynamic] Kadernath Ramnath.

[29] Smith G.D. (1971) [Numerical Solution of PDE'S] Oxford

University Press.

[30] Streeter V.L., and Wylie E.B. (1985) [Fluid Mechanics].

McGraw-Hill, Inc.

[31] Wessling P. (2001) [Principles of Computational Fluid

Dynamics]. Printing in Germany.

[32] White F.M. (1994) [Fluid Mechanics]. 3rd Edition by

McGraw-Hill, Inc.

[33] Yakhot A. Arab M. (1999) [Numerical Investigation of A

laminar pulsating Flow in A rectangular Duct]. J.Num.Math

Fluids Vol. 29, PP. 935-950.

Page 113: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

المستخلص

في ،لزج، غير قابل لألنضغاط نيوتوني لمائع جريان دراسة تقدم هذه الرسالة

االولى المائع من الرتبةر بشكل خاص إعتبو الضغط. تأثيرمقطع عرضي مربع تحت

:من النوع ن أن يمثل بمعادلة حالة الذي يمك

i,j = 1,2 ijij eT 2 h=

معدل مركبات هما مركبات االجهاد و eijو Tijثابت للمائع و هو ηحيث

نظام االحداثيات المتعامدة تم استخدامه لوصف حركة المائع وقد المرونة على التوالي.

وجد أن معادالت الحركة مسيطر عليها من قبل معلمة وهي رقم رينولدز.

ىحيث أن األول SIMPLEو MACالحركة محلولة بطريقين إن معادالت

ضمنية. ىبينما اآلخر صريحة

أستخدمت لكتابة البرنامج وايجاد الحسابات العددية التي تخص Qbasicلغة

مكونات سرعة في رسم أشكالستعمل لا Matlab البرنامج الجاهزهذه الحلول، بينما

الثانوي.الجريان رينولدز على رقم و وقت ال بدراسة تأثير تنتهي ادراستن. المستوي

Page 114: A Newtonia… · Acknowledgments thanks to allah, the creator of heavens and earth Thanks to ALLAH as this thesis has been completed. I would also like to thank my supervisor Dr

دادـــعة بغــجام ومــــة العلـــــــكلي

اتــاضيـم الريــــقس

رساله جامعة بغداد -مقدمه الى كلية العلوم

درجة ماجستير علوم نيلمتطلبات كجزء من في الرياضيات

من قبل صباح حسين المرسوميد ــمحم

۲۰۰٦تشرين االول