SlideShare una empresa de Scribd logo
1 de 28
Finite element method 1
Finite Elements
 Basic formulation
 Basis functions
 Stiffness matrix
 Poisson‘s equation
 Regular grid
 Boundary conditions
 Irregular grid
 Numerical Examples
Scope: Understand the basic concept of the finite element
method with the simple-most equation.
Finite element method 2
Formulation
Let us start with a simple linear system of equations
| * y
and observe that we can generally multiply both sides of this
equation with y without changing its solution. Note that x,y
and b are vectors and A is a matrix.
b
Ax 
n
y
yb
yAx 



We first look at Poisson’s equation
)
(
)
( x
f
x
u 


where u is a scalar field, f is a source term and in 1-D
2
2
2
x






Finite element method 3
Poisson‘s equation
fv
uv 


We now multiply this equation with an arbitrary function v(x),
(dropping the explicit space dependence)
... and integrate this equation over the whole domain. For
reasons of simplicity we define our physical domain D in the
interval [0, 1].

 


D
D
fv
uv
dx
fv
dx
uv 
 


1
0
1
0
Das Reh springt hoch,
das Reh springt weit,
warum auch nicht,
es hat ja Zeit.
... why are we doing this? ... be patient ...
Finite element method 4
Discretization
As we are aiming to find a numerical solution to our problem it is
clear we have to discretize the problem somehow. In FE problems
– similar to FD – the functional values are known at a discrete set
of points.
... regular grid ...
... irregular grid ...
Domain D
The key idea in FE analysis is to approximate all functions in
terms of basis functions j, so that
i
N
i
i
c
u
u j




1
~
Finite element method 5
Basis function
where N is the number nodes in our physical domain and ci are real
constants.
With an appropriate choice of basis functions ji, the coefficients ci
are equivalent to the actual function values at node point i. This – of
course – means, that ji=1 at node i and 0 at all other nodes ...
Doesn’t that ring a bell?
Before we look at the basis functions, let us ...
i
N
i
i
c
u
u j




1
~
Finite element method 6
Partial Integration
... partially integrate the left-hand-side of our equation ...
dx
fv
dx
uv 
 


1
0
1
0
  dx
u
v
uv
dx
v
u 
 








1
0
1
0
1
0
)
(
we assume for now that the derivatives of u at the boundaries vanish
so that for our particular problem
dx
u
v
dx
v
u 
 






1
0
1
0
)
(
Finite element method 7
…
... so that we arrive at ...
... with u being the unknown. This is also true for our
approximate numerical system
dx
fv
dx
v
u 
 


1
0
1
0
... where ...
i
N
i
i
c
u j



1
~
was our choice of approximating u using basis functions.
dx
fv
dx
v
u 
 


1
0
1
0
~
Finite element method 8
Partial integration
... remember that v was an arbitrary real function ...
if this is true for an arbitrary function it is also true if
... so any of the basis functions previously defined ...
j
v j

... now let’s put everything together ...
dx
fv
dx
v
u 
 


1
0
1
0
~
Finite element method 9
The discrete system
The ingredients:
k
v j
 i
N
i
i
c
u j



1
~
dx
fv
dx
v
u 
 


1
0
1
0
~
dx
f
dx
c k
k
n
i
i
i j
j
j 
  









1
0
1
0 1
... leading to ...
Finite element method 10
The discrete system
dx
f
dx
c k
k
i
n
i
i j
j
j 

 



1
0
1
0
1
... the coefficients ck are constants so that for one particular
function jk this system looks like ...
k
ik
i g
A
b 
... probably not to your surprise this can be written in matrix form
k
i
T
ik g
b
A 
Finite element method 11
The solution
... with the even less surprising solution
  k
T
ik
i g
A
b
1


remember that while the bi’s are really the coefficients of the basis
functions these are the actual function values at node points i as well
because of our particular choice of basis functions.
This become clear further on ...
Finite element method 12
Basis functions
... otherwise we are
free to choose any
function ...
The simplest choice
are of course linear
functions:
+ grid nodes
blue lines – basis
functions ji
1
2
3
4
5
6
7
8
9
10
we are looking for functions ji
with the following property







i
j
x
x
for
x
x
for
x
j
i
i
,
0
1
)
(
j
Finite element method 13
Basis functions - gradient
To assemble the stiffness matrix we need the gradient (red) of the basis
functions (blue)
1
2
3
4
5
6
7
8
9
10
Finite element method 14
Stiffness matrix
Knowing the particular form of the basis functions we can now
calculate the elements of matrix Aij and vector gi
dx
f
dx
c k
k
i
n
i
i j
j
j 

 



1
0
1
0
1
dx
A k
i
ik  


1
0
j
j
k
ik
i g
A
b 
dx
f
g k
k j


1
0
Note that ji are continuous functions defined in the interval [0,1], e.g.

















 





elsewhere
x
x
x
for
x
x
x
x
x
x
x
for
x
x
x
x
x i
i
i
i
i
i
i
i
i
i
i
0
)
( 1
1
1
1
1
1
j
Let us – for now – assume a
regular grid ... then
Finite element method 15
Stiffness matrix –regular grid
... where we have used ...


















 





elsewhere
x
x
x
for
x
x
x
x
x
x
x
for
x
x
x
x
x i
i
i
i
i
i
i
i
i
i
i
0
)
( 1
1
1
1
1
1
j

















elsewhere
dx
x
for
dx
x
x
dx
for
dx
x
x
i
0
~
0
~
1
0
~
1
~
)
~
(
j
1
~





i
i
i
x
x
dx
x
x
x
dx
xi
ji
Finite element method 16
Regular grid - gradient













elsewhere
dx
x
for
dx
x
dx
for
dx
x
i
0
~
0
/
1
0
~
/
1
)
~
(
j
1
~





i
i
i
x
x
dx
x
x
x
dx
xi
ji
1/dx
-1/dx
Finite element method 17
Stifness matrix - elements
dx
A k
i
ik  


1
0
j
j
1
2
3
4
5
6
7
8
9
10
... we have to distinguish various cases ... e.g. ...
dx
dx
dx
dx
dx
dx
dx
dx
A
dx
dx
x
x
dx
x
x
1
1
1
1
0
2
1
1
1
0
1
1
11
1
1
1
1










 





j
j
j
j
dx
dx
dx
dx
dx
dx
dx
dx
A
dx
dx
dx
x
x
x
dx
x
2
1
1
0
2
0
2
2
2
2
2
1
0
2
2
22
2
2
2
2




















j
j
j
j
j
j
Finite element method 18
Stiffness matrix
dx
A k
i
ik  


1
0
j
j
1
2
3
4
5
6
7
8
9
10
... and ...
dx
dx
dx
dx
dx
dx
dx
dx
A
dx
dx
x
x
dx
x
x
1
1
1
1
0
2
2
1
1
0
2
1
12
1
1
1
1


















j
j
j
j
12
21 A
A 
... and ...
... so that finally the stiffness matrix looks like ...
Finite element method 19
Stiffness matrix
dx
A k
i
ik  


1
0
j
j
1
2
3
4
5
6
7
8
9
10























1
1
1
2
1
1
2
1
1
1
1

dx
Aij
... so far we have ignored sources and boundary conditions ...
Finite element method 20
Boundary conditions - sources
... let us start restating the problem ...
)
(
)
( x
f
x
u 


... which we turned into the following formulation ...
dx
f
dx
c k
k
i
n
i
i j
j
j 

 



1
0
1
0
1
... assuming ...
i
N
i
i
c
u j



1
~ with b.c. N
i
N
i
i u
u
c
u j
j
j )
1
(
)
0
(
~
1
1
2


 


where u(0) and u(1) are the values at the boundaries of the domain [0,1].
How is this incorporated into the algorithm?
Finite element method 21
Boundary conditions
)
(
)
( x
f
x
u 


... which we turned into the following formulation ...
dx
f
dx
c k
k
i
n
i
i j
j
j 

 



1
0
1
0
1
... in pictorial form ...
dx
u
dx
u
dx
f
dx
c k
n
k
k
k
i
n
i
i 



 










1
0
1
0
1
1
0
1
0
1
2
)
1
(
)
0
( j
j
j
j
j
j
j
=
boundary condition
boundary condition
source heterogeneity (f)
... the system feels the boundary conditions through the (modified) source term
AT b = g
Finite element method 22
Numerical Example
)
(
)
( x
f
x
u 


Domain: [0,1]; nx=100;
dx=1/(nx-1);f(x)=d(1/2)
Boundary conditions:
u(0)=u(1)=0
f(nx/2)=1/dx;
for it = 1:nit,
uold=u;
du=(csh(u,1)+csh(u,-1));
u=.5*( f*dx^2 + du );
u(1)=0;
u(nx)=0;
end
Matlab FD code
% source term
s=(1:nx)*0;s(nx/2)=1.;
% boundary left u_1 int{ nabla phi_1 nabla phij }
u1=0; s(1) =0;
% boundary right u_nx int{ nabla phi_nx nabla phij }
unx=0; s(nx)=0;
% assemble matrix Aij
A=zeros(nx);
for i=2:nx-1,
for j=2:nx-1,
if i==j,
A(i,j)=2/dx;
elseif j==i+1
A(i,j)=-1/dx;
elseif j==i-1
A(i,j)=-1/dx;
else
A(i,j)=0;
end
end
end
fem(2:nx-1)=inv(A(2:nx-1,2:nx-1))*s(2:nx-1)';
fem(1)=u1;
fem(nx)=unx;
Matlab FEM code
Finite element method 23
Regular grid
)
(
)
( x
f
x
u 


Domain: [0,1]; nx=100;
dx=1/(nx-1);f(x)=d(1/2)
Boundary conditions:
u(0)=u(1)=0
Matlab FD code (red)
Matlab FEM code (blue)
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0
0.05
0.1
0.15
0.2
0.25
x
u(x)
FD (red) - FEM (blue)
Finite element method 24
Regular grid - non zero b.c.
)
(
)
( x
f
x
u 


Domain: [0,1]; nx=100;
dx=1/(nx-1);f(x)=d(1/2)
Boundary conditions:
u(0)=0.15
u(1)=0.05
Matlab FD code (red)
Matlab FEM code (blue)
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
x
u(x)
FD (red) - FEM (blue) -> Regular grid
% Quelle
s=(1:nx)*0;s(nx/2)=1.;
% Randwert links u_1 int{ nabla phi_1 nabla
phij }
u1=0.15; s(2) =u1/dx;
% Randwert links u_nx int{ nabla phi_nx nabla
phij }
unx=0.05; s(nx-1)=unx/dx;
Finite element method 25
Stiffness – irregular grid
1
2
3
4
5
6
7
8
9
10
dx
A k
i
ik  


1
0
j
j
21
1
0
2
1
1
2
1
1
0
2
1
12
1
1
1
1
1
1
1
1
1
1
1
1
A
h
dx
h
dx
h
h
dx
dx
A
h
h
x
x
h
x
x



















j
j
j
j
i
i
ii
h
h
A
1
1
1



i=1 2 3 4 5 6 7
+ + + + + + +
h1 h2 h3 h4 h5 h6
Finite element method 26
Example
)
(
)
( x
f
x
u 


Domain: [0,1]; nx=100;
dx=1/(nx-1);f(x)=d(1/2)
Boundary conditions:
u(0)=u0; u(1)=u1
for i=2:nx-1,
for j=2:nx-1,
if i==j,
A(i,j)=1/h(i-1)+1/h(i);
elseif i==j+1
A(i,j)=-1/h(i-1);
elseif i+1==j
A(i,j)=-1/h(i);
else
A(i,j)=0;
end
end
end
i=1 2 3 4 5 6 7
+ + + + + + +
h1 h2 h3 h4 h5 h6
Stiffness matrix A
Finite element method 27
Irregular grid – non zero b.c.
)
(
)
( x
f
x
u 


Domain: [0,1]; nx=100;
dx=1/(nx-1);f(x)=d(1/2)
Boundary conditions:
u(0)=0.15
u(1)=0.05
Matlab FD code (red)
Matlab FEM code (blue)
+ FEM grid points 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
x
u(x)
FD (red) - FEM (blue)
FEM on Chebyshev grid
Finite element method 28
Summary
In finite element analysis we approximate a function defined in
a Domain D with a set of orthogonal basis functions with
coefficients corresponding to the functional values at some
node points.
The solution for the values at the nodes for some partial
differential equations can be obtained by solving a linear
system of equations involving the inversion of (sometimes
sparse) matrices.
Boundary conditions are inherently satisfied with this
formulation which is one of the advantages compared to finite
differences.

Más contenido relacionado

Similar a 5994944.ppt

Integral Calculus Anti Derivatives reviewer
Integral Calculus Anti Derivatives reviewerIntegral Calculus Anti Derivatives reviewer
Integral Calculus Anti Derivatives reviewerJoshuaAgcopra
 
Optimization introduction
Optimization introductionOptimization introduction
Optimization introductionhelalmohammad2
 
Principal Component Analysis
Principal Component AnalysisPrincipal Component Analysis
Principal Component AnalysisSumit Singh
 
Engg. mathematics iii
Engg. mathematics iiiEngg. mathematics iii
Engg. mathematics iiimanoj302009
 
Problem Solving by Computer Finite Element Method
Problem Solving by Computer Finite Element MethodProblem Solving by Computer Finite Element Method
Problem Solving by Computer Finite Element MethodPeter Herbert
 
13 1 basics_integration
13 1 basics_integration13 1 basics_integration
13 1 basics_integrationManarAdham
 
NN_02_Threshold_Logic_Units.pdf
NN_02_Threshold_Logic_Units.pdfNN_02_Threshold_Logic_Units.pdf
NN_02_Threshold_Logic_Units.pdfchiron1988
 
Mba admission in india
Mba admission in indiaMba admission in india
Mba admission in indiaEdhole.com
 
Supporting Vector Machine
Supporting Vector MachineSupporting Vector Machine
Supporting Vector MachineSumit Singh
 
Amirim Project - Threshold Functions in Random Simplicial Complexes - Avichai...
Amirim Project - Threshold Functions in Random Simplicial Complexes - Avichai...Amirim Project - Threshold Functions in Random Simplicial Complexes - Avichai...
Amirim Project - Threshold Functions in Random Simplicial Complexes - Avichai...Avichai Cohen
 
2012 mdsp pr13 support vector machine
2012 mdsp pr13 support vector machine2012 mdsp pr13 support vector machine
2012 mdsp pr13 support vector machinenozomuhamada
 
Basics of Integration and Derivatives
Basics of Integration and DerivativesBasics of Integration and Derivatives
Basics of Integration and DerivativesFaisal Waqar
 
Rasterisation of a circle by the bresenham algorithm
Rasterisation of a circle by the bresenham algorithmRasterisation of a circle by the bresenham algorithm
Rasterisation of a circle by the bresenham algorithmKALAIRANJANI21
 
Rasterisation of a circle by the bresenham algorithm
Rasterisation of a circle by the bresenham algorithmRasterisation of a circle by the bresenham algorithm
Rasterisation of a circle by the bresenham algorithmKALAIRANJANI21
 

Similar a 5994944.ppt (20)

Integral Calculus Anti Derivatives reviewer
Integral Calculus Anti Derivatives reviewerIntegral Calculus Anti Derivatives reviewer
Integral Calculus Anti Derivatives reviewer
 
Algorithms DM
Algorithms DMAlgorithms DM
Algorithms DM
 
Optimization introduction
Optimization introductionOptimization introduction
Optimization introduction
 
Unit1
Unit1Unit1
Unit1
 
project final
project finalproject final
project final
 
Principal Component Analysis
Principal Component AnalysisPrincipal Component Analysis
Principal Component Analysis
 
Engg. mathematics iii
Engg. mathematics iiiEngg. mathematics iii
Engg. mathematics iii
 
OI.ppt
OI.pptOI.ppt
OI.ppt
 
Randomized algorithms ver 1.0
Randomized algorithms ver 1.0Randomized algorithms ver 1.0
Randomized algorithms ver 1.0
 
Problem Solving by Computer Finite Element Method
Problem Solving by Computer Finite Element MethodProblem Solving by Computer Finite Element Method
Problem Solving by Computer Finite Element Method
 
13 1 basics_integration
13 1 basics_integration13 1 basics_integration
13 1 basics_integration
 
NN_02_Threshold_Logic_Units.pdf
NN_02_Threshold_Logic_Units.pdfNN_02_Threshold_Logic_Units.pdf
NN_02_Threshold_Logic_Units.pdf
 
Mba admission in india
Mba admission in indiaMba admission in india
Mba admission in india
 
Supporting Vector Machine
Supporting Vector MachineSupporting Vector Machine
Supporting Vector Machine
 
Amirim Project - Threshold Functions in Random Simplicial Complexes - Avichai...
Amirim Project - Threshold Functions in Random Simplicial Complexes - Avichai...Amirim Project - Threshold Functions in Random Simplicial Complexes - Avichai...
Amirim Project - Threshold Functions in Random Simplicial Complexes - Avichai...
 
2012 mdsp pr13 support vector machine
2012 mdsp pr13 support vector machine2012 mdsp pr13 support vector machine
2012 mdsp pr13 support vector machine
 
Basics of Integration and Derivatives
Basics of Integration and DerivativesBasics of Integration and Derivatives
Basics of Integration and Derivatives
 
Statistical Method In Economics
Statistical Method In EconomicsStatistical Method In Economics
Statistical Method In Economics
 
Rasterisation of a circle by the bresenham algorithm
Rasterisation of a circle by the bresenham algorithmRasterisation of a circle by the bresenham algorithm
Rasterisation of a circle by the bresenham algorithm
 
Rasterisation of a circle by the bresenham algorithm
Rasterisation of a circle by the bresenham algorithmRasterisation of a circle by the bresenham algorithm
Rasterisation of a circle by the bresenham algorithm
 

Más de ssuserc1ed5e

Sprawled City; Lesson 11.ppt
Sprawled City; Lesson 11.pptSprawled City; Lesson 11.ppt
Sprawled City; Lesson 11.pptssuserc1ed5e
 
Sprawled City; Lesson 7.pptx
Sprawled City; Lesson 7.pptxSprawled City; Lesson 7.pptx
Sprawled City; Lesson 7.pptxssuserc1ed5e
 
Drivers of Urban Sprawl.pptx
Drivers of Urban Sprawl.pptxDrivers of Urban Sprawl.pptx
Drivers of Urban Sprawl.pptxssuserc1ed5e
 
Lesson 2 Why Sprawl Matters.pptx
Lesson 2 Why Sprawl Matters.pptxLesson 2 Why Sprawl Matters.pptx
Lesson 2 Why Sprawl Matters.pptxssuserc1ed5e
 
Lesson 1 Urban Sprawl Definition.pptx
Lesson 1 Urban Sprawl Definition.pptxLesson 1 Urban Sprawl Definition.pptx
Lesson 1 Urban Sprawl Definition.pptxssuserc1ed5e
 
161532-abstract-template-16x9.pptx
161532-abstract-template-16x9.pptx161532-abstract-template-16x9.pptx
161532-abstract-template-16x9.pptxssuserc1ed5e
 
SheppardLincolnShort.ppt
SheppardLincolnShort.pptSheppardLincolnShort.ppt
SheppardLincolnShort.pptssuserc1ed5e
 
Happy Chinese (Kuaile Hanyu) Student's Book. Volume 1 快乐汉语 (俄语版) ( PDFDrive )...
Happy Chinese (Kuaile Hanyu) Student's Book. Volume 1 快乐汉语 (俄语版) ( PDFDrive )...Happy Chinese (Kuaile Hanyu) Student's Book. Volume 1 快乐汉语 (俄语版) ( PDFDrive )...
Happy Chinese (Kuaile Hanyu) Student's Book. Volume 1 快乐汉语 (俄语版) ( PDFDrive )...ssuserc1ed5e
 

Más de ssuserc1ed5e (10)

Sprawled City; Lesson 11.ppt
Sprawled City; Lesson 11.pptSprawled City; Lesson 11.ppt
Sprawled City; Lesson 11.ppt
 
Sprawled City; Lesson 7.pptx
Sprawled City; Lesson 7.pptxSprawled City; Lesson 7.pptx
Sprawled City; Lesson 7.pptx
 
9883885.ppt
9883885.ppt9883885.ppt
9883885.ppt
 
9920717.pptx
9920717.pptx9920717.pptx
9920717.pptx
 
Drivers of Urban Sprawl.pptx
Drivers of Urban Sprawl.pptxDrivers of Urban Sprawl.pptx
Drivers of Urban Sprawl.pptx
 
Lesson 2 Why Sprawl Matters.pptx
Lesson 2 Why Sprawl Matters.pptxLesson 2 Why Sprawl Matters.pptx
Lesson 2 Why Sprawl Matters.pptx
 
Lesson 1 Urban Sprawl Definition.pptx
Lesson 1 Urban Sprawl Definition.pptxLesson 1 Urban Sprawl Definition.pptx
Lesson 1 Urban Sprawl Definition.pptx
 
161532-abstract-template-16x9.pptx
161532-abstract-template-16x9.pptx161532-abstract-template-16x9.pptx
161532-abstract-template-16x9.pptx
 
SheppardLincolnShort.ppt
SheppardLincolnShort.pptSheppardLincolnShort.ppt
SheppardLincolnShort.ppt
 
Happy Chinese (Kuaile Hanyu) Student's Book. Volume 1 快乐汉语 (俄语版) ( PDFDrive )...
Happy Chinese (Kuaile Hanyu) Student's Book. Volume 1 快乐汉语 (俄语版) ( PDFDrive )...Happy Chinese (Kuaile Hanyu) Student's Book. Volume 1 快乐汉语 (俄语版) ( PDFDrive )...
Happy Chinese (Kuaile Hanyu) Student's Book. Volume 1 快乐汉语 (俄语版) ( PDFDrive )...
 

Último

Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 

Último (20)

Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 

5994944.ppt

  • 1. Finite element method 1 Finite Elements  Basic formulation  Basis functions  Stiffness matrix  Poisson‘s equation  Regular grid  Boundary conditions  Irregular grid  Numerical Examples Scope: Understand the basic concept of the finite element method with the simple-most equation.
  • 2. Finite element method 2 Formulation Let us start with a simple linear system of equations | * y and observe that we can generally multiply both sides of this equation with y without changing its solution. Note that x,y and b are vectors and A is a matrix. b Ax  n y yb yAx     We first look at Poisson’s equation ) ( ) ( x f x u    where u is a scalar field, f is a source term and in 1-D 2 2 2 x      
  • 3. Finite element method 3 Poisson‘s equation fv uv    We now multiply this equation with an arbitrary function v(x), (dropping the explicit space dependence) ... and integrate this equation over the whole domain. For reasons of simplicity we define our physical domain D in the interval [0, 1].      D D fv uv dx fv dx uv      1 0 1 0 Das Reh springt hoch, das Reh springt weit, warum auch nicht, es hat ja Zeit. ... why are we doing this? ... be patient ...
  • 4. Finite element method 4 Discretization As we are aiming to find a numerical solution to our problem it is clear we have to discretize the problem somehow. In FE problems – similar to FD – the functional values are known at a discrete set of points. ... regular grid ... ... irregular grid ... Domain D The key idea in FE analysis is to approximate all functions in terms of basis functions j, so that i N i i c u u j     1 ~
  • 5. Finite element method 5 Basis function where N is the number nodes in our physical domain and ci are real constants. With an appropriate choice of basis functions ji, the coefficients ci are equivalent to the actual function values at node point i. This – of course – means, that ji=1 at node i and 0 at all other nodes ... Doesn’t that ring a bell? Before we look at the basis functions, let us ... i N i i c u u j     1 ~
  • 6. Finite element method 6 Partial Integration ... partially integrate the left-hand-side of our equation ... dx fv dx uv      1 0 1 0   dx u v uv dx v u            1 0 1 0 1 0 ) ( we assume for now that the derivatives of u at the boundaries vanish so that for our particular problem dx u v dx v u          1 0 1 0 ) (
  • 7. Finite element method 7 … ... so that we arrive at ... ... with u being the unknown. This is also true for our approximate numerical system dx fv dx v u      1 0 1 0 ... where ... i N i i c u j    1 ~ was our choice of approximating u using basis functions. dx fv dx v u      1 0 1 0 ~
  • 8. Finite element method 8 Partial integration ... remember that v was an arbitrary real function ... if this is true for an arbitrary function it is also true if ... so any of the basis functions previously defined ... j v j  ... now let’s put everything together ... dx fv dx v u      1 0 1 0 ~
  • 9. Finite element method 9 The discrete system The ingredients: k v j  i N i i c u j    1 ~ dx fv dx v u      1 0 1 0 ~ dx f dx c k k n i i i j j j              1 0 1 0 1 ... leading to ...
  • 10. Finite element method 10 The discrete system dx f dx c k k i n i i j j j        1 0 1 0 1 ... the coefficients ck are constants so that for one particular function jk this system looks like ... k ik i g A b  ... probably not to your surprise this can be written in matrix form k i T ik g b A 
  • 11. Finite element method 11 The solution ... with the even less surprising solution   k T ik i g A b 1   remember that while the bi’s are really the coefficients of the basis functions these are the actual function values at node points i as well because of our particular choice of basis functions. This become clear further on ...
  • 12. Finite element method 12 Basis functions ... otherwise we are free to choose any function ... The simplest choice are of course linear functions: + grid nodes blue lines – basis functions ji 1 2 3 4 5 6 7 8 9 10 we are looking for functions ji with the following property        i j x x for x x for x j i i , 0 1 ) ( j
  • 13. Finite element method 13 Basis functions - gradient To assemble the stiffness matrix we need the gradient (red) of the basis functions (blue) 1 2 3 4 5 6 7 8 9 10
  • 14. Finite element method 14 Stiffness matrix Knowing the particular form of the basis functions we can now calculate the elements of matrix Aij and vector gi dx f dx c k k i n i i j j j        1 0 1 0 1 dx A k i ik     1 0 j j k ik i g A b  dx f g k k j   1 0 Note that ji are continuous functions defined in the interval [0,1], e.g.                         elsewhere x x x for x x x x x x x for x x x x x i i i i i i i i i i i 0 ) ( 1 1 1 1 1 1 j Let us – for now – assume a regular grid ... then
  • 15. Finite element method 15 Stiffness matrix –regular grid ... where we have used ...                          elsewhere x x x for x x x x x x x for x x x x x i i i i i i i i i i i 0 ) ( 1 1 1 1 1 1 j                  elsewhere dx x for dx x x dx for dx x x i 0 ~ 0 ~ 1 0 ~ 1 ~ ) ~ ( j 1 ~      i i i x x dx x x x dx xi ji
  • 16. Finite element method 16 Regular grid - gradient              elsewhere dx x for dx x dx for dx x i 0 ~ 0 / 1 0 ~ / 1 ) ~ ( j 1 ~      i i i x x dx x x x dx xi ji 1/dx -1/dx
  • 17. Finite element method 17 Stifness matrix - elements dx A k i ik     1 0 j j 1 2 3 4 5 6 7 8 9 10 ... we have to distinguish various cases ... e.g. ... dx dx dx dx dx dx dx dx A dx dx x x dx x x 1 1 1 1 0 2 1 1 1 0 1 1 11 1 1 1 1                  j j j j dx dx dx dx dx dx dx dx A dx dx dx x x x dx x 2 1 1 0 2 0 2 2 2 2 2 1 0 2 2 22 2 2 2 2                     j j j j j j
  • 18. Finite element method 18 Stiffness matrix dx A k i ik     1 0 j j 1 2 3 4 5 6 7 8 9 10 ... and ... dx dx dx dx dx dx dx dx A dx dx x x dx x x 1 1 1 1 0 2 2 1 1 0 2 1 12 1 1 1 1                   j j j j 12 21 A A  ... and ... ... so that finally the stiffness matrix looks like ...
  • 19. Finite element method 19 Stiffness matrix dx A k i ik     1 0 j j 1 2 3 4 5 6 7 8 9 10                        1 1 1 2 1 1 2 1 1 1 1  dx Aij ... so far we have ignored sources and boundary conditions ...
  • 20. Finite element method 20 Boundary conditions - sources ... let us start restating the problem ... ) ( ) ( x f x u    ... which we turned into the following formulation ... dx f dx c k k i n i i j j j        1 0 1 0 1 ... assuming ... i N i i c u j    1 ~ with b.c. N i N i i u u c u j j j ) 1 ( ) 0 ( ~ 1 1 2       where u(0) and u(1) are the values at the boundaries of the domain [0,1]. How is this incorporated into the algorithm?
  • 21. Finite element method 21 Boundary conditions ) ( ) ( x f x u    ... which we turned into the following formulation ... dx f dx c k k i n i i j j j        1 0 1 0 1 ... in pictorial form ... dx u dx u dx f dx c k n k k k i n i i                 1 0 1 0 1 1 0 1 0 1 2 ) 1 ( ) 0 ( j j j j j j j = boundary condition boundary condition source heterogeneity (f) ... the system feels the boundary conditions through the (modified) source term AT b = g
  • 22. Finite element method 22 Numerical Example ) ( ) ( x f x u    Domain: [0,1]; nx=100; dx=1/(nx-1);f(x)=d(1/2) Boundary conditions: u(0)=u(1)=0 f(nx/2)=1/dx; for it = 1:nit, uold=u; du=(csh(u,1)+csh(u,-1)); u=.5*( f*dx^2 + du ); u(1)=0; u(nx)=0; end Matlab FD code % source term s=(1:nx)*0;s(nx/2)=1.; % boundary left u_1 int{ nabla phi_1 nabla phij } u1=0; s(1) =0; % boundary right u_nx int{ nabla phi_nx nabla phij } unx=0; s(nx)=0; % assemble matrix Aij A=zeros(nx); for i=2:nx-1, for j=2:nx-1, if i==j, A(i,j)=2/dx; elseif j==i+1 A(i,j)=-1/dx; elseif j==i-1 A(i,j)=-1/dx; else A(i,j)=0; end end end fem(2:nx-1)=inv(A(2:nx-1,2:nx-1))*s(2:nx-1)'; fem(1)=u1; fem(nx)=unx; Matlab FEM code
  • 23. Finite element method 23 Regular grid ) ( ) ( x f x u    Domain: [0,1]; nx=100; dx=1/(nx-1);f(x)=d(1/2) Boundary conditions: u(0)=u(1)=0 Matlab FD code (red) Matlab FEM code (blue) 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.05 0.1 0.15 0.2 0.25 x u(x) FD (red) - FEM (blue)
  • 24. Finite element method 24 Regular grid - non zero b.c. ) ( ) ( x f x u    Domain: [0,1]; nx=100; dx=1/(nx-1);f(x)=d(1/2) Boundary conditions: u(0)=0.15 u(1)=0.05 Matlab FD code (red) Matlab FEM code (blue) 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 x u(x) FD (red) - FEM (blue) -> Regular grid % Quelle s=(1:nx)*0;s(nx/2)=1.; % Randwert links u_1 int{ nabla phi_1 nabla phij } u1=0.15; s(2) =u1/dx; % Randwert links u_nx int{ nabla phi_nx nabla phij } unx=0.05; s(nx-1)=unx/dx;
  • 25. Finite element method 25 Stiffness – irregular grid 1 2 3 4 5 6 7 8 9 10 dx A k i ik     1 0 j j 21 1 0 2 1 1 2 1 1 0 2 1 12 1 1 1 1 1 1 1 1 1 1 1 1 A h dx h dx h h dx dx A h h x x h x x                    j j j j i i ii h h A 1 1 1    i=1 2 3 4 5 6 7 + + + + + + + h1 h2 h3 h4 h5 h6
  • 26. Finite element method 26 Example ) ( ) ( x f x u    Domain: [0,1]; nx=100; dx=1/(nx-1);f(x)=d(1/2) Boundary conditions: u(0)=u0; u(1)=u1 for i=2:nx-1, for j=2:nx-1, if i==j, A(i,j)=1/h(i-1)+1/h(i); elseif i==j+1 A(i,j)=-1/h(i-1); elseif i+1==j A(i,j)=-1/h(i); else A(i,j)=0; end end end i=1 2 3 4 5 6 7 + + + + + + + h1 h2 h3 h4 h5 h6 Stiffness matrix A
  • 27. Finite element method 27 Irregular grid – non zero b.c. ) ( ) ( x f x u    Domain: [0,1]; nx=100; dx=1/(nx-1);f(x)=d(1/2) Boundary conditions: u(0)=0.15 u(1)=0.05 Matlab FD code (red) Matlab FEM code (blue) + FEM grid points 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 x u(x) FD (red) - FEM (blue) FEM on Chebyshev grid
  • 28. Finite element method 28 Summary In finite element analysis we approximate a function defined in a Domain D with a set of orthogonal basis functions with coefficients corresponding to the functional values at some node points. The solution for the values at the nodes for some partial differential equations can be obtained by solving a linear system of equations involving the inversion of (sometimes sparse) matrices. Boundary conditions are inherently satisfied with this formulation which is one of the advantages compared to finite differences.