Anda di halaman 1dari 9

IEEE TRANSACTIONS ON EDUCATION, VOL. 32, NO.

2, MAY 1989 85

A Simple Introduction to Finite Element Analysis of


Electromagnetic Problems
MATTHEW N. 0. SADIKU

Abstract-This paper is a tutorial introduction for an absolute be- like asking students to use SPICE in an introductory
ginner in finite element numerical analysis. The finite element method course in networks. Although most commercial finite ele-
is applied to Laplacian electrostatic field problems. Suggestions are
offered on how the basic concepts developed can be extended to finite
ment packages are easy to use, yet pitfalls, not widely
element analysis of problem involving Poisson’s or wave equation. A appreciated, exist. While, it is unreasonable to expect that
step-by-step procedure for coding the numerical method is presented; students armed with only an introductory knowledge of
a useful, working Fortran program is also included. finite element method write commercial codes, a basic un-
derstanding of the method and its limitations is vital.
This paper presents a tutorial introduction to the finite
I. INTRODUCTION
element method without requiring the reader to be famil-
T HE finite element method has its origin in the field of
structural analysis. Although the earlier mathematical
treatment of the method was provided by Courant [ l ] in
iar with variational calculus. This not only helps the cu-
rious user of an existing finite element program under-
stand the mathematical basis of the method, it gives him
1943, the method was not applied to electromagnetic (EM) the ability to modify the program if necessary or develop
problems until 1968. With the increasing application of his own code. It is hoped that the paper will help the reader
the method in the numerical solution of continuum prob- who is first being introduced to the finite element analy-
lems (of which EM problems are an integral part), an ef- sis.
fort to apply the method in both undergraduate and grad- Most EM problems involve either partial differential
uate EM courses has gained momentum [2]-[4]. equations or integral equations. While partial differential
So far, little attempt has been made to present finite equations are usually solved using the finite difference
element method in simple terms which undergraduate stu- method or finite element method, integral equations are
dents in electrical engineering can understand. It is dis- solved conveniently using moment method [5]. In con-
appointing to note that while a large amount of research trast to other methods, the finite element method accounts
papers and textbooks on the subject have been published for nonhomogeneity of the solution region. The system-
by civil and mechanical engineers, it is hard for an elec- atic generality of the method makes it a versatile tool for
trical engineering student or a practicing electrical engi- a wide range of problems. As a result, flexible general-
neer, who is an absolute beginner in using finite element purpose computer programs can be constructed.
method, to get a simple, brief introductory material. Civil The finite element analysis of any problem involves ba-
or mechanical engineering materials on finite element sically four steps: 1) discretizing the solution region into
method are not easy for electrical engineers to under- finite number of subregions or elements, 2) deriving gov-
stand. This is due to the fact that the terminology and erning equations for a typical element, 3) assembling of
notation used in those materials are usually inconsistent all elements in the solution region, 4)and solving the sys-
and unfamiliar to electrical engineers. It has been the gen- tem of equations obtained. Each of these steps will be
eral belief among electrical engineers that the method is discussed briefly in the subsequent sections.
not so easy for undergraduates to grasp. The students are
merely asked to use an existing finite element program to 11. FINITEELEMENT DISCRETIZATION
generate solutions to specific problems assigned [3], [4]. We divide the solution region into a number of -finite
This is justified on the ground that numerical methods elements as illustrated in Fig. 1 where the region is sub-
constitute a fragment of an EM course and that the finite divided into four nonoverlapping elements (two triangular
element method involves calculus of variation which the and two quadrilateral) and seven nodes. We seek an ap-
students may not be familiar with at the undergraduate proximation for the potential Ve within an element e and
level. Asking students to perform finite element analysis then interrelate the potential distributions in various ele-
with either packaged commercial codes or faculty-devel- ments such that the potential is continuous across inter-
oped programs can be dangerous if care is not taken. It is element boundaries. The approximate solution for the
whole region is
Manuscript received January 18, 1989.
N
The author is with the Department of Electrical Engineering, Temple
University, Philadelphia, PA 19122.
IEEE Log Number 8927100.
V(x, Y ) = 2
e= I
V,(& Y ) (1)

0018-9359/89/0500-0085$01.OO O 1989 IEEE


86 IEEE TRANSACTIONS ON EDUCATION, VOL. 32, NO. 2, MAY 1989

yf
i node no.
1
@ element no

I
I

Actual boundary
I t X

Approximate boundary Fig. 2 . Typical triangular element; the local node numbering 1-2-3 must
6 proceed counterclockwise as indicated by the arrow.
Fig. 1 . A typical finite element subdivision of an irregular domain.
or
where N is the number of triangular elements into which
the solution region is divided. (7)
The most common form of approximation for V within
an element is polynomial approximation, namely where
V,(x, y) = a + bx + cy (2)
for triangular element and
V,(x, y) = a + bx + cy + dxy (3)
for quadrilateral element. The potential V, in general is
nonzero within element e but zero outside e . In view of
the fact that quadrilateral elements are in general noncon-
forming elements (see Fig. l ) , we prefer to use triangular
elements throughout our analysis in this paper. Notice that
our assumption of linear variation of potential within the
triangular element as in (2) is the same as assuming that
the electric field is uniform within the element, i.e.,
+
E , = -VV, = -(b.',, + c.',). (4)
111. ELEMENT GOVERNING EQUATIONS
Consider a typical triangular element shown in Fig. 2 .
The potential Vel, Ve2, and V,, at nodes 1, 2 , and 3 , re-
spectively, are obtained using ( 2 ) , i.e.,

or

A = L[(
2 x2 - X I ) (Y3 - Y l ) - (x3 - X I ) (YZ - Yl)].

The coefficients a , 6, and c are determined from ( 5 ) as


(9)
The value of A is positive if the nodes are numbered coun-
terclockwise (starting from any node) as shown by the ar-
row in Fig. 2 . Note that (7) gives the potential at any point
(x, y ) within the element provided that the potentials at
Substituting this into (2) gives the vertices are known. This is unlike finite difference
1 analysis where the potential is known at the grid points
V, = [ I x y ] - only. Also note that a, are linear interpolation functions.
2A They are called the element shapefinctions and they have
the following properties [7]:

3
c
i= 1
ffi(X, y) = 1

The shape functions a I and a2,for example, are illus-


trated in Fig. 3 .
SADIKU: ANALYSIS OF ELECTROMAGNETIC PROBLEMS 87

Similarly,

1
il
1
2
(a) (b)
Fig. 3 . Shape functions a , and a2 for a triangular element.

The energy per unit length associated with the element


e is given by 161, i.e.,

where a two-dimensional solution region free of charge


( p , = 0 ) is assumed. But from (7),
3

VV, = c V,,Va,.
I = I
(12)

Substituting (12) into (1 1) gives


3 3
W, = t c c tVc,,[i V a l . VaJdS
I = [ J=I IV. ASSEMBLING
OF ALL ELEMENTS
If we define the term in brackets as Having considered a typical element, the next step is to
assemble all such elements in the solution region. The
Cf’ = V a , VaJ dS, (14) energy associated with the assemblage of elements is
N
we may write (13) in matrix form as
w = ec= I w, = ; t [ V f
w, = + t [ Vel‘ [ c‘”][ V,] (15)
where the superscript T denotes the transpose of the ma-
trix,

and
(16)a
where

[VI = [ I5
[ c“’]= [
c\1;) cy’
cl“’
CC)
C‘l’l
22
C\;’
Cb;.]
cy;’ c:;)
(16)b
n is the number of nodes, N is the number of elements,
and [ C ] is called the over-all or global coeficient matrix
which is the assemblage of individual element coefficient
matrices.
The matrix [ C ‘ ” ] is usually called the element coeficienf The process by which individual element coefficient
matrix (or “stiffness matrix” in structural analysis). The matrices are assembled to obtain the global coefficient
matrix element Cf’ of the coefficient matrix may be re- matrix is best illustrated with an example. Consider the
garded as the coupling between nodes i a n d j ; its value is finite element mesh consisting of three finite elements as
obtained from (8) and (14). For example, shown in Fig. 4. Observe the numberings of the mesh.

C\;’ = 1 V a l . Vcu,dS
The numbering of nodes as 1, 2, 3, 4, and 5 is called
global numbering. The numbering i-j-k is called local
numbering and it corresponds with 1-2-3 of the element
1 in Fig. 2. For example, for element 3 in Fig. 4, the local
-
- 2 [(Y? - 4’3) ( Y 3 - Y I ) numbering 3-5-4 corresponds with 1-2-3 of the element
in Fig. 2. Note that the local numbering must be in coun-
terclockwise sequence starting from any node of the ele-
ment. For element 3, we could choose 4-3-5 instead of
1
= - [ ( Y z - 4’3) 0 ‘ 3 - YI) 3-5-4 to be correspond with 1-2-3 of the element in Fig.
4A 2. Thus, the numbering in Fig. 4 is not unique. Assuming
+ (x3 - (XI - X ? ) ] . (17)a the particular numbering in Fig. 4, the global coefficient
88 IEEE TRANSACTIONS ON EDUCATION, VOL. 32, NO. 2, MAY 1989

2) Since C, = 0 if no coupling exists between nodes i


a n d j , it is evident that for a large number of elements
[ C ] becomes sparse and banded.
3) It is singular. Although this is not so obvious, it can
be shown using the element coefficient matrix of (16)b.
Adding columns 2 and 3 to column 1 yields zeros in col-
umn 1 in (16)b.
Fig. 4. numbering
(1-2-3) of the element in Fig. 2 . THE RESULTING
IV. SOLVING EQUATIONS
matrix is expected to have the form It can be shown that Laplace’s (or Poisson’s) equation
is satisfied when the total energy in the solution region is
c12 c
13 c14 c1.5 minimum. Thus, we require that the partial derivatives of
W with respect to each nodal value of the potential be
c21 c22 c23 c24 c2S
zero, i.e.,
[Cl = c3.5
aw aw . . . . . . . . . - aw - 0
c31 c32 c33 c34
- - _ _ --
c4l c42 c43 c44 c4.5 av, av2 a vn

-GI cs2 cs3 cs4 c5s- or


which is a 5 X 5 matrix since five nodes ( n = 5 ) are
involved. Again, C, is the coupling between nodes i and
j . We obtain C, by using the fact that the potential distri-
bution must be continuous across interelement bounda- For example, to get a W / a V , = 0 for the finite element
ries. The contribution to the i , j position in [ C ] comes mesh of Fig. 4,we substitute (21) into (19) and take the
from all elements containing nodes i and j . For example, partial derivative of W with respect to V I . We obtain
in Fig. 4,elements 1 and 2 have node 1 in common; hence
aw
CI, = cl!’ + Cg’. 0=-=21/
av, IC11 + v2c12 + v3c13 + v4c14 + v5c15

Node 2 belongs to element 1 only; hence


+ v2c21 + v3c31 + v4c41 + v5c51
c,, = cg. (22)b
Node 4 belongs to elements 1, 2, and 3; hence or

c, = cp + cp + c g (22)c
0 = VICII + V 2 C 1 2 + V‘3CI-j + I/,C14 + VSCl,. (25)
Nodes 1 and 4 belong simultaneously to elements 1 and In general, dW/aV, = 0 leads to
2; hence I1

Cl4 = c,, = cl:’ + c\:). (22)d


0 = c KC;,
i= I
(26)

Since there is no coupling (or direct link) between nodes where n is the number of nodes in the mesh. By writing
2 and 3, (26) for all nodes k = 1, 2, . . . . . , n , we obtain a set
= c2 = 0. of simultaneous equations from which the solution of
c23 3 (22)e
[ V ] T = [VI, v2, , VI,]can be found. This can be
Continuing in this manner, we obtain all the terms in the done in two ways similar to those used in solving finite
global coefficient matrix by inspection of Fig. 4 as

Note that element coefficient matrices overlap at nodes


shared by elements and that there are 27 terms (9 for each difference equations obtained from Laplace’s (or Pois-
of the 3 elements) in the global coefficient matrix [ C ] . son’s) equation [8].
A ) Iteration Method: Suppose node 0 is connected to
Also note the following properties of the matrix [ C ] :
1) It is symmetric (C, = Cji) just as the element coef- m nodes as shown in Fig. 5 . Using the idea in (25),
ficient matrix. 0 = v,,c,, + v,c,, + v,c , , 2 + * * * -- * * * + VI, c,,,,
SADIKU: ANALYSIS OF ELECTROMAGNETIC PROBLEMS 89

where [ V I = [ V f l , [ A I = rcff1,[ B I = -[Cfp1 [V,I.


Since [ A ] is, in general, nonsingular, the potential at the
free nodes can be found using (31). We can solve for [ V I
in (3 l)a using Gaussian elimination technique. We can
also solve for [ V I in (31)b using matrix inversion if the
size of the matrix to be inverted is not large.
Notice that as from (1 1) onward, the solution has been
restricted to two-dimensional problem involving La-
place's equation, V V = 0. The basic concepts developed
in this paper can be extended to finite element analysis of
proQIems inyolving Poisson's equation ( v 2v = - p ( , / ~ ,
rn

Fig. 5 . Node 0 connected to m other nodes.


V 2 A = - p J ) or wave equation ( V 2 + - y 2 + = 0).

or VI. ILLUSTRATIVE
EXAMPLES
. m Implementation of the concepts discussed in the pre-
V, = --
I
CO, k = l
c
VkC,,. ceeding sections is illustrated with two examples. The first
example is a necessary preparation for the second where
Thus, if the potentials at nodes connected to 0 are known, the numerical process is developed into a Fortran pro-
we can determine V, using (27). The iteration process be- gram. The code developed is simple and self-explanatory
gins by setting the potentials at the free nodes (where the since it is intended for instructional purposes. The nota-
potential is unknown) equal to zero or to the average po- tions used in the programs are as close as possible to those
tential [9] used in previous sections; some are defined wherever nec-
essary.
Example 1: Consider the two-element mesh shown in
Fig. 6(a). Using finite element method, determine the po-
where V,,, and V,,, are the minimum and maximum val- tentials within the mesh.
ues of V at the$xed nodes (where the potential V is pre- Solution: The element coefficient matrices can be cal-
scribed or known). With these initial values, the poten- culated using (17) and (18). However, our calculations
tials at the free nodes are calculated using (27). At the will be easier if we define
end of the first iteration, when the new values have been
calculated for all the free nodes, they become the old val- PI = (Y2 - Y3>, p2 = (Y3 - Yl), p3 = (Yl - Y2)
ues for the second iteration. The procedure is repeated
until the change between subsequent iterations is neglible QI = ( ~ -
3 x2)3 Q2 = (XI - x3), Q3 = (x2 - xi>.
enough.
B) Band Matrix Method: If all free nodes are num- (32)
bered first and the fixed nodes last, (19) can be written With Pi and Qi ( i = 1, 2, 3 are the local node numbers),
such that each term in the element coefficient matrix is found as

1
C$') = 4~ [P;P, + QiQ,] (33)
where subscripts f and p , respectively, refer to nodes with
free and fixed (or prescribed) potentials. Since VP is con- where A = :(P2Q3 - P 3 Q 2 ) . It is evident that (33) is
stant (it consists of known, fixed values), we only differ- more convenient to use that (17) and (1 8). For element 1
entiate with respect to Vf so that applying (24) to (29) consisting of nodes 1-2-4 corresponding to the local num-
yields [7] bering 1-2-3 as in Fig. 6(b),

PI = -1.3 P2 = 0.9 P3 = 0.4,


QI = -0.2 Q2 = -0.4 Q3 = 0.6,

A = i(0.54 + 0.16) = 0.35.


This equation can be written as Substituting all these into (33) gives

or
[VI = P I (31 ) b
[C"'] =
I -0.7786
-0.4571
0.6929
0.0857
0.0857 .
0.3714 I (34)
IEEE TRANSACTIONS ON EDUCATION, VOL. 32. NO. 2. MAY 1989

follows:
Node: (x,y) C22 = C$:’ + C\:’ = 0.6929 + 0.5571 = 1.25

Of
1 (0.8.1.8)
2 (1.4,1.4) C24 = C$\) + C::) = 0.0857 - 0.1 = -0.0143

v = lg
3
4
(2.1,Z.l)
(1.2J.7)
C4, = Cii) + Ci:) = 0.3714 + 0.4667 = 0.8381
lT
v - 0 2 C2l = C$l’ = -0.7786

C23 = C\i) = -0.4571


, X C41 = Ci:) = -0.4571
(a)
C43 = Cii’ = -0.3667.

Note that we follow local numbering for the element coef-


ficient matrix and global numbering for the global coef-
ficient matrix. Thus, the square matrix [ C ] is obtained as

(b)
Fig. 6. For example 1 : (a) two-element mesh, (b) local and global num-
bering of the elements. LO -0.0143 0 0.8381J
and the matrix [ B ] on the right-hand side of (37)a is ob-
Similarly, for element 2 consisting of nodes 2-3-4 corre- tained as
sponding to local numbering 1-2-3 as in Fig. 6(b),
PI
Q,

A
=

=
-0.6

-0.9

i(0.91
P2

Q2 =

+ 0.14)
= 1.3

0.2

=
P3 = -0.7,
Q, = 0.7,

0.525.
[B] = [1i::71].
3.667
(39)

Hence, By inverting matrix [ C ] in (38), we obtain

Applying (30) gives


0.5571 -0.4571
0.8238
-0.3667
-0.1
-0.3667
0.4667 I . (35)

Thus, V , = 0, V2 = 3.708, V3 = 10, and V4 = 4.438.


Once the values of the potentials at the nodes are known,
This can be written in a more convenient form as the potential at any point within the mesh can be deter-
mined using (7).
Example 2: Write a Fortran program to solve the La-
place’s equation using finite element method. Apply the
program to the two-dimensional problem shown in Fig.
7(a).
Solurion: The solution region is divided into 25 three-
node triangular elements with total number of nodes being
21 as shown in Fig. 7(b). This is a necessary step in order
to have input data defining the geometry of the problem.
or Based on the discussions in Sections 11-IV, a general For-
tran program for solving problems involving Laplace’s
[Cl [VI = P I . (37)b equation using three-node triangular elements is devel-
The terms of the global coefficient matrix are obtained as oped as in the Appendix. The development of the program
~

SADIKU: ANALYSIS OF ELECTROMAGNETIC PROBLEMS 91

TABLE I
'1. NODALCOORDINATES
OF T H E FINITE ELEMENT
MESHOF FIG. 7.

Node Y Y Node r Y

1 0.0 0.0 12 0.0 0.4


2 0.2 0.0 13 0.2 0.4
3 0.4 0.0 14 0.4 0.4
4 0.6 0.0 15 0.6 0.4
5 0.8 0.0 16 0.0 0.6
6 1 .o 0.0 17 0.2 0.6
7 0.0 0.2 18 0.4 0.6
8 0.2 0.2 19 0.0 0.8
9 0.4 0.2 20 0.2 0.8
IO 0.6 0.2 21 0.0 1 .o
11 0.8 0.2

zlk
TABLE I1
ELEMEYT-NODE
IDEYTIFICATIO?I
Y
Local Node no. Local Node no.

Element 1 2 3 Element I 2 3
19 90
I 1 2 7 14 9 IO 14
23
2 2 8 7 15 IO 15 14
3 2 3 8 16 IO 11 15
4 3 9 8 17 12 13 16
5 3 4 9 18 13 17 16
6 4 IO 9 19 13 14 17
7 4 5 IO 20 14 18 17
8 5 II IO 21 14 15 18
9 5 6 I1 22 16 17 19
IO 7 8 12 23 17 20 19
11 8 13 12 24 17 18 20
12 8 9 13 25 19 20 21
13 9 14 13

TABLE I11
(b) PRESCRIBED POTENTIALS AT FIXEDNODES
Fig. 7. For example 2: (a) two-dimensional electrostatic problem, (b) so-
lution region divided into 25 triangular elements. Prescribed Prescribed
Node Potential Node Potential

basically involves four steps indicated in the program and 1 0.0 18 100.0
2 0.0 20 100.0
explained as follows. 3 0.0 21 50.0
Step 1: This involves inputting the necessary data de- 4 0.0 19 0.0
fining the problem. This is the only step that depends on 5 0.0 16 0.0
6 50.0 12 0.0
the geometry of the problem at hand. Through a data file, I1 100.0 7 0.0
we input the number of elements, the number of nodes, 15 100.0
the number of fixed nodes, the prescribed values of the
potentials at the fixed nodes, the x and y coordinates of
all nodes, and a list identifying the nodes belonging to Step 3: The global matrix obtained in the previous step
each element in the order of the local numbering 1-2-3. is inverted by calling subroutine INVERSE. The values
For the problem in Fig. 7, the three sets of data for co- of the potentials at all nodes are obtained by matrix mul-
ordinates, element-node relationship, and prescribed po- tiplication as in (31)b. Instead of inverting the global ma-
tentials at fixed nodes are shown in Tables I, 11, and 111, trix, it is also possible to solve for the potentials at the
respectively. The data are inputted according to the cor- nodes using Gaussian elimination technique.
responding format in the program in the Appendix. Step 4: This involves outputting the result of the com-
Step 2: This step entails finding the element coefficient putation. The output data for the problem in Fig. 7 are
matrix [ C'"] for each element and the global matrix [ C 1. presented in Table IV.
The procedure explained in the previous example is ap- The validity of the result in Table IV is checked using
plied. The matrix [ B ] on the right-hand side of (37) is finite difference method. From the finite difference anal-
also obtained at this stage. ysis, the potentials at the free nodes are obtained as
92 IEEE TRANSACTIONS ON EDUCATION, VOL. 32, NO. 2, MAY 1989

TABLE IV methods enable recognition of mistakes. A third method


OUTPUT DATAOF THE P R O G R A M IN FIG. 7
is using an automatic mesh generating scheme, e.g., [ 111,
No. of Nodes = 21 [ 121; this labor-saving method of discretizing the solution
No. of Elements = 25 region into triangular elements eliminates the problem.
No. of Fixed Nodes = 15 Another major problem in finite element analysis is the
Node X Y Potential
relatively large amount of computer memory and time re-
1 0.00 0.00 0.000 quired. With the advent of batch processing and time-
2 0.20 0.00 0.000 sharing, the problem has been alleviated to some degree.
3 0.40 0.00 0.000
0.60 0.00 0.000
In spite of the limitations and problems, the finite ele-
4
5 0.80 0.00 0.000 ment method has successfully been applied to various EM
6 1 .oo 0.00 50.000 problems. For such applications, the reader is referred to
I 0.00 0.20 0.000
0.20 0.20 18.182
the literature, e.g., [4], [7].
8
9 0.40 0.20 36.364
10 0.60 0.20 59.091
11 0.80 0.20 100.000
APPENDIX:
12 0.00 0.40 0.000 COMPUTER
PROGRAM 2
FOR EXAMPLE
13 0.20 0.40 36.364
C FINITE ELEMENT SOLUTION OF LAPLACE'S EQUATION FOR
14 0.40 0.40 68.182 C TWO-DIMENSIONAL PROBLEMS
15 0.60 0.40 100.000 C TRIANGULAR ELEMENTS ARE USED
C
16 0.00 0.60 0.000 C ND = NO. OF NODES
17 0.20 0.60 59.091 C NE = NO. OF ELEHENTS
C NP = NO. OF FIXED NODES (WHERE POTENTIAL IS PRESCRIBED)
18 0.40 0.60 100.000 C NDPIII = NODE NO. OF PRESCRIBED POTENTIAL, I = 1,2,...NP
19 0.00 0.80 0.000 C VAL(I1) = VALUE OF PRESCRIBED POTEKPIAL AT NODE NDPII)
0.20 100.000 C NL(1.J) = LIST OF NODES FOR EACH ELEMENT I, WHERE
20 0.80 C J = 1. 2, 3 IS THE LOCAL NODE NUMBER
21 0.00 1 .oo 50.000 C CE(1.J) = EL= COEFFICIENT MATRIX
C C1I.J) = GLOBAL COEFFICIENT MATRIX
C BIII = RIGHT-HAND SIDE MATRIX IN THE S Y S T M OF
C SIMULTANEOUS EQUATIONS; SEE EQ.131) OR EQ.137)
C X(1). YII) = GLOBAL COORDINATES OF NODE I
C XLIJ), YLIJ) = LOCAL COORDINATES OF NODE J = 1,2,3
Vs = 15.41 V9 = 26.74 VI0 = 56.69 C
C
VII) = POTENTIAL AT NODE I
MATRICES PII) AND QIII ARE DEFINED IN EQ.132)

