application of the finite element method using the method
TRANSCRIPT
Brigham Young UniversityBYU ScholarsArchive
All Theses and Dissertations
1972-8
Application of the Finite Element Method Usingthe Method of Weighted Residuals to TwoDimensional Newtonian Steady Flow withConstant Fluid PropertiesMien Ray ChiBrigham Young University - Provo
Follow this and additional works at: https://scholarsarchive.byu.edu/etd
Part of the Mechanical Engineering Commons
This Thesis is brought to you for free and open access by BYU ScholarsArchive. It has been accepted for inclusion in All Theses and Dissertations by anauthorized administrator of BYU ScholarsArchive. For more information, please contact [email protected], [email protected].
BYU ScholarsArchive CitationChi, Mien Ray, "Application of the Finite Element Method Using the Method of Weighted Residuals to Two Dimensional NewtonianSteady Flow with Constant Fluid Properties" (1972). All Theses and Dissertations. 7085.https://scholarsarchive.byu.edu/etd/7085
L <nS
APPLICATION OF THE FINITE ELEMENT METHOD
0 . o G 'Zr>
~2 6
USING THE METHOD OF WEIGHTED RESIDUALS
TO TWO DIMENSIONAL NEWTONIAN STEADY
FLOW WITH CONSTANT FLUID PROPERTIES
(
A Thesis
Presented to the
Department of Mechanical Engineering
Brigham Young University
In Partial Fulfillment
of the Requirements for the Degree
Master of Science
by
Mien Ray Chi
August 1972
This thesis, ly Mien Ray Chi, is accepted in its present form
by the Department of Mechanical Engineering of Brigham Young
University as satisfying the thesis requirement for the degree of
Master of Science.
'i,-.,? ! ^ . ( < ) 7 >' ! Date'
ii
To My Parents
iil
ACKNOWLEDGEMENTS
Sincere appreciation is expressed to Dr. Howard S. Heaton
for his personal suggestions and encouragement throughout this
thesis. Thanks are also extended to Dr. Henry N. Christiansen
and Dr. Richard A. Hansen for their private instruction.
The author is especially indebted to his parents for their
love and their expressions of confidence and encouragement.
iv
TABLE OF CONTENTS
ACKNOWLEDGEMENTS
LIST OF TABLES .
LIST OF FIGURES.
Page
iv
vii
viii
ChapterI. INTRODUCTION............................................. 1
The Problem Considered The Finite Element Method Summary
II. METHOD OF WEIGHTED RESIDUALS...................... 3
Brief Historical ReviewThe Method of Weighted Residuals
III. GOVERNING EQUATIONS ..................................... 5
Governing Equations Continuity Equation Momentum EquationsGeneral Procedure for Solving the Governing Equations
IV. INTEGRAL EQUATIONS AND DISCRETIZATION .................... 11
Integral EquationsCompatibility Integral Equation Vorticity Transport Integral Equation
Discretization Remarks
V. APPROXIMATIONS AND WEIGHTING VECTOR ..................... 19
Introduction Linear Approximations
Stream Function Approximation Vorticity Approximation
Weighting Vector - Galerkin's Criterion Evaluation of ds Summary
v
vi
Page
VI. FINITE ELEMENT EQUATIONS ................................ 29
OutlineEvaluation of Integral (6.1)Evaluation of Integral (6.2)Finite Boundary Slope Infinite Boundary Slope
Evaluation of Integral (6.3)Evaluation of Integral (6.4)Finite Boundary Slope Infinite Boundary Slope
Summary
VII. ASSEMBLING OF FINITE ELEMENT EQUATIONS .................. 41
The Concept of AssemblingAssembling of the Compactibility Element Equations - The Compactibility Set
Assembling of the Vorticity Transport Element Equations - The Vorticity Transport Set Summary
VIII. SOLUTION METHOD.......................................... 45
OutlineBoundary ConditionsStream Function and Vorticity Solutions by an Iteration
Scheme Velocity Solutions The Use of Digital Computer Solved ProblemsFully Developed Flow Between Two Stationary Parallel
Planes Couette Flow Conclusion
LIST OF REFERENCES................................................. 56
APPENDIX........................................................... 58
Computer Program List
LIST OF TABLES
Table Page
1. Comparison of Exact and Finite Element Solutions forParallel Flow Between Fixed Walls. . . . . . . . . . . . . 52
2. Comparison of Exact and Finite Element Solutions forCouette F l o w ............................................ 54
LIST OF FIGURES
Figure Page
1. Fluid Region Showing the Positive Flow Direction Used inthe Definition of the Stream Function.......... 6
2. Triangular Finite Element.................................. 19
3. Linear Variation of Stream Function of a TriangularFinite Element ........................................... 20
4. A Boundary Element.......................... 26
5. An Interior Node with Neighboring Elements to Show theAssembling Procedures.................... 42
6. An Interior Node with Neighboring Elements to Show theRelation Between the Velocity Components of the Interior Nodes and the Stream Functions of the Neighboring Nodes. . 49
7. Parallel Flow with Parabolic Distribution.................. 50
8. A Typical Finite Element Arrangement ...................... 52
9. Couette Flow Between Two Parallel Flat Walls............... 53
viii
CHAPTER I
INTRODUCTION
The Problem Considered
In this thesis we will be concerned with the two-dimensional
steady laminar Newtonian fluid flow with constant fluid properties in
Cartesian coordinate system. More precisely, we will consider a flow
for which the interesting dependent variables, for example, velocity,
vorticity, stream function, etc., are expressible as functions of two
independent Cartesian coordinates.
The governing equations for the problem considered are the
continuity equation and the momentum equations. We shall first state
these basic equations in terms of the local velocity and then in terms
of the local stream function and vorticity. The use of stream function
and vorticity will enable us to reduce the number of dependent variables
and to facilitate the method of weighted residuals which will be
introduced in the next chapter.
The continuity equation and the momentum equations with the
prescribed boundary conditions constitute a boundary value problem which
is difficult to solve because of the nonlinearity of the momentum
equations. The problem can be solved exactly only for several simple
cases. For complicated cases, numerical methods have to be used. The
finite difference method is an extensively used numerical method. One
disadvantage of the finite difference method is the difficulty in fitting
1
2
irregular boundary shaves to finite difference grids. However, another
numerical method— the finite element method— does not have this
difficulty.
The Finite Element Method
The finite element method was originally developed for the
analysis of stress problems and has been successfully applied to a(13)variety of structure problems. Fluid dynamics and heat transfer
workers have started trying to apply this method to solve the problems in their own £ields . <D , (6) , (9) , (10), (H) , (12)
The development of the finite element method is based on the
fact that a physical problem governed by a set of differential equations
"may" be equivalently expressed as an extremum problem by the
variational principle. An integral which is to be minimized must be
found from the differential equations or directly from basic principles.
For certain types of problems, the integral to be minimized is easy to
find. However, it is generally difficult and may be impossible to
obtain. It is the purpose of this thesis to get rid of this difficulty
by using the method of weighted residuals to accomplish the minimizing
process without actually finding the integral to be minimized. The
concept of the method of weighted residuals will be reviewed in the
next chapter.
Summary
This thesis will solve a general two-dimensional steady fluid
flow with constant fluid properties in Cartesian coordinate system using
the finite element method based on the concept of weighted residuals.
CHAPTER II
METHOD OF WEIGHTED RESIDUALS
Brief Historical Review
The method of weighted residuals was first used by Crandall and (5)Kantorovich to obtain a solution for a differential equation.
(2)Finlayson and Scriven also showed that variational principles applied
to steady-state heat transport problem are applications of the method of
weighted residuals.
The Method of Weighted Residuals
Suppose we are given a mathematical statement,
Ltf^r), f2(r), fn (r)] = 0 (2.1)
~bwhere f^(r) (i = 1, 2, ..., n) are scalar functions of the position
vector r and L stands for a mathematical relation among these scalar
functions. Equation (2.1) holds true if and only if exact solutions for
f^(r) are substituted into it. If approximate solutions are substituted
into Equation (2.1) rather than exact solutions, we will obtain
L[fx(?), f2(r), ..., fn(r)] = R(r)
~bwhere f^(r) (i = 1, 2, ..., n) are approximate solutions and R(r) is the
residual term which is a function of the position vector r. Note that"V ~bR(r) is generally not zero unless exact solutions for f^(r) are
3
substituted into Equation (2.1). Also note that, generally.
4
R(r)dV- + 0
where the triple integral is over the whole region of interest. How
ever, we might expect to choose an appropriate weighting function W so
that
0
for f^(r) are quite close to their exact solutions.
Various selections of the weighting function have been tried.
In the material that is to follow, we will use Galerkin’s criterion,
because it is closely related to the variational principle as has been
shown in many specific cases. First of all, we will review the basic
governing equations which will be used and correspond to Equation (2.1).
CHAPTER III
GOVERNING EQUATIONS
Governing Equations
The governing equations are the continuity equation and the
momentum equations. As mentioned before, we shall first state these
equations in terms of the local velocity and then in terms of the local
stream function and the local vorticity.
Continuity Equation
The principle of conservation of mass gives the continuity
equation,
for an incompressible flow.
Using Cartesian notations, we shall define the stream function
i(/(x, y) as a point function which has the following relations with the two
velocity components:
(3.1)
or
V * V - 0 (3.2)
3y (3.3)
(3.4)
5
6
ft is easy to show that the assumption of a stream function as a point
function identically satisfies the equation of continuity, since the
order of differentiation of a point function is immaterial. In other
words, the equation of continuity for the steady two-dimensional flow
of an incompressible fluid is mathematically the necessary and
sufficient condition for the existence of a point function called the
stream function.
Following the sign convention in Equations (3.3) and (3.4),
the stream function can be considered as the volume flow rate from left
to right as the observer views a line from A looking toward P as shown
in Figure 1, if we consider a unit depth in the direction perpendicular
to the x-y plane.
Fig. 1.— Fluid region showing the positive flow direction used in the definition of the stream function.
We further define the vorticity £ as
E = _ 9“. (3.5)* Sx 3y
Differentiating Equation (3.3) with respect to y and
Equation (3.4) with respect to x and using Equation (3.5), we obtain
V2^ + 5 = 0 (3.6)
which is called the compatibility equation and will be used to derive
the finite element equations.
Momentum Equations
The principle of conservation of momentum gives the following
momentum equations in x and y directions:
~ = B - I | E - + v V2uDt x p 8x (3.7)
Dv 1 3p . n2— = B ------ + v VzvDt y p 3y (3.8)
for Newtonian flow with constant fluid properties. B^ and are
respectively the body force in x and y directions.
Eliminating pressure p from Equations (3.7) and (3.8) and
using the definition of vorticity Equation (3.5), we obtain
Dt vV2£ = 0
or
— + V • vt; - w*^ = o (3.9)
because
D_ _ 3_ Dt " 3t + v • V
83£For steady flow (— «= 0), Equation (3.9) becomesO t
V • V£ - vV2£ ■ 0 (3.10)
However,
V . V£ - V . (VO - £V • v
Furthermore,
V • V£ = V • (VO (3.11)
for incompressible flow because of Equation (3.2) .
Substituting Equation (3.11) into Equation (3.10), we obtain
V . (VO - vV2£ = 0 (3.12)
which is called the vorticity transport equation and will also be used
to derive the finite element equations.
General Procedure for Solving the Governing Equations
The governing equations to be solved are the compatibility
equation and the vorticity transport equation:
V2i|> + K = 0 (3.6)
V • (VO - W 2£ = 0 (3.12)
The vorticity £ appears in both equations. It is natural to
eliminate the vorticity from these two equations to obtain one equation
involving only the stream function We may solve for £ from
Equation (3.6) to obtain
We also know the relations between the velocity components and the
stream function,
u 3y
_ M3x
(3.3)
(3.4)
or
V =13y3i3x
(3.14)
Substituting Equations (3.13) and (3.14) into Equation (3.12), we
obtain
3y_ it
3x I
(- V2*) + vV1* = 0 (3.15)
Theoretically, we are able to solve Equation (3.15) with prescribed
boundary conditions and get the solution for the stream function.
♦ = Mx, y) (3.16)
With Equation (3.16), we can find the velocity components by Equations
(3.3) and (3.4), the vorticity by either Equation (3.5) or Equation (3.13).
In this thesis, we will formulate two sets of simultaneous linear
equations. One set is formulated from the compatibility equation,
Equation (3.6) and another set from the vorticity transport equation,
Equation (3.12). Instead of eliminating the vorticity, we will use the
iteration scheme to solve for the stream functions. The vorticity
solution will be the intermediate result of the iteration scheme and
10
the velocity components will be calculated with the concept of weighted
averages.
The two sets of simultaneous linear equations will be
formulated in the following chapters. In Chapter IV, we will first
derive the integral equations for both the compatibility equation and
the vorticity transport equation based on the method of weighted
residuals as has been discussed in Chapter II. Then, we will
discretize the integral equations into finite element equations. In
Chapter V, approximate solutions for the stream function and the
vorticity will be derived and the weighting function, introduced into
the finite element equations in Chapter IV, will be chosen so that two
sets of simultaneous equations will be obtained.
CHAPTER IV
INTEGRAL EQUATIONS AND DISCRETIZATION
Integral Equations
Integral equations will be formulated for both the compatibility
equation and the vorticity transport equation.
Compatibility Integral Equation
The compactibility equation from Chapter III is
V2<ji + £ - 0 (3.6)
If approximate solutions of \p and £ are substituted into the above
equation, the left hand side of the equation will not be identically
equal to zero but equal to some residual term which should approach
zero if the approximate solutions approach their exact forms. In other
words
V 2il> + £ = R (4.1)
where
and 5 are approximate solutions and
R is the residual
Based on the method of weighted residuals, we set the weighted average
of the residual to zero over the volume of interest and obtain
11
WRdV- - 0 (4.2)
r r r12
V-
Note that the region of integration of the above integral is the flow
field in which we are interested and has a unit depth in the direction
perpendicular to the x-y plane for our two-dimensional problem.
Substituting Equation (4.1) into Equation (4.2), we obtain
W(V2^ + £)d¥- = 0
or
(WV2ip + W£)dV- = 0 (4.3)
By vector identities,
WV2\|> = WV'Vijj = V.(WVi^) - W 'V i p (4.4)
Substituting Equation (4.4) into Equation (4.3), we have
f[7*(WVi{,) - VW-V\p + W£]d¥- = 0
or
|(W5 - VW*V^)dV- + / 7 • (WV\(;)dV- = 0 (4.5)
By Gauss divergence theorem, the second integral in Equation (4.5)
becomes a surface integral,
V*(WV^)dV- = / / WV<|>*ds (4.6)
Kith Equation (4.6), we can write Equation (4.5) as
(W£ - VWV\f»)dV- + IJ WVij;.ds « 0 (4.7)
13
For our two-dimensional problem, the volume integral and the surface
integral in Equation (4.7) can be written as a surface integral and a
line integral respectively. Thus, Equation (4.7) becomes the
compactibility integral equation
(4.8)
Note that we have used ds to represent both the infinitesional area
element in Equation (4.7) and the infinitesional line segment in
Equation (4.8). Also note that, in Equation (4.8), both £ and ^ are some
kind of approximate solutions and W is a weighting function which has not
been chosen yet. In Equation (4.8), the domain of the surface integral
is the two-dimensional flow region we are interested in and the line
integral is along the boundary of the two-dimensional flow region.
Vorticity Transport Integral Equation
The vorticity transport equation is
7-(V5) - vV2C - 0 (3.12)
If approximate solutions of V and £ are substituted into Equation (3.12),
we will have
V . ( V O - vV25 = R (4.9)
where R is the residual terra. By the method of weighted residuals, we
have
WRdV- = 0 (4.10)
Substituting Equation (4.9) into Equation (4.10), we obtain
W[7-(7C) - v72£]dV- = 0
By vector identities.
WV.(VQ = V.(WVC) - ^*7W
and
W72£ = W7-7£ = 7-(W7S) - 7W*7£
Substituting Equations (4.12) and (4.13) into Equation (4.11)
[7-(WVO - V£ *7W - v7 • (W7£) + v7W-7§]d¥- = 0
or
7W*(75 - v7^)d¥-+ I II [v7• (W7£) - 7-(WV5)]d
By Gauss divergence theorem,
7 * (W7£) dV- = W7£-ds
and
7 • (WV£)d¥- = WV£*ds
(4.11)
(4.12)
(4.13)
, we obtain
V- « 0 (4.14)
(4.15)
(4.16)
Substituting Equations (4.15) and (4.16) into Equation (4.14), we obtain
15
IIIVW-(V£ - vVQdV-+ //'W(vV£ - $ 0 -ds = 0 (4.17)
For our two-dimensional problem, Equation (4.17) becomes
IIVW-(V£ - vV£)dA + W(vV£ - V£)-ds « 0 (4.18)
This integral equation is called the vorticity transport integral
equation. The meanings of the symbols used here are the same as those
used in the compatibility integral equation. Equation (4.8).
Discretization
With the plane region of interest subdivided into a number of
finite elements, Equations (4.8) and (4.18), which are
can be written as summations over the elements,
and
W(vV£ - V O -ds] = 0 (4.20)
Where
16
M = the total number of elements,
A «* the area of m1"*1 element, m= the external boundary of a boundary element.*
As a simplification. Equations (4.19) and (4.20) can be
generated by assembling element equations of the form,
7W.(V? - vV£)dA + W(vV£ - VO-ds - 0 (4.24)
for a boundary element
Note that Equations (4.21), (4.22), (4.23) and (4.24) are not
*A boundary element is a finite element which has at least part of its boundary is the boundary of the whole region of interest.
(4.21)
A
for an interior element
(4.22)
A Sm m
for a boundary element
(4.23)
Am
for an interior element
A Sm
complete by themselves. However, the element equations for all the
finite elements in the region of interest will be assembled in a
certain fashion in Chapter VII to obtain two sets of simultaneous
linear equations which are complete and will be solved.
If we consider a weighting vector consisting of three weighting
functions, we can have
(4.25)
Amfor an interior element
(4.26)
A Sm
for a boundary element
(4.27)
A
for an interior element
VW-(V£ - vV£)dA + W(vV£ - VO*ds = 0 (4.28)
A Sm
for a boundary element
Note again that these equations are not complete by themselves
and should be assembled to obtain complete equations as will be shown
in Chapter VII.
Remarks
18
Element Equations (4.25), (4.26), (4.27) and (4.28) were
derived by using the weighting vector and the approximate solutions for
the stream function \p and the vorticity £. In the next chapter, the
approximate forms of the stream function and the vorticity will be
derived and the weighting vector selected.
CHAPTER V
APPROXIMATIONS AND WEIGHTING VECTOR
Introduction
To formulate the finite element equations, we need the forms of
the approximate solutions for the stream function and the vorticity
and the weighting vector. We also need an expression for ds in the
line integral of Equations (4.26) and (4.28). They will be discussed
in the following sections.
Linear Approximations
First of all, we should select the shape of the finite elements.
We will choose the triangular element and use it in this thesis. A
typical triangular element is shown in Figure 2.
Fig. 2.— Triangular finite element.
Stream Function Approximation
For our two-dimensional steady flow problem, the stream function
19
is a function of x and y, say
>J's=’Kx, y) (5.1)
We assume a linear variation of the stream function in each
triangular element in terms of the discrete stream functions at the
three vertices, say
41 = ax + by + c (5 .2)
or, in matrix form,
= $ C (5.3)
where
4> = ( 1 x y )
C -
Geometrically, this approximation means a plane surface as shown in
Figure 3.
Fig. 3.— Linear variation of stream function in a triangular finite element.
Let the stream functions at the three vertices of a finite
element be i|/ , iji ,
From Equation (5.2), we have
4»i = ai: + byx + c
2 “ ax2 + by2 + c
^3 = ax3 + by3 + C
or, in matrix form
\l> - BC (5.4)
where
\p = ♦ll<J>2*3
I 1 xi y i \B = 1 x2 y2' I1 x3 y3
Solving for C from Equation (5.4), we obtain
C = B"1^ (5.5)
where
2?
V 3- V 2 x3yr xiy3 Xly2'X2yl \
A = y2~y3 y3~yl yr y2
x -x„ x, -x„ x.-x, /\ 3 2 1 3 2 1 /
where
A = the area of the triangular element.
Substituting Equation (5.5) into Equation (5.3), we obtain
* SB"1!})
or
(5.6)
which is the desired approximate form for the stream function within a
triangular finite element.
From Equation (5.6), we can obtain
(5.7)
where
23
We can also evaluate the velocity within a triangular element
by differentiating Equation (5.6). The result is
V = $ = (U) - v (5.8)
where
A , A „ A31 32 33-A-, -A -A21 22 23 /
“w.
Note that the velocity V is uniform throughout the triangular
element based on linear approximation of the stream function in a finite
element.
Vorticity Approximation
Following the same arguments for the linear approximation for the
stream function in the previous discussion, it is obvious that we can
have the following approximations for £ and V£.
(5.9)
(5.10)
where A, A, 4>, 4>' are as defined previously and
is the vorticity vector consisting of the vertex vorticities.
Weighting Vector - Galerkin's Criterion
The choice of the weighting vector is the most difficult part in
the method of weighted residuals. Different choices will lead to
different approximate solutions to a given problem. We will use the
Galerkin method which proves to be simple and powerful in solving two
dimensional fluid flow problems.(4)The Galerkin criterion takes the weighting vector to be the
transpose of the coefficient matrix of the linear approximate form of
unknown physical quantities (stream function or vorticity in our
problem) so that
W - 2A(4>A)T
25
or
(5.11)
where
1xy
By Equation (5.11), we can obtain
T T' VW = 2A A 1 (5.12)
where
26
Evaluation of ds
For our triangular element, ds can be expressed in a simple
form. Recall that d^ is the line segment along the external boundary of
a boundary element. Referring to Figure 4,* we can write ds; in terms of
the slope of the external boundary as follows:
x
Fig. 4.— A boundary element.
The external boundary is a straight line passing through vertices
2 and 3 and can be expressed as
y = mx + b (5 .13)
where
From Equation (5.13),
*Here we limit the external boundary to the 2-3 side of a boundary element. However, we will not lose the generality.
dy = mdx
27
However, ds = (dx, dy)
so ds ** (dx mdx)
or
ds = (l,m)dx for finite m (5.14)
If the slope m is infinite (vertical external boundary), we will
use
ds = (0, dy)
or
ds « (0, l)dy (5.15)
for vertical external boundary.
Summary
For clarity and convenience, the approximations for the stream
function and the vorticity, and the expressions for weight vector and
ds are summarized below. They will be used in the next chapter to
formulate the finite element equations.
* - *A* (5.6)
Viji = G'A'i' (5.7)
28
V
W
VW
Ia !?
— $Ar2a
k !'«
T T 2AA <S>
T T'■ 2AA *
(5.8)
(5.9)
(5.10)
(5.11)
(5.12)
for m = finite
ds = <
v
(1 m)dx
(0, l)dy
for m = 00
(5.14)
(5.15)
yi
CHAPTER VI
FINITE ELEMENT EQUATIONS
Outline
In Chapter IV we obtained element equations (4.25), (4.26)
(4.27), and (4.28), and in Chapter V we obtained the forms of the
approximate solutions for the stream function and the vorticity and
selected the weighting vector. Now we are ready to substitute the
expression obtained in Chapter V into the element equations (4.25),
(4.26), (4.27), and (4.28). It is obvious that we only need to
evaluate the following four integrals:
m
(6.1)
Sm
WVi{) *ds (6.2)
KVW-(VC - vV£)dA (6.3)
m
(6.4)
They will be evaluated in the following four sections.
29
Evaluation of Integral (6.1)
Substituting Equations (5.7), (5.9), (5.11), and (5.12) into
integral (6.1), we obtain
(W? - VW*Vi|i)dA
"m
[ (2AAT$T) (~- *A?)dA (2AAT$T>) •(— * ’A*)]dA
ra
AT [ I I 0TMA]A5 - A V ' n t A
ATnAC - aaW a ^
(6.5)
where A is the area of the mt 1 element.
Qij AkinklAlj
kl
I I dxdy I I xdxdy I S ydxdy ^iu m m
Symmetric
S I x2dxdy I I xydxdy Am
I S y2dxdy I
31
ij
/ a 2 _j_ a 2 21 31 A21A22 + A31A32
A 2 _i_ a 2 22 32
A21A23 + A31A33
A22A23 + A32A33
\Symmetric 23 + A33
Evaluation of Integral (6.2)
Integral (6.2) assumes different forms for finite and infinite
boundary slopes.
Finite Boundary Slope (m = finite)
Substituting Equations (5.7), (5.11) and (5.14) into
Equation (6.2), we obtain
I WVijMds Sm
( 2AA iJ) ) (— 'Ai//) • (1 m)dx
** AT [ I $Tdx](l m)$'A4;8 J ’
■ at s k 4>
(6.6)
Mij - \ i skKj
32
where
\S = (1 / 2 ) ( x ^ - x22)
\ Cm/2Xx32 - x22) + b(x3 - x2) J
m “ (y^ - y2)/(x3 “ x2)
b - (x3y2 - x2y3)/(x3 “ x2>
5 " KJ ■ a2: + -Si
Infinite Boundary Slope (m = <*>)
Substituting Equations (5.7), (5.11) and (5.15) into
Equation (6.2), we obtain
m
(2AAT$T) ( ~ * ' M > ) • (0 l)dy .. _ —
at S* K* ip
(6.7)
where
V = ' S a W
s*’ y3 " y2x2(y3 - y2)
\ (y32 - y22)/2
Kj*= A3j
Evaluation of Integral (6.3)
Integral (6.3) can be split into two integrals.
VW-(V£ - vVOdA
m
rVW'V^dA - v VW•V^dA (6.8)
m m
The second integral is easy to evaluate if compared with the
integral (6.1) and can be written as
V | 1 VW*V£dA = vAP^S.. (6.9)
TOwhere is as defined in Equation (6.5).
The first integral, after substitution of Equations (5.8), (5.9)
and (5 .12), becomes
34
where
J J AVW ♦ V £dA
m
r(2AATiJ>T) • (-- 64-) (— *A?)dA
m
■rr.— AT$T04-[jJ $dA]A£
2A “ 5
V i
m
J. .ij 2A « *
H =
A2iA3i4-i - A31A2i4-. \
A22A3i^i " A32A2i^i
' A23A3i^i “ A33A2i^i /
K - (I.A.. I,A. I.A.,)i ll i i2 i i3
I. = | // dxdy // xdxdy // ydxdy J*• * A A A <
m m m
(6.10)
Substituting Equations (6,9), (6.10) into Equation (6.8), we
35
obtain the integral (6.3) written as
/ /VW • (V£ - vVOdA
Am
(6.11)
Evaluation of Integral (6.A)
As for integral (6.2), Equation (6.4) assumes different forms for
finite and infinite boundary slopes.
Finite Boundary Slope (m = finite)
The first term is easy to evaluate because it is similar to
integral (6.2) and
Integral (6.4) can be split into two integrals.
S
W(vV£ - V5)*ds
(6.12)
m m
(6.13)
The second tern, after substitution of Equations (5.8), (5.9),
(5.11) and (5.14), becomes
36
wve; *dsJ .
m
(2AAT<f.T) 0*) 4>A?) • (1 m)dx
~ [(1 m)64»][AT( | $T $dx)A]5
2A 6Wij^
V i(6.14)
where
6
— 6W. .2A ij
V i
E. = A3i - n,A2i
WiJ ’ AliNlk\j
Ni3 '
Ax Ax 2/2 mAx2/2 + bAx \
Ax 3/3 iuAx 3/3 + bAx2/2\ Symmetric m2Ax3/3 + mbAx2 + b2Ax /
Ax = x3 - x2
Ax2 = x 2 - x 2 X2
Ax3 = x„3 - x„3
* " <y3 ’ y2)/Cx3 x2)
37
b " X3y2 ” X2y3)/(X3 " X2
Substituting Equations (6.13) and (6.14) into Equation (6.12),
we obtain integral (6.4) written as
J W(vV5 - $5) -ds
(6.15)
for a triangular element with finite boundary slope.
Infinite Boundary Slope (m - “)
As for finite boundary slope, we can easily obtain the first
integral in Equation (6.12),
v J WV^’ds = (6.16)
where M ^ * is as defined in Equation (6.7).
The second integral in Equation (6.12), after substitution of
Equations (5.8), (5.9), (5.11) and (5.15), becomes
f - ->WVS-dsJ s
(2A A V ) ( ^ 6 )(— * A O -(0 1) dy
^ [(1 m)6^][AT( I $T$dy)A]|
where
z. * ® — 6*Wij 2A
6* - E±*^i
E * = Ai 2i
w . . = A Nij li lk
N
1 Ay x2Ay
13 ■ x 22iy
, Symmetric
Ay2/2 '
x2Ay2/2
Ay3/3 /
Ay = y3 ■ y2
Substituting Equations (6.16) and (6.17) into Equation (6.12),
we obtain the integral (6.A) written as
r - -W(W£ - V O *dsJ ’
(6.18)
Summary39
The results derived in the last four sections are summarized
below for convenience.
(W£ - VW-V*)dA = Q±j5 - AP (6.5)
m
WVi|> *dsV j
for m = finite (6.6)
for m = » (6.7)m
VW-(V£ - vV£)dA
m
->W(vV£ - V£)*ds
(J., - vAP..)£. (6.11)ij ij ]
(vM^ - Z^) j for m = finite(6.15)
(vM^* - Z ^ * ) ^ for m » « (6.18)m
Substituting these equations into element equations (4.25), (4.26),
(4.27), and (4.28), we obtain the compatibility element equations.
(6.19)
for an interior element
(APij V * J ' V l
for a boundary element with
finite boundary slope
<APu M *)i(i ij J Q <K Vij^j
for a boundary element with
(6.20)
(6.21)
infinite boundary slope
and the vorticity transport element equations.
<JU - vAPiJ,£3 ‘ 0
for an interior element
‘<Jil - '■APy ) - (zi3 " ‘ 0for a boundary element with
finite boundary slope
[ ( J ± . - vAP±j) - (Z±j - - 0
for a boundary element with
infinite boundary slope
These element equations will be used in the next
(6.22)
(6.23)
(6.24)
chapter to
formulate two sets of simultaneous equations.
CHAPTER VII
ASSEMBLING OF FINITE ELEMENT EQUATIONS
The Concept of Assembling
The assembling procedure will be discussed in the following
sections and should be carefully followed to make correct assembling.
The compatibility element equation assumes different forms
depending on the property of the triangular element (interior or
boundary, finite or infinite boundary slope) . We will consider the
boundary element only because it is more general.
Let us look at the compatibility element equation for a
boundary element with finite boundary slope. Equation (6-20).*
where i = 1, 2, 3 and j =1, 2, 3.
Notice that this equation implies three equations corresponding
to three vertices of a triangular element. We assign
Assembling of the Compatibility Element Equations to Obtain
the Compatibility Set
(6.20)
to vertix 1
to vertix 2
*If the boundary slope is infinite, use Equation (6.21).
41
42
(AP^ - M )\Ji = Q3j Cj to vertix 3
Now, let us look at a certain interior node in the region of interest.
For this node there are a number of neighboring triangular elements.
For each of these neighboring elements, there is an element equation
assigned to this certain interior node as we just did. As an example,
refer to Figure 5. Node 1 is the chosen interior node with five
neighboring elements. There are five element equations assigned to
node 1. Each neighboring element assigns one element equation to node 1.
We will use the element equation for a boundary element, i.e. Equation
(6.20) or (6.21), to assign equations to an interior node. In other
words, the edges 23, 34, 45, 56 and 62 are considered as external
boundaries and the region enclosed by these edges is the only region we
are interested in when we are looking at the interior node 1. This con
cept should be carefully followed as it will be used again. Since we got
five element equations for node 1, we merely add up these five equations to
obtain a complete equation for node 1 which would be in the following form:
Fig. 5.— An interior node with neighboring elements to show the assembling procedure.
A3
‘l*l + *2*2 + *3*3 + V * + *5*5 + *6*6
V l + V 2 + V 3 + V * + b5«5 + b6«6
where ^ and (1 = 1, 2, ...» 6) are respectively the vorticlty and
stream function at node i. and b^ are functions of the positions of
these nodes.
If we apply the same idea to each of the interior nodes in the
whole region of interest, we will obtain a set of simultaneous
equations. Each equation corresponds to an interior node. Thus, we can
have
TY = TC (7.1)
where
T and T are both n x 1 matrix and are functions of the
positions of all nodes in the flow region of interest,
n = the number of interior nodes,
1 = the number of all nodes,
Y * the column vector of the stream functions of all nodes,
£ ** the column vector of the vorticities of all nodes.
This equation is one of the two sets of simultaneous equations
we have been trying to find. It will be called the compatibility set.
Another set of equations will be derived in the next section.
44
Assembling of the Vorticity Transport Element Equations— the Vorticity
Transport Set
We again use the element equation for a boundary element.
Following the same procedures as in the last section and putting all
known and unknown quantities on the left side of the equations, we are
able to obtain the following set of simultaneous equations.
B£ - 0 (7.2)
where
B = a n x 1 matrix and is a function of the positions of all
nodes and the stream functions at all these nodes,
5 = a column vector of the vorticities at all nodes in the
region of interest,
n and 1 = are respectively the number of interior nodes and the
number of total nodes.
This is the second set of simultaneous equations we need and will be
called the vorticity transport set.
Summary
The assembling procedures result in the following two sets of
simultaneous equations:
TV *= T£ (7.1)
BS - 0 (7.2)
Along with suitable boundary conditions, these two sets of equations can
be used to solve a general two-dimensional steady flow problem with
constant fluid properties as will be shown in the next chapter.
CHAPTER VIII
SOLUTION METHOD
Outline
Two sets of equations were derived in the last chapter, i.e.
Equations (7.1) and (7.2). Along with given boundary conditions on
the stream function and vorticity, we can solve these two sets of
equations using as interation scheme. We can obtain the solutions
for the stream functions, vorticities, velocities at all interior nodes.
The procedures will be discussed in the following sections and two
examples are given to show the validity of the method developed in this
thesis.
Boundary Conditions
We need to know the stream functions and the vorticities along
the external boundary of the whole region of interest.
The stream functions at the boundary nodes are obtainable, if the
volume flow rates across the boundaries are determined.
The vorticity boundary conditions are not as easy to obtain as
the stream function boundary conditions, because velocity gradients are
involved. To specify them, we need to distinguish between the solid wall
boundary and the internal fluid boundary. The solid wall vorticities
can be deduced from other information. ^ The internal fluid
vorticities can be measured by hot-wire technique. For the purpose
45
45
of this thesis, we assume the vorticity boundary conditions are known
regardless of the procedures to find them.
Stream Function and Vorticity Solutions by an Iteration Scheme
Refer to Equations (7.1) and (7.2), i.e.
TV *» T £ (7.1)
8£ = 0 (7.2)
The components of the column vector £ in Equation (7.2) are not
all unknowns, because the vorticities on the boundaries are specified.
We can move those terms in each equation of the set (7.2) involving
the boundary stream functions to the other side of the equation. Then,
we can obtain
C = n x n matrix function of the stream functions at all nodes
and the position of each node,
£' * column vector of the unknown vorticities at all interior
nodes,
D = column vector which is a function of the stream functions
at all nodes and the vorticities at all external boundary
nodes.
Now, we can assume the stream functions at all interior nodes.
We also have boundary conditions on the stream functions and vorticities.
C£' = D (8.1)
where
47
So we can solve Equation (8.1) for £', the vorticities at interior
nodes. We then substitute these vorticities into Equation (7.1) to
make the right hand side of Equation (7.1) become constant, or
Ti(j = k (8.2)
where k is a constant column vector.
Note also that the components of <J> are not all unknowns because
the stream functions at the boundary nodes are all specified.
Rearranging the terms in Equation (8.2), we can obtain
eip’ = F (8.3)
where
e « n x n matrix function of the positions of all nodes,
V = column vector of the stream functions at interior nodes,
F = constant column vector.
Then, we can solve for if*’, the stream functions at interior nodes. These
values are compared with the initially assumed stream functions. If
their differences are within some pre-assigned limits. We will accept
the newly calculated solutions or the assumed solutions for the stream
functions at interior nodes. If their difference exceeds the pre
assigned limit, we use the newly calculated stream functions to calculate
D in Equation (8.1) and solve for 5’• Then, use the new £' to find
F in Equation (8.3) and solve for ip' .
Then, compare this i|j’ with the previous one. If they are close
enough, we have our solution for the stream functions at all interior
nodes. If not, do the same iteration procedures again and again until
the stream functions at the interior nodes converge.
One significant result of the procedures described above is
that, once the stream functions are solved, the vorticities at
interior nodes are obtained. This is obvious because vorticities are
solved during each iteration. The vorticities solved just before the
stream functions converge within a pre-assigned limit are accepted as
our vorticity solutions for the interior nodes.
Velocity Solutions
Recall Equation (5.8), which is
0 - k eJwhere
A31 A32 A33
~A21 "A22 ~A23
or
u 2A A3i^i (8.4)
v -1_ ' 2A A2i*i (8.5)
As we mentioned in Chapter V, Linear Approximations - Stream
Function Approximation, the velocity components u and v are uniform
throughout the triangular element. In essense, it is some kind of
average velocity within a triangular element.
For a certain node, we take the average value of these constant
velocity components for its neighboring elements as the velocity
49
components at this node. The following example shows a general
relation between the velocity components at a certain node and the
stream functions at its neighboring nodes.
Example: With Equations (8.4) and(8.5) some mathematical manipulation shows the following:
2*' <x2- V V ' V ’V V ' V V ' 1'T
+ < v W
2At 1 <y2~y4 >*l+<y3"yl)*2+ < V X2> *
+ (V x3)(.4]
3
3
Where AT = A . + AX][ + + AIV
Fig. 6.— An interior node with neighboring elements to show the relation between velocity components and stream functions.
An alternative way to specify the velocity solutions is to
assume the constant velocity components of each element are the
velocities at the center of the triangular element. Both ways are
acceptable. However, the average velocities over the neighboring
elements will be used in the example problems, because no effort is
intended to find the center of the triangular elements.
The Use of Digital Computer
The complete solution for the problem considered in this thesis
requires numerical calculations. We need to formulate three finite
50
element equations tor each finite element, assemble finite element
equations for each node, and solve two sets of simultaneous equations
by iteration process. A computer program is developed and two
examplar problems with standard solutions are solved using this
computer program. The program solves for the stream functions and the
vorticities. The velocity components are calculated by hand for the
example problems.
Solved Problems
Two problems are solved by the computer program. They are
1. Fully developed flow through a straight channel with fixed
parallel boundaries.
2. Couette flow between two parallel flat walls, one of which
is at rest, the other moving in its own plane with a constant velocity.
They are discussed in the following two sections.
Fully Developed Flow Between Two Stationary Parallel Planes
The solution for this problem is easily obtained by solving the
governing equations with the boundary condition of zero wall velocities.(8)The resulting velocity profile'' , Figure 7, is parabolic and
Fig. 7.— Parallel flow with parabolic velocity distribution.
The stream function is
51
*f '/ u dy 1_ d£
2y dxo
The total volume flow rate through the charnel is
1 dp h3 2y dx 6
Then, the velocity and the stream function at each point in terms
of the total flow rate are
uh 3
(hy - y2) (8.6)
# - ~ (3hy2 - 2y3) (8.7)h 3
The vorticity at each point is
5 = - — (2y - h) (8.8)dy h3
The specific problem considers a 3 ft. long flow channel with
h = 2 ft. and the total volume flow rate ¥ = 100 ft3/hr. The problem
region is divided up into a mesh of triangular finite elements
illustrated in Figure 8.
The exact solutions for the velocity, the stream function and
the vorticity are calculated from Equations (8.6), (8.7) and (8.8).
These exact solutions are compared with the solutions obtained by using
the finite element method in Table 1.
52
9 8 7
Fig. 8.— A typical finite element arrangement.
TABLE 1
COMPARISON OF EXACT AND FINITE ELEMENT SOLUTIONS
NodeVelocity Stream Function Vorticity
Exact Approximate Exact Approximate Exact Approximate
1 56.25 50.16 84.375 83.455 75 73.02
2 56.25 50.16 84.375 83.485 75 73.54
3 75.00 60. 50.00 49.693 0 -.5
4 56.25 50. 15.625 16.218 -75 -75.74
5 56.25 50. 15.625 16.188 -75 -76.26
Couette Flow
53
The general case of Couette flow is a superposition of the
simple Couette flow with a vanishing pressure gradient over the flow(O)
between two stationary flat plates. 1 The velocity solution is
" ■ hD - h t (hy ‘y2)which is shown in Figure 9. Note that U is the constant moving
velocity of the upper wall, and the dimensionless pressure gradient,
u---- ^
Fig. 9.— Couette flow between two parallel flat walls.
^2P = (“ j ) . determines the existence of back-flow. As in the last2pU dxsection, we can write the velocity, the stream function, and the vorticity
in terms of the total mass flow rate, i.e.
u ) y + (—h2 h h2
6V)y2 (8.9)
(8.10). , 3 V U. 2 . ,U 2¥. 3t “ (----- ) y + (------ ) yh3 h h2 h3
„ ,1 2 V 6U. . ,2U 6V.K - (------- )y + (------ )
h3 h2 h h2
54
(8.11)
The specific problem considers a Couette flow channel with
h B 2 ft and the total volume flow rate of 100 ft3/hr. The problem
region is divided up into a mesh of triangular finite elements as
illustrated in Figure 8. The exact solutions are calculated from
Equations (8.9), (8.10) and (8.11) and are compared to the finite
element solutions in Table 2.*
TABLE 2
COMPARISON OF EXACT Aid) FINITE ELEMENT SOLUTIONS FOR COUETTE FLOW
NodeVelocity Stream Function Vorticity
Exact Approximate Exact Approximate Exact Approximate
1 58.125 52.6 81.5625 80.82 62.5 60.772 58.125 52.6 81.5625 80.84 62.5 61.243 72.5 58. 47.5 47.32 -5. -5.4 53.125 47.41 14.6875 15.31 -72.5 -73.5 53.125 47.41 14.6875 15.28 -72.5 -73.5
Conclusion
From the above examples, it is seen that the agreement between
*For Couette flow we have convergence problems. Unless the first guesses are very close to the exact solutions, the iteration solutions keep diverging. The approximate solutions in Figure 10 are the result of the first iteration, when the first guesses are the exact solutions.
numerical and theoretical solutions is very good. The velocity
55
distributions of many physical problems cannot be obtained
analytically. The finite element method can be applied to find the
approximate solutions.
LIST OF REFERENCES
1. Becker, E. B. and Parr, C. H., "Application of the Finite ElementMethod to Heat Conduction in Solids," Rohm and Hass Company Technical Report, S-117, November, 1967.
2. Finlayson, B. A. and Scriven, L. E., "The Method of WeightedResiduals and its Relation to Certain Variational Principles for the Analysis of Transport Processes," Chemical Engineering Science, Vol. 20, 1965, pp. 395-404.
3. Gosman, A. D. and others, Heat and Mass Transfer in RecirculatingFlows, Academic Press, London and New York, 1969.
4. Heaton, H. S., "Improvements in Two-Dimensional Transient HeatConduction Computer Programs," Hercules, Inc. Technical Report, August, 1970.
5. Kantorovich, L. V. and Krylov, V. I., Approximate Methods inHigher Analysis, Interscience, New York, 1958.
6. Myer, G. E., Analytical Methods in Conduction Heat Transfer, McGraw-Hill, New York, 1971.
7. Roache, P. J. and Mueller, T. J., "Numerical Solutions ofCompressible and Incompressible Laminar Separated Flows,"AIAA Fluid and Plasma Dynamics Conference Paper, No. 68-741, June, 1968.
8. Schlichting, H., Boundary-Layer Theory, McGraw-Hill, New York, 1968.
9. Tay, A. G., and G. de Vahl Davis. "Application of the Finite ElementMethod to Convective Heat Transfer Between Parallel Planes," International Journal of Heat and Mass Transfer, Vol. 14, No. 8, August, 1971.
10. Tong, P., and Y. C. Fung. "Slow Particulate Viscous Flow in Channelsand Tubes— Application and Biomechanics." Journal of Applied Mechanics. December, 1971.
11. Vrie3, G., and D. H. Norrie. "The Application of the Finite-ElementTechnique to Potential Flow Problems." Transaction of the ASME. December, 1971.
12. Wilson, E. L., and R. E. Nickell, "Application of the Finite ElementMethod to Heat-Conduction Analysis." Nuclear Engineering and Design, 4. 1966.
56
57
13. Zienkiewicz, 0. C., and Y. K. Cheung. The Finite Element Method— Structural and Continuum Mechanics. McGraw-Hill, Maidenhead, England, 1967.
a ppen d ix
ThS.147 A,T=2.,RAY CUJ eortran DECK «MWR 06/03/72 RACE iC CONGRATULATIONS CONORaTUI AT IONS CONOR aTUl AT IONS CDNORaTLi »T IONSc CONGRATULATION'S CONOR* TulaT ! ONS CONORA Tut A T I (INS CONORA U I * T t ONSC “ NUMRtR Of v*OD£SC NE MJMRER CE El CENTSC w'Jhpeo iHTrojOft NODES FIRSTC CO TuRU EAC« element AND READ NODES COUNTER CLOCKWISEC E0[> INTERIOR ELEMENT STaR f AT ANT OE THREE VERTICESC EOR ROUNDARY ELEMENT START AT THE VERTlX NOT ON BOLNCSrYC NODE Mi NOTE NUMBER0 XM > Y (I) COORDINATE S OE EACH NODEc LAC-n eor Interior elementC LAG = 'l, 2. 3, ETC. FOR BOUNDARY ELEMENTC NRD NUMBER or BOUNDARY MOOES c c
• DIMENSION SA!<5S>.SA!M(S5).v0R(S5),XX(5R).YY(S5>.PD(55T,AnD(5S>.1 1SN0(5S.1C.3),SNE(S5),RAY(SS.55).CATMY<5C.55>.GRACE<55.RS).1 2N0DE(3),x (3).Y(T).S(3),RK(3).RH(3>,1 3a1(13.13),TM(13,13).BB(13.13>.AA<3,3>.R!<3.3>.1 4PLM(3.3)«P<3,3).0<3,3). R.J( 3.3 >. RN (3,3). N< 3,3 >
CC
2 READ<5.9999) NOsET3 9 9 9 9 F O R M A T * 1 1 0 )4 WR!TE(6.e5«R) NOSET9 8883 rOR"AT<lHC, 12(5)
6
ccc
REaO(S,P9) h,NBD7 09 rOR'<AT(2112)e I T I " A. = 19 MINsw-NOn
1 -r MM»NIN*111 REA'.'fE.AV) (xX<T),YYCI),I=l,M>12 <9 FORMAT (■ 2E10.2 I
C READ POUNCaPy STREAM FUNCTIONS1*5 READ!?. 19) (SA!(p.I«N!Ni,M>1 4 19 FCRHAT(cJFlC.T)15 RE AP( 9,2TV ) (VOR(I),I=NIN1,M>16 20? fCrmat(bfu- .3)
C ASSUMING ST' rAM FUNCTIONS for17 REA0(9,2) (SaI<I).I=1*N!n )15 2 FCR''AT(0E1;i.3>: v wH]Te < 6.167 > (SA1U)>IM.K)2: 167 FCR"A*<lH. ,«rlC,3)21 RF AO(N.09) VIS22 99 FORMAT(Elf,3)23 11=194 281 RFAO(S.l) Nf:25 1 FORMAT(Ilf)26 S'.E ( I I ) =nE27 213C DO 3 1=1,M26 DO 3 .1 = 1, M29 Al(I,J)=8.3 7 t u(i,j> =e.•r 4’ X 3 CONTINUE
LnvO
/
Tm s.h /, .a .T •» 2 J ^ a V CHI FORTRAN DECK • MWR32 IFOTlMf-l) i3.553.20Rccc MAX COUNTING FLFMFNT NyMpcR13 55S *AX = 1c RFAfi IN FOR A TRIANGULAR FLFMFNT34 le RFA''(C,68) (nCDF(I).1=1,3)Id Afl FCRMAT(3t10>
C36 DC t:< 1*1,337 snqi11,wax,I)=NGpt(I)36 1S« CGivTlVir39 20? NE = GNF(I I)4;’ 15* M 71 in.341 J«S'iU( I I .MAX, I )42 X( I >=yx(J>43 V( I > = Y Y tJ)44 71 cont i mjf4 > Nl= M'l 11 ,MiX,l»46 N? = RnI)( I I, “Ax.2)47 N.(rSNn< I 1 « M A X . 3 >46 CALC AMaT(X.Y.AA)49 CALC IMNT(X.Y.RI)
Cc *cr stRca" fu,jcti°n equation
5.?N DO 30 1=1,3SI DC 30 J=l,352 RIM(I,J)e.p
53 38 0(I,J)=L.54 DO 5 1=1,355 DO 5 .1 = 1,3’56 DO 5 K=1,35 7 DO 5 L = 1,356 OC. J)=C(I,J)»AA(K,I).RI<K,L)»AA(L,J>59 5 CONTIIiuF.6 2 CALL ASRCY(Al,Nl,N2,N3,0)
C61 DO A 1=1,262 DC 6 J=I« 363 P(I.J) = (AA(?,I).AA(2,.I)*AA(3,I)»AA(3,44 6 CONTINUE65 P(2,1)=F(1,2)46 P(3,1)=P(1,3>67 P(3,?)=P(2,3)cc68 IF(X(2)-X<3)> 35,A,3569
c75 S(1>=X(2!-X(3>73 WP=X(2)»»2-X(3).»271 S(2) = ,.w/2.72 RM=(Y(2)-Y(3j>/S(l>73 B=(Y(3)*X(2)-Y(3).X(3))/SI1>74 S(3)=»M*S(2)*P*Stl)
Cc
0 8 /0 3 / 7 2 MAGE
147, • A.r*23.RAY cm75 no d 1=1,376 **<1) = AA(2,!)*RV»AA<3,I)77 S icOMinur.7b !r,0 TO 32-
C7 V 4 S(1)*Y(2>*Y(3>a: S < 2 >*Y(2>»SM )A 1 S(3)=,5.(Y(2)«»2-Y(3).»2)52 DO 36 J = 1,393 P<(J)=AA(3,J)54 36 COUTPUlF.55 32 CONTp.uF*6 DO 9 1=1,357 DO 9 J=1,359 DO 9 5 = 1,3« 9 m m I, j>=hL.Y< i, jj*aa(k, i )9“ 6 com 16 ME91 DO 88 1=1,392 DO 88 J = l,303 88 PC 1, J)=P(1»J)*RLK(I,J)04 101 CALL' ASf-'LY ( T||«N1. N2, N3,P)
C95 MAx=max*106 IFCAX-^E) 68,58,1107 68 I F( I T 1 hC-1> 13,13,15496 11 DC 136 1=1,«09 RAY(N1,I) = A1(N1,D1 CATPYCNl,I)=TU<51,I)171 136 continue
C1.72 136 5 A X = 1133 DO 111 1=1,u174 DO 111 J=l,«105 111 Bin i, j) = .o
Ccc
176 28 DO 14 1=1,3177 J = SN’D( 11 .BAX, I)178 x (1> = x x < j >179 Y ( I ) = Y Y C J )11C 14 CONTINUE111 N1=6NP( I I , ” A X > 1)112 N? = 9Nr(H,MAY.2)113 NJ = 8ND(I I , y AX■3)ll4 CALL AYATCX.Y/AA)115 CALI P I NT ( X , Y, RI >
CC VOB’ICITy EOtjAT I ONC
116 S(l) = 6Al(M)117 S(2)=SAI(N2)118 S C 3)=?AI(M3)11712C PH2=,C121 DC 16 1=1,3122 RHi=RHl*AA(3,1)*SC1)123 Ph2=rw2»aA(2,I).S(1)
FORTRAN DECK 'KWR 06/0 3 / 7 2 PA«E 3
oxhJ
FORTRAN DECK *MWRTkS.147, CHI124125126 127 126 179ir131132 1 = 3134135136137 136
139143141142143144145146147 143 1 4 9 l5'» l i152153154155156157 156 159163 161 162 143164 146 166 167 163 149 173171172173174
15 CONTINUEDO 14 1*1,3RR< I >*AA<2.l>*RHl = AA<3,l>»RH2
16 CONTINUEL’0 29 1 = 1.3 RK(I)=.0
29 CONTINUEDO 17 1=1.3 DC 17 J=l,3RK{!>sfi.K<I).Rl(i,J)»AA(J. I)
17 cONTI\UEDO 23 1*1,3 DO 23 J=1.3 RJ( T,J)=RH<I >»R*(J)
23 cOn t INlTCCC IF(X(2)-X(3) ) 4.3,41,4cC43 XC*T(2)-X(3)
R"*(Y(2)-Y(3))/XC R=(Y(3)*X(2)-Y(2)4X(3))/XC DO 13 1*1.3
18 RKC I)*RM*AA(2.I)-AA(3. I) o'. (1.1 > = X (3) -X t 7 )RN(l.?>=.5.(x<3)..2-X(2>»o2>95(1.3) = R N * R f. ( 1,2 ) *fi*RN( 1,1) R6(2.?)=(X(!)**3-X(2)*«3)/3. R'«(?,3)=RY»R'i(2.2)»P»“N<i,2)RM3,3) = Rt'«‘2«R9(2,?)*2.»PM»B*R9<i,2)*B**2*l,N(i,i)GO to 45
C41 DO 63 1*1.3 60 R4(!)=AA(2,|>
RN(1, 1 ) =Y(3).Y(?)°N(1,2 ) =X(2)*RN(1,1)RN(l,3)=.5*(y(3)«*2-Y(2)**2)RN(?.2)=X(2>.RN(1,2>R!;(2,3) = x <2).RM(1,3)RN(3,3) = (Y(3)...X-Y(2)*«3)/3.
C<5 cCYTP'uE
RN(2,1 )=R>'(1,2)»N(3.i>sRH(l,3>PN(3,2)=RN(?,3>DO 41 1*1,3 DC 61 J = 1.3
41 wU.J )=.•;. 7 CO 51 1=1,3 DO 51 J = 1»3 DO 51 K =1.3 DO 51 L = 1,3 .
51 U(I,J)* W{I/J)*AA(K»I)*RN(K#L)*Aa(L,J)C
CC= .3DO 22 1*1,3 CC=CC*RK(I)«S(1)
06/03/72 RAGE 4
OXTO
FORTRAN d e c k »m w r147. ,A.T=20,PAY CH! FORTRAN175 22
rcn\'t imjf.
176U
D0 23 1=1,3177 DO 23 J=1,3175 w<I,J)rCC*M< J,J)179 23 CONTINUE1*0 DO 24 1=1,31*1 DO 24 J=1.31*2 RJ<I,J) = .5.(rJ<I,J>*WU,J))/RI<1,1)1*3 24 CONTINUE184 C
122r
CAUL AS(:LY(«R,N1,N2,N3,Rj )1*5 HAX=YAX»11*6 !F(>-4X-Nf.> 24,25 » 27:«7 27 DO 26 1=1,M1 *8 DO 26 J=1,M189 B8(I,J)=bP<I,J)-VIS«TU(I,J)10? 26 C 0 :-i T I • mj r101 DO 13 7 I=1, Mlo2 GBACt<\l,t)»flH<Nl«I>193 137 CONTINUE104 I 1 = 11*1195 IE(I I -NIN> 110,100,135106 120 IE(!T!mF-1> 13,281,147107 147 M A X =1i06 GO TO 2132109
C135 DO 4Ji 1=1,NlN
27 7 431 DP(I>=.U2 .11 DO 128 I=1,NJN2 72 DO 128 Js'JINj ,M2 *5 125
CD'J( I > = dh< D - gRace 11, J)*v o p<J)
2/*CC0
CALL r.LIM(G5A0E,NIN,DD,V0R)
275 DO 33 !=1,N!N2 76 a d d< !> = ,;?277 33 DO(I)=.C2 75 DO 34 1=1,NlN219 DC 34 J=1,M21S DP<I>=DP<!!*RAY(I,J)»VOR<J>211 34 CONTPmt2l2 DO 37 1=1, M n2l3 DO 37 J = u m , M214 ADD!I)=ADD(I)*CATMY(I.J)*S A1(J>215 37 continue216 DO 4j 1=1,n In21 7 nn< 1 !=DD(1)’aOD(1)21 b 43 CONTINUE219 call EL1m <CATHY,NIN,D«.SA!N)22.1
Cdo 42 1=1,NlN
221 !F<aps<Sa IN(I>-8A!(!>>-.1) 50,So,30222 <2 CONTINUE223 3C IE <ITIME-23 1 31,31,777
06/0*5/72 HAGE «s
U)
147, ,A.T«2K#RAY CHI FORTRAN DECK »MWR •22 4 31 ITI “E=ITIHE*1225 DO 4p 1=1.NIN226 A 0 SAI<I> =SAlM<I>227 RPITE<6.44> <SA!<I),I=1,M>22tt A A FORRaT(1HL.AE14.7)229 11=12-0 R A X231 GO TO 2130
cc PRINT vORTICITY AND STRFam FUNCTION232
c777 W°ITF(6.212>
?33 21? FORMAT(1h2»'NOT CONVERGENT')234 cn Tp i3235 52 L'P I T E ( 5, 191)236 191 fcr-at(1r:,'this is the nUrher op iterations’)237 WRITE(6>4766) IT1HE23 5 47A6 forhaT(ih;,Iic)2-39 hRITr(6,9574)24'' 9P76 FORMAT(1 HO.* THIR IS The SOLUTION FOR VORTICITY* )241 wRITF C 6.52) (VOP(I), I = 1.M>242 52 FCRRaT(1H.',5f14.7)243 WRITf(6,117)244 117 FORMAT(1H 0 . 'THIS IS THE SOLUTION FOR stream function245 HR ITE < 6.54) (Sa IN(I)#I=1.MIN)246 54 FORMAT(1HE.5E14.7)247 13 STOP24ti END
NO “ESSAGrS FOR ARCVr COMPILATION,EXTERNAL REFERENCES:
FTIO.RGO FTIO.XMT FT!0.HLT FTIO.KCO aRaTaSBlY EXP2, ELIM
0 6 / 0 3 / 7 2
R I NT
RAGE a
PFTC.ARAT e2f
ON
TRS.H7 A.Wl'.RAY CHI FORTRAN1 SUbPniJT ! NE AYATfX.Y.AA)2 Dt«'AF!ON x <3>. ' ' ( 3>»A«<3, 3)3 AA( 1 , 1 ) = XC2 ) » Y( 3 ) - X! 3 ) * V( 2 )A a«(1.2)=X(3)*Y(1>-X(1)*Y(3)5 a a(I,3)=X(1)oY(?)-X(2>»Y(1>6 AA«2#1) =Y(2>. Y( J>7 AA( 2 . 2 ) = Y< 3 ) - Y( i )8 AA(?,3)=Y(1)-Y(?)9 AA( 7 , 1 ) = X( 3 ) - X( 7 )17 AA(3,2)=X(1>-X<3>11 AA(3,3)=X(2)-X(1)12 RETURN13 END
NO "ESS4G=-S FOR aROVE C0HP IL aTI ON *
#F7C.P!NT
86/23/72 RAr.E T
226
ONUl
ThS, 47, ,A,T=20,»AY CWI FORTRAN DECK fRINT * 06/03/721 S't&SOt'TINE RlMIX.Y.R! >2 DIMENSION X(3),v (3),R[<3,3>,SX(3).SY<3)3 DO 11 1=1,34 DO 11 J=1,35 11 R I ( I . J) =.» . 36 !F(X(?)-X(3)> 3,4,37 4 I D = 18 1 .P01=x(3>-X(l)9 BD2 = X(3)**2-.xQ)**212 R':3 = X (3 > **3-x< 1> **311 pD4 :: X ( 3 > • *4-X < 1 > **412 «M2=(Y(3)-Y(l)>/(X(3)'X(l)>13 PM3 = <v <1)-Y(?))/'<X(i )-X(2))14 Sni = R>-2-RY315 S!'D = R'!?*»2-R"3»«?16 Sr>3 = R'2**3-P“3**317 I F ( ID-4) 63,66,8818 46 I n»?IV .SDi = -S0i2’’ SD2=-0D221 SD3 = -St)322 * 8 RI(l,l>=.S«ani»»2»SDi*RI(i,i0?3 RI (!,’) = (Dd3/3.-.S»x (1) »Rn2) *901 *PU1.2>24 R! (1,3) = Sl2*p.D3/«,.*.5.( Y( 1 )«SDl-X( i) *SD2) »aD2*Xt !)•( ,5.y<i)«SD8-2* 1Y(1'»SD1),R’'1*8T(1,3)25 °I t 2,2) = ( . ?S.RIM-Xt 1) *RD3/'3. )*S01*91(2,2)26 RI(2,3>=SD2*F.D4/(i,*(Y<1).SD1-Xtl)#Sn2).RD3/3,«.5.X<1>*< ,5*X(1>*S26 1D2-Y11 )-sr1)«RD2*BI(2,3)27 R1(1,3)=SD3.p94/l2.*(Y(l).SD2-X(l).SD31*803/3...5»(X(l).«2.SD3-227 1 . *X( 1 )*Y( l).<;D2.Y(l)**2*SDi)*i)D?-X(l )*(X(l)»*2*SD3/3.-V(l)»Y(i)»27 1S02.Y(1>**2*9Dl>.RDl.PI(3,3>28 I F ( ID.tO.l) GO TO 1329 I f < Iq .EO.2) f,0 TO 93-: IM ID.EO.3) GO TO 7731 77 X 11)=SX(2> .32 X(2)=5X(1)33 Y(1)=9Y(2>34 v < 2 > =SY(1>35 ir = 436 GO TO l37 I F (ID.EO.3) GO To 638 9 DO 2.' 1=1,339 x(i> =sx <i>4 3 20 Y(1)=SY(I )4 1 i; PI(2,1)=RI(1,2)42 RI(3,l)=RI(1.3)43 R!(3.?>=R!(2,3>44 RETURN45 3 in = 246 DO 30 1=1,34 7 sx(i>=x(i)43 3£ SY< I)=Y( I )49 I F (<(1) -X ( 2 1 > 1 4 . 7 , 1 45.: 7 X(1> *SX < 3 >■SI X ( 2 )=0 x (1)52 X ( 3 ) = 9 X ( 2)53 Y ( 1 > = G Y ( 3 )54 Y ( 2 ) =5Y(1>
kage: a
ONON
TRS.147 A.T»20,RAY CM I rOPTBAW5556S 7 StJ 59 A "J 61 62 *3 4«4546 67 4 a
y «3)»:,y<z )GC TD 1 '14 Ir{y < t) - x ( 3)) 16,4,156 x<l>«rx<2>X < 2 > = SX(3 >X<3>*5X(1)Y(1>=SY(?)Y(2>r5Y<3>Y(3)*SV(1)ID = ?GO TO 1
15 10 = 3GO TO 1 END
"ESSAGrS rOR Ali°YE C0MPIt-ATInN'EXTERNAL REEERE'ICES:
EXP?.
«F TC, ASRLY
176/03/72 rag: «
e2«
O'>vj
TWS.147 4. T»21.pay Cm 1 rtJPTPAN de ck 'ASBLY
123456 7 6 31 2 11 :2 13
S'JBPO'JTlNE AGf)Lv < A »f<l .M2.N3 DIMENSION a(i3.13).0(3.3) 40.1 ,M) = 4(*'1.N’ 1*0(1.114(‘(1,i,?)eA('Ji ,N?)*()(1,2)A(01.131=A(Ml»M3 1*0(1.3)A (N’,M>=A(M?.M >*0(2.1) 4(n2,'!2)=4(M?.N?)*0(2.2)' A(.M?,'.3)aA(M?,N3)*0(2.3) 4(N5,‘ll)sA(*,3.M ) *Q ( 3,1) A(07,’1?)«4(Mt ,M?)»0(3,2)4 ( N3 , N3 1 = A ( A'3. N3 1 +0 ( 3,3 1 P r T' IBEND
,0)
"tSSAGcS r'OR ABOVE ItaTION,
AFTC.ELI*
26/23/72 page i
221
<7400
TRS.1A7 A.T«2S.RAV C h ! f o r t r a n d e c k 'ELIM .1 SUf-.»0'*TlMF Ff TM(AA#N*RD.7)2 0 t H F f * 3 : C N A*(55.55),B0<55>,A(55,56),2(55)# Tn<55>3 fc s N ♦ 14 d o id: i = i •3 A (I < N*‘-) “BD (!)6 P(I)-I7 DC 1CV J*1.NB ISC A(:,J ) = A A ( I . J )9 **1
1 C 4i CALL r.XCM(A.N.NM,K,!0)1 1 2 I F (A (K .K )) 3 , 9 9 9 , 31 2 3 k k = k * i1 3 D C A J = K K ,N N14 A(K,J ) i A ( K , J ) / a < K . K )1 5 D O A U l , l .1 6 IFtK-n A1,4,A11 7 A1 A ( 1 , J ) = A ( ! , J ) - A ( I » K ) » A ( K , J )IB A C O N T I M j E1 9 K s K K2 C IF 1,2,52 1 5 D O 1 C 1 = 1 , N? 2 D O I D J = 1 ,N2 3 I.F(ID(J)-!)lB,fi,132 < 6 ZM) = A ( J , f-N)2 5 IS coNTp'ur.2 6 RETURN2 7 790 L R I T E I 6,10 D 2 )?e isos FORRA T{19M No UN I CUE S O L U T I O N )?9 RETURN3 C END
N O * £ S S A C rs FOR A B O V E C O H P I L a T I G N .
EXTERNAL refeRe*• C E S :t X C M F T I 0 , W & O F T I O . H L T
«FTC,f XCM
09/03/72 RAGE It
ez<
a \N O
TN$ f147 A.T*2C.RAY CKI fOUTRAN DECK • f XCH
1 St'B°0')T!NE ExCH(A.N,NN,K, ID)2 DIMCNOION A(d5,*;6)»ID(55)3 N R 0 ■*' i K4 NCO'-sm5 B>Af>S(A<K.K))6 DO 2 I=K,N7 DO 2 J=<,N8 ir<Af,SUlt.J)>-f»> 2,2,219 21 NRO'-i* !
in NCOL*J11 M =* A ■' ( S ( A ( J , J » >:2 ? CONTI '..'F13 irc:p'’*-K) 3,3,311« 31 DC- 32 J=K,NN:5 C*4 C r,;io«f» J )16 A(NRO,.,J)=A(K,J)17 22 A(K.J ) =C18 3 CONTJDUE19 I M ’JCOL-K) A,4,41
<1 DO *2 I=1.N?i C«A ( | , dC(h.)22 a (I.NCoL)1A{j,K)23 <2 A ( I,K)«C?4 ! * I P (' COL )25 I 0(DcOL > rID(K)26 I c <>•;> = I27 4 COuTIMJE28 PETIIPN29 END
no N£ssACrs ros arOvt cOmPiIation,PTC VERSION 5 MOD e
016/ 03/ 72 MAGE It
o
APPLICATION OF THE FINITE ELEMENT METHOD
USING THE METHOD OF WEIGHTED RESIDUALS
TO TWO DIMENSIONAL NEWTONIAN STEADY
FLOW WITH CONSTANT FLUID PROPERTIES
Mien Ray Chi
Department of Mechanical Engineering
M.S. Degree, August 1972
ABSTRACT
The finite element method using the method of weighted residuals is applied to solve for the velocity distribution of two- dimensional steady flow with constant fluid properties. The stream function and the vorticity are solved in the intermediate steps.Two examples are included to verify the validity of the method and aspects of the method discussed.
COMMITTEE APPROVAL: