Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Two-Dimensional Finite Element Analysis: ME 501B Seminar, Slides of Engineering Analysis

A seminar outline for me 501b engineering analysis focusing on finite elements in two dimensions. It covers topics such as quadratic basis functions, border integral terms, triangular elements, natural coordinates, and linear and higher order basis functions. The document also includes information on boundary terms, selecting basis functions, and computing integrals using gauss quadrature.

Typology: Slides

2013/2014

Uploaded on 02/01/2014

sashie
sashie 🇮🇳

4.2

(40)

185 documents

1 / 13

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
More two-dimensional elements April 27-29, 2009
ME 501B – Engineering Analysis 1
More on Finite Elements in
More on Finite Elements in
Two Dimensions
Two Dimensions
Larry Caretto
Mechanical Engineering 501B
Seminar in Engineering
Analysis
April 27-29, 2009
2
Outline
Review last lecture
Quadratic basis functions in two
dimensions
Border integral terms
Triangular elements
Natural coordinates (area coordinates)
Linear basis functions
Higher order basis functions
Boundary terms
3
Review Quadrilateral Equation
∫∫
−−
=
1
1
1
1
),(
ηξηξ
ddfAki
Ja
J
yyxx
J
yx
J
yyxx
J
yx
f
ik
kki
kki
φϕ
ξ
ϕ
η
ϕ
η
ϕ
η
ϕ
ξ
ϕ
ξ
ϕ
ηξ
ξηξηξξ
ξηξηηη
2
22
22
),(
+
+
+
+
+
=
∑∑
∫∫ ==
−−
n
k
n
jjkjk fddf
11
1
1
1
1
),(),(
ηξγγηξηξ
Select basis functions and n 4
Review Linear φiQuadrilateral
(x4, y4)
(x2, y2)
(x1, y1)
(x3, y3)
ξ= -1,
η= -1
ξ= -1,
η= 1
ξ= 1,
η= 1
ξ= 1,
η= -1
4
)1)(1(
4
)1)(1( 4
)1)(1(
4
)1)(1(
43
21
ηξ
ϕ
ηξ
ϕ
η
ξ
ϕ
η
ξ
ϕ
+
=
++
=
+
=
=
Note:
φi(x(j))
= δij
5
Review φDerivatives
4
)1(
4
)1(
4
)1)(1(
4
)1(
4
)1(
4
)1)(1(
4
)1(
4
)1(
4
)1)(1(
4
)1(
4
)1(
4
)1)(1(
44
4
33
3
22
2
11
1
ξ
η
ϕη
ξ
ϕηξ
ϕ
ξ
η
ϕ
η
ξ
ϕ
ηξ
ϕ
ξ
η
ϕη
ξ
ϕηξ
ϕ
ξ
η
ϕη
ξ
ϕηξ
ϕ
=
+
=
+
=
+
=
+
=
++
=
+
=
=
+
=
=
=
=
6
Review x and y Derivatives
(x4, y4)
(x2, y2)
(x1, y1)
(x3, y3)
)(
4
1
)(
4
1
)(
4
1
)(
4
1
)(
4
1
)(
4
1
)(
4
1
)(
4
1
2314
2314
4312
4312
yyyyy
xxxxx
yyyyy
xxxxx
+
+
=
+
+
=
+
+
=
+
+
=
ξξ
ξξ
ηη
η
η
η
η
ξ
ξ
η= –1
η= 1
ξ= 1
ξ= 1
ξηηξ
ξηηξ
yxyx
yxyx
J
=
=
Have all information to
evaluate Aki for element
pf3
pf4
pf5
pf8
pf9
pfa
pfd

Partial preview of the text

Download Two-Dimensional Finite Element Analysis: ME 501B Seminar and more Slides Engineering Analysis in PDF only on Docsity!

More on Finite Elements inMore on Finite Elements in

Two DimensionsTwo Dimensions

Larry Caretto

Mechanical Engineering 501B

Seminar in Engineering

Analysis

April 27-29, 2009

2

Outline

  • Review last lecture
    • Quadratic basis functions in two

dimensions

  • Border integral terms
  • Triangular elements
    • Natural coordinates (area coordinates)
    • Linear basis functions
    • Higher order basis functions
    • Boundary terms

3

Review Quadrilateral Equation

∫ ∫ − −

1

1

1

1

Aki f (ξ ,η) d ξ d η

a J

J

xx yy

J

x y

J

xx yy

J

x y

f

k i

i k k

i k k

ξ ξ η ξ η ξ

η η η ξ η ξ

2

2 2

2 2

⎥^ −

∫ ∫ ∑∑ − − =^ =

n

k

n

j

k j k j

f dd f

1 1

1

1

1

1

  • Select basis functions and n (^4)

Review Linear φ i Quadrilateral

(x

4

, y

4

(x 2 , y 2 )

(x

1

, y

1

(x 3 , y 3 )

3 4

1 2

Note:

i

( x

(j)

= δij

5

Review φ Derivatives

4 4 4

3 3 3

2 2 2

1 1 1

ξ

η

η ϕ

ξ

ξ η ϕ ϕ

ξ

η

η ϕ

ξ

ξ η ϕ ϕ

ξ

η

η ϕ

ξ

ξ η ϕ ϕ

ξ

η

η ϕ

ξ

ξ η ϕ ϕ

6

Review x and y Derivatives

(x 4 , y 4 )

(x

2

, y

2

(x 1 , y 1 )

(x 3 , y 3 )

4 1 3 2

4 1 3 2

2 1 3 4

2 1 3 4

y y y y y

x x x x x

y y y y y

x x x x x

ξ ξ

ξ ξ

η η

η η

η

η

ξ

ξ

η^ = –

ξ η η ξ

ξ η η ξ

xy x y

x y x y J

= −

∂ − ∂

  • Have all information to

evaluate A

ki

for element

7

Boundary Terms

(x

4

, y

4

(x 2 , y 2 )

(x 1 , y 1 )

(x

3

, y

3

  • Have gradient (2 nd^ or 3rd^ kind) boundary

condition to include in solution

  • Compute gradients from solution for

Dirichlet boundary condition

η^ = –

  • Element boundaries lie

along line of constant ξ

= ±1 or constant η = ±

  • Boundary integral is

found along these lines

  • Two cases to consider

8

Boundary Integral

(x 4 , y 4 )

(x 2 , y 2 )

(x 1 , y 1 )

(x

3

, y

3

  • Differential distance, ds = S ξ=± 1

dη/2 or

Sη=± 1 dξ/2 where S is length of side

  • E.g.

η^ = –

Γ

end

start

k side

k

ds

n

u

ds

n

u ˆ

  • Find integral below

whenever one side of

element is on external

boundary

2 3 2

2 S (^) ξ= 1 = x 3 − x 2 + yy

9

ξ = 1 Boundary as Example

(x 4 , y 4 )

(x 2 , y 2 )

(x

1

, y

1

(x 3 , y 3 )

  • Differential distance, ds = S ξ=

dη/

η^ = –

  • φ 1 and φ 4 are zero

along ξ = 1 boundary

  • Length of side, Sξ=1, is

ds

n

u

∫ k

Γ

2 3 2

2 1 3 2 S = xx + yy ξ=

2 3

1

1

1

3

2

1 2

ξ ξ

d S ds S

10

ξ = 1 Boundary Example II

(x

4

, y

4

(x 2 , y 2 )

(x

1

, y

1

(x 3 , y 3 )

  • Same result for φ 3

η^ = –

  • Evaluate

integral

for φ 2 and

φ 3 at ξ = 1

ds

n

u

∫ k

Γ

2 1

ξ

=

1

1

1

1 1

2

=

− =

= Γ =

ξ

ξ

ξ ξ

S

n

d u

S

n

u

ds

n

u

11

ξ = 1 Boundary Equations

(x 4 , y 4 )

(x

2

, y

2

(x 1 , y 1 )

(x 3 , y 3 )

η^ = –

= –1 A 11 u 1 +^ A 12 u 2 + A 13 u 3 + A 14 u 4 =^0

A (^) 21 u 1 + A 22 u 2 + A 23 u 3 + A 24 u 4 = B

A 31 u 1 + A 32 u 2 + A 33 u 3 + A 34 u 4 = B

A 41 u 1 + A 42 u 2 + A 43 u 3 + A 44 u 4 = 0

1

1

=

=

ξ

ξ

S

n

u

B

  • Boundary

term

  • Equations with B not needed for

Dirichlet boundary conditions

  • Used after solution to compute gradients 12

η = 1 Boundary Equations

(x 4 , y 4 )

(x

2

, y

2

(x 1 , y 1 )

(x 3 , y 3 )

η^ = –

= –1 A 11 u 1 +^ A 12 u 2 + A 13 u 3 + A 14 u 4 =^0

A 21 u 1 + A 22 u 2 + A 23 u 3 + A 24 u 4 = 0

A (^) 31 u 1 + A 32 u 2 + A 33 u 3 + A 34 u 4 = B

A 41 u 1 + A 42 u 2 + A 43 u 3 + A 44 u 4 = B

1

1

=

=

η

η

S

n

u

B

  • Boundary

term

  • Equations with B not needed for

Dirichlet boundary conditions

  • Used after solution to compute gradients

19

Review April 27 Homework II

  • Local coordinate system (h = 0.1 m)
    • ξ 1 = -1, η 1 = -1 => x 1 = 0, y 1 = 0
    • ξ 2 = 1, η 2 = -1 => x 2 = h, y 2 = 0 x 2 - x 1 = h
    • ξ 4 = -1, η 4 = 1 => x 4 = h sin θ, y 4 = h cos θ
    • ξ 3 = 1, η 3 = 1 => x 3 = x 4 + h, y 3 = h cos θ
    • y 3 – y 2 = y 4 – y 1 = h cos θ

1

30 o

1

1

1

1 1 1 1

1

1 1

0

o

1

4 3

2

(x 4 , y 4 )

(x

2

, y

2

(x )

1

, y

1

(x 3 , y 3 )

20

Review April 27 Homework III

(x

4

, y

4

(x 2 y2)

(x

1

, y

1

(x 3 , y 3 )

sin ( sin ) 4

(sin ) 4

θ θ=

+ξ θ+

−ξ

−η

−η

η

ξ

ξ

h x h h

y

h x h h

4 1 3 2

2 1 3 4

2 1 3 4

x x x x x

y y y y y

x x x x x

+ξ − +

−ξ

+η − +

−η

+η − +

−η

η

ξ

ξ

21

Review April 27 Homework IV

(x

4

, y

4

(x 2 y2)

(x 1 , y 1 )

(x

3

, y

3

cos ( cos) 4

( cos ) 4

4 1 3 2

θ θ=

+ξ θ+

−ξ

+ξ − +

−ξ

η

h h h

y y y y y

2

cos 0 2

sin

2

cos

2

2 θ ⎟ = ⎠

⎞ ⎜ ⎝

⎛ θ −

θ = (^) ξη− ηξ=

hh h h J xy xy

( )

θ

θ

θ

θ

θ

=

θ

= θ

θ+ θ

θ

⎟ ⎠

⎞ ⎜ ⎝

⎛ θ ⎟+ ⎠

⎞ ⎜ ⎝

⎛ θ

=

ηξ ηξ

η η

cos

sin

4

cos

0 2

cos

2 2

sin

cos

1

4

cos

sin cos 4

4

cos

2

cos 2

sin

2

2

2 2

2

2

2 2 2 2

h

h h h

J

xx yy

h

h

h

h h

J

x y

22

Review April 27 Homework V

  • Use one-point Gauss quadrature for

(symmetric) A

ki

from April 20-22 lecture

A f dd f byGauss quadrature

a J

J

xx y y

J

x y

J

xx y y

J

x y

f

ki

k i

k k

i k k

1

1

1

1

2

2 2

2 2

∫ ∫ − −

ξ ξ ηξ η ξ

η η ηξ η ξ

a = 0

23

Review April 27 Homework VI

θ

= θ

⎟+ ⎠

⎞ ⎜ ⎝

=

ξ+^ ξ

cos

1

4

cos

0 2 2

2

2

2 2

h

h

J

x y

⎥ ⎦

⎤ ⎢ ⎣

∂ξ

∂ϕ

θ

θ − ∂η

∂ϕ

∂η θ

∂ϕ ⎥+ ⎦

⎤ ⎢ ⎣

∂η

∂ϕ

θ

θ − ∂ξ

∂ϕ

∂ξ θ

∂ϕ ξ η= i k k i k k f cos

sin

cos

1

cos

sin

cos

1 (, )

⎧ ⎥ ⎦

⎤ ⎢ ⎣

∂ξ

∂ϕ − θ ∂η

∂ϕ

∂η

∂ϕ ⎥+ ⎦

⎤ ⎢ ⎣

∂η

∂ϕ − θ ∂ξ

∂ϕ

∂ξ

∂ϕ

θ

ξ η= i k k i k k f sin sin cos

1 (,)

⎧ ⎥ ⎦

⎤ ⎢ ⎣

∂ξ

∂ϕ − ∂η

∂ϕ

∂η

∂ϕ ⎥+ ⎦

⎤ ⎢ ⎣

∂η

∂ϕ − ∂ξ

∂ϕ

∂ξ

∂ϕ ξ η= i k k i k k f 2

1

2

1

3

2 (, )

For q = 30 o , sinθ = ½

and cosθ = 31/2^ /

24

Review April 27 Homework VII

  • Compute A ki

integrals using Gauss

quadrature with one Gauss point

  • See general form of shape function on next

chart for computational ease

  • Assemble equations for three unknown

nodes in diagram

  • Substitute boundary values and solve

resulting system of three equations for

the three unknowns

25

Review April 27 Homework VIII

  • We can write all

shape functions as

i i i

+ a + b

b i a i i

ξ

η

ϕ

η

ξ

ϕ

i i i

i i i

b a

a b

  • Solutions use

these equations

to get integrals

for various Aki

26

Review April 27 Homework IX

⎫ ⎥ ⎦

⎤ ⎢ ⎣

⎡ + η −

  • ξ + ξ

⎧ ⎥ ⎦

⎤ ⎢ ⎣

⎡ + ξ −

  • η + η ξη=

4

( 1 )

2

1

4

( 1 )

4

( 1 )

4

( 1 )

2

1

4

( 1 )

4

( 1 )

3

2 (,)

i i k k k k

i i k k k k

b a b a a b

a b a b b a f

  • Set x = h = 0 to get f(0,0) for Gauss

quadrature

⎧ ⎥ ⎦

⎤ ⎢ ⎣

  • − ⎥ ⎦

⎤ ⎢ ⎣

⎡ = − 24

1

24 4 4

1

3 4 4

2 ( 0 , 0 )

ai ak bk bi bk ak f

163

2

3 16 32

2 ( 0 , 0 )

ai ak bibk aibk biak aiak bibk aibk biak f

  • − + ⎟= ⎠

⎞ ⎜ ⎝

⎛ + −

=

27

Review April 27 Homework X

  • A ki

= 4f(0,0) for zero-point Gauss

43

2 4 ( 0 , 0 ) ik ik ik ik ki

aa bb ab ba A f

  • − + = =

=

0 6 0 6

2 0 2 0

0 6 0 6

2 0 2 0

23

1 A

12 44

31 33

22 24

11 13

u u

u u

u u

u u

A 11 = 2, A 13 = -2, A 22 = 6, A 24 = -6, A 31 = -2, A 33 = 2, A 42 = -6, A 44 = 6, A 12 = A 14 = A 21 = A 23 = A 32 = A 34 = A 41 = A 43 = 0

28

Review April 27 Homework XI

  • Add all element

equations with

global indices for

node ij

i-1,j-1 (^) i,j-1 i+1,j-

i-1,j

i-1,j+

i,j+1 i+1,j+

i+1,j

(UR)

(LL)

(UL)

(LR)

i,j

[ ]

[ ] [ ]

[ ]

[ ] (^1) , 1 0

( ) , (^113)

( ) 23

( ) 14

1 , 1

( ) 1 , 24

( ) 43

( ) 12

,

( ) 44

( ) 33

( ) 22

( ) 1 , 11

( ) 34

( ) 21

1 , 1

( ) , 1 42

( ) 41

( ) 1 , 1 32

( ) 31

    • =
  • − +

− − − + −

i j

UR ij

UR UL

i j

UR i j

UR LR

ij

UR UL LL LR i j

UL LL

i j

LR ij

LL LR i j

LL

A A u A u

A A u A u

A A u A A A A u

A u A A u A u

29

Review April 27 Homework XII

i-1,j-1 (^) i,j-1 i+1,j-

i-1,j

i-1,j+ i,j+1 i+1,j+

i+1,j

(UR)

(LL)

(UL)

(LR)

i,j

[ ] [ ] [ ]

[ 0 0 ] 6 [ 0 0 ] 2 0

2 0 0 6 0 0 2 6 2 6

1 , 1 , 1 , 1 1 , 1

1 , 1 , 1 1 , 1 1 , ,

  • − + + − =

− + + − + + + + + +

  • − + + + +

− − − + − −

i j i j ij i j

i j ij i j i j ij

u u u u

u u u u u

  • Substitute

numerical values

(same for all

elements)

− 2 ui − 1 , j − 1 − 6 ui + 1 , j − 1 + 16 ui , j − 6 ui − 1 , j + 1 − 2 ui + 1 , j + 1 = 0

30

Higher order Shape Functions

  • Equation on previous page is valid for

any shape functions in a quadrilateral

  • Isoparameteric elements use the same

order shape functions for both the

geometry and the dependent variable

  • Could use linear functions for geometry

higher order for dependent variable

  • Higher order functions for geometry would

allow elements with curved sides

37

Triangular Coordinates

  • Vertices have coordinates x (^) i , yi
  • Natural (area) coordinates, λ i

start at

zero at side opposite vertex i, are

perpendicular to that side, and go to

one at vertex i

  • Three such coordinates with λi = Ai /A

x 1 ,y 1 x 2 ,y 2

x3 ,y 3

λ 3

λ 3 = A 3 /A

λ 3 = 1

A 3

38

Triangular Coordinates II

  • Triangle area = A = (base)(height)/2 =

(x 2 – x 1 ) (y 3 – y 1 )/2 (for this triangle)

  • Inner area A 3

has height which is λ

3

times total height, i.e. h 3 = λ 3 (y 3 – y 1 ) so

that A 3 = (x 2 – x 1 ) [λ 3 (y 3 – y 1 )]/

  • Dividing A 3 by A gives λ 3 = A 3 /A

x 1 ,y 1 x 2 ,y 2

x3 ,y 3

λ 3

λ 3 = A 3 /A

λ 3 = 1

A 3

39

Triangular Coordinates III

  • Have three separate area coordinate

variables, λ

1

2

, and λ

3

  • Each goes from zero to one

λ 2

λ 3

λ 1

x 3 , y 3

x 1 , y 1 x 2 , y 2

  • Each λi = Ai /A so that λ 1 + λ 2 + λ 3 = A 1 /A

+ A 2 /A + A 3 /A = A/A = 1

40

Triangular Coordinates IV

  • Lines from point where all λi intersect to

each vertex defines three subareas

  • Previous chart showed that each area, Ai

= (height) i (base) iλi /2 = λi A or λi = Ai /A

  • Since A 1 + A 2 + A 3 = A, λ 1 + λ 2 + λ 3 = 1

λ 2

λ 3

λ 1

x 3 , y 3

x 2 , y 2 x 1 , y 1

A 2 A 1
A 3

41

Triangular Coordinates V

λ 2

λ 3

λ 1

x 3 , y 3

x 1 , y 1 x 2 , y 2

A 2 A 1
A 3
  • At any point in the triangle the x, y and λi

coordinates are related as follows

x = x 1 λ 1 + x 2 λ 2 + x 3 λ 3 y = y 1 λ 1 + y 2 λ 2 + y 3 λ 3

  • Can write matrix equation to relate x and y

to λ

i

plus constraint that λ

1

2

3

42

Coordinate Transformations

3

2

1

1 2 3

1 2 3

y y y

x x x

y

x

y

x

y y y

x x x

1

1 2 3

1 2 3

3

2

1

( )

Det A

M

b

ji

i j

ij

  • Use formula

for bij, the

components

of B = A

  • M ji

is minor

determinant

43

Finding the Inverse

A

xy xy xy

xy xy xy

y y y

Det x x x 2

2 1 3 2 1 3

2 3 1 2 31

1 2 3

− − − −

− − − − −

− − − −

=

12 12 2 1 2 1

1 3 13 3 1 3 1

2 3 23 3 2 3 2

1

1 2 3

1 2 3 2

1

1 1 1

xy yx y y x x

xy yx y y x x

xy yx y y x x

A y y y

x x x

( )

Det A

M

b

ji

ij

ij

  • Details for area, A, at

end of presentation

M 32

b 23

44

Getting λ i from x and y

  • This equation gives all λ i

coordinates for

any Cartesian coordinate x, y

  • Can express shape functions of any

order in terms of λi coordinates

y

x

xy yx y y x x

yx xy y y x x

xy yx y y x x

A

2 3 12 1 2 2 1

13 1 3 3 1 2 3

2 3 2 3 2 3 3 2

3

2

1

45

Triangle Shape Functions (N i ≡ φ i )

  • Linear shape functions: N i

i

  • Three nodes at triangle vertices
  • Satisfy basic result that N i ( x j ) = δ ij
  • Quadratic shape functions
  • Nodes 1, 2, and 3 at vertices and nodes 4,

5, and 6 at midpoints of edge

( )

( )

( ) 3 3 3 6 3 1

2 2 2 5 2 3

1 1 1 4 12

N N

N N

N N

6

5

3 4

1

2

46

Shape Function Derivatives

  • Finite element coefficients have

derivatives and integrals of shape

functions with respect to x and y

  • Have to get derivatives and integrals

with respect to the λi

  • Only two of the λ i

are independent

  • Can pick λ 1

and λ

2

as independent

values of λ

i

  • Have usual equations for transforms

47

Shape Function Derivatives II

  • Transform derivative of any function, ψ

2

2

1

1

2

2

1

1

λ

λ ψ

λ

ψ λ ψ

λ

λ ψ

λ

ψ λ ψ

x x x y y y

y

x

xy yx y y x x

yx xy y y x x

xy yx y y x x

A

2 3 1 2 1 2 2 1

13 1 3 3 1 2 3

2 3 23 2 3 3 2

3

2

1

y

A

x x

x

A

y y

A

xy yx

23 23 2 3 3 2 1

48

Shape Function Derivatives III

  • Summary of partial derivatives required

for natural coordinate derivative

transformations

  • Definitions of ai and bi given here
A

b

A

x x

A y

a

A

y y

x

A

b

A

x x

A y

a

A

y y

x

A

b

A

x x

A y

a

A

y y

x

3 1 2 3 3 2 1 3

2 3 1 2 2 1 3 2

1 2 3 1 1 3 2 1

λ λ

λ λ

λ λ

55

Border Terms

  • Consider side 2-3, ds = L 23 dλ 3
  • Others will be similar

1 , 2 , 3

ˆ ˆ ˆ

3

2

1

0

3 23

23 0 () 23

= ∂

= Γ

Nd k n

u Nds L n

u ds n

u A u Nk k k

M

i

kii e

λ

  • Along side 2-3, λ 1 = 0 we only have to

evaluate this integral for k = 2 and k = 3

23

23

1

0

2 3

23

23

1

0

3 3 23

23

( 23 ) 3 0

3

n

L u

n

u d L n

u Au B L

M

i

i i

∑ ∫

λ λ λ

56

Border Terms II

  • To get border integral for k = 2 with N 2 =

λ 2 , use λ 1 + λ 2 + λ 3 = 1 so dλ 3 = –dλ 1 –

dλ 2 = –dλ 2 since λ 1 is constant along 23

  • On side 23, λ 2 goes from 1 to zero as we

integrate in a counterclockwise direction

23

23

0

1

2 3

23

23

0

1

2 2 23

23

( 23 ) 2 0

2

ˆ

2 2

ˆ ˆ

n

L u

n

u d L n

u Au B L

M

i

i i

∂ ⎥= ⎦

⎤ ⎢ ⎣

∂ − =− ∂

∂ = =

=

λ λ λ

  • Similar results for other borders
    • Terms appear in two of three element

equations

57

Border Terms III

  • Element equations for border on side 23

( 23 ) 311 32 2 33 3 3

( 23 ) 211 22 2 233 2

11 1 122 133

Au A u A u B

A u A u A u B

Au A u Au

  • Element equations for border on side 31

( 31 ) 311 32 2 33 3 3

211 22 2 23 3

( 31 ) 111 12 2 13 3 1

Au Au Au B

Au A u Au

Au Au Au B

23

23

( 23 ) 3

( 23 ) 2

ˆ

2 n

L u

B B

31

31

( 31 ) 3

( 31 ) 1

ˆ

2 n

L u

B B

58

Border Terms III

  • Element equations for border on side 12

311 32 2 333

( 12 ) 211 22 2 233 2

( 12 ) 111 12 2 13 3 1

Au A u A u

Au A u Au B

Au Au Au B

  • Define R i

= 0 for nodes not on external

boundary and R

i

= B

i

(jk)

otherwise

12

12

( 12 ) 2

( 12 ) 1

ˆ

2 n

L u

B B

311 32 2 33 3 3

211 22 2 23 3 2

111 12 2 133 1

A u A u Au R

A u A u A u R

Au A u Au R

59

Assembly

  • Away from boundary typical node is part

of five or six triangles

  • Must consider element equations for that

node from all triangles

  • Each element has three equations
    • To assemble equations for one node, pick the

one equation (from three) from each element

where node appears

  • pick equation where the nodal value is multiplied by Akk (coefficient whose subscripts are the same)

60

Mesh

  • Trian-

gular

mesh

from

MATLAB

PDE

toolbox

  • 5 or 6

per node

61

Assembly for Six Triangles

  • Central node g is part of

six elements labeled

from (α) to (ζ)

  • Assume node g in global

system is node 3 for all

triangles in local system

a

b

d c

e

f

(α)

(β)

(γ)

(δ)

(ε)

(ζ)

g

( ) 3

() 33

() 32

() 31

() 3

() 33

() 32

() 31

() 3

() 33

() 32

() 31

() 3

() 33

() 32

() 31

() 3

() 33

() 32

() 31

() 3

() 33

() 32

() 31

γ γ γ γ ς ς ς ς

β β β β ε ε ε ε

α α α α δ δ δ δ

A u A u A u R A u A u A u R

A u A u A u R A u A u A u R

A u A u A u R A u A u A u R

b c g e f g

a b g d e g

f a g c d g

    • = + + =
    • = + + =
    • = + + =

62

Assembly for Six Triangles II

  • Add all element

equations for node g

  • Other systems will not

have all node g

coefficients as A 33 a

b

d c

e

f

(α)

(β)

(γ)

(δ)

(ε)

(ζ)

g

( ) ( ) ( )

( ) ( ) ( )

( )

( ) 3

() 3

() 3

() 3

() 3

() 3

() 33

() 33

() 33

() 33

() 33

() 33

() 31

() 32

() 31

() 32

() 31

() 32

() 31

() 32

() 32

() 31

() 31

() 32

α β γ δ ε ς

α β γ δ ε ς

δ ε ε ς ς α

α β γ β γ δ

R R R R R R

A A A A A A u

A A u A A u A A u

A A u A A u A A u

g

d e f

a b c

63

Triangle Quality

  • For accuracy want all triangles to be as

close to equilateral triangles as possible

  • Area of equilateral triangle with side b

2

2 2

b

bh bb b b A

A

  • Quality of triangle with sides b 1 , b 2 , and b 3

b b b

A

Q

  • Keep Q

64

65

May 4 Homework

  • Two problems
    • Repeat finite element problem from last

week using gradient boundaries

  • Triangular finite elements

1

30 o

1

1

1 1 1 1

0

1 1

Zero gradient on these elements

  • Get element

equations from

homework

solution

  • One gradient

boundary node

0

66

May 4 Homework II

  • Recall quadrilateral

shape function form

i i i

+ a + b

i ai bi

  • Use exact result

for Aki integrals

4 cos

sin 3

ik ik

ikik ik ik

ki

ab ba

aabb aa bb

A

73

Jacobian Details

  • Multiply by 4A 2

and show that numerator

gives previous expression for 2A in

terms of triangle vertices’ coordinates

( )( ) ( )( )

yx yx yx yx A

yx yx yx yx

AJ y y x x y y x x

3 3 32 13 12

33 31 2 3 2 1

3 2 3 1 3 1 3 2

2

1 2 1 2

λ λ dxdy dxdy Ad λ d λ

A

d d = Jdxdy = =

74

Integrating Triangle Area

  • Use following limits for integration over

entire area of triangle

λ 2 λ 1

x 3 , y 3

x1 , y 1 x2 , y 2

Length = λ 1 = 1 – λ 2

∫ ∫

∫ ∫

Ω Ω

1

0

1

0

1 2 3 1 2

1 2 3 1 2 3 1 2

2

λ

A f d d

f dxdy f Ad d

λ 3 = 0

75

Confirm Integration Limits

  • If f = 1 we should get area

[ ]

A ( ) d A A A

A dxdy Ad d A d d A d

= ⎥ ⎦

⎤ ⎢ ⎣

⎡ ⎥ = − ⎦

⎤ ⎢ ⎣

⎡ = − = −

= = = =

∫ ∫ ∫ ∫ ∫

− − Ω Ω

2

1 2 1 2

2 1 2

2 2 2

1

0

2 2 2 2

1

0

2

1

0

1

0

2

1

0

1 (^121210)

2 2

λ λ λ λ

λ λ λλ λ λ

λ λ

  • Confirms correct limits for integrating

complete area of a triangle using the

natural (area) coordinates, λ

i

  • Also shows integral value = 1/

76

Linear Shape Functions

  • Start with general two-dimensional

integral for Helmholtz equation example

NaN dxdy y

N

y

N

x

N

x

N

A (^) k i i k i k ki (^) ∫ Ω

2

  • For linear shape functions Ni = λi

∫ ∫ ∫ ∫

∫ ∫ ∫ ∫

− −

− −

1

0

1

0

1

0

1

0

1 2

2 1 2

1

0

1

0

1

0

1

0

1 2

2 1 2

2 2

2 2

λ λ

λ λ

λ λ λλ λ λ

λ λ λλ λ λ

λ λ λ λ

d d a A d d A

b

A

b

A

a

A

a A

d d a A d d x x y y

A A

k i

i k i k

k i

i k i k ki

77

Linear Shape Functions II

  • Use following general result (we have

shown it is correct for m

1

= m

2

= m

3

A

aa bb

A

aa bb

d d

A

aa bb

d d

A

b

A

b

A

a

A

a

A

ik ik ik ik ik ik

i k i k

1

0

1

0

1 2

1

0

1

0

1 2

2

2

∫ ∫

∫ ∫

λ

λ

( 2 )!

1 2 3

1 2 3 1 2 3

1 2 3

∫ Ω

m m m

m m m

d A

m m m

78

Linear Shape Functions III

  • Use general form just stated to get

remainder of A

ki

integral for N

i

i

ik

k i k i

Aa

i k

Aa a A

i k

Aa a A

NaNdxdy a dxdy

∫ ∫ Ω Ω

2 2

2 2

2 2