Sie sind auf Seite 1von 27

Numerical Methods in

Electromagnetic Field
Finite difference method
Monte Carlo method
Method of simulated charges
The integration of the Biot-Savart law
RNDr. Ctibor Henzl, Ph.D.
VB Technical University Ostrava

Finite difference Method


Example: Two very long electrodes have potentials 0 V and 100 V. Compute
electric potential between electrodes.
0V

100 V

2 2
2 0
2
x
y

Laplaces Equation

with

konst ,

Boundary Conditions

0
n

The partial derivatives must be replaced by the differences for


numerical computing. At point 5 we have :

2 4 6 25

2
h2
x

2 2 8 25

2
y
h2

0V
The partial
derivatives are
replaced by
differences at
point 5

100 V

2 4 6 25

2
x
h2

2 2 8 25

2
y
h2

By substitution into the original equation:

4 6 25
h

2 8 25
h

the fundamental result of the rearrangement of this equation is :

2 4 6 8
5
4
The central point potential is the arithmetical mean of the potentials
of the adjacent point potencials.

0V
The central
point
potential is
the
arithmetical
mean of the
potentials of
the adjacent
point
potencials.

100 V

2 4 6 8
5
4
Computation may be realized in two ways.

a)Relaxation method: The initial solution is estimated and refined. We


suppose an initial solution in all nodes ( = 0 ).
0V
The value in
point 7 changes
after
first
iteration (025)

0 100 0 0
7
25
4
100 V
This computation must be
made in all points. For this purpose
spreadsheet EXCEL may be used. This is suprising!

b) Arrangement of a set of linear equations: Every equation of the


type

2 4 6 8 can be rearranged
4

45 - 2 - 4 - 6 - 8 = 0

0 0
0
0 1 0
4 1 0 1 0

1 4 1 0 1 0 0

0
0 2 0

0 2 4 0
0 1 0
0
0 3 0


0 4 1 0 1 0
0 4 0
1 0
0 1 0 1 4 1 0 1 0 5 0


0 1 0 2 4 0
0 1 6 0
0

0
0 1 0
0 4 1 0 7 100

0
0 0 1 0 1 4 1 8 100
0


0
0 0
0 1 0 2 4 9 100
0

1 9,3

2 15,1
16,9
3

4 22,3

34
5

6 37,5

45
,
9
7

61,2
8

9 65

We have a set of nine linear equations for nine unknowns. We can


find the solution with any suitable method. The resulting solution is
on the right.

Arrangement of the EXCEL relaxation method


This table may be used for the creation of the
model.

Results and comparison

0.020

0.015

0.010

0.005

0.000

0.005

0.010

0.015

0.020

0.025

0.000
0.030

1 9,3

2 15,1
16,9
3

4 22,3

34
5

6 37,5

45
,
9
7

61,2
8

9 65

Monte Carlo Method


We are solving the original problem (finding of potential in nodes)
The solution is known as a fixed random walk or as "drunkard's walk.
Thin horizontal and vertical lines represent paths in a mesh. The thick
lines represent walls . These are Dirichlet's or Neumanns boundary
conditions.
0V

100 V

The drunkards walk begins at a point between the walls. The walker
can make either one step to the left or one step to the right or one step
forward or one step backward. The probability of a step is always 1/4. A
penalty is paid if it hits the wall. The penalty being either 100 or 0.
0V

100 V
Then the drunkard returns to the starting point and his walk
may begin again.

This is the final table of the drunkards walk :


Wall

Amount of hits

Penalty

100

N100

100N100

N0

0N0

Total

N100+N0

100N100+0N0

From the viewpoint of probability calculus every walk is a random trial


and the penalty paid on the borders is a random quantity. The total of
random trials is

N = N100 + N0
The mean value of one walk being

p mean

100 N100 0 N 0

Its value is equal to the electric potential of the starting point.


References may be found in literature.
The result of the Monte Carlo Method is the value of potential in one
point only. This process must be repeated to compute the potential of
other points.

Arrangement of the Monte Carlo Method in the EXCEL


program

Method of Simulated Charges


Example: The cylindrical conductor has radius a and length L. Its
potential is . Let us determine the distribution of charge, the value of a
charge and the capacitance of the conductor.
L
2a

The charge is distributed irregularly. The charge density ( x) is


