Вы находитесь на странице: 1из 27

The Finite Element Method

Defined
The Finite Element Method (FEM) is a weighted
residual method that uses compactly-supported
basis functions.
Brief Comparison with Other
Methods
Finite Difference (FD)
Method:
FD approximates an
operator (e.g., the
derivative) and solves a
problem on a set of points
(the grid)
Finite Element (FE)
Method:
FE uses exact operators
but approximates the
solution basis functions.
Also, FE solves a problem
on the interiors of grid
cells (and optionally on the
gridpoints as well).
Brief Comparison with Other
Methods
Spectral Methods:
Spectral methods use
global basis functions to
approximate a solution
across the entire domain.
Finite Element (FE)
Method:
FE methods use compact
basis functions to
approximate a solution on
individual elements.
( ) ( ) ( ) ( ) M G W S ~
Overview of the Finite Element
Method
Strong
form
Weak
form
Galerkin
approx.
Matrix
form
Axial deformation of a bar subjected to a uniform load
(1-D Poisson equation)
Sample Problem
( )
0
p = x p
( )
0
0 0
2
=
dx
du
EA
= u
p =
dx
u d
EA
L x
0
2
=
L
| | L = x 0,
u = axial displacement
E=Youngs modulus = 1
A=Cross-sectional area = 1
Strong Form
The set of governing PDEs, with boundary conditions, is
called the strong form of the problem.
Hence, our strong form is (Poisson equation in 1-D):
( )
0
0 0
2
=
dx
du
= u
p =
dx
u d
L x
0
2
=
We now reformulate the problem into the weak form.
The weak form is a variational statement of the problem in
which we integrate against a test function. The choice of test
function is up to us.
This has the effect of relaxing the problem; instead of finding
an exact solution everywhere, we are finding a solution that
satisfies the strong form on average over the domain.
Weak Form
Weak Form
0
0
0
0
2
0
2
2
= vdx p
dx
u d
= p
dx
u d
p =
dx
u d
L
2
2
0
2
} |
|
.
|

\
|

Strong Form
Residual R=0
Weak Form
v is our test function
We will choose the test function later.
Why is it weak?
It is a weaker statement of the problem.
A solution of the strong form will also satisfy the weak form,
but not vice versa.
Analogous to weak and strong convergence:
Weak Form
f x f x f
x x
n
n
=
=


lim : weak
lim : strong
n
n
Weak Form
Choosing the test function:

We can choose any v we want, so let's choose v such that it
satisfies homogeneous boundary conditions wherever the actual
solution satisfies Dirichlet boundary conditions. Well see why
this helps us, and later will do it with more mathematical rigor.

So in our example, u(0)=0 so let v(0)=0.

Returning to the weak form:
} }
} |
|
.
|

\
|

L
L
2
L
2
vdx p = vdx
dx
u d
= vdx p
dx
u d
0
0
0
2
0
0
2
0
Weak Form
Integrate
Integrate LHS by parts:
( ) ( )
0
0
0
0
0
) (
= =
=
=
+ =
(

+ =
}
}
x L x
L
L x
x
L
dx
du
v
dx
du
L v dx
dx
dv
dx
du
dx
du
x v dx
dx
dv
dx
du
Weak Form
Recall the boundary conditions on u and v:
( )
0 ) 0 (
0
0 0
=
=
v
=
dx
du
= u
L x
( ) ( )
} }
}
=
+
= =
L
L
x L x
L
vdx p dx
dx
dv
dx
du
dx
du
v
dx
du
L v dx
dx
dv
dx
du
0
0
0
0
0
0
H
Hence,
The weak form
satisfies Neumann
conditions
automatically!
Weak Form
( )
functional linear a , functional bilinear a
) ( , such that Find
: statement l Variationa
1
0
1
0
0
0
F B
H v v F v u B H u
vdx p = dx
dx
dv
dx
du
L
L
e = e
} }
Why is it variational?
u and v are functions from an infinite-dimensional
function space H
We still havent done the finite element method yet, we have
just restated the problem in the weak formulation.
So what makes it finite elements?
Solving the problem locally on elements
Finite-dimensional approximation to an infinite- dimensional
space Galerkins Method
Galerkins Method
{ }
( ) ( )
( ) ( )
( ) ( ) ( )
}

}

} }

= = =
=
=
=
=
=
=
=
L
N
j
L
N
j
j j
N
i
i
i
j
j
L L
j
N
j
j j
j
N
j
j j
N
i i
i
dx x b p dx x
dx
d
b x
dx
d
c
vdx p dx
dx
dv
dx
du
b x b x v
c x c x u
0
1
0
1
0
1
0 0
0
1
1
: form our weak into se Insert the
chosen y arbitraril ,
for solve to unkowns ,
Then,
basis finite Choose

Galerkins Method
( ) ( ) ( )
dx p dx
dx
d
dx
d
c
dx p b dx
dx
d
dx
d
c b
dx x b p dx x
dx
d
b x
dx
d
c
i
L
N
j
L
i
j
j
i
L
N
i
i
N
i
N
j
L
i
j
j i
L
N
j
L
N
j
j j
N
i
i
i
j
j

}
}

}
}

}

=
= = =
= = =
=
=
=
0
0
1
0
0
0
1 1 1
0
0
1
0
1
0
1
: Cancelling
: g Rearrangin
Galerkins Method
effect. without , e interchang
can we since symmetric be will see already can We
and
,
unknowns, of vector a is
where , problem matrix a have now We
0
0
0
0
0
1
0
j i
K
dx p F
dx
dx
d
dx
d
K
c
dx p dx
dx
d
dx
d
c
ij
i
L
i
L
i
j
ij
j
i
L
N
j
L
i
j
j

}
}
}

}
=
=
=
=
=
F Kc
Galerkins Method
Galerkins Method
So what have we done so far?
1) Reformulated the problem in the weak form.
2) Chosen a finite-dimensional approximation to the solution.
Recall weak form written in terms of residual:
0
0 0 0
0
2
2
= = =
|
|
.
|

\
|

}

} }
L
i
L
i i
L
dx b vdx vdx p
dx
u d
R R
This is an L
2
inner-product. Therefore, the residual is orthogonal
to our space of basis functions. Orthogonality Condition
Orthogonality Condition
0
0 0 0
0
2
2
= = =
|
|
.
|

\
|

}

} }
L
i
L
i i
L
dx b vdx vdx p
dx
u d
R R
The residual is orthogonal to our space of basis functions:
u
u
h

H
H
h

i

Therefore, given some space of approximate functions H
h
, we are
finding u
h
that is closest (as measured by the L
2
inner product) to
the actual solution u.
Discretization and Basis Functions
Lets continue with our sample problem. Now we discretize our
domain. For this example, we will discretize x=[0, L] into 2
elements.
0
h 2h=L
1

In 1-D, elements are segments. In 2-D, they are triangles, tetrads,


etc. In 3-D, they are solids, such as tetrahedra. We will solve the
Galerkin problem on each element.
Discretization and Basis Functions
For a set of basis functions, we can choose anything. For
simplicity here, we choose piecewise linear hat functions.
Our solution will be a linear combination of these functions.
x
1
=0
x
2
=L/2
x
3
=L
( )
unity. of partition e satisfy th they Also, ory. interpolat
be ill solution w Our : satisfy functions Basis =
i
j j i
x o

3
Discretization and Basis Functions
To save time, we can throw out
1
a priori because, since in this
example u(0)=0, we know that the coefficent c
1
must be 0.

x
1
=0
x
2
=L/2
x
3
=L

3
Basis Functions
| |
| |
| |

e
=

e
e
=
otherwise 0
, if 1
2
otherwise 0
, if
2
2
, 0 if
2
2
3
2
2
2
L x
L
x
L x
L
x
x
L
x
L
L
L

x
1
=0 x
2
=L/2 x
3
=L

3
Matrix Formulation

expected. as symmetric is Notice


s. polynomial for
exact is it since , quadrature Gaussian use to FEM in standard is It
. quadrature by y numericall performed be n would integratio
and known, are functions basis the since advance, in done
be can functions basis the ating differenti code, computer a In
,
2 2
2 4
1
: have we integrals, the evaluating then functions,
basis the ating Differenti problem. algebra linear a at arrive
and slide previous on the chosen insert the can We
: problem matrix our Given
4
1
2
1
0
0
0
1
0
K
F K
F Kc
F Kc
F
K
c
(

=
(


=
= =
=
}

}
=
L
p
L
dx p dx
dx
d
dx
d
c
i
i
L
N
j
L
i
j
j



Solution
( )
| |
| |
( )
2
: is problem for this solution analytical exact The
, n whe ) (
, 0 n whe
: solution numerical final our
gives functions basis by multiplied en which wh ,
: ts coefficien our obtain we
slide, previous on the problem n eliminatio Gaussian the Solving
2
0
0
2
2
0 4
1
2 0 4
3
2
8
3
2
0
2
0
x p
Lx p x u
L x Lx L p
x Lx p
x
c
L
L
i
L p
L p
i
=

e +
e
=
(
(

c
Solution
0
0.1
0.2
0.3
0.4
0.5
0.6
0 0.2 0.4 0.6 0.8 1
x
u
(
x
)
Exact
Approx
Notice the numerical solution is interpolatory, or nodally exact.
Concluding Remarks
Because basis functions are compact, matrix K is typically
tridiagonal or otherwise sparse, which allows for fast solvers that
take advantage of the structure (regular Gaussian elimination is
O(N
3
), where N is number of elements!). Memory requirements
are also reduced.
Continuity between elements not required. Discontinuous
Galerkin Method

Вам также может понравиться