Professional Documents
Culture Documents
Microsoft PowerPoint - Lecture3 Meshing and Shapefunctions
Microsoft PowerPoint - Lecture3 Meshing and Shapefunctions
Microsoft PowerPoint - Lecture3 Meshing and Shapefunctions
2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 1
MAE 323: Lecture 3 Shape Functions and Meshing
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
2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 3
MAE 323: Lecture 3 Shape Functions and Meshing
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
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
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
2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 7
MAE 323: Lecture 3 Shape Functions and Meshing
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
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
y y
x x
2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 10
MAE 323: Lecture 3 Shape Functions and Meshing
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
2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 12
MAE 323: Lecture 3 Shape Functions and Meshing
2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 13
MAE 323: Lecture 3 Shape Functions and Meshing
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
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
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
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.
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
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:
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
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
2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 28
MAE 323: Lecture 3 Shape Functions and Meshing
2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 29
MAE 323: Lecture 3 Shape Functions and Meshing
2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 30
MAE 323: Lecture 3 Shape Functions and Meshing
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
2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 33
MAE 323: Lecture 3 Shape Functions and Meshing
2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 34
MAE 323: Lecture 3 Shape Functions and Meshing
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
2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 36
MAE 323: Lecture 3 Shape Functions and Meshing
2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 37
MAE 323: Lecture 3 Shape Functions and Meshing
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
2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 39
MAE 323: Lecture 3 Shape Functions and Meshing
2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 40
MAE 323: Lecture 3 Shape Functions and Meshing
2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 41
MAE 323: Lecture 3 Shape Functions and Meshing
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.
2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 42
MAE 323: Lecture 3 Shape Functions and Meshing
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
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
s
s r r
2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 46
MAE 323: Lecture 3 Shape Functions and Meshing
s
s
r
r t
t
2011 Alex Grishin MAE 323 Lecture 3 Shape Functions and Meshing 47
MAE 323: Lecture 3 Shape Functions and Meshing
4 4
3
t t t s
r 3
3
r 2 2 s
r
1
s 1 2
1
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
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