CFD I_2
-
Upload
andres-rojas -
Category
Documents
-
view
213 -
download
0
Transcript of CFD I_2
-
7/27/2019 CFD I_2
1/53
The equations governing the steady 2-D Newtonian flow are
or identically
But this is just a theoretical example in which the flow is assumed to havenull thickness
If we want to make a more adequate approach that takes into account the
third dimension we have to use the Shallow Water equations (SSWW)
governing equations
shallow waterscomputational fluid dynamics I
xfux
p
y
uv
x
uu
t
u
1
yfvy
p
y
vvx
vut
v
1
0, iiu ufuuu
p
t
1
0
y
v
x
u
2,1i
-
7/27/2019 CFD I_2
2/53
governing equations
shallow waterscomputational fluid dynamics I
The assumptions to be made are
The distribution of the horizontal velocity along the vertical direction is assumed
to be uniform
An integration in height is carried out, and the horizontal velocity is taken as the
mean value of the horizontal velocities along the vertical direction
The main direction of the flow is the horizontal one, and only very small flows
take place on vertical planes
The acceleration in the vertical direction is negligible compared to gravity and a
hydrostatic distribution of the pressure is assumed
-
7/27/2019 CFD I_2
3/53
Integrating the continuity equation along the z-axis
As the Leibniz rule to bring the derivatives into the integral sign gives
it is obtained
governing equations
shallow waters. continuity eq.computational fluid dynamics I
0 bh
h
h
h
hwhwdz
y
vdz
x
u
bb
0
z
w
y
v
x
u
h
hbH=h+hb
h
0 xh
hux
hhuudzxdzx
u bb
h
h
h
h bb
0 bbbh
h
bb
h
h
hwhwy
hhv
y
hhvvdz
yx
hhu
x
hhuudz
xbb
-
7/27/2019 CFD I_2
4/53
w(h), (vertical component of the velocity on the surface) is given by
Substituting in the former equation
Noting that , and taking and renaming the main velocities as
the continuity equation is obtained as
0
th
t
hvdz
yudz
x
b
h
h
h
h bb
hvyh
hux
h
t
h
dt
dh
hw
0
t
hb
uudzH
u
h
hb
1vvdz
Hv
h
hb
1
0
y
vH
x
uH
t
h
governing equations
shallow waters. continuity eq.computational fluid dynamics I
-
7/27/2019 CFD I_2
5/53
As the vertical acceleration is negligible, the third dynamic equation
can be written as
Integrating this equation in depth and assuming the atmospheric pressure
to be zero it is obtained
Deriving with respect tox and y
governing equations
shallow waters. dynamic eq.computational fluid dynamics I
01
zf
z
p
zfz
w
y
w
x
w
z
p
z
ww
y
wv
x
wu
t
w
2
2
2
2
2
21
dzz
pdzf
h
h
h
hz
bb
phphphhf bbz
x
p
x
hfz
1
y
p
y
hfz
1
-
7/27/2019 CFD I_2
6/53
The first dynamic equation results into
Adding the continuity equation multiplied by u, it is obtained
this is
as
2
2
2
2
2
2
zu
yu
xu
xhff
zuw
yuv
xuu
tu zx
2
2
2
2
2
2
z
u
y
u
x
u
x
hff
z
w
y
v
x
uu
z
uw
y
uv
x
uu
t
uzx
2
2
2
2
2
22
z
u
y
u
x
u
x
hffz
uw
y
uv
x
u
t
uzx
governing equations
shallow waters. dynamic eq.computational fluid dynamics I
z
wuw
z
u
y
vuv
y
u
x
uu
t
u
z
uw
y
uv
x
u
t
u
2
2
-
7/27/2019 CFD I_2
7/53
Integrating in depth the former expression
Taking into account that , it is obtained
Cancelling terms
xhhuxhhudzuxthhuudztb
b
h
h
h
h bb
222
dzHx
hffhwhuhwhu
y
hhvhu
y
hhvhuuvdz
y
h
hzxbb
h
h
bbb
bb
u
hvy
hhu
x
h
t
h
dt
dhhw
dzHx
hffhv
y
hhu
x
h
t
hhuhv
y
hhu
x
h
t
hhu
y
hhvhu
y
hhvhuuvdz
y
h
hzxb
bb
bbb
h
h
bbb
bb
u
dzHx
h
ffuvdzydzuxudzt
h
hzx
h
h
h
h
h
h bbbb
u
2
x
hhu
x
hhudzu
xt
hhuudz
t
bb
h
h
h
h bb
222
2
2
2
2
2
22
z
u
y
u
x
u
x
hff
z
uw
y
uv
x
u
t
uzx
governing equations
shallow waters. dynamic eq.computational fluid dynamics I
-
7/27/2019 CFD I_2
8/53
Taking mean velocities it is obtained
The viscosity effects can be evaluated as
where v is the turbulent viscosity
Where are the shear stresses acting on the surface (due to the wind action)and on the bottom (due to the roughness of the channel)
= Wind drag coefficient
= Manning coefficient
= Wind velocity components
= Air density
dzHx
hff
y
uvH
x
Hu
t
uH h
hzx b
u
2
xxb
bs
h
hH
y
u
x
udz
2
2
2
2
u
xx bs ,
iaw
s
WWC
i 34
2
h
i
b H
uVgn
Hi
WC
n
iW
a
governing equations
shallow waters. dynamic eq.computational fluid dynamics I
-
7/27/2019 CFD I_2
9/53
Developing the derivatives in the left hand side
Taking into account the continuity eq.
the former eq becames
governing equations
shallow waters. dynamic eq.computational fluid dynamics I
yHuvH
yvuv
yu
xHuH
xuu
tHuH
tu
yuvH
xHu
tuH
)(2 2
2
0
y
HvH
y
v
x
HuH
x
u
t
h
y
vH
x
uH
t
h
vHy
u
y
HvH
y
v
x
HuH
x
u
t
HuH
x
uuH
t
u
y
uvH
x
Hu
t
uH
)(
2
vH
y
uH
x
uuH
t
u
y
uvH
x
Hu
t
uH
0
2
-
7/27/2019 CFD I_2
10/53
The derivatives of the depth with respect tox and y are
Carrying out the same operations for they dimension, and developing the
derivatives taking into account the last expression it is obtained
wherefc is the Coriolis factor
34
2
2
2
2
2
h
xaw
cH
uVgn
H
WWC
y
u
x
uvf
x
hg
y
uv
x
uu
t
u
34
2
2
2
2
2
h
yaw
cH
vVgn
H
WWC
y
v
x
v
ufy
h
gy
v
vx
v
ut
v
governing equations
shallow waters. dynamic eq.computational fluid dynamics I
xhxhhxHb
-
7/27/2019 CFD I_2
11/53
The shallow water equations result into
with boundary conditions
impermeability , (no slip)
discharge
contour stresses ,
water level
governing equations
shallow waterscomputational fluid dynamics I
34
2
2
2
2
2
h
xaw
cH
uVgn
H
WWC
y
u
x
uvf
x
hg
y
uv
x
uu
t
u
34
2
2
2
2
2
h
yaw
cH
vVgn
H
WWC
y
v
x
vuf
y
hg
y
vv
x
vu
t
v
0 yvH
xuH
th
0Nu 0Tu
QdsHuN0NN
0TT
thth 0
-
7/27/2019 CFD I_2
12/53
If in the N-S dynamic equation we substitute the non-linear velocities by a known
velocity field and the rest of the velocities by the a scalar unknown we arrive to
the convection diffusion equation that rules the transport of substances byconvective and diffusive actions.
The equations are
or in 1D
where is the quantity being transported, kis the diffusion coefficient, Ui is the
known velocity field, and Q are the external sources of the quantity. These are
also known as the Transport Equations
governing equations
convection-diffusion equationcomputational fluid dynamics I
f
zyxz
W
y
V
x
U
t
2
2
2
2
2
2
0 QkU jjjjt ,,,
0
Q
xk
xxU
t
-
7/27/2019 CFD I_2
13/53
CFDI
finite elements in fluids
computational fluid dynamics I
3. Finite Elements in Fluids
-
7/27/2019 CFD I_2
14/53
There is no analytical solution for most engineering problems such as
fluid flow
The determination of the velocity and pressure field is required in a
domain ofinfinite degrees of freedom
The Finite Element Method (developed about 1950 for structures)
substitutes the domain by another with a finite number of freedom
degrees, thus an approximation of the solution is obtained
Some important names in the finite element history are Courant, Turner,
Clough, Zienkiewicz, Brookes, Hughes,
Now it is used not only in structural mechanics but also in heat
conduction, seepage flow, electric and magnetic fields, and of course
in fluid dynamics
finite elements in fluids
general issuescomputational fluid dynamics I
-
7/27/2019 CFD I_2
15/53
finite elements in fluids
general issuescomputational fluid dynamics I
sms.avi
-
7/27/2019 CFD I_2
16/53
finite elements in fluids
general issuescomputational fluid dynamics I
2D h zoom at the mine.avi
3D H(x,y), water depth colour (only 600 days).avi
largo modulos.avi
-
7/27/2019 CFD I_2
17/53
finite elements in fluids
general issuescomputational fluid dynamics I
X
Y
0 100 200
0
50
100
150
200
250
VEL
1.78125
1.6625
1.54375
1.425
1.30625
1.1875
1.06875
0.950002
0.831252
0.712501
0.593751
0.475001
0.356251
0.237501
0.11875
1.69975E-06
9.60324E-07
4.19696E-07
8.11084E-08
2D H (water level).avi
-
7/27/2019 CFD I_2
18/53
finite elements in fluids
general issuescomputational fluid dynamics I
-
7/27/2019 CFD I_2
19/53
The main way of solving continuum problems in the finite element method are the
following
The direct approach (matrix analysis), by using a direct physical reasoning to establish
the element properties. Requires very simple basic elements (bars, pipelines,)
Variational approach (e.g. Rayleigh-Ritz based method), in this method the stiffness
matrix is obtained as a result of the resolution of a variational problem
Weighted residual approach (e.g. Galerkin Method), as a result of weighting the
differential equations and integrating them in the domain
finite elements in fluids
general issuescomputational fluid dynamics I
-
7/27/2019 CFD I_2
20/53
Main steps of the finite element method
Subdivide the domain in a finite number of elements interconnected a the nodes,
where the unknowns (p, u) are going to be determined
It is assumed that the variation of the unknowns can be approximated by a simple
function
The approximation functions are defined in terms of the values of the field
variables at the nodes
When the equilibrium or variational equations has been obtained the new finite
unknowns are introduced into the equations
The system of equations is solved and the unknowns are determined at the nodes The approximat ion functions give the solution in the rest of the domain points
Following, the fem solution of the one simple 1-D problem is to be considered
on a 6-step basis
finite elements in fluids
general issuescomputational fluid dynamics I
-
7/27/2019 CFD I_2
21/53
In the traditional Rayleigh-Ritz methods the interpolating functions have to be
defined over the enti re domain and have to satisfy the boundary conditions.
Meanwhile in the FEM the interpolat ing trial funct ions are defined on a finite elementbasis, being more versatile when the shape is not simple enough
The limitation is that the FEM trial functions have to satisfy in addition some
convergence conditions (continuity and completeness and compatibility)
finite elements in fluids
general issuescomputational fluid dynamics I
'...as the nature of the universe is the most perfect and the work of the
Creator is wiser, there's nothing that takes place in the universe inwhich the ratio of maximum and minimum does not appear. So there is
no doubt whatsoever that any effect of the universe can be explained
satisfactorily because of its final causes, through the help of the method
of maxima and minima, as can be by the very causes taking place
Leonhard Euler
(Basel,1707- Saint Petersburg,1783)
-
7/27/2019 CFD I_2
22/53
When using a variational approach, the aim is to find the vector function of
unknowns, that makes a minimum or a maximum of the functional I (typically
the energy)
After the discretezation has been carried out in terms ofE smaller parts the
piecewise approximation is introduced so that
or in terms of the so called shape functions Ni
where are the values of the unknowns at the nodes
finite elements in fluids
variational approachcomputational fluid dynamics I
dSx
gdVx
FI
,...,,...,
e
aprox
e
ee
NNe
2211
i
-
7/27/2019 CFD I_2
23/53
Afterwards, the condition of extremezation ofIwith respect to i is imposed
Adding all those element contributions it is obtained
Assuming I to be a quadratic functional of the element equation results in
finite elements in fluids
variational approachcomputational fluid dynamics I
0
M
i
I
II
I
2
1
E
e i
e
i
II
1
0
eee
e
e
PKI
-
7/27/2019 CFD I_2
24/53
After the assembling process it is obtained
where and
After applying the boundary conditions the system is solved for the nodal
unknowns i
Once i are known, we can obtain other variables as a post-processing value
finite elements in fluids
variational approachcomputational fluid dynamics I
PK
E
e
e
1
KK
E
e
e
1
PP
-
7/27/2019 CFD I_2
25/53
Example. Find the velocity distribution of an inviscid fluid flowing trough a
varying cross section pipe shown in the figure
The governing equations are defined by finding the potential that minimizes the
energy integral equation
with the boundary condition u(x=0)=u0, where the cross section area is
finite elements in fluids
variational approach, examplecomputational fluid dynamics I
dxdx
dAI
L
0
2
2
1
LxeAA
0
u0
A0
L
A1 A2
1 2 3
l(1) l(2)
-
7/27/2019 CFD I_2
26/53
1st step. Discretization
Divide the continuum into two finite elements. The values of the potential
function at the three nodes will be the unknowns of the fem
2nd step. Select an interpolation model, easy but leading to convergence
The potential function will be taken as linear
and can be evaluated at each element as
where l(e) is the length of the e element
bxax
eeeee
l
xx 121
finite elements in fluids
variational approach, examplecomputational fluid dynamics I
-
7/27/2019 CFD I_2
27/53
3rd step. Derivation of stiffness matrices K(e) and load vectors P(e) by using
a variational principle
Deriving the interpolating function with respect to x it is obtained
where the cross sectional areas can be taken for the first and second element
as and
where the nodal unknowns are respectively and
eee
l
oe
eeeel
e
eel
e xl
Adx
lAdx
dx
dAI
2
2
2
1
2
12
12
2
1
2
2
0
2
12
0
2
eeTe
e
e
e
ee
e
eeeee
l
A
l
AI K
2
1
11
11
2
1
2
2
2
1
2112
2
1
2
2
2
10 AA
2
21 AA
2
11)(
3
22)(
finite elements in fluids
variational approach, examplecomputational fluid dynamics I
-
7/27/2019 CFD I_2
28/53
3rd step. (cont)
The minimal potential energy principle gives , if we take into account the
external inflow
where Q is the mass flow rate across section
therefore, if we derive the functional Ifor each basic element
or in matrix form
eTeeeTeeeee
e
eeeee QQ
l
AI QK
2
1
2
22211
12
2
1
2
2
0
i
I
02
2121221
1
12
2
1
2
2
111
)()()( eeee
eeeeeeee
e
e
Ql
AQQ
l
AI
022 2122212122
1
2
2
221
)()()( eee
e
eeeeeeee
e
e
QlAQQ
lAI
0
2
1
eeeeTeeeTe
ii
eI
QKQK
AuQ
finite elements in fluids
variational approach, example
computational fluid dynamics I
-
7/27/2019 CFD I_2
29/53
4th step. Assembly of the stiffness and load vectors
Once we have obtained the matrices for all the basic elements as
we can assemble the system to obtainQK
11
111
11
l
AK
11
112
22
l
AK
0
111uA
Q
23
20
uAQ
22
00
3
2
1
2
2
2
2
2
2
2
2
1
1
1
1
1
1
1
1
0
0
0
uA
uA
l
A
l
Al
A
l
A
l
A
l
A
l
A
l
A
finite elements in fluids
variational approach, examplecomputational fluid dynamics I
-
7/27/2019 CFD I_2
30/53
5th step. Resolution of the system
As we need a reference value for the potentials (u3
is an unknown) we can set
equal to 0
Taking A(1) as 0.80 A0 and A(2) as 0.49 A0, and l
(1)= l(2)=L/2, the system of two
equations with two unknowns gives
6th step. Computation of the results
Once we have obtained the potentials, the velocities can be derived by using
the equivalence
which gives the velocities at elements 1 and 2 as
Lu01 651. Lu02 0271.
112
ldx
du
0
1
251 uu .
0
2
052 uu .
finite elements in fluids
variational approach, examplecomputational fluid dynamics I
-
7/27/2019 CFD I_2
31/53
In this method the FE equations can be directly obtained from the governing
equations (or equilibrium equations)
The discretization is made and the field variable is approximated as
where i are constants and Ni(x) are linearly independent functions chosen
such that the boundary conditions are satisfied
A quantity R known as the residual or error is defined as
The weighted function of the residual is taken as
where f(R)=0 when R=0
finite elements in fluids
weighted residualscomputational fluid dynamics I
GF
n
i
ii xNx1
~
~~
FGR
0 dVRwfV
-
7/27/2019 CFD I_2
32/53
There are several approaches to the weighted residuals method such as the
collocation method, the Least Squares method and the most commonly used of
all, the Galeking method
In the Galerkin method the weighting functions are chosen to be equal to the
trial functions and f(R) is taken as R
with i=1,2,,n
In the rest of the aspects the method is similar to the variational
finite elements in fluids
weighted residualscomputational fluid dynamics I
0 dVRNV
i
-
7/27/2019 CFD I_2
33/53
Example. Find the velocity distribution of an inviscid fluid flowing trough a
varying cross section tube shown in the figure
The governing equations are given by the continuity equation
with the boundary condition u(x=0)=u0, where the cross section area is
finite elements in fluids
weighted residualscomputational fluid dynamics I
02
2
dx
d
LxeAA 1
u0
A1
L
A2 A3
1 2 3
l(1) l(2)
-
7/27/2019 CFD I_2
34/53
1st step. Discretization
Divide the continuum into two finite elements. The values potential function in
the three nodes will be the unknowns of the fem
2nd step. Select an interpolation model, easy but leading to convergence
The potential function will be taken as linear
and can be evaluated at each element as
where l(e) is the length of element e
bxax
eeee
l
xx 121
finite elements in fluids
weighted residualscomputational fluid dynamics I
-
7/27/2019 CFD I_2
35/53
This can also be obtained through the shape functions which have to be 1 at its
node and zero at the others, that is
this is
(the same as obtained before)
finite elements in fluids
weighted residualscomputational fluid dynamics I
xNxNx 2211
elxN 11
el
xN 21
l(e)
1
l(e)
eeel
x
l
x
l
xx 12121 1
fi i l i fl id
-
7/27/2019 CFD I_2
36/53
3rd step. Derivation of stiffness matrices K(e) and load vectors P(e) by using
equilibrium. Obtaining of a weak form
The integral of the weighted residual is
integrating by parts
00 2
2
dxdxd
wel
i
finite elements in fluids
weighted residuals
computational fluid dynamics I
dxdxddv
2
2
dxdv
iwu idwdu
00000
00 2
2
dxdxdwdxddxdwdxldlwdwdxddxdwdxdxdw
il
i
e
eii
ll
i
l
i
ee
e
e
12
00 uwulwdx
dx
d
dx
dwi
e
i
li
e
fi it l t i fl id
-
7/27/2019 CFD I_2
37/53
finite elements in fluids
weighted residuals
computational fluid dynamics I
This is
The elementary matrices result into
As
where
As the derivatives are
the elementary matrices result into
0 eee PK
122
121
02211
00 uwulwdx
dx
dN
dx
dN
dx
dwdxNN
dx
d
dx
dwi
e
i
li
li
ee
dx
dx
dN
dx
dN
dx
dN
dx
dNdx
dNdx
dNdx
dNdx
dN
dxdx
dN
dx
dN
dx
dNdx
dNe
2212
2111
21
2
1
K
2
1
u
ue
P
Ldx
dN 11 Ldx
dN 12
11
111
11
11
0
22
22
e
l
ee
eee
ldx
ll
lle
K
2
11)(
3
22)(
fi it l t i fl id
-
7/27/2019 CFD I_2
38/53
4th step. Assembly of the stiffness and load vectors
Once we have obtained the matrices for all the basic elements as
we can assemble the system to obtainQK
11
1111
1
lK
11
1112
2
lK
0
01u
P
2
20
uP
2
0
3
2
1
22
2211
11
0
110
1111
011
u
u
ll
llll
ll
finite elements in fluids
weighted residuals
computational fluid dynamics I
finite elements in fluids
-
7/27/2019 CFD I_2
39/53
5th step. Resolution of the system
6th step. Computation of the results
As can be seen, the system of equations obtained by the weighted residuals
method is the same as in the variational method except for the absence of the
density (which can be removed as it is a constant), and the cross section areas.
The areas are not present in the second formulation as the system is solved invelocities and not in flow rates. To avoid this fact a two dimensional model
should be considered.
finite elements in fluids
weighted residuals
computational fluid dynamics I
finite elements in fluids
-
7/27/2019 CFD I_2
40/53
Finite elements = Piecewise approximation of the solution by dividing the
region into small pieces
This approximation is usually made in terms of a power series (polynomial) which
is easy to integrate and easy to be improved in accuracy by increasing the order,
fitting in this way the shape of the polynomial to that of the solution (see figure)
When the polynomial is of higher order (bigger than one) the midside and/or
interior nodes have to be used in addition to the corner nodes
Some other approximations such as Fourier series could also be used
Problems involving curved boundaries can be solved using isoparametricelements which are not straight-sided
finite elements in fluids
discretization
computational fluid dynamics I
finite elements in fluids
-
7/27/2019 CFD I_2
41/53
finite elements in fluids
discretization
computational fluid dynamics I
finite elements in fluids
-
7/27/2019 CFD I_2
42/53
The mesh can be improved by
Subdividing selected elements (h-refinement)
Increasing the order of the polynomial of selected elements (p-refinement) Moving node points (r-refinement)
Defining a new mesh
In higher order elements the midside and/or interior nodes have to be used in
addition to the corner nodes in order to match the number of nodal degrees offreedom with the number of constants
As it will be shown a different interpolation for the velocity and pressure
unknowns is required for fem in fluids
Basic elements to be considered
Triangular linear
Quadrilateral linear
Triangular linear (natural)
Triangular quadratic
finite elements in fluids
discretization
computational fluid dynamics I
finite elements in fluids
-
7/27/2019 CFD I_2
43/53
The FEM is an approximation that converges to the exact solution as the element
size is reduced if:
i. The field variable and its derivatives must have representation as the element
size reduces to zero
For example, second derivatives cannot be represented with linear functions
Then the elements are said to be complete
ii. The field variable and its derivatives should be continuous within the element (Cr
piecewise differentiable, where ris the maximum order of derivatives within the
integrand)
(The polynomials are inherently continuous and satisfy this requirement)
The field variable and its derivatives, up to the r-1-th, must be continuous at the
element boundaries
Then the elements are said to be compatible or conforming
finite elements in fluids
discretization, convergence
computational fluid dynamics I
dxdx
dr
r
finite elements in fluids
-
7/27/2019 CFD I_2
44/53
If we had for instance, flat penthouses as interpolating functions, the
interpolating surface would be discontinuous (would break and split up)
Still, there are many fem basic elements that not verifying the former properties
still provide meaningful solutions (such as the checker board pressure mode)
finite elements in fluids
discretization, convergence
computational fluid dynamics I
5 . 00 1 0 .0 0 1 5 .0 0 2 0 .0 0 2 5 .0 0 3 0 .0 0 3 5 .0 0 4 0 .0 0 4 5 .0 0 5 0 .0 0 5 5 .0 0
5.00
10.00
15.00
20.00
25.00
30.00
35.00
40.00
45.00
50.00
55.00
0 . 00 1 0 .0 0 2 0 .0 0 3 0 .0 0 4 0 .0 0 5 0 .0 0 6 0 .0 0 7 0 .0 0 8 0 .0 0 9 0 .0 0 1 0 0 .0 0
0.00
10.00
20.00
30.00
40.00
50.00
60.00
70.00
80.00
90.00
100.00
finite elements in fluids
-
7/27/2019 CFD I_2
45/53
Let the basic linear triangular element connecting nodes 1, 2,and 3 be
The equation that gives the
surface (plane) is
(1)
that leads to the following
equations
yxyx 321 ,
131211yx
232212 yx
333213 yx
1
2
3
22 , yx
11, yx 33 , yxx
y
finite elements in fluids
discretization, triangular linear b.e.
computational fluid dynamics I
finite elements in fluids
-
7/27/2019 CFD I_2
46/53
The solution of the former system gives
(2)
where
substituting (2) in (1) and rearranging terms it is obtained
3322111 21
aaaA
33221122
1 bbb
A
33221132
1 ccc
A
132 yyb 321 yyb 231 xxc
312 xxc
123 xxc 213 yyb
23321 yxyxa
31132 yxyxa
12213 yxyxa
finite elements in fluids
discretization, triangular linear b.e.
computational fluid dynamics I
33
22
11
1
1
1
2
1
yx
yx
yx
A
finite elements in fluids
-
7/27/2019 CFD I_2
47/53
The interpolating function results
where
(3) The shape functions take the value of 1 at its node and cero at the rest
These expressions are complicated and depend onx andy
332211 ,,,, yxNyxNyxNyx
2332233211112
1
2
1xxyyyxyxyx
Aycxba
AyxN ,
3113311322222
1
2
1xxyyyxyxyx
Aycxba
AyxN ,
1221122133332
1
2
1xxyyyxyxyx
Aycxba
AyxN ,
finite elements in fluids
discretization, triangular linear b.e.
computational fluid dynamics I
finite elements in fluids
-
7/27/2019 CFD I_2
48/53
For anA element matrix equal to
The integrals are
As the integrand is a constant there is no need to integrate numerically
dxdy
y
N
y
N
x
N
x
NA
jiji
ij
e
A
discretization, triangular linear
computational fluid dynamics I
dxdy
y
N
y
L
x
N
x
N
y
N
y
N
x
N
x
N
y
N
y
N
x
N
x
N
yN
yN
xN
xN
yN
yN
xN
xN
yN
yN
xN
xN
y
N
y
N
x
N
x
N
y
N
y
N
x
N
x
N
y
N
y
N
x
N
x
N
e
e
333323231313
323222221212
313121211111
A
e
dxdy
xxyysim
xxxxyyyyxxyy
xxxxyyyyxxxxyyyyxxyy
Ae
e
2
12
2
21
12312113
2
31
2
13
1223213231231332
2
23
2
32
24
A
finite elements in fluids
-
7/27/2019 CFD I_2
49/53
The basic element matrix results
That now can be assembled
in the stiffness matrix to yield
discretization, triangular linear
computational fluid dynamics I
2
12
2
21
12312113
2
31
2
13
1223213231231332
2
23
2
32
4xxyysim
xxxxyyyyxxyy
xxxxyyyyxxxxyyyyxxyy
Ae
e A
6
2
9
10
9
8
7
6
5
4
3
2
1
10
9
8
7
6
5
4
3
2
1
f
f
f
ff
f
f
f
f
f
finite elements in fluids
-
7/27/2019 CFD I_2
50/53
The need of integrating the shape functions and their derivatives overthe domain leads to the use of the natural (local) coordinates, which
allows for an element based integration that simplifies the calculations
The natural triangular system of referenced is defined with the lineardependent coordinatesL1, L2, andL3
whereAi is the area defined by the point P and the opposite side
The shape functions for this triangular linear element are
A
AL 11 AAL 22
A
AL 33
1
3
2P
A2 A1
A3
ii LN 321 ,,i
discretization, triangular linear b.e.
computational fluid dynamics I
1321 LLL
finite elements in fluids
-
7/27/2019 CFD I_2
51/53
The shape functions are in fact as seen in (3)
Or in matrix form
1
3
2P
A2 A1
A3
discretization, triangular linear b.e.
computational fluid dynamics I
A
A
yx
yxyx
ALN ikk
jj
ii2
2
1
11
2
1
jkkjjkkjii xxyyyxyxyxAyxLyxN 21
,,
y
x
xxyyyxyx
xxyyyxyx
xxyyyxyx
AL
L
L 1
21
12211221
31133113
23322332
3
2
1
33
22
11
1
1
1
2
1
yx
yx
yx
A
finite elements in fluids
-
7/27/2019 CFD I_2
52/53
The derivatives ofL1,L2 andL3 being
1
3
2P
A2 A1
A3
discretization, triangular linear b.e.
computational fluid dynamics I
Ayy
xL
2321
Ayy
xL
2132
A
xx
y
L
2
312
A
xx
y
L
2
231
Ayy
xL
2213
A
xx
y
L
2
123
finite elements in fluids
-
7/27/2019 CFD I_2
53/53
For natural coordinates in triangles the same procedure can be usedexcept for the fact that one of the three coordinates is lineardependant and can be dropped from the integration leading to a
change in the integration limits
where the jacobian determinant is
and the integral is
Axxyyxxyy
AyL
xL
yL
xLJ
21
41 231331322
1221
121
0
1
02112
1
0
1
0
11 1dLdLLLgdLdLyxfJdxdyyxf
LL
,,,
1321 LLL
discretization, triangular quadratic
computational fluid dynamics I
121
0
1
021
1
2 dLdLLLgAdyxfL
,,