Graduate Electrodynamics
Mathematica Examples
(c) R. Johnson 1996 - All rights reserved
The following are Mathematica notebooks which illustrate points made in
a first year graduate course in Electrodynamics. The course uses Jackson's
Electrodynamics as a text but introduces additional material. In particular,
the first quarter's coverage of conformal mappings and finite element analysis
are outside of Jackson.
- Quarter 1
- Green's functions
- One dimensional Green's function: Calculating the
one dimensional Green's function for Helmholz's equation
subject to the boundary conditions that
the function is zero at both ends of the interval. Green's function is
expanded as a Fourier series and also calculated directly.
- Green's function for a spherical cavity: The Green's
function for Laplace's equation for inside a spherical cavity is used to
find the potential inside the cavity if the surface is either
- V=+V_0 if z>0 and V= -V_0 if z<0; or
- V= V_0 Cos[theta]
- See separation of variables solution for Green's
function for Laplace's equation inside a square box given below under
separation of variables section.
- Introduction to Mathematica: Examples use during Mathematica lab
sessions.
-
Guant coefficients: Expanding the product of two spherical harmonics in terms
of spherical harmonics. Calculation of the expansion coefficients directly from
Mathematica's Wigner3J functions is also done. The Gaunt coefficients are used later
as the classical approximatiuon for multipole radiation from atoms.
-
Vector analysis package: Example of using Mathematica's vector analysis package
to compute various differential operations starting with a 1/r function.
- Conformal Mapping
-
Cylinder: A cylinder in a uniform electric field along the x-axis, rotated
by Pi/4 from the x-axis, and then the cylinder is transformed into an elliptical
cylinder in a unifrom electric field along the diagonal.
- Schwarz-Christoffel transforms
-
Strip: Jackson illustration of the potential in the region bounded
by y>0 and |x| < a when the sides x=+/-a are grounded and the side y=0 is held
at V0 volts. Jackson solves the problem by an expansion in orthonormal
polynomials and then sums the series to get the result. Here the result is
obtained directly by conformal mapping. Problem is extended to solve the
problem of a single wire between two grounded planes and then multiple wires
between two grounded planes.
-
Square-theory: Field inside
a square tube with the top and bottom held at 100 volts and the sides at 0 volts.
- Capacitor: The field at the
edge of a capacitor.
- Finite Elements
- Mlaplace: Finite element solution to Laplace's equation
for a square tube with a voltage V0 on two opposite faces and zero voltage on the other
two. Various finite element techniques,
including direct matrix inversion and various relaxation methods,
are illustrated and compared to the complex
analysis solution to the same problem.
- Separation of Variables - 2 Dimensions
- Rectangular Coordinates
- Square-poly: The problem of the square tube with the two opposite
walls held at 100 volts and the other two walls grounded is solved by a Fourier expansion
of the boundary surface potential. The result is compared with the result obtained from
conformal mappings. The field lines are plotted by finding the imaginary part of the
analytic function whose real part is given by the Fourier expansion.
- Polar Coordinates
- Split cylinder: Upper half of a cylinder is held at +V0, the
bottom half at -V0. The voltage is found inside. The equivalent analytic function is found
for this problem.
- Separation of Variables - 3 Dimensional
- Cartesian
- Spherical with azimuthal symmetry
- Eloop: The potential of a loop of
charge which lies in the xy plane and centered on the origin is calculated
along the z axis and then expanded in Legendre polynomials for other
angles.
- Split Sphere: Solution to the problem of a spherical cavity
with the walls held at +V0 for the upper half of the cavity and -V0 for the lower half.
Result through the center of sphere is compared with the result from the split cylinder
given above. This same problem is solved with the Green's function technique above.
- Spherical
-
Split Sphere II : Same problem as above except the voltage
is given in term of phi. V= +V0 for 0 < phi < Pi and V=-V0 for Pi < phi < 2 Pi.
- Example: Find the voltage inside a spherical cavity
if the voltage on the surface is V=V0 Sin[theta] Cos[2 phi].
- Cylindrical Coordinates
-
Example 1: The voltage inside a cylinder whose top is held at V0
volts and whose side and bottom are grounded.
-
Example 2: The voltage inside a cylinder whose top and bottom are
grounded and whose side has a voltage pattern V(z,theta)=V0 Cos[theta].
- Quarter 2
- Magnetostatics
- Vector Potential
- Aloop: Calculate the vector potential for
a current loop by direct integration. Then expand in spherical harmonics
and compare results.
- Scalar Potential
- Loop: Calculate the magnetic scalar potential
along the z-axis for a loop of current centered on the origin and situated in
the xy plane. The scalar potential is then expanded in Legendre polynomials
for other angles.
- Sphere: Find the scalar potential for a sphere
of magnetic material in an external magnetic field.
- Shield: calculate scalar potential for a
cylindrical magnetic shield in an external magnetic field. Surface current,
potential lines and field lines are plotted for both paramagnetic and
diiamagnetic substances.
- Induced Electric Fields
- Square.Magnet: find the electric field induced by
increase the magnetic field between the poletips of a square horseshoe magnet.
- Plane Waves
- Pulse Precursors: Numeric Fourier transform of a
propogating sine wave. Result is compared with the Sommerfeld and
Brillouin precursors given in Jackson.
- Relativity
- Electric Dipole. Transforming the fields
from a moving electric dipole into the lab. (Solution to Spring '95 final
problem 1.) Also, obtaining frequency spectrum of impulse of electric
dipole.
- Quarter 3