FEM 1D Feb11 2013 - New Mexico Tech Earth and ... · FEM Mesh of Baseball and Bat ......

19
2/13/13 1 FEM Method We will explore: 1D linear & higher order elements 2D triangular & rectangular elements Powerful method developed originally to solve structural mechanics problems (e.g. bridges, buildings, etc..) Can be applied to flow, solute, and heat transport problems FEM Method Has underlying theoreJcal basis in branch of mathemaJcs called calculus of variaJon Within each element, the unknown variable is approximated using polynomials that depend only on the spaJal coordinates (i.e. h = a + bx + cy +...). The verJces of the elements are referred to as nodes . Originally developed for solid mechanics problems Tri FEM Mesh of Baseball and Bat FEM Mesh of Dam Triangular Element

Transcript of FEM 1D Feb11 2013 - New Mexico Tech Earth and ... · FEM Mesh of Baseball and Bat ......

Page 1: FEM 1D Feb11 2013 - New Mexico Tech Earth and ... · FEM Mesh of Baseball and Bat ... (see$Feynman’s$lecture$notes)$ x(t) η(t) x(t) ... FEM_1D_Feb11_2013.ppt Author: Mark Person

2/13/13

1

FEM  Method  

We  will  explore:  

1-­‐D  linear  &  higher  order  elements  2-­‐D    triangular  &  rectangular  elements  

Powerful  method  developed  originally  to  solve  structural  mechanics  problems  (e.g.  bridges,  buildings,  etc..)  

Can  be  applied  to  flow,  solute,  and  heat  transport  problems  

FEM  Method  •  Has  underlying  theoreJcal  basis  in    branch  of  mathemaJcs  called  calculus  of  variaJon  

•  Within  each  element,  the  unknown  variable  is  approximated  using  polynomials  that  depend  only  on  the  spaJal  coordinates  (i.e.  h  =  a  +  bx  +  cy  +...).    The  verJces  of  the  elements  are  referred  to  as  nodes.    

•  Originally  developed  for  solid  mechanics  problems     Tri  

FEM Mesh of Baseball and Bat

FEM Mesh of Dam

Triangular Element

Page 2: FEM 1D Feb11 2013 - New Mexico Tech Earth and ... · FEM Mesh of Baseball and Bat ... (see$Feynman’s$lecture$notes)$ x(t) η(t) x(t) ... FEM_1D_Feb11_2013.ppt Author: Mark Person

2/13/13

2

Finite  Element  Method  &  Calculus  of  VariaJons  

•  Involves  minimizing  residual  errors  using  integraJon  •  Conceptually  similar  to  the  cannon  ball  trajectory  problem  solved  using  the  calculus  of  

variaJons  method  (see  Feynman’s  lecture  notes)  

x(t)

η(t) x(t)

η(t)

-  one possible path -  true path -  deviation

feynman_vc.pdf True path is the path of minimum energy!

•  FD  method  using  Taylor’s  Series  Expansion  

•  FE  method  uses  IntegraJon  by  Parts    

Example:

Solve the following Integral. The integrand is the product of two functions

Page 3: FEM 1D Feb11 2013 - New Mexico Tech Earth and ... · FEM Mesh of Baseball and Bat ... (see$Feynman’s$lecture$notes)$ x(t) η(t) x(t) ... FEM_1D_Feb11_2013.ppt Author: Mark Person

2/13/13

3

Steps  in  FEM  Method,  1D  Example  

•  Formulate  Diff.  Eq.  

T  –  transmisivity  (m2/day)  H  –  head  (m)  Q  –  recharge  (m/day)  

h(0,t)  =  specified  head  q(L,t)  =  specifed  flux  

•  DiscreJze  SoluJon  Domain  

•  Define  Local  Coordinate  System  

L

Steps  in  FEM  Method,  1D  Example  

•  Construct  (linear)  Trial  SoluJon  for  each  element  

φ  -­‐  Shape  funcJons    

Page 4: FEM 1D Feb11 2013 - New Mexico Tech Earth and ... · FEM Mesh of Baseball and Bat ... (see$Feynman’s$lecture$notes)$ x(t) η(t) x(t) ... FEM_1D_Feb11_2013.ppt Author: Mark Person

2/13/13

4

Steps  in  FEM  Method,  1D  Example  

•  Construct  (linear)  Trial  SoluJon  for  each  element  

φ  -­‐  Shape  funcJons    

