Anda di halaman 1dari 25

7/21/2017

Instructor
Dr. Raymond Rumpf
(915) 747‐6958
rcrumpf@utep.edu

EE 5337
Computational Electromagnetics (CEM)

Lecture #26

Introduction to 
Variational Methods
 These notes may contain copyrighted material obtained under fair use rules.  Distribution of these materials is strictly prohibited  
Lecture 26 Slide 1

Outline
• Overview
• Galerkin Method
• Example
• Finite Element Method
• Method of Moments
• Other Worthy Methods
– Boundary element method
– Spectral domain method

Lecture 26 Slide 2

1
7/21/2017

Overview

Lecture 26 Slide 3

Classification of Variational Methods
Finite Element Method Boundary Element Method
• Utilizes a volume mesh • Utilizes a conformal surface mesh
• Matrices are sparse • Matrices are full
• Requires boundary conditions • Good for devices described efficiently 
by their surfaces
• Does not require boundary conditions

Method of Moments Spectral Domain Method
• Typically makes a PEC approximation • BEM/MoM in Fourier‐Space
• Utilizes a conformal surface mesh • Matrices are full
• Can be 1D for thin wire structures • Excellent for periodic structures
• Matrices are full • Does not require boundary conditions
• Good for devices described efficiently 
by their surfaces
• Does not require boundary conditions

Lecture 26 Slide 4

2
7/21/2017

Discretization

Variational Method

Governing Equation Matrix Equation

Weighted Residual 
Method

Both the variational method and the method of weighted residuals can be used 
to write a governing equation in matrix form.

Both approaches yield exactly the same matrices.

The Galerkin method is the most popular special case of weighted residual 
methods.
Lecture 26 Slide 5

Galerkin Method

Boris Grigoryevich Galerkin
1871 ‐ 1945

Lecture 26 Slide 6

3
7/21/2017

Linear Equations
Consider the following linear homogeneous equation.

L  f  x    g  x  L   Linear operation
f  x   unknown solution
g  x   known driving function

The linear operator L[] has the following properties

L  f1  x   f 2  x    L  f1  x    L  f 2  x  
L  af  x    aL  f  x  

L1  L2  f  x     L2  L1  f  x   
   
Lecture 26 Slide 7

Inner Product
An inner product is a scalar quantity that provides a measure of 
similarity between two functions.
f  x  , g  x   inner product between f  x  and g  x 
f,g 0 f and g are orthogonal It is common to scale functions such that
f , g  small number f and g are very different f , f * 1
f , g  big number f and g are very similar

An appropriate inner product must satisfy
f , g  g, f

 f   g, h   f , h   g, h
 0 f 0
f, f* 
 0 f 0

We will use the following inner product: f  z  , g  z    f  z  g  z  dz
z
Lecture 26 Slide 8

4
7/21/2017

Expansion Into a Set of Basis Functions
Let f(x) be expanded into a set of basis functions.
f  x   unknown function
f  x    an vn  x  an  coefficient of n th basis function
n
vn  x   n th basis function

Subdomain Basis Functions Entire Domain Basis Functions

We choose the basis functions with two considerations: (1) ease of calculations, and 
(2) minimize how many are needed in the expansion to accurately portray the field.
Lecture 26 Slide 9

Linear Equation in Terms of Basis Functions
First we substitute the expansion into the original linear equation.

f  x    an vn  x 
n
L  f  x    g  x 

Using the properties of linear operations, we get

L  f  x    g  x  We try to choose vn(x) so that 
L[vn(x)] is easy to calculate and 
efficiently represents f(x).
 
L   an vn  x    g  x 
 n 
 L an vn  x   g  x   a L v  x   g  x 
n
n n
n

Lecture 26 Slide 10

5
7/21/2017

Method of Weighted Residuals (1 of 2)
Similar to how we choose a set of basis functions, we choose another 
set of weighting functions.

wn  x 

We start with our linear inhomogeneous equation and calculate the 
inner product with wm(x) of both sides.  Here we “test” both sides 
with wm(x).
 a L v  x   g  x 
n
n n

wm  x  ,  a L v  x 
n
n n  wm  x  , g  x 

an
n wm  x  , L vn  x    wm  x  , g  x 
Lecture 26 Slide 11

Method of Weighted Residuals (2 of 2)
This equation can be written in matrix form as

a n
n wm  x  , L vn  x    wm  x  , g  x    zmn  an    g m 

 w1 , L  v1  w1 , L  v2  
 
 w , L v  w2 , L  v2  
 zmn    2 1 
  

 wM , L  vN  

 a1   w1 , g 
a   
 w2 , g 
 n   1 
a   m   
g 
   
 aN   wM , g 
Lecture 26 Slide 12

6
7/21/2017

Galerkin Method
The Galerkin method is the method of weighted residuals, but the 
weighting functions are made to be the same as the basis functions.

wm  x   vm  x 

The matrix equation becomes

an
n vm  x  , L vn  x    vm  x  , g  x    zmn  an    g m 

 v1 , L  v1  v1 , L  v2    a1   v1 , g 
  a   
 v , L v  v2 , L  v2   v ,g
 zmn    2 1   an    1   g m    2 
      

 vM , L  v N  
  aN   vM , g 

Lecture 26 Slide 13

Summary of the Galerkin Method
The Galerkin method can be used to find the solution to any linear inhomogeneous 

L f   g
equation.

Step 1 – Expand the unknown function into a set of basis functions.
 
f   an vn L   an vn   g   a L v   g
n n
n  n  n

Step 2 – Test both sides of the equation with the basis functions using an inner 
product

vm ,  an L  vn   vm , g  a n vm , L  vn   vm , g
n n

Step 3 – Form a matrix equation
 zmn  an    g m 
 a1   v1 , g 
 v1 , L  v1  v1 , L  v2   a 
   
 an    1  v ,g
 zmn    v2 , L v1  v2 , L  v2    g m    2 
   
  
  aN   vM , g 
Lecture 26 Slide 14

7
7/21/2017

Example

Lecture 26 Slide 15

Governing Equation and Its Solution
Governing Equation
We will apply the Galerkin method to solve the following differential 
equation.
d2 f
 2
 1  4 x2 f  0   f 1  0 0  x 1
dx
Simple Analytical Solution
This is a simple boundary value problem with the following solution.

5x x2 x4
f  x   
6 2 3
We wish to solve this using the Galerkin method.

Lecture 26 Slide 16

8
7/21/2017

Choose Basis Functions
Basis Functions
For this problem, it will be convenient to choose as basis functions:
vn  x  x n 1

Expansion of the Function into the Basis
We expand our function into this set of basis functions as
N
f  x    an  x  x n 1 
n 1

Lecture 26 Slide 17

Choose Testing Functions
Testing Functions
The Galerkin method uses the same function for basis and testing.

wn  vn  x  x n 1

Lecture 26 Slide 18

9
7/21/2017

Form of Final Solution
Recall that we are converting a linear equation into a matrix equation 
according to

L f   g  zmn  an    g m 
 v1 , L  v1  v1 , L  v2  
 
 zmn    v2 , L v1  v2 , L  v2  
 
 
 a1   v1 , g 
a   
v ,g
 an    1   g m    2 
   
 aN   vM , g 

vm , L  vn 
To do this, we need to evaluate                 and           .
vm , g

Lecture 26 Slide 19

First Inner Product
vm , L  vn    vm L  vn  dx
mn
zmn  vm , L  vn  
x

 
 m  n  1
1 2
 x  x m 1
  dxd 2  x  x n1   dx
0  
1
    x  x m 1   n  n  1 x n 1  dx
0
1
 n  n  1   x n  x m n  dx
0
1
 x n 1 x m  n 1 
 n  n  1    
 n  1 m  n  1 0
 1 1 
 n  n  1   
 n  1 m  n  1 
 m  n 1 n 1 
 n  n  1    
  n  1 m  n  1  n  1 m  n  1 
 m 
 n  n  1   
  n  1  m  n  1 
mn

 m  n  1
Lecture 26 Slide 20

10
7/21/2017

Second Inner Product
vm , g   vm gdx
x
m  3m  8 
1
   x  x m1 1  4 x 2  dx
g m  vm , g 
0
2  m  2  m  4 
1
   x  4 x3  x m1  4 x m 3  dx
0
1
 x2 x m 2 4 x m 4 
   x4   
 2 m 2 m4 0
1 1 4
 1 
2 m2 m4
3 1 4
  
2 m2 m4
3  m  2  m  4  2  m  4 8  m  2
  
2  m  2  m  4  2  m  2  m  4  2  m  2  m  4 
3  m  2  m  4   2  m  4   8  m  2 

2  m  2  m  4 
3  m 2  6m  8  10m  24

2  m  2  m  4 
3m2  8m

2  m  2  m  4 
m  3m  8 

2  m  2  m  4 
Lecture 26 Slide 21

Try N=1
For N=1, our matrix equation isn’t even a matrix equation.
mn
 z11  a1    g1   z11a1  g1 zmn 
 m  n  1
Applying our equations for zmn and gm, we get m  3m  8 
gm 
1 1 1 2  m  2  m  4 
z11  
1  1  1 3
1 3 1  8  11
g1  
2 1  2 1  4  30

The coefficient is
g1 11 30 11
a1   
z11 13 10

Finally, the solution for N=1 is
11x 11x 2
f  x   a1  x  x 2    Not correct.  Need larger N.
10 10
Lecture 26 Slide 22

11
7/21/2017

Try N=2
For N=2, our matrix equation is zmn 
mn

 z11 z12   a1   g1   m  n  1
z      m  3m  8 
 21 z22   a2   g 2  gm 
2  m  2  m  4 
Applying our equations for zmn and gm, we get
1 1 1 1 2 1 2 1 1 22 4
z11   z   z   z22  
1  1  1 3 12 1  2  1 2 21  2  1  1 2  2  2  1 5
1 3 1  8  11 2 3  2  8 7
g1   g2  
2 1  2 1  4  30 2  2  2  2  4  12

The coefficients are
1 1 1
 a1   z11 z12   g1   13   30
11
  101 
a    z   72
2

 2   21 z22   g 2   12 4
5   12   3 

Finally, the solution for N=2 is
23 x x 2 2 x3
f  x   a1  x  x 2   a2  x  x3     Still not correct.  Need larger N.
30 10 3
Lecture 26 Slide 23

Try N=3
For N=3, are matrix equation is zmn 
mn
 m  n  1
 z11 z12 z13   a1   g1 
z     m  3m  8 
gm 
 21 z22 z23   a2    g 2  2  m  2  m  4 
 z31 z32 z33   a3   g 3 

Applying our equations for zmn and gm, we get
1
 13 12 53   a1   11 30   a1   13 1
2  3
5  11
30   12 
 1 4 1 a    7    1
2 5   2   12   a2    2
4
5 1  7  
 12    0 
 53 1 79   a3   70
51 
  a3   53 1 97   70
51 
  3 
1

Finally, the solution for N=3 is
5x x2 x4
f  x   a1  x  x 2   a2  x  x3   a3  x  x 4     Exact solution!
6 2 3

Lecture 26 Slide 24

12
7/21/2017

Try N=4
For N=4, we get a larger matrix equation, but it also converges to the 
exact solution.

In fact, the method converges to the exact solution for all N൒3.
N
5x x2 x4
f  x    an  x  x n 1     Exact solution
n 1 6 2 3

Lecture 26 Slide 25

Finite Element Method

Lecture 26 Slide 26

13
7/21/2017

What is a Finite Element?
Like the finite‐difference method, the finite element method (FEM) 
discretizes the problem space.  In FEM, it is divided into small regions 
called finite elements.
Most common

Node finite
element

Lecture 26 Slide 27

Meshing
Meshing describes the “intelligent” process of subdividing space into 
non‐overlapping finite elements.  Usually this is done to conform 
perfectly to the shapes of devices.

2

1

• FEM mesh conforms very well to curved geometries.
• Mesh can be locally refined to resolve small features or abruptly varying fields.
• Adaptive meshing – Refines the mesh based on a prior solution.
Lecture 26 Slide 28

14
7/21/2017

Adaptive Meshing
A model is performed using a coarse mesh.  The mesh is then refined 
where the field is varying rapidly and the model is run again.  This 
continues until convergence.

http://www.cradle‐cfd.com/product/tetrav7/tetra_pre.html

Lecture 26 Slide 29

FEM Vs. Finite‐Difference Grids
The finite element mesh offers minimal discretization error.

discretization error

Arbitrary Object Finite‐Difference Discretization Triangular Discretization


• Simpler to implement • More complex implementation
• Larger error • Smaller error

Lecture 26 Slide 30

15
7/21/2017

Node Elements Vs. Edge Elements
Node Elements
• Field is known and stored at the element nodes.
• Elsewhere, field is interpolated.
• Suffers from spurious solutions due to lack of 
enforcing divergence conditions.
• Matrices better conditioned.

Edge Elements
• Vector field is known at the edges of the elements.
• Elsewhere, field is interpolated.
• Solves the spurious solution problem because the 
divergence conditions are enforced through 
continuity of the tangential field components.
• Matrices have poorer conditioning.
Lecture 26 Slide 31

Shape Functions

The field within the elements is 
expanded into a set of basis 
functions that are called 
“shape” functions.  
3
E  x, y    ui N i  x, y 
i 1

For linear triangular elements, 
the shape functions are

N i  x, y   ai x  bi y  ci

Lecture 26 Slide 32

16
7/21/2017

Element Matrix K
The element matrix is N×N where N is the number of nodes in an 
element.  It is derived to enforce Maxwell’s equations within an 
element.
1  
     E    2 E  0
  
u3 
e

Galerkin Method Variational Method

u2 
e
u1 e 
Element e  K11 e  K12 e  K13 e   u1 e   b1 e  
 e e  e
   e    e 
 K 21 K 22 K 23  u2   b2 
 e    
Nodes are normally labeled 
 K 31 K 32 e  K 33   u3 e   b3 e  
e
going counter‐clockwise.

Element Matrix K  e 
Lecture 26 Slide 33

Global Matrix
The global matrix is the overall matrix wave equation.
  
 
   1  E   2 E  b   K   E   b



Global matrix

? ? ? ? ? ? ? ? ? 
? ? ? ? ? ? ? ? ? 
  
? ? ? ? ? ? ? ? ? 
   
? ? ? ? ? ? ? ? ?
  
K     
b 
? ? ? ? ? ? ? ? ?
   
? ? ? ? ? ? ? ? ? 
? ? ? ? ? ? ? ? ? 
   
? ? ? ? ? ? ? ? ? 

Lecture 26 Slide 34

17
7/21/2017

Assembling the Global Matrix (1 of 5)
The global matrix is assembled by adding the elements of the 
element matrices to the corresponding elements of the global matrix.
Ne  K   8  8 global matrix
 K     K e   K  e    4  4 element matrix
e 1  

The global matrix is initialized as
0 0 0 0 0 0 0 0 Element  Element 
0 0 0 0 0 0 0 0 
1 2

0 0 0 0 0 0 0 0
  Element 
0 0 0 0 0 0 0 0
 K    global node  3
0 0 0 0 0 0 0 0 numbers
 
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
 
0 0 0 0 0 0 0 0 
Lecture 26 Slide 35

Assembling the Global Matrix (2 of 5)
Add Element 1
1. We match the local nodes to the global nodes.

Local Node  Global Node 
Number Number
1 1 3
4
2 8
Element  Element 
3 3
1 2
4 2 1 2

Element 
Kij e   K mn
 global  3

im
jn We use this chart to map 
local matrix elements to 
global matrix elements.

Lecture 26 Slide 36

18
7/21/2017

Assembling the Global Matrix (3 of 5)
Local Global
Add Element 1 1 1
2. We add [K(1)] to the global matrix. 2 8
3 3
4 2

3
4
Element  Element 
1 2
1 2

Element 
3

Lecture 26 Slide 37

Assembling the Global Matrix (4 of 5)
Local Global
Add Element 2 1 8
1. Match local to global node numbers. 2 5
3 4
2. Add [K(2)] to the global matrix. 4 3

3
Element  Element 
1 2
1 2

Element 
3

Lecture 26 Slide 38

19
7/21/2017

Assembling the Global Matrix (5 of 5)
Local Global
Add Element 3 1 7
1. Match local to global node numbers. 2 6
3 5
2. Add [K(3)] to the global matrix. 4 8

Element  Element 
1 2

4 3
Element 
3
2

Lecture 26 Slide 39

Don’t Forget about [b]
We follow the same procedure for [b] and get

Element  Element 
1 2

Element 
3

Lecture 26 Slide 40

20
7/21/2017

Overall Solution
We solve this problem as


 K   E   b
Element  Element 
 1 2

 E    K  b 
1

Element 
3

Lecture 26 Slide 41

Domain Decomposition Methods
The grid is split into a number of smaller grids.  The overall solution is 
found by solving the smaller subdomains and iterating their solutions.

Lecture 26 Slide 42

21
7/21/2017

Method of Moments

Lecture 26 Slide 43

Two Common Forms
The method of moments is most commonly applied to one of two 
special cases:

Thin Wire Devices Thin Metal Sheets

Lecture 26 Slide 44

22
7/21/2017

Thin Wire Devices
Thin wire devices are most commonly modeled using 1D integral 
equations solved along the length of the wire.
Pocklington’s Integral Equation
Pocklington’s integral equation is the most famous, but converges 
slower due to the derivative operator operating directly on a 
singularity in the kernel.  It is the simplest to solve.
j L2
  2  e  jkr
Ezinc 

  L 2
I z  z  k 2  2 
 z  4 r
dz 

Hallen’s Integral Equation
Hallen’s integral equations is a modified version of Pocklington’s
integral equal which fixes the singularity.  It is more complicated to 
solve, but converges faster.
j  2 2  L2
e  jkr
Ezinc  k  2 
  z   L 2
I z  z
4 r
dz 

Lecture 26 Slide 45

Thin Metallic Sheets
Metal sheets are most commonly modeled using 2D integral 
equations solved along the length of the wire.  

Triangular meshes are typically used where the Rao‐Wilton‐Glisson
(RWG) edge element is most famous.

S. M. Rao, D. R. Wilton, A. W. Glisson, “Electromagnetic scattering by surfaces of arbitrary shape,” IEEE Trans. Antennas and Propagation, 
Vol. 30, No. 3, pp. 409‐418, 1982.
Lecture 26 Slide 46

23
7/21/2017

Fast Multipole Method (FMM)
A drawback of the method of moments is that it leads to full 
matrices where each element is coupled to every other element.  
This leads to prohibitively large matrices for very large structures.

The fast multiple method is a way of treating far away elements as 
a single element, thereby significantly reducing the number of 
elements in the final matrix.

Lecture 26 Slide 47

Other Worthy Methods

Lecture 26 Slide 48

24
7/21/2017

Boundary Element Method
The wave equation describes the field through volumetric space.  The solution 
requires the field throughout the volume to be resolved.  This leads to a large 
number of elements.  Matrices are sparse.  Boundary conditions are needed.
Maxwell’s equations can be manipulated into the form of a surface integral.  For 
many structures, this formulation requires many fewer elements and provides 
faster solution.  Matrices are full.  Boundary conditions are needed.

2

1

FEM Mesh BEM Mesh
183 nodes 24 nodes
321 elements 23 elements
sparse matrix full matrix
Lecture 26 Slide 49

Spectral Domain Method
The spectral domain method is essentially the method of moments 
in Fourier‐space.  Many variations of this method exist.

Array Antennas and
Transmission Line Analysis
Frequency Selective Surfaces

1

2

3

Lecture 26 Slide 50

25

Anda mungkin juga menyukai