Microsoft PowerPoint - Lecture3 Meshing and Shapefunctions

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 59

MAE 323: Lecture 3 Shape Functions and Meshing

Part I: Shape Function Basics

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 1
MAE 323: Lecture 3 Shape Functions and Meshing

Lagrange Interpolation and Natural Coordinates

In the previous lecture, we saw a bar or truss element which could be used to
solve truss problems in structural mechanics. We constructed shape functions, Ni
by solving the governing differential equations.
However, in FEM we need a more general procedure for generating such
functions. It turns out that we can use any trial functions, as long as they satisfy
the boundary conditions and certain continuity requirements
This is generally done by polynomial interpolation, which we will discuss now

Well start with the linear shape functions for the truss element:

n
x x
u ( x) ui N i = u1 1 + u2
i =1 L L

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 2
MAE 323: Lecture 3 Shape Functions and Meshing

Lagrange Interpolation and Natural Coordinates (Cont.)


These shape functions form a linear piecewise polynomial field which interpolate
the points x=0 and x=L
For now, well define interpolate to mean that the polynomial takes on a value
u(xi) at x=xi (node i) equal to the ith coefficient, ui
There is an automatic interpolation procedure which will give such functions given
the interpolating points, xi. It is called Lagrange Interpolation. So, if we have k+1
data points, u0,, uk the Lagrange formula, L may be stated as:
k
L( x) := u j l j ( x) (1)
j =0
where:
k
x xi
l j ( x) :=
i = 0,i j x j xi

Note that k equals the degree of the polynomial sought

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 3
MAE 323: Lecture 3 Shape Functions and Meshing

Lagrange Interpolation and Natural Coordinates (Cont.)


So, if we want a linear polynomial that interpolates two points p0=(x0,u0) and
p1=(x1,u1), equation (1) would yield:
x x1 x x0
L( x) = u +
0 u1 (2)
x
0 1x x
1 0x

xL x Lx x
L( x) = u +
0 1 u = u 0 + u1
L L L L
OR:
x x
L( x) = 1 u0 + u1
L L
y

x0,u0 x1,u1
0 x 1
L
2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 4
MAE 323: Lecture 3 Shape Functions and Meshing

Lagrange Interpolation and Natural Coordinates (Cont.)


If we want a bi-linear interpolation field over a square domain (as might be used
for plane stress elements, for example), it is straightforward to extend equation (1)
to two dimensions:
n m
L( x, y ) = uij li ( x)l j ( y ) (3a)
i =0 j =0

Similarly, for a cubic domain:


n m o
L( x, y, z ) = uijk li ( x)l j ( y )lk ( z ) (4)
i =0 j =0 k =0

Equation (3a) is equivalent to:


n m
L( x) := uili ( x) * u j l j ( x) (3b)
i =0 j =0

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 5
MAE 323: Lecture 3 Shape Functions and Meshing

Equation (3b) represents a tensor or outer product. Thus, the extension to two (or
more) dimensions can be accomplished by interpolating in one spatial dimension,
then another, and finding the outer product of the two interpolations
Although this is very convenient, some problems arise as can be seen when we try
to construct a bi-quadratic interpolation over a square domain
Before we continue, some remarks are
in order. The element coordinate
system (which we will use to
y,v interpolate) is placed in the centroid of
b the square. This will be convenient
when dealing with more arbitrary
x,u
shapes. Also, equations (3a) and (3b)
a suggest that we need to interpolate nine
points (three in each direction for 2nd
degree polynomial)! This means we
need nine nodes
2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 6
MAE 323: Lecture 3 Shape Functions and Meshing

Lagrange Interpolation and Natural Coordinates (Cont.)


Well start by interpolating a curve on the x-axis (y=0) utilizing (1)
The three points used to interpolate this curve are {-a,u1},{0,u2},{a,u3}

u2 u3 u1 x ( a + x)
2a 2
u1 y,v
u 2 ( a + x )( a + x )
N ( x) = 2
x1 x2 x3 a
u3 x (a + x)
x,u
2a 2
-a a