Shape  FuncJon  ProperJes  

•  Linear  variaJon  across  element  from  0  to  1  

•  DerivaJves  of  linear  shape  funcJons    are  constant  

Page 5: FEM 1D Feb11 2013 - New Mexico Tech Earth and ... · FEM Mesh of Baseball and Bat ... (see$Feynman’s$lecture$notes)$ x(t) η(t) x(t) ... FEM_1D_Feb11_2013.ppt Author: Mark Person

2/13/13

5

1D-­‐FEM  

•  SubsJtute  Trial  SoluJon  into  Diff.  Eq.  

•  MulJply  trial  soluJon  by  a  weighJng  funcJon  and  require  the  weighted  residual  errors  integrate  to  zero  across  the  element  

v  –  weighJng  FuncJon  

1D-­‐FEM  Steps  

•  Use  IntegraJon  by  parts  to  “lower  the  order  of    the  PDE”  

•  SubsJtute  Trial  SoluJon  and  weighJng  funcJon  into  “weak  form  of  PDE”  

v  –  weighJng  FuncJon  

0

Page 6: FEM 1D Feb11 2013 - New Mexico Tech Earth and ... · FEM Mesh of Baseball and Bat ... (see$Feynman’s$lecture$notes)$ x(t) η(t) x(t) ... FEM_1D_Feb11_2013.ppt Author: Mark Person

2/13/13

6

1D-­‐FEM  Steps  

•  This  results  in  a  system  of  algebraic  EquaJons  

1D-­‐FEM  Steps  

•  Evaluate  Integrals:  m=1,  n=1  

•  Evaluate  Integrals:  m=2,  n=1  

Page 7: FEM 1D Feb11 2013 - New Mexico Tech Earth and ... · FEM Mesh of Baseball and Bat ... (see$Feynman’s$lecture$notes)$ x(t) η(t) x(t) ... FEM_1D_Feb11_2013.ppt Author: Mark Person

2/13/13

7

ProperJes  of  Shape  FuncJons:  

This is true for any point along the element (i.e. )

ProperJes  of  Shape  FuncJons:  

1D-FEM

Page 8: FEM 1D Feb11 2013 - New Mexico Tech Earth and ... · FEM Mesh of Baseball and Bat ... (see$Feynman’s$lecture$notes)$ x(t) η(t) x(t) ... FEM_1D_Feb11_2013.ppt Author: Mark Person

2/13/13

8

FEM-­‐1D  Steps  

Assemble Global Matrix:

Steps  1D  FEM  

•  Impose  specified  Head  Boundary  CondiJon  @  x=0  

•  Impose  specified  Flux  Boundary  CondiJon  @  x=L  

Generalized Tridiagonal Matrix….look familiar??

Page 9: FEM 1D Feb11 2013 - New Mexico Tech Earth and ... · FEM Mesh of Baseball and Bat ... (see$Feynman’s$lecture$notes)$ x(t) η(t) x(t) ... FEM_1D_Feb11_2013.ppt Author: Mark Person

2/13/13

9

1D  FEM  Steps  

•  Let:  

•  Global  Matrix  Becomes:    

•  SoluJon  (Gaussian  EliminaJon):  

AnalyJcal  SoluJon  Comparison  

Unlike the finite difference method, the finite element method provides us with an estimate of the hydraulic heads everywhere within the solution domain.

Page 10: FEM 1D Feb11 2013 - New Mexico Tech Earth and ... · FEM Mesh of Baseball and Bat ... (see$Feynman’s$lecture$notes)$ x(t) η(t) x(t) ... FEM_1D_Feb11_2013.ppt Author: Mark Person

2/13/13

10

DeterminaJon  of  Elemental  Fluxes  

FEM:

Analytical:

Higher  Order  Elements  

x=0 x=Δx/2 x=Δx

h1 h2 h3

Page 11: FEM 1D Feb11 2013 - New Mexico Tech Earth and ... · FEM Mesh of Baseball and Bat ... (see$Feynman’s$lecture$notes)$ x(t) η(t) x(t) ... FEM_1D_Feb11_2013.ppt Author: Mark Person

2/13/13

11

Lagrange  Family  of  Shape  FuncJons  

Example 1: N=2 (linear element)

Example 2: N=3 (quadatric element)

Lagrange Family Shape Functions: Quadratic Elements

Properties of Lagrange Shape Functions

