Finite Element Method FEM Approaches There are two

  • Slides: 52
Download presentation
Finite Element Method

Finite Element Method

FEM Approaches There are two main methods that are applied to solving problems using

FEM Approaches There are two main methods that are applied to solving problems using the FEM method. Variational methods that use the classical Rayleigh-Ritz technique Galerkin’s methods which is one technique in a family of methods referred to as method of weighted residuals.

Variational Approach In solving problems arising in physics and engineering it is often possible

Variational Approach In solving problems arising in physics and engineering it is often possible to replace the problem of integrating a differential equation by the equivalent problem of seeking a function that gives a minimum value of some integral. Problems of this type are called variational problems. The methods that allow us to reduce the problem of integrating a differential equation to the equivalent variational problem are usually called variational methods.

Variational Approach What is a functional? functional subjected to the boundary conditions Goal: Find

Variational Approach What is a functional? functional subjected to the boundary conditions Goal: Find a function F(x, y, y’) for which the functional I(y) has an extremum (usually a minimum)

Variational Approach Some problems: NOT: Question: Are there situations in which the function F(x,

Variational Approach Some problems: NOT: Question: Are there situations in which the function F(x, y, y’) for which the functional I(y) in minimized is ALSO a solution to the PDE and BCs? ?

Variational Approach Question: Are there situations in which the function F(x, y, y’) for

Variational Approach Question: Are there situations in which the function F(x, y, y’) for which the functional I(y) in minimized is ALSO a solution to the PDE and BCs? ? Answer: Yes, all PDEs typically found in physics and engineering have functionals or variational equations whose solution is equivalent to solving the PDE directly.

Variational Approach Answer: Yes, all PDEs typically found in physics and engineering have functionals

Variational Approach Answer: Yes, all PDEs typically found in physics and engineering have functionals or variational equations whose solution is equivalent to solving the PDE directly. Deriving those equations can be done using the calculus of variations (beyond the scope of this class).

Variational Approach Name of equations Homogeneous wave equation with sources Homogeneous wave equation without

Variational Approach Name of equations Homogeneous wave equation with sources Homogeneous wave equation without sources Diffusion equation Homogenous Poisson’s equation Homogenous Laplace’s equation PDE Variational principle

Finite Element Method The finite element method (FEM) has its origin in the field

Finite Element Method The finite element method (FEM) has its origin in the field of structural analysis. However, since then the method has been employed in nearly all areas of computational physics and engineering. The FEM method, while more difficult to program than either the finite difference (FD) or method of moments (MOM), is a more powerful and versatile numerical technique for handling problems involving complex geometries and inhomogeneous media.

Basic concept Although the behaviour may be complex when viewed over a large region,

Basic concept Although the behaviour may be complex when viewed over a large region, a simple approximation may suffice over a small subregion. The region is divided up into finite elements. (usually, triangles or squares, but can be more complicated) Regardless of the shape the field is approximated by a different expression over each element, maintaining continuity at adjoining elements.

Solution Strategy: Variational Approach The equations to be solved are usually stated not in

Solution Strategy: Variational Approach The equations to be solved are usually stated not in terms of field the variables but in terms of an integral-type functional such as energy. The functional is chosen such that the field solution makes the functional stationary The total functional is the sum of the integral over each element

Finite Element Method The finite element method (FEM) involves basically four steps: (1) Discretize

Finite Element Method The finite element method (FEM) involves basically four steps: (1) Discretize the solution region into a finite number of subregions or elements (2) Derive the governing equations for each element based on either a variational approach or Galerkin’s method (3) Assemble all the elements together in the solution space. (4) Solve the resulting system of equations

Finite Element Method CREATING THE MESH (1) Discretize the solution region into a finite

Finite Element Method CREATING THE MESH (1) Discretize the solution region into a finite number of subregions or elements

Finite Element Method in 2 D CREATING THE MESH (1) Discretize the solution region

Finite Element Method in 2 D CREATING THE MESH (1) Discretize the solution region into a finite number of subregions or elements • divide the geometry into elements (in 2 D triangular elements are common) • each element has a number of nodes attached. In this figure there are 8 elements (E 1 -E 8) and 9 nodes (N 1 -N 9)

Finite Element Method The mesh is often described using two tables (element table and

Finite Element Method The mesh is often described using two tables (element table and a node table) Element Table Element# Node 1 1 4 2 4 3 8. . . 8 2 Node Table Node# x 1 0 2 0. 5 3 1. . . 9 1 Node 2 7 8 9 6 y 1 1 1 0 Node 3 8 5 5 3

2 D FEM: Right Triangular Single Element The simplest element is the right triangle

2 D FEM: Right Triangular Single Element The simplest element is the right triangle (0, 1, 2) The potential can be calculated as y 2 x h 1 0 Then: h a, b, c unknown ! Smart to specify the interpolation at the vertices!

Other elements Square element: consider as two triangles. This is ok, but does not

Other elements Square element: consider as two triangles. This is ok, but does not lead to a smooth interpolation over the square. Better to use a higher order interpolation that uses four nodal values This scheme leads to: 6 7 3 2 0 1 4 5 8

Element expansion In general we wish to approximate the unknown function, (x, y), Inside

Element expansion In general we wish to approximate the unknown function, (x, y), Inside an element by an interpolation of its values at the vertices. Number of vertices unknown anywhere within the element Provided the values at the vertices are known element shape functions or basis functions. In FEM these are usually interpolation functions

Generalized Triangular Develop the Governing Equations for a Single Element y Ve 3 (x

Generalized Triangular Develop the Governing Equations for a Single Element y Ve 3 (x 3, y 3) Assume the unknown variable (V), in each element can be found as a linear interpolation of its value at the three nodes. FIND a, b and c 3 Ve(x, y) 2 Ve 2 (x 2, y 2) 1 Ve 1 (x 1, y 1) x

Finite Element Method Develop the Governing Equations for a Single Triangular Element y Ve

Finite Element Method Develop the Governing Equations for a Single Triangular Element y Ve 3 (x 3, y 3) 3 Ve(x, y) Solve for the unknowns (a, b and c) and then substituting that result into 2 Ve 2 (x 2, y 2) 1 Ve 1 (x 1, y 1) x

Finite Element Method y Ve 3 (x 3, y 3) 3 where Ve(x, y)

Finite Element Method y Ve 3 (x 3, y 3) 3 where Ve(x, y) 2 Ve 2 (x 2, y 2) 1 Ve 1 (x 1, y 1) x Shape or basis functions (only function of geometry)

Finite Element Method y Ve 3 (x 3, y 3) 3 Ve(x, y) 2

Finite Element Method y Ve 3 (x 3, y 3) 3 Ve(x, y) 2 Ve 2 (x 2, y 2) 1 Ve 1 (x 1, y 1) Properties of the shape functions x

2 D Example: Laplace’s Equation When the quantity being sought (here the electrostatic potential

2 D Example: Laplace’s Equation When the quantity being sought (here the electrostatic potential V) Recall: The true potential is known to minimize the electrostatic field energy.

Create the Mesh Step #1: Discretize the surface/volume to be solved into small finite

Create the Mesh Step #1: Discretize the surface/volume to be solved into small finite elements. Label each element and its associated nodes 1 2 3 2 1 4 3

Basic concept: Review Step #2: Approximate the complex solution within the whole region in

Basic concept: Review Step #2: Approximate the complex solution within the whole region in terms of a sum of solutions found within each element 1 2 3 2 1 4 3

FEM Laplace’s Equation Approximate the solution within each element in terms of each value

FEM Laplace’s Equation Approximate the solution within each element in terms of each value at the corresponding nodes. (i. e. interpolation) (x 1, y 1) (x 3, y 3) Element (x 2, y 2)

Finite Element Method To derive an equation for each element we plug in our

Finite Element Method To derive an equation for each element we plug in our linear approximation into an functional expression. y Ve 3 (x 3, y 3) 3 Ve(x, y) 2 Ve 2 (x 2, y 2) 1 Ve 1 (x 1, y 1) x

Finite Element Method To derive an equation for each element we plug in our

Finite Element Method To derive an equation for each element we plug in our linear approximation into an functional expression. y Ve 3 (x 3, y 3) 3 Ve(x, y) 2 Ve 2 (x 2, y 2) 1 Ve 1 (x 1, y 1) x

Finite Element Method Example: Laplace’s Equation y Ve 3 (x 3, y 3) 3

Finite Element Method Example: Laplace’s Equation y Ve 3 (x 3, y 3) 3 Ve(x, y) 2 Ve 2 (x 2, y 2) 1 Let Ve 1 (x 1, y 1) x element coefficient matrix where and

Finite Element Method Example: Laplace’s Equation Solution for triangular elements y Ve 3 (x

Finite Element Method Example: Laplace’s Equation Solution for triangular elements y Ve 3 (x 3, y 3) 3 Ve( x, y) 1 Ve 2 2 (x 2, y 2) Ve 1 (x 1, y 1) x

Finite Element Method y Ve 3 (x 3, y 3) 3 Main property of

Finite Element Method y Ve 3 (x 3, y 3) 3 Main property of the coefficient matrix: Ve(x, y) 2 Ve 2 (x 2, y 2) 1 Ve 1 (x 1, y 1) x

Finite Element Method Assembling of All Elements Together Solve for the unknowns (a, b

Finite Element Method Assembling of All Elements Together Solve for the unknowns (a, b and c) and then substituting that result into where and Global coefficient matrix

Finite Element Method Assembling of All Elements Together 2 4 E 1 1 -4

Finite Element Method Assembling of All Elements Together 2 4 E 1 1 -4 -2 (1 -2 -3) Coefficients are only non-zero for elements that touch each other 1 E 2 1 -3 -4 (1 -2 -3) 5 E 3 3 -5 -4 (1 -2 -3) 3

Finite Element Method Setting up and solving the resulting equations The solution for the

Finite Element Method Setting up and solving the resulting equations The solution for the node values is the ones that result in the functional obtaining its minimum value!

Finite Element Method Setting up and solving the resulting equations Example for five nodes:

Finite Element Method Setting up and solving the resulting equations Example for five nodes:

Finite Element Method Setting up and solving the resulting equations Example for five nodes:

Finite Element Method Setting up and solving the resulting equations Example for five nodes: In general:

Iterative solution method At node k in a mesh with n nodes, we have

Iterative solution method At node k in a mesh with n nodes, we have the solution e. g. see previous slide We note that Cki = 0 if node k is not directly connected to node i, only nodes that are directly connected to node k contribute to Vk. We apply this iteratively to all free nodes (not at fixed boundary value) where the potential is unknown. Initially we assign either 0, random or some average value to each free node and then iterate on the above equation until convergence is met.

Finite Element Method Example: Poisson’s Equations for single element:

Finite Element Method Example: Poisson’s Equations for single element:

Finite Element Method Example: Poisson’s Equations for single element: where and

Finite Element Method Example: Poisson’s Equations for single element: where and

Finite Element Method Example: Poisson’s Equations for single element: Solution for triangular elements

Finite Element Method Example: Poisson’s Equations for single element: Solution for triangular elements

Finite Element Method Example: Poisson’s Equation Put all the elements together: Construct matrix and

Finite Element Method Example: Poisson’s Equation Put all the elements together: Construct matrix and then solve:

Finite Element Method Example: Poisson’s Equation Example: Result in: In General:

Finite Element Method Example: Poisson’s Equation Example: Result in: In General:

Finite Element Method Example: Homogenous Wave Equations for single element:

Finite Element Method Example: Homogenous Wave Equations for single element:

Finite Element Method Example: Wave Equations for single element: where and

Finite Element Method Example: Wave Equations for single element: where and

Finite Element Method Example: Wave Equation with no sources Equations for single element: where

Finite Element Method Example: Wave Equation with no sources Equations for single element: where and

Finite Element Method Example: Wave Equation Put all the elements together:

Finite Element Method Example: Wave Equation Put all the elements together:

Finite Element Method: Waveguide TM Modes TE Modes where and y x z

Finite Element Method: Waveguide TM Modes TE Modes where and y x z

Finite Element Method: Waveguide TM Modes Put all the elements together: Band Matrix Solution:

Finite Element Method: Waveguide TM Modes Put all the elements together: Band Matrix Solution: Break the matrices up into sub-matrices that distinguishes free-nodes from those that are known or prescribed nodes (i. e. boundary values):

Finite Element Method: Waveguide TM Modes Minimize the functional:

Finite Element Method: Waveguide TM Modes Minimize the functional:

Finite Element Method: Waveguide TM Modes For TM modes: since tangential E field must

Finite Element Method: Waveguide TM Modes For TM modes: since tangential E field must vanish on PEC boundary

Finite Element Method: Waveguide TM Modes Pre-multiply both sides by Where:

Finite Element Method: Waveguide TM Modes Pre-multiply both sides by Where:

Finite Element Method Project #2: Write a FEM program that calculates the mode shapes

Finite Element Method Project #2: Write a FEM program that calculates the mode shapes and cutoff frequencies of the TM modes for the air filled ridge waveguide shown below. PEC Walls t h w d w