distributed, so that the surface be equipotential ( = const). This solution
is an approximation:

1.The conductor is divided into m elements of the equal length d =


L/m. See figure where m =5

d = L/m

2.We suppose regular distribution of the charge for every element.


The charge density of the element is i = const.

3.The effect of a charged element on the others is approximately equal


to the effect of the point charge Qi = 2.a.d.i. This point charge is in
the centre of every element.

Qi = 2.a.d.i

4.The reference point where the contributions of potentials are


concentrated is in the centre of the element. The contributions come
from every element.

5. The contribution of i-element to k- element potential being:

1 2ad i
1 ad i
ik

,i k
4 0 rik
2 0 rik

6. The contribution of i-element to the potential of the same element


cannot be determined in this way. Unfortunately i = k results in rik = 0. This
contribution is calculated as the potential of the centre of the pipe.
Charge density being i and area dS = a.d.dz. The limits of integration
being 0 to 2 for and 0 to d/2 for z.
ds

1
ii
4 0

d/2

2
0

addz i
a 2 z2

dz

a i d
d
ln

1,i k
0 2a

2a

e.g.:

d
d
d
a d1
d
d

2
2 2 ln 1 3 4 5
2 0 r12
r42
r52
2a
r32
2a

At last there is a set of m linear equations for m unknown densities


1,,m. A standard method can solve this set. Charge distribution and
total charge are in a chart below (L = 50 cm ,radius a = 1 mm , potential =
1V, number of elements m = 20).

The matrix of this system is symmetric along the main diagonal and
is diagonally dominant.

Integration of the Biot-Savart law

Ix sin
H
4 r 2

H = 0

Ix

H = max

For H of the square coil in axis z we have:


I sin
I
a2
H
dx
2
4 r
a2
a2
2
2 p z
p 2z
4
2

H z

I x
sin cos
4 r 2

H z

I x
sin
4 r 2

r
y

Even in this special case the integration is not simple.

We divide the path into elements (discretization) and compute the value H
as a sum of elementary contributions.

r = a/2

x = a

a 5
4
x = a/2

4I
sin
Ix sin Ia sin 90
I H Ix sin I

2
2
2
2
4 r
4 a 5
4 r
4 a
a
5a 5

2
4

Results calculated in the centre of the current carrying square :

Theoretical
result

Discretization
N = 1, x = a

2I 2
a

4I
a
Error = 43%

N = 2,x = a/2

32I
5a 5
Error = 1,2%

In this lecture I mentioned some of the classical numerical methods that


can be used in teaching the theory of the electromagnetic field.
The modules of these methods (ELSTAT.XLS, MONTEC.XLS, BS.XLS,
VEKPOT.XLS, INDUK.XLS) are at our disposal.

1
2
3
4
5
6
7
8
9
10
11
12

pz(m)

Hn(A/m)

Ha(A/m)

0.00
0.08
0.16
0.30
0.40
0.50
0.60
0.70
0.80
0.90
1.00
1.10

22.508
18.671
11.946
4.751
2.599
1.529
0.960
0.636
0.441
0.318
0.236
0.179

22.508
18.671
11.945
4.751
2.599
1.529
0.960
0.636
0.441
0.318
0.236
0.179

Zvislost H na pz
25.000

20.000

H (A/m)

Tab.1
. dku

15.000

10.000

5.000

0.000
0.00

0.20

0.40

0.60
pz (m)

Hn(A/m)

Ha(A/m)

0.80

1.00

In our lecture we spoke only of classical methods. But we did not mention
the Finite Element Method (FEM) which is now very common.
QUICKFIELD and ANSYS are professional products available on the
market.
There are four reasons for these classical methods:

1. They can be used on current software


2. They are cheap in comparsion with ANSYS or QUICKFIELD
3. They render results of equal precision like limited versions of
ANSYS or QUICKFIELD
4. They allow us to understand the fundamentals of the problem
References
[1]Hoole, S. Ratnajeevan H., Hoole, P. Ratnamahilan P.: A Modern
Short Course in Engineering Electromagnetics, Oxford 1996
[3]Ivnek, L. : Teorie elektromagnetickho pole cvien s potaovou
podporou, Ostrava 1994
[2]Strassacker, G; Strassacker, P. : Analytische und numerische
Methoden der Feldberechnung, Stuttgart, 1993

Das könnte Ihnen auch gefallen