VI3 34.88 DIMENSION XflOO), YflOO), CflOO.100). CEf100,lOO)


DIMENSION B1100). NLl100.3). NDPflOO), VAL(100)
DIMENSION VIlOO), P(31, Q(3), XL(3). YLl3)
VI4 = 65.41 VI, = 58.72 V . C ...................................................
C FIRST STEP - INPUT DATA DEFINING GEOMFPRY AND
C BOUNDARY CONDITIONS
C ...................................................
Although the result obtained using finite difference is RERD15.10) NE,ND. NP
10 FORMATl313)
considered more accurate in this problem, increased ac- READf5.20)( I, ( NL1I.J). J=1,3),1=1,NE)
20 FORMAT(413)
curacy of finite element analysis can be obtained by di- RERD(5.301 11, XII), YII), I=l.ND)
30 FORMATfI3, 2F6.21
viding the solution region into greater number of trian- READ(5.40) ( NDPIII, VALII), I=l,NP)
40 FORMATlI3,F6.2)
gular elements. As referred to earlier, the finite element c ...................................................
method has a major advantage over the finite difference C SECOND STEP - EVALUATE COEFFICIENT MATRIX FOR EACH
C ELEMENT AND ASSEMBLE GLOBALLY
method. While in finite difference method, field quantities C ...................................................
GO 5 0 H =1, ND
are obtained only at discrete positions in the solution re- BfM)=O.O
DO 50 N=l.ND~.~

gion, they can be obtained at any point in the solution 50


C1M.N) = 0.0
CONTINUE
region in finite element method. C
DO 140 I = 1. NE
FIND LOCAL COORDINATES XL(J), YL(J1 FOR ELEMENT I
DO 6 0 J=1.3
K=NLI I, ~

X L f J ) = X(K1
CONCLUSIONS YLIJ) = YIK)
60 CONTINUE
Pf1) = YLl2) - YL(31
The finite element method was originally expounded for P(2) = YL(3) - YLl1)
Pl3) = YLi1) - YLf2) ~~

civil engineering applications but has recently seen in- Q l l ) = XLf3) - XLIZI
Ql2) = XLl1) - XL(31
creasing applications in EM. A brief, tutorial introduction Ql3) = XLf2) - XLf1)
AREA = 0.5*ABSl P(2)*Ql3) - Ql2)*Pl3) )
to the method has been presented. The method is applied C DETERMINE COEFFICIENT MATRIX FOR EL=
DO 70 M=1,3
I

specifically to Laplacian electrostatic field problems. Sug- DO 7 0 N.1.3


CE(t4.N) = I PlMl*PlN) + QlM)*QfN) IIfI.O*AREA)
gestions are offered on how the concepts developed can 70
C
CONTINUE
ASSEMBLE GLOBALLY - FIND Cl1,J) AND BII)
be extended to other types of EM problems. DO 130 5.1.3
IR=NLfI.J)
It should be noted that one problem associated with the C CHECK IF ROW CORRESPONDS TO FIXED NODE
DO 80 K=l,NP
finite element method is inputting the data defining the 80
1FfIR.EQ.NDPlK)) GO TO 120
CONTINUE
geometry of the solution region. Since a large amount of DO 110 L=1.3
IC = NLI1.L)
data is involved, a mistake can easily be made in entering C CHECK IF-COLUMN CORRESPONDS TO FIXED NODE
DO 9 0 K=l,NP
this data. This problem can be attacked in three different IF( IC.EQ.NDPIK1 ) GO TO 100
90 CONTINE-
ways. One is by having an in-built subroutine for data C(IR,IC) = ClIR,IC) + CE1J.L)
GO TO 110
verification. Another method is using computer graphics 100 BIIRI = BIIR) - CElJ,Ll*VAL(K)
110 CONTINUE
to plot the mesh before analyzing the data. These two GO TO 130
SADIKU ANALYSIS OF ELECTROMAGNETIC PROBLEMS 93

120 CONTINUE
C(IR,IRI = 1.0 REFERENCES
B(IR1 = VAL(K1
130 CONTINE R. Courant, “Variational methods for the solution of Problems of
140 CONTINUE
C .............................................. Equilibrium and vibrations,” Bull. Am. Math. Soc.. vol. 49, 1943.
C THIRD STEP - SOLVE THE RESULTING SYSTEM OF J. F . Hoburg and J . L. Davis, “A student-oriented finite element pro-
C SIMULTANEOUS EQUATIONS
C ............................................. gram for electrostatic potential problems,” IEEE Trans. Educ.. vol.
NMRX=100 E-26, pp. 138-142, NOV. 1983.
CALL INVERSE(C.ND.NMRX1
DO 150 I=l,NO -, “Enhanced capabilities for a student-oriented finite element
V(I1 = 0.0 electrostatic potential program,” IEEE Trans. E d u c . , vol. E-28, pp.
00 150 J=l,ND 25-28, Feb. 1985.
VI11 = VI11 + ClI,J)*B(Jl
150 CONTINUE S . R. H. Hoole and P. R. P. Hoole, “Finite element programs for
C ............................................. teaching electromagnetics,” IEEE Trans. Educ., vol. E-29, Feb.
C FOURTH STEP - OUTPUT THE RESULTS, THE POTENTIAL
C V ( I 1 AT NODE I, I = 1.2.. ... ND 1986.
C ............................................... R. F. Harrington, Field Computation by Moment Methods. Malabar:
WRITE(6.1601 ND,NE,NP
160 FORMAT(2X,’NO. OF NODES = ’,13,2X,’NO.OF ELDlENT.5 = ’ Kriger, 1968.
1 13,2X,’NO. OF FIXED NODES = ‘.13,Il W . H. Hayt, Engineering Elecrromagnerics. New York: McGraw-
WRITE(6.1701 Hill, 1981, pp. 121, 184-192.
170 FORMAT(ZX,’NODE’,SX,’X Y’.7X.‘POT€VTIAL’,/l
wRITE(6,1801 (I, X(I1, Y(I1. V(I1, I-1.ND I P. P. Silvester and R. L. Ferrari, Finite Elements f o r electrical En-
180 F0RMAT12X,13.2X,F6.2,2X,F6.2,2X,F10.4,/1 xineers. Cambridge: Cambridge Univ. Press, 1983, pp. 1-32.
STOP
EN0 [8] C. R. Paul and S . A. Nasar, Introduction t o Electromagneric Fields.
New York: McGraw-Hill, 1982, pp. 465-472.
[9] 0. W . Andersen, “Laplacian electrostatic field calculations by finite
elements with automatic grid generation,’’ IEEE Trans. Power Ap-
C SUBROUTINE INVERSE paratus S y s t . , vol. PAS-92, no. 5 , Sept./Oct., pp. 1485-1492, 1973
C SX IS THE MATRIX TO BE INVERTED; IT IS DESTROYED [IO] D. R. J . Owen and E. Hinton, A Simple Guide t o Finite Elements
C IN THE COMPUTATION AND REPLACED BY THE INVERSE Swansea: Pineridge Press, 1980, pp. 47-79.
C N IS THE ORDER OF SX
C IDM IS THE DIMENSION OF SX 1111 E. Hinton and D. R. J . Owen, An Introduction to Finite Elemenr
SUBROUTINE INVERSlSX,N,IDMl Computations. Swansea: Pineridge Press, 1985, pp. 328-326.
DIMENSION SXlIOM,IDMl [I21 W . R. Buell and B. A. Bush, “Mesh generation-A survey,” Trans
ESP=l.OE-5 ASME, J . Engng. Ind., pp. 332-338, Feb. 1973.
00 50 K.1.N
DO 30 J.1.N
IF(J.EQ.Kl CO TO 30
IF1 ABSlSX(K,Kll I 20,10,20
10 SXlK.Kl=ESP
20 SX(K 1J I =SX(K,J I /SXlK ,Kl
30 CONTINUE
SX(K ,KI = ? . 0E X ( K, Kl
DO 40 I.1.N
IF(1.EQ.K) GO TO 40
DO 40 J=l,N
IF(J.EQ.K) GO TO 4 0
SX(I,Jl=SX!I.Jl- SX(K.JI*SX(I,KI
40 C0 NTINUE
D O 50 I=l,N
1FII.EQ.K) GO TO 50 Matthew N. 0. Sadiku graduated from Ahmadu
S : < ! I . K l = - CX(I,Kl+SX(K.Kl Bello University, Zaria (Nigeria) and received the
50 CONTiNUE
RFIURN M.S. and Ph.D. degrees from Tennessee Tech.
END University, Cookeville.
He is currently an Assistant Professor of Elec-
ACKNOWLEDGMENT trical Engineering at Temple University, Phila-
delphia. PA. He was formerly at Florida Atlantic
The author would like to express his appreciation to Y. University, Boca Raton. He is the author of Ele-
Kim and L. Agba for their review and helpful comments ments of Electromagnetics (HRW, 1989). His
current research interests are in numerical tech-
on the manuscripts. The corrections and comments of the niques in electromagnetics, local area computer
reviewers are also appreciated. networks, and superccnductivity.

Anda mungkin juga menyukai