Presentation is loading. Please wait.

Presentation is loading. Please wait.

Finite Element Method Sauro Succi (Non-spherical cows…)

Similar presentations


Presentation on theme: "Finite Element Method Sauro Succi (Non-spherical cows…)"— Presentation transcript:

1 Finite Element Method Sauro Succi (Non-spherical cows…)

2 Finite Elements The main of FEM is to handle real-life geometries of virtually arbitrary complexity (non spherical cows) FEM achieves this task in a mathematically most elegant and systematic way.Rooted in functional analysis: very abstract but it lands down on very practical implementation strategies with the major comfort of rigorous convergence theorems.

3 FEM for any geometry Most powrful instance: Coordinate free (unstructured) Arbitrary shape and connectivity

4 FEM Theory: Functional Analysis * Hilbert space expansions * Strong vs Weak Convergence

5 Expansion on basis functions KNOWN set of basis functions UNKNOWN coefficients of the expansion The basis functions form a (complete) set in Hilbert space, the functional analogue of R^N vector space. Ordinary d=3 unit vectors: i=(1,0,0); j=(0,1,0), k=(0,0,1).

6 Examples basis functions Fourier: (periodic geometry) Note that the basis functions are spatially extended Hermite: (harmonic oscillator) Laguerre: (radial symmetry)

7 What’s the point? Convergence: By sending N to infinity ANY function in the proper Hilbert space should be approximated to arbitrary accuracy: Example: Hilbert Lp: Note that this is GLOBAL statement, less demanding than LOCAL ones: WEAK convergence

8 Pointwise (strong) formulation Local interpolation around x=x_j: Based on global polynomials Awkward on unstructured lattices

9 FEM: Practice How do we compute the unknown coeff’s? * Projetion methods Define the scalar (inner) product in Hilbert space as: Where w(x) is a suitable weight to secure finiteness Mass matrix

10 Co-evolutionary ODE’s Liouville equation: Hilbert-Expand: Hilbert Project: Take scalar product with each phi_1 … phi_N: CO-evolution matrix ODE’s problem: Mass matrix Liouville matrix

11 Co-evolutionary ODE’s Suppose the basis set is ortho-normal, i.e. Then the mass matrix is the identity and each coefficient evolves on its own: The “ray” f=(f1,f2 … fN) moves in time within N-dimensional Hilberts Space spanned by phi_1 … phi_N. By making Hilbert infinite-dimensional, the exact solution is recovered. This is systematic and supported by rigorous convergence theorems. All basis functions mentioned earlier on can be made ortho-normal.

12 Practical concern All is well in theory, but practice often tells another story: By increasing N, orthogonality depends more and more on subtle cancellations, because the basis functions are global hence their overlap integral (mass matrix) cannot be zero unless these functions oscillate in space. This is very unhealthy from the numerical standpoint: leads to ill-fated long term solutions

13 FEM take stage! FEM’s are COMPACT basis functions: they are non-zero only within a finite set (whence the nomer) and strictly zero elsewhere: Piecewise linear elements (“hat functions”) Usually denoted e_j(x):

14 Piecewise Constant (pwc) Pretty low-order, not useful unless discontinuities are physical (shocks) Characteristic function

15 Piecewise linear, C1 class: Continuous with discontinuous derivatives Piecewise Linear (pwl) Higher order (quadratic, cubic and so on) are also used, esp With PDE’s with space derivatives above second order

16 Expansion on local basis functions Basis function (known): Coeff’s: (UNknown):

17 Expansion on local basis function Projection on Hilbert space Note that the mass matrix is NOT diagonal, a price to pay to locality: the finite elements overlap with neighbors The Liouville matrix cannot be diagonal as it contains space derivatives derivatives

18 Finite-support basis function Note that the support extends over TWO lattice spacings (generally non uniform)

19 Useful identities Polynomials of order 2+ are not exactly representable by linear elements:

20 Variational (weak) formulation Hilbert space L2: global statement Operational: for a sequence g_k, find f_N such that: Exact: Orthogonality in N-dim Hilbert space

21 Examples of matrices: Mass, Stiffness, Advection. using linear hat functions

22 FEM operators

23 Mass matrix Uniform mesh: Algebra on the blackboard..

24 Advection matrix Same as uniform mesh:

25 Diffusion matrix Uniform mesh:

26

27 Mass matrix: mollifier Define: F_j is a coarse-grained quantity: smoother

28 FEM vs FD operators

29 1.Form the Local Matrices (Numerical Quadrature) 2. Assemble the Global Matrices (Local to Global Mapping) 3. Time Marching M*df/dt=Lf by a suitable time-marching method 4. Solve the matrix algebra problem A*f(t+dt)=B*f(t) FEM code structure

30 Matrix assembly Element-wise

31 Matrix assembly: 1d 4 matrix elements per interval; 2 intervals per node= 8 matrix elements/node

32 Local to Global Mapping In d=1 it is trivial: In d>1 a bit more laborious but still simple if the FEM are Cartesian: With unstructured meshes, no global coordinate system is available. Numbering is a task intself. More on the next lecture. 1 21 2

33 Time marching Index free notation: f is an array of size N: Explicit Euler: Even the explicit marching implies a matrix problem!!! (not nice) Crank-Nicolson:

34 Matrix Problem Index free notation: f is an array of size N: 1. Direct Methods (Gauss Elimination) Two major families: Exact (within roundoff) but expensive O(N^3). Highly sensitive to optimal numbering 2. Iterative Methods Approximate, but they involve no linear algebra other Than matrix-vector multiply, hence they take full advantage of matrix sparsity. Usually much faster, unless the matrix is very “nasty” (advection dominated). Generally recommended in d>2.

35 FEM for nonlinear eqs Burgers (again!) Nonlinearity brings in higher rank matrices (mode coupling) Thanks to compactness, the coupling remains local: k and l cannot be more than one spacing apart from j!

36 Self-advection matrix: triad Uniform mesh: Three-body coupling

37 Self-advection: j=k=l

38 Self-advection: j=k,k+1

39 Self-advection: j,k=j+1,l=k+1

40 FEM for high order PDEs Kuramoto-Sivashinsky (paradigm of chaotic PDE’s) Hat functions return ZERO: cubic elements mandatory!

41 Boundary Conditions 1.Periodic 2.Dirichlet 3.Neumann They are implemented at the level of the matrix and/or The right hand side, see examples

42 Periodic BC a10 aN,N+1 a10

43 Dirichlet

44 Von-Neumann

45 Assignements 1.Solve the one-dimensional Poisson equation using hat FEM (Dirichlet BC) 2.Same for ADR (Periodic BC) 3.Same for Burgers

46 End of Lecture

47 Expansion on basis functions Operators to Matrices


Download ppt "Finite Element Method Sauro Succi (Non-spherical cows…)"

Similar presentations


Ads by Google