Page 12: FEM 1D Feb11 2013 - New Mexico Tech Earth and ... · FEM Mesh of Baseball and Bat ... (see$Feynman’s$lecture$notes)$ x(t) η(t) x(t) ... FEM_1D_Feb11_2013.ppt Author: Mark Person

2/13/13

12

DerivaJves  of  Shape  FuncJons  

1D-­‐FEM-­‐QuadraJc  

•  SubsJtute  Trial  SoluJon  into  Diff.  Eq.  

•  MulJply  trial  soluJon  by  a  weighJng  funcJon  and  require  the  weighted  residual  errors  integrate  to  zero  across  the  element  

v  –  weighJng  FuncJon  

Page 13: FEM 1D Feb11 2013 - New Mexico Tech Earth and ... · FEM Mesh of Baseball and Bat ... (see$Feynman’s$lecture$notes)$ x(t) η(t) x(t) ... FEM_1D_Feb11_2013.ppt Author: Mark Person

2/13/13

13

1D-­‐FEM  QuadraJc  Steps  

•  This  results  in  a  system  of  algebraic  EquaJons  

Evaluate  QuadraJc  Amn  •  Evaluate  Integrals:  m=1,  n=1  

•  Evaluate  Integrals:  m=2,  n=1  

You can do the rest….

Page 14: FEM 1D Feb11 2013 - New Mexico Tech Earth and ... · FEM Mesh of Baseball and Bat ... (see$Feynman’s$lecture$notes)$ x(t) η(t) x(t) ... FEM_1D_Feb11_2013.ppt Author: Mark Person

2/13/13

14

Load  Vector  

You can do B3

Final  Amn  Matrix  

Final  Bm  Vector  

Quad. Element Linear Element

Page 15: FEM 1D Feb11 2013 - New Mexico Tech Earth and ... · FEM Mesh of Baseball and Bat ... (see$Feynman’s$lecture$notes)$ x(t) η(t) x(t) ... FEM_1D_Feb11_2013.ppt Author: Mark Person

2/13/13

15

Assemble  Global  Matrix  

Note Amn Matrix is no longer tridiagonal

Solve  System  of  EquaJons  Let: T(element-1) = 3 T(element-2) = 3 Δx = 1 qo = 1 ho = 0 Q(element-1) = 6 Q(element-2) = 6

h1 = 0 h2 = 1.91 h3 = 3.333 h4 = 4.25 h5 = 4.667

Page 16: FEM 1D Feb11 2013 - New Mexico Tech Earth and ... · FEM Mesh of Baseball and Bat ... (see$Feynman’s$lecture$notes)$ x(t) η(t) x(t) ... FEM_1D_Feb11_2013.ppt Author: Mark Person

2/13/13

16

Solve  System  of  EquaJons  

(use local coordinate system For elemental flux calc. (0<x<Δx)

Transient  FEM  Problems  

The finite element solution to this time dependent problem is very similar to the approach taken to solve Poisson's Equation. We use the same trial solutions:

Page 17: FEM 1D Feb11 2013 - New Mexico Tech Earth and ... · FEM Mesh of Baseball and Bat ... (see$Feynman’s$lecture$notes)$ x(t) η(t) x(t) ... FEM_1D_Feb11_2013.ppt Author: Mark Person

2/13/13

17

Transient  FEM  Problems  

Since hn is not a function of “t”, we get the following integrand For the time dependent derivative:

Transient  FEM  Problems  

So our governing equation can be recast in matrix form as:

Recall we already know what Amn is

So now we need to solve for Pmn:

Page 18: FEM 1D Feb11 2013 - New Mexico Tech Earth and ... · FEM Mesh of Baseball and Bat ... (see$Feynman’s$lecture$notes)$ x(t) η(t) x(t) ... FEM_1D_Feb11_2013.ppt Author: Mark Person

2/13/13

18

Transient  FEM  Problems  Evaluate the matrix:

Transient  FEM  Problems  Evaluate the matrix:

Recall:

Putting it all Together:

Page 19: FEM 1D Feb11 2013 - New Mexico Tech Earth and ... · FEM Mesh of Baseball and Bat ... (see$Feynman’s$lecture$notes)$ x(t) η(t) x(t) ... FEM_1D_Feb11_2013.ppt Author: Mark Person

2/13/13

19

Fully  Implicit  FormulaJon  

Writing out the equations for element 1, nodes “1” and “2”: