Finite Element Method in 1-D*cem01.ucsd.edu/~vitaliy/courses/ece222c/ece222c_set5_FEM.pdf · 1...

Preview:

Citation preview

1

Finite Element Method in 1-D*ECE 222c, UCSD

Instructor: Vitaliy Lomakin

*Used material: Notes by J. Jin, ECE, UIUCand J. Jin, The Finite Element Method in EM, Wiley 2002

2

Finite Element Method in 2-D*ECE 222c, UCSD

Instructor: Vitaliy Lomakin

*Based on the notes by J. Jin, ECE, UIUCand J. Jin, The Finite Element Method in EM, Wiley 2002

3

Boundary-Value Problem

ΩΓ

4

Equivalent Variational Problem

5

Equivalent Variational Problem

6

Equivalent Variational Problem

7

Equivalent Variational Problem

8

Basic FEM Steps

1. Discretization/subdivision of solution domain

2. Selection of interpolation schemes

3. Formulation of the system of equations

4. Solution of the system of equations

1-D: 2-D: 3-D:

Linear or higher-order polynomials

Using either the Ritz or Galerkin method:Formulate elemental equations and assemble

Using either a direct or iterative method

9

FEM Analysis – Domain subdivision

Step 1: Domain Discretization

10

FEM Analysis – Domain subdivision

Step 1: Domain Discretization

11

FEM Analysis – Domain subdivision

Step 1: Domain Discretization

12

FEM Analysis – Domain subdivision

Step 1: Domain Discretization

13

FEM Analysis – Element interpolation

Step 2: Element Interpolation

12

3

e

14

FEM Analysis – Element interpolation

15

FEM Analysis – Element formulation

Step 3: Formulation of the System of EquationsA. Elemental equations

16

FEM Analysis – Element formulation

Elemental functional:

17

FEM Analysis – Element formulation

Integration formula:

18

FEM Analysis – Element formulation

Use matrix notation:

19

FEM Analysis – Assembly

B. Assembly

20

FEM Analysis – Assembly

Apply the stationarity condition:

Carry out the summation:

21

FEM Analysis – Assembly

How to carry out the summation?

22

FEM Analysis – Assembly

Example: 1

2

3

4

5

6

1

2

3

4

23

FEM Analysis

1. Start from a null matrix and add in the first element:

24

FEM Analysis

2. Add in the second element:

25

FEM Analysis

3. Add in the third element:

26

FEM Analysis

4. Add in the fourth element:

27

FEM Analysis

5. Follow a similar procedure:

28

FEM Analysis – Apply BC

C. Impose the Dirichlet Boundary Condition:

To impose , simply set:

To maintain symmetry, set:

Approach #1:

29

FEM Analysis – Apply BC

After imposing , , :

RemainsSymmetric!

30

FEM Analysis – Apply BC

Can be made smaller:

Worthwhile when there are many prescribed nodes.

31

FEM Analysis – Apply BC

Approach #2 (Simple one):

To impose , simply set:

After imposing , , :

32

FEM Analysis – Sample Program

c.....Input data descriptionc c nn total number of nodes c For i = 1 to nn, input:c x(i) x-coordinate c y(i) y-coordinate c end forc c ne total number of elements c For e = 1 to ne, input:c alpha(e) value of alphac beta(e) value of beta c f(e) value of f c For i = 1 to 3, input:c n(i,e) global node number c end forc end for

33

FEM Analysis – Sample Program

c c n1 number of nodes with prescribed valuesc For i = 1 to n1, input:c p(i) prescribed value of phi c nd(i) global node number c end forc c.....Initialize the matrix [K]

do 1 i = 1, nndo 1 j = 1, nn

1 k(i,j) = 0.Cc.....Start to assemble all area elements in Omega

do 4 e = 1, ne

34

FEM Analysis – Sample Program

c..... Calculate b^e_i and c^e_i (i=1,2,3) i = n(1,e)j = n(2,e)m = n(3,e)be(1) = y(j) - y(m) be(2) = y(m) - y(i) be(3) = y(i) - y(j) ce(1) = x(m) - x(j) ce(2) = x(i) - x(m) ce(3) = x(j) - x(i)

Cc..... Calculate Delta^e

deltae = 0.5*(be(1)*ce(2)-be(2)*ce(1))

35

FEM Analysis – Sample Program

c..... Generate the elemental matrix [K^e]do 2 i = 1, 3 do 2 j = 1, 3

if (i.eq.j) then del_ij = 1.0

else del_ij = 0.0

endif2 ke(i,j) = alphax(e)*(be(i)*be(j)

& + ce(i)*ce(j))/(4.0*deltae) & + beta(e)*(1.+del_ij)*deltae/12.

cc..... Add [K^e] to [K]

do 3 i = 1, 3 do 3 j = 1, 3

3 k(n(i,e),n(j,e)) = k(n(i,e),n(j,e))+ke(i,j) c

4 continue

36

FEM Analysis – Sample Program

c.....Impose the Dirichlet boundary condition do 8 i = 1, n1

b(nd(i)) = p(i) k(nd(i),nd(i)) = 1. do 7 j = 1, nn

if(j.eq.nd(i)) go to 7 b(j) = b(j) - k(j,nd(i))*p(i) k(nd(i),j) = 0.k(j,nd(i)) = 0.

7 continue 8 continue

37

Electrostatic Problems

Partial differential equation:

Boundary conditions:

Continuity conditions:

38

Electrostatic Problems

Example:

Problem: To compute the characteristic impedance

39

Electrostatic Problems

Mesh: Equi-potential:

40

Electrostatic Problems

Axisymmetric (body of revolution):

Along the z-axis:

41

Electrostatic Problems

Example:

42

Electrostatic Problems

Mesh:

Equi-potential:

43

Magnetostatic Problems

2-D:

Continuity conditions:

44

Magnetostatic Problems

Axisymmetric (body of revolution):

Continuity conditions:

45

Electrodynamic Problems

2 mm resolution14 kinds of tissue

Currents:RF shield

Head:

Currentelements

46

64 MHz 128 MHz

171 MHz 256 MHz

Example – Electric field (no load)

47

64 MHz 128 MHz

171 MHz 256 MHz

Example – Magnetic field (no load)

48

64 MHz 128 MHz

171 MHz 256 MHz

Example – Magnetic field (with load)

49

Electrodynamic ProblemsWaveguide device analysis:

Question: How to find the boundary condition at AB and CD?

50

Electrodynamic Problems

At AB:

At CD:

51

Electrodynamic ProblemsExample:

Equi-potential:

52

Electrodynamic Problems

Scattering analysis:

Question: How to find the boundary condition on theartificial boundary?

53

Electrodynamic Problems

Asymptotic expansion:

First-order ABC:

Take the derivative:

54

Electrodynamic Problems

From a circular to an non-circular boundary:

First-order ABC:

For total field:

55

Electrodynamic Problems

Example:

56

Electrodynamic Problems

Example:

57

Electrodynamic Problems

Example:

Amplitude of the scattered field

Recommended