Remember: We dont really have a curve to interpolate. Were just


interpolating three points symbolically as if they pass thru a 2nd
degree curve. This gives us the form of a 2nd degree interpolant to re-
use in particular circumstances

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 7
MAE 323: Lecture 3 Shape Functions and Meshing

Lagrange Interpolation and Natural Coordinates (Cont.)


Now interpolate along the y-axis (x=0)
The three points used to interpolate this curve are {-b,v1},{0,v2},{b,v3}

y3
v3
v1 y ( b + y )
y,v
b 2b 2

y2 v2 (b + y )(b + y )
v2 N( y) =
x,u b2
v3 y (b + y )
-b
2b 2
v1 y1

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 8
MAE 323: Lecture 3 Shape Functions and Meshing

Lagrange Interpolation and Natural Coordinates (Cont.)


Next, use equation (3b) to find the bi-quadratic interpolant over the entire
domain
N ( x, y ) = N ( y ) N ( x )

c1 x( a + x ) y ( b + y ) 7 8 9
4a b2 2

c2 ( a + x )( a + x ) y ( b + y )
2a 2 b 2

c 3 x ( a + x ) y ( b + y )


4a 2 b 2 4 5 6
c x( a + x )( b + y )(b + y )
4
2a 2 b 2
c5 ( a + x)(a + x )( b + y )(b + y )
N( x, y ) =
a 2b 2 1 2 3
c6 x (a + x )( b + y )(b + y )
2a 2 b 2
We now number the nodes to match the coefficients
c7 x( a + x ) y (b + y )
4a b2 2 in the outer product. However, note that the actual

c8 ( a + x)( a + x ) y (b + y ) numbering is unimportant. What IS important to
2a 2 b 2
c9 x (a + x ) y (b + y ) match each basis function coefficient to its proper

4a 2 b 2 spatial location

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 9
MAE 323: Lecture 3 Shape Functions and Meshing

Lagrange Interpolation and Natural Coordinates (Cont.)


We now have a basis that could serve nicely as a rectangular continuum element (maybe
plane stress or plane strain). The shape functions, N form the basis for both the u and v
displacement fields (and all their derivatives)
9
u ( x, y ) = N i ( x, y )ui
i =1
9
v( x, y ) = N i ( x, y )vi
i =1
The shape functions just calculated are capable of interpolating all three domains
shown below , by just changing values of a and b and and multiplying the stiffness
matrix by a rotation

y y
x x

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 10
MAE 323: Lecture 3 Shape Functions and Meshing

Lagrange Interpolation and Natural Coordinates (Cont.)


An Isoparametric Rectangular Lagrange Element
But what if the element were distorted as below?

y y
x x

We must first explain why we might want to support such shapes. The reason is
that the element domains must discretize arbitrary geometries (such discretizations
are carried out by some meshing technique). The closer they can conform to
surface contours, the fewer elements we will need for a given degree of accuracy*
It turns out, there are some fairly straightforward ways to handle this. The idea is
to first find a bi-variate polynomial that interpolates the nodal locations, and then
re-use that same polynomial to interpolate the displacement field

*This statement provides the basis for what is known as the p-method of mesh
refinement
2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 11
MAE 323: Lecture 3 Shape Functions and Meshing

Lagrange Interpolation and Natural Coordinates (Cont.)


An Isoparametric Rectangular Lagrange Element (Cont.)
Elaborating a bit further: first parameterize the element coordinates so that the element
corners are always at (1,1).
(1,1)
y The r,s system is the
x (0,1) (1,0) natural (parametric)
coordinate system
(-1,1) s (0,0) r
(-1,0) (1,-1)
(0,-1)
(-1,-1)
As before, the origin (0,0) is at the centroid (or barycenter) of the domain. Next,
the nodal points themselves are interpolated in the local, or natural coordinate
system, such that the local-to-global coordinate transformation may be given as:
n
x = Ni xi
i =1
n
y = Ni yi
i =1

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 12
MAE 323: Lecture 3 Shape Functions and Meshing

Lagrange Interpolation and Natural Coordinates (Cont.)


An Isoparametric Rectangular Lagrange Element (Cont.)
The shape functions are obtained by using the shape functions from before for a rectangular
domain, setting a and b to 1, and replace x and y with r and s
The s,r system is the natural (parametric) coordinate system (by
definition, the centroid lies at (0,0)
1
( 1 + r ) r ( 1 + s ) s
4

1 ( 1 + r )(1 + r )( 1 + s ) s
2
1
The parametric r (1 + r )( 1 + s ) s
4
shape functions are 1
(1 + r ) r ( 1 + s )(1 + s)
shown at right 2
N( r , s ) = ( 1 + r )(1 + r )( 1 + s )(1 + s )
1
r (1 + r )( 1 + s)(1 + s )
2
1
( 1 + r ) rs (1 + s)
4
1
2 ( 1 + r )(1 + r ) s (1 + s )

1
r (1 + r ) s (1 + s )
4

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 13
MAE 323: Lecture 3 Shape Functions and Meshing

Lagrange Interpolation and Natural Coordinates (Cont.)


An Isoparametric Rectangular Lagrange Element (Cont.)

Note that the local-to-global mapping has the same form as the displacement solution:
n
u = N i ui
i =1
n
v = N i vi
i =1

Element formulations with this property (where the solution interpolation has the
same form as the parametric coordinate mapping) are said to be isoparametric.
The bi-quadratic element formulation just shown is known as a Lagrangian
isoparametric rectangular element.

One question that arises with this type of element is: Where to place the mid-side
and center nodes? The common answer is: at the midpoints and centroid,
respectively. This will work, of course, but the node at the center is not strictly
necessary and having to calculate the centroid beforehand is inconvenient.

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 14
MAE 323: Lecture 3 Shape Functions and Meshing

Serendipity Elements
Another problem with the Lagrange element we just described is that convergence issues
arise when connecting such elements to elements of lower polynomial degree.
Consider the following bi-linear Lagrange rectangle (constructed the same way we
constructed the bi-quadratic rectangle)
3 4 1
(-1,1) (1,1) 4 (1 r )(1 s )

1 (1 + r )(1 s )
s
N( r , s ) = 4
r 1 (1 r )(1 + s )
4
1
(-1,-1) (1 + r )(1 + s )
1 2 (1,-1) 4

What happens if we connect this element to the bi-quadratic Lagrange element?

The strains may be


incompatible along this
edge

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 15
MAE 323: Lecture 3 Shape Functions and Meshing

Serendipity Elements
So, wed really like the flexibility of creating an element like the one below, which can be
linear along any edge you choose, and quadratic elsewhere (and without a node at the
centroid)

Quadratic
Linear along along these
this edge three

And, since we dont really need the center node, wed like to get rid of it as well.
Such elements can be obtained, and usually go by the name transition elements. The
techniques to derive them are general and produce a class of elements called Serendipity
Elements. These are some of the most popular and common finite elements (most
continuum elements in the ANSYS library fall under this category). There are many ways to
construct them*, but we will focus on just one

*see, for example:


R. D. Cook, D. S. Malkus, and M. E. Plesha, Concepts and Applications of Finite Element Analysis,
3rd ed. New York, NY, USA: John Wiley & Sons, 1989.
2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 16
MAE 323: Lecture 3 Shape Functions and Meshing

Serendipity Elements
The method well use can be found in C.A. Felippas course on finite elements at the
University of Colorado*
The method is based on the observation that most isoparametric shape functions are given
as products of fairly simple polynomials given in the natural coordinates. Thus a particular
shape function at node i may be given as:
N i = ci L1 L2 ...Lm

where LjLm = 0 are the homogeneous equation of lines or curves expressed as linear
functions in the natural coordinates and ci is a normalization coefficient (not to be confused
with the shape function coefficient)

* http://www.colorado.edu/engineering/cas/courses.d/IFEM.d/IFEM.Ch18.d/IFEM.Ch18.pdf

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 17
MAE 323: Lecture 3 Shape Functions and Meshing

Serendipity Elements
The rules for determining Ni are as follow:

1. Select the Lj as the minimal number of lines or curves linear in the natural
coordinates that cross all nodes except the ith node. Primary choices in
2D are element sides and medians
2. Set the coefficient ci so that Ni has the value 1 at the ith node
3. Check that Ni vanishes over all element sides that do not contain node i
4. Check the polynomial order* over each side that contains node i. If the
degree is n, there must be exactly n+1 nodes on the side for compatibility
to hold.
5. If (3) and (4) are satisfied, check that the sum of the shape functions is
identically one at an arbitrary point within the element domain

*Recall that by polynomial order, we usually mean degree + 1

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 18
MAE 323: Lecture 3 Shape Functions and Meshing

Serendipity Elements
A Quadratic Serendipity Rectangle
To begin, lets try to find the shape functions for an eight-node, quadratic rectangle

3
Note: We are now switching to a more
6 conventional node numbering scheme.
7
4
The one we used previously was simply
s r convenient as it mirrored terms in the
8 outer product of two Lagrangian
5 2
functions
1

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 19
MAE 323: Lecture 3 Shape Functions and Meshing

Serendipity Elements
A Quadratic Serendipity Rectangle
Step 1: Select the Lj as the minimal number of lines or curves linear in the natural
coordinates that cross all nodes except the ith node.

So, for node 1, we would have the following:

N1 = c1 L43 L2 3 L58
3
L4-3: s=1
L2-3: r=1
7 6
4 s L43 = s 1
r
L23 = r 1
8 2
5 L58 = r + s + 1
1 L5-8: r+s=-1
Now, substitute back in:
N1 = c1 ( s 1)(r 1)(r + s + 1)

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 20
MAE 323: Lecture 3 Shape Functions and Meshing

Serendipity Elements
A Quadratic Serendipity Rectangle
Step 2: Set the coefficient ci so that Ni has the value 1 at the ith node

At node 1, (r,s)=(-1,-1). Plugging those values in for N1 yields:

N1 ( 1, 1) = c1 (4)
Therefore, c1=-1/4
3
1 L4-3: s=1
N1 = ( s 1)(r 1)(r + s + 1) L2-3: r=1
4 7 6
4 s r
8 2
5
1 L5-8: r+s=-1

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 21
MAE 323: Lecture 3 Shape Functions and Meshing

Serendipity Elements
A Quadratic Serendipity Rectangle
Step 3: Check that Ni vanishes over all element sides that do not contain node i

For node 1, the relevant element sides are at s=1 and r=1. It is immediately clear that N1=0
along these sides.

Step 4: Check the polynomial order over each side that contains node i the degree
is n, there must be exactly n+1 nodes on the side for compatibility to hold.
3
The two sides that contain node 1 L4-3: s=1
are at s=-1 and r=-1. Plugging L2-3: r=1
7 6
these into the expression for N1
reveals that the polynomial is 4 s r
quadratic in r on s=-1, and
8 2
quadratic r on r=-1. There are 5
correspondingly three nodes on
1 L5-8: r+s=-1
each of these sides

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 22
MAE 323: Lecture 3 Shape Functions and Meshing

Serendipity Elements
A Quadratic Serendipity Rectangle
We must wait until we have calculated all the other shape functions for this element before
performing the final check in step 5. So, lets move on to node 5:
3
L4-3: s=1 N5 = c5 L43 L23 L1 4
L2-3: r=1
7 6 L43 = s 1
4 s r L23 = r 1
8 2 L1 4 = r + 1
5
1 Plugging back in:
L1-4: r=-1 Step 2:
At (0,-1), N5=2. So c5=1/2 N5 = c5 ( s 1)(r 2 1)
1 Steps 3 reveals that the N5=0 at all
N 5 = ( s 1)(r 2 1) points other than node 5. Also,
2 since no line contains node 5 in N5,
step 4 is irrelevant
2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 23
MAE 323: Lecture 3 Shape Functions and Meshing

Serendipity Elements
A Quadratic Serendipity Rectangle
For node 2:
3
L4-3: s=1 N 2 = c2 L1 4 L4 3 L56
7 6
L43 = s 1
4 s r L1 4 = r + 1
L5-6: s=r-1
8 2 L56 = s r + 1
5
1
L1-4: r=-1 Plugging back in:

Step 2: N 2 = c2 ( s 1)(r + 1)( s r + 1)


At (1,-1), N2=4. So c4=1/4
Steps 3 and 4 yield the same
1 results as for N1
N 2 = ( s 1)(r + 1)( s r + 1)
4
2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 24
MAE 323: Lecture 3 Shape Functions and Meshing

Serendipity Elements
A Quadratic Serendipity Rectangle
The calculations for the five remaining nodes will be left as an exercise for the student. He
(she) should be able to verify the following:

3 1
4 (r 1)( s 1)(r + s + 1)

1 (r + 1)(s 1)( s r + 1)
6 4
7 1
(r + 1)( s + 1)(s + r 1)
4 s 4
r 1
(r 1)( s + 1)( s r 1)
8 We can now
5 2 N( r , s ) = 4
1 2 implement the final
(r 1)( s 1)
1 2
check, Step 5.
1
(r + 1)(s 2 1)
2
1 2
(r 1)(1 + s )
2
1 2
(r 1)( s 1)
2

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 25
MAE 323: Lecture 3 Shape Functions and Meshing

Serendipity Elements
A Quadratic Serendipity Rectangle
Step 5: If steps 3 and 4 are satisfied, check that the sum of the shape functions is identically
one at an arbitrary point within the element domain

We will arbitrarily check the point, r=1/2, s=1/2


1
8

3
16

0
3

16 8
1 1 24 8
1 1
N , = 3
2 2
N i , = =1
2 2 16 16
i =1
16
9
16

9
16
3

16

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 26
MAE 323: Lecture 3 Shape Functions and Meshing

Serendipity Elements
A linear-quadratic transition element
Using the five steps on slide 17, plus the concept of mapping, where a low-order
configuration is used as a parent element while selectively adding higher order terms*, one
can solve for virtually any hybrid combination of polynomial degrees. For example, the
transition element of slide 15 may be constructed by starting with the bi-linear element (slide
14) and augmenting with higher order terms while obeying steps 3 and 4.

1
4 (r 1)r ( s 1)
4 7 3 Note that every
1 (r + 1)( s 1)( s r + 1)
4 term except
1
(r + 1)( s 1)( s r + 1) those for nodes
s 4
6 1 1 and 4 are the
N (r , s ) = (r 1)r ( s + 1)
4 same as the
r 1 2
(r 1)( s 1)

eight-node
2

1 (r + 1)( s 2 1) serendipity
2
rectangle
1 5 2 1 (r 2 1)(s + 1)
2

*Doing this in a systematic way requires more assumptions


2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 27
MAE 323: Lecture 3 Shape Functions and Meshing

Part II: Meshing

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 28
MAE 323: Lecture 3 Shape Functions and Meshing

Constructing a Finite Element Mesh


Structured (or Regular) Grids

In the numerical approximation of


differential equations, a domain must first
be discretized. Such discretizations are
made of cells, which form the support of
finite elements. The earliest and simplest
way of doing this was to generate a
structured grid

Definition: A structured grid is one in


which each cell can be addressed by the
index (I,j) in two dimensions, or (I,j,k) in
three dimensions, and each vertex has Such grids are necessary in the Finite
coordinates (idx,jdy) in two dimensions, Difference Method (above), and can be
or (idx,jdy,kdz) in three useful in the Finite Element Method

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 29
MAE 323: Lecture 3 Shape Functions and Meshing

Constructing a Finite Element Mesh


Structured (or Regular) Grids

A severe limitation of the structured grid is the


requirement that it be representable as a unique
coordinate mapping (as shown at the right)*

Most modern meshing algorithms allow a user


to either define the coordinate system and
mapping explicitly, or to extract both from the
topology of the manifold to be meshed. The last
option is not trivial, and to my knowledge there
are no algorithms for doing this in a systematic
and robust way. However, this operation
becomes almost trivial if the manifold is 2m-
sided, where m is the number of spatial
dimensions

*the picture is from a CFD mesh, described on http://www.cgl-


erlangen.com/downloads/Manual/ch09s16s01.html

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 30
MAE 323: Lecture 3 Shape Functions and Meshing

Constructing a Finite Element Mesh


Structured (or Regular) Grids

However, most geometric entities encountered


by the analyst will not meet this requirement.
So, if a structured grid is required, the domain
must be sub-divided into 2m-sided polytopes by
the user (manually). Again, this is not a trivial
task in most cases.

For example, most automatic mesh generators


would not be able to generate a structured grid
out of the domain at the right

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 31
MAE 323: Lecture 3 Shape Functions and Meshing
Constructing a Finite Element Mesh
Structured (or Regular) Grids

A common solution would be to split the


polygon into quadrilaterals as shown at the right.
Four quadrilaterals
Most meshers could now create five structured
grids, which share nodes between them as
shown below

Five edges shared


between
neighbors
2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 32
MAE 323: Lecture 3 Shape Functions and Meshing

Constructing a Finite Element Mesh


Structured (or Regular) Grids

Most finite element applications do not make use of


the nodal coordinate mapping produced (or implied) by
structured grids, and so the mapping itself is commonly
not calculated (when this is the case, such grids are
referred to by the shape of their elements). Instead, 6 7 8 9 10
nodal connectivity data is stored for each element. 1 2 3 4
1 2 3 4 5
In the quadrilateral grid shown to the right, node
numbers are marked with circles, while element
numbers are marked in squares l k
The element data are stored according the element
number and nodal connectivity as shown. For example,
element 1 and 2 would be stored as:
i j
Element: 1 Element: 2
Nodes: 1,2,7,6 Nodes: 2,3,8,7

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 33
MAE 323: Lecture 3 Shape Functions and Meshing

Constructing a Finite Element Mesh


Unstructured Grids
Thus, it can immediately be seen by simply looking at
the element connectivity data structures for elements
one and two on the previous slide, that they share
nodes 2 and 7.

The element connectivity data structure is very


flexible, and can accommodate any kind of element. 3
6 9
For example, consider a domain meshed by quadratic
triangular elements. The data structures for element 1 1
1 5 2 7
and 2 may be given by:
4
Element: 1 Element: 2
2 8
Nodes: 1,2,3,4,5,6 Nodes: 2,7,3,5,8,9
Triangular elements have the advantage that they do not require a domain to
have 2m sides . They may thus be used to create unstructured meshes over
arbitrary domains in an automated fashion

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 34
MAE 323: Lecture 3 Shape Functions and Meshing

Constructing a Finite Element Mesh


Unstructured Grids

Let s take another look at the two domains we have


already used as examples

Unstructured Structured
quadratic triangle quadratic
mesh. No manual rectangle mesh.
intervention Area split into four
sub-domains

Unstructured
quadratic triangle
mesh. No manual
intervention

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 35
MAE 323: Lecture 3 Shape Functions and Meshing

Constructing a Finite Element Mesh


Unstructured Grids

These examples illustrate that an unstructured grid may be created


automatically with fairly standard algorithms (described next) over most
geometric domains

In two dimensions, the unstructured element type is triangular. In three


dimensions, it is a tetrahedron. This is because these shapes form what is
known as a simplex in their respective spaces. For our purposes, we only
need to know that a simplex is the simplest possible polytope of dimension
m which can be used to tile a space of the same dimension

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 36
MAE 323: Lecture 3 Shape Functions and Meshing

Constructing a Finite Element Mesh


Unstructured Grids - Delaunay Triangulation

To understand how unstructured grids are created, well start by looking at


the algorithm which plays some role in most unstructured meshing
programs: the Delaunay Algorithm

Well begin by considering an arbitrary collection of points (nodes) in two


dimensions
Note that there isnt a unique
triangular mesh for these points

But this one looks better than this one

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 37
MAE 323: Lecture 3 Shape Functions and Meshing

Constructing a Finite Element Mesh


Unstructured Grids - Delaunay Triangulation

So, before we continue, we should probably give a definition of a good


mesh. What are the goals when constructing meshes? The following
definition comes from a paper by Bern, Eppstein, and Gilbert*:

The mesh must conform to the boundary of the region, which may
consist of more than one connected component
The mesh must be fine enough to produce an acceptable
approximation to the original problem at all points of interest
The number of elements in the mesh should be as small as possible
given the two previous requirements
The individual elements must be well-shaped. The most important
restriction is on minimum angle:
No small angles: For most problems, elements with small
angles lead to ill-condtioned linear systems. Angles close to 180
degrees pose further problems

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 38
MAE 323: Lecture 3 Shape Functions and Meshing

Constructing a Finite Element Mesh


Unstructured Grids - Delaunay Triangulation

The Delaunay Criterion states


that any node under consideration
as a tetrahedron or triangle vertex
must not be contained within the
circumsphere* of any other node
which is already being used as a
vertex

D C Numerically, this criterion is


easily checked by making sure that

B the sum of opposite angles is less
A than 180

*Note the difference Note that in this case, +>180.


between contained So this triangulation fails
within and lying on

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 39
MAE 323: Lecture 3 Shape Functions and Meshing

Constructing a Finite Element Mesh


Unstructured Grids - Delaunay Triangulation

Once the criterion fails, the


adjacent edge is flipped. That is
to say the other two vertices of
the four points are used as the
adjacent edge

D C The Delaunay Criterion is checked


again.


B It this case, it passes because
A
+<180

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 40
MAE 323: Lecture 3 Shape Functions and Meshing

Constructing a Finite Element Mesh


Unstructured Grids - Delaunay Triangulation

Thus the Delaunay algorithm proceeds by arbitrarily drawing a


circumsphere around three points (in two dimensions. Four points in three
dimensions). It then arbitrarily chooses a neighboring point and draws
another circumphere and checks the Delaunay Criterion. It either passes or
fails, in which case the adjacent edge is flipped. It then chooses another
point and draws a circumsphere around it, and so on until the entire set of
points is meshed. For a given collection of points, the Delaunay Algorithm
guarantees the best mesh according to the well-shaped criteria stated
earlier (it maximizes the minimum angle)

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 41
MAE 323: Lecture 3 Shape Functions and Meshing

Constructing a Finite Element Mesh


Unstructured Grids - Delaunay Triangulation

But thats not the whole story. Recall the first requirement from slide 42.
We MUST have nodes on the boundary. Even in the interior of the domain,
we usually dont simply create points randomly.

So, the Delaunay algorithm is often combined with some judicious point
insertion algorithm. Of these, there are several different varieties. Three
very common ones are: Methods based on Delaunay Refinement, Octree
(in three dimensions Quadtree in two) and Advancing Front.

Advancing Front Quadtree

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 42
MAE 323: Lecture 3 Shape Functions and Meshing

Constructing a Finite Element Mesh


Unstructured Grids - Delaunay Triangulation
Many commercial finite element codes offer several different algorithms for
flexibility in meshing difficult geometry.

Historically, the advancing front algorithms have tended to produce higher quality
meshes, but at the expense of requiring absolutely error-free geometry

The quadtree and Deluanay-based algorithms (and other similar ones) are
currently enjoying a resurgence due to problems relating to CAD import. These
algorithms are capable of producing meshes on broken or incomplete geometry

For more detailed discussion, see the references below

For a list of meshing algorithms:


http://www.cs.berkeley.edu/~jrs/mesh/present.html

For a more thorough discussion of meshing generally:


http://morden.csee.usf.edu/dragon/kpalbrec/mesh.html

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 43
MAE 323: Lecture 3 Shape Functions and Meshing

Review

Elements represent the support (domain) over which shape functions are defined

Higher order shape functions (polynomials of degree greater than 1) require mid-side
nodes. This is because nodes represent locations corresponding to shape function
coefficients. The number of midside nodes required along an element edge is equal to n-
1, where n is the degree of the polynomial (recall that a 2nd degree polynomial has three
terms and thus requires three coefficients)

The number of degrees of freedom (DoFs) an element has is equal to the number of
nodes times the spatial dimension. This is illustrated below for a 2-dimensional linear
element
4 nodes times 2 DoFs
s per node. This
r element has 8 DoFs

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 44
MAE 323: Lecture 3 Shape Functions and Meshing

Part III:
Element Types in
Workbench

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 45
MAE 323: Lecture 3 Shape Functions and Meshing

2D Continuum Element Types

s
s r r

8-node quadrilateral 6-node triangle 4-node quadrilateral 3-node triangle


Quadratic shape Quadratic shape Linear shape Linear shape
functions functions functions functions
Structural Thermal
Parent Shape MAPDL Type Parent Shape MAPDL Type
3-node triangular Plane182 3-node triangular Plane55
4-node quad. Plane182 4-node quad. Plane55
6-node triangular Plane183 6-node triangular Plane77
8-node quad. Plane183 8-node quad. Plane77

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 46
MAE 323: Lecture 3 Shape Functions and Meshing

3D Continuum Element Types

s
s

r
r t
t

20-node Hex. 10-node tet. 8-node hex. 4-node tet.


Quadratic shape Quadratic Linear shape Linear shape
functions shape functions functions
Structural functions Thermal
Parent Shape MAPDL Type Parent Shape MAPDL Type
4-node tetrahedral solid185 4-node tetrahedral Solid70
8-node hexahedral solid185 8-node hexahedral Solid70
10-node tetrahedral solid186 10-node tetrahedral Solid87
20-node hexahedral solid187 20-node hexahedral Solid90

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 47
MAE 323: Lecture 3 Shape Functions and Meshing

3D Reduced-Continuum Element Types

4 4
3
t t t s
r 3
3
r 2 2 s
r
1
s 1 2
1

2-node beam 3-node beam 8-node quad. shell

Structural Thermal
Parent Shape MAPDL Type Parent Shape MAPDL Type
2-node beam beam188 2-node beam link33
3-node beam beam189 3-node beam link33
3-node triang. Shell shell181 3-node triang. Shell shell131
4-node quad. Shell shell181 4-node quad. Shell shell131
6-node trang. Shell shell281 6-node trang. Shell shell132
8-node quad. Shell shell281 8-node quad. Shell shell132

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 48
MAE 323: Lecture 3 Shape Functions and Meshing

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 49
MAE 323: Lecture 3 Shape Functions and Meshing

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 50
MAE 323: Lecture 3 Shape Functions and Meshing

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 51
MAE 323: Lecture 3 Shape Functions and Meshing

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 52
MAE 323: Lecture 3 Shape Functions and Meshing

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 53
MAE 323: Lecture 3 Shape Functions and Meshing

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 54
MAE 323: Lecture 3 Shape Functions and Meshing

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 55
MAE 323: Lecture 3 Shape Functions and Meshing

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 56
MAE 323: Lecture 3 Shape Functions and Meshing

Part IV:
Lab 3

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 57
MAE 323: Lecture 3 Shape Functions and Meshing

Tet mesh: 1
element thru
thickness

Tet mesh with


edge
refinement

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 58
MAE 323: Lecture 3 Shape Functions and Meshing

Tet mesh w/
sphere of
influence
refinement

Hex mesh: 1
element thru
thicknesss

2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 59

You might also like