Electromagnetic Theory (comments to: moloney@nextwork.rose-hulman.edu)

  MAPLE text and input lines  


(cylinder.ms)

This calculates the approximate surface charge on a long thin wire, where the wire radius is small compared to its overall length. The method is to use a set of hollow cylindrical sections, each of which has its own constant charge density. When the potential at the center of each section on the axis is specified (it will be the same for a conducting wire), one may solve N equations for N unknowns (the charge densities), and then plot the charge density as a function of distance along the wire.

It ultimately determines the charges on each subsection of the wire by solving N equations in N unknowns, by specifying that the potential on the axis of each hollow cylindrically- shaped element be the same V.

Potential due to a charged section of a cylinder when the ends of the cylinder are located at Z1 and Z2

Find the potential at different segment distances away from a charged segment.

Make a function for the potential of the section at "dist" sections away from the charged section with rho="charge".

Set up 4 equations to find the 4 unknown charges on the 4 sections.

Now do the same problem with more segments in the cylinder.

Use a loop to create the equations.

Download cylinder.ms [Use 'Save File']


(holtplot.ms)


(Legendr2.ms)

Objective: To derive the first eight Legendre polynomials in two different ways:
1) Using Maple's built in Legendre function
2) By using the formula given: 1/(2^n*(n!))*(d/dx)^n[(x^2 - 1)^n]

Software: Maple V Release 3.0 Authors: Perry Peters and Greg Williby
Concepts Used: Legendre Polynomials Load the orthopoly package

with(orthopoly); Generate the first eight Legendre polynomials

p1 := P(1,x); p2 := P(2,x); p3 := P(3,x); p4 := P(4,x);
p5 := P(5,x); p6 := P(6,x); p7 := P(7,x); p8 := P(8,x);

By using a simple FOR loop, the formula given at the top

can be evaluated for several values of n.

for n from 1 to 8 do
P.n:= simplify(1/(2^n*(n!))*diff((x^2 - 1)^n, x$n)); od;

Plot the first eight Legendre polynomials

plot({P.(1..8)},x=-1.5..1.5,y=-1.5..1.5,title=`Plot of first eight Legendre Polynomials`,color=black);

Download legendr2.ms [Use 'Save File']


pulse.ms


restart;
with(plots):

The idea here is to create a moving magnetic field by successively energizing coils one after the other. The first coil current ramps up to a max, and then as it ramps down, the second coil's current is ramping up to a max. Then as the second coil current ramps down, the current in the 3rd coil ramps up, and so on.

For a loop of wire, the magnetic field a distance x along its axis is:

B:=mu[0]*i*R^2/(2*(x^2+R^2))^(3/2);

where x is the axial distance from the center of the coil, and R is the radius of the coil. Substituting in values for the constants gives:

Bsub:=subs({mu[0]=1,R=1},B);

Next we generate a triangular pulse to represent the current in an individual coil.

Pulse:=(t)->(1-abs(t))*Heaviside(1-abs(t));
plot(Pulse(t),t=-2..2);

Position five coils at locations x=-1, x=-1/2, x=0, x=1/2, and x=1. The coil at x = -1 is pulsed first, and successive coils are pulsed one second after the start of the pulse in the previous coil.

for n from -2 to 2 do
B.n:=subs({x=x-n/2,i=Pulse(t-n)},Bsub);
od;

Draw the individual coils' contributions to the axial B field in red.

f:=animate({B.(-2..2)},x=-2..2,t=-3..3,color=red,frames=50):

Draw the resultant axial B field in black.

g:=animate(convert({B.(-2..2)},`+`),x=-2..2,t=-3..3,color=black,frames=50):

Animate the individual contributions and resultant fields.

display({f,g});

Download pulse.ms [Use 'Save File']


qcap.ms

Download qcap.ms [Use 'Save File']


(slot.ms)

slot.ms This is virtually Example 3. p. 127 in Griffiths text.

A 'slot' is formed by two infinite grounded metal plates parallel to one another, and by a third metal plate. The one grounded metal plate is in the xz plane, from the origin to positive infinity in x and plus/minus infinity in z. The second plate is parallel to the first, located at y=Pi. The third plate runs between the first two from y=0 to y=Pi, and from z=- infinity to to +infinity.

We first plot the fourier sine series solution for this case, then the analytic solution.

restart;with(plots):
s:=1/k*exp(-k*x)*sin(k*y);
V:=4/Pi*sum(subs(k=2*k-1,s),k=1..20);
plot3d(V,x=0..4,y=0..Pi,grid=[40,40],title=`Graph of potential using 20 terms in the series`);
V:=2*1/Pi*arctan(sin(y)/sinh(x));
plot3d(V,x=0..4,y=0..Pi,grid=[40,40],title=`Graph of potential using an explicit function`);


Download slot.ms [Use 'Save File']


vcap.ms

Download vcap.ms [Use 'Save File']


(wireskin.ms)

      |E(r=x)| vs x.


    x  = R/L       

ER(x) EI(x)  |E(x)|  frequency
(kHz)
L (mm)
(this
paper)
d (mm)
(conventional
skin depth)
Conventional
skin depths
(R/d)
0 1.00 0.00 1.0 0 infinite infinite 0
0.35 1.000 0.031 1.0 1 1.43 2.02 0.25
0.70 0.996 0.122 1.0 4 0,71 1.01 0.49
1.05 0.981 0.275 1.0 9 0.48 0.67 0.74
1.40 0.940 0.487 1.1 16 0.36 0.50 0.99
1.75 0.854 0.753 1.1 25 0.29 0.40 1.24
2.10 0.699 1.065 1.3 36 0.24 0.34 1.48
2.45 0.446 1.407 1.5 49 0.20 0.29 1.73
2.80 0.065 1.753 1.8 64 0.18 0.25 1.98
3.15 -0.473 2.063 2.1 81 0.16 0.22 2.23
3.50 -1.194 2.283 2.6 100 0.14 0.20 2.47
3.85 -2.111 2.283 3.2 121 0.13 0.18 2.72
4.2 -3.219 2.142 3.9 144 0.12 0.17 2.97
4.55 -4.888 1.579 4.8 169 0.11 0.16 3.22
4.90 -5.843 0.525 5.9 196 0.10 0.14 3.46
5.25 -7.160 -1.147 7.3 225 0.10 0.13 3.71
5.60 -8.247 -3.560 9.0 256 0.09 0.13 3.96
5.95 -8.835 -6.801 11.1 289 0.08 0.12 4.21
6.30 -8.569 -10.901 13.9 324 0.08 0.11 4.45
6.65 -7.007 -15.787 17.3 381 0.08 0.11 4.70
7.00 -3.633 -21.239 21.5 400 0.07 0.10 4.95


N. B. Conventional skin depth 'd' is sqrt(2) L.
x =3.5
means radius = 3.5 L, or radius = 3.5 skin depths as defined in this paper.
BUT, x=3.5 also means radius = 3.5/sqrt(2) d, or radius = 2.5 d = 2.5 conventional skin depths


References

Download wireskin.ms [Use 'Save File']


Back to the Electromagnetic Theory Resource Page