2. General Physics

Legal Notice, Disclaimer, and Book Ordering Information:

Null

Setup

\($DefaultFont = {"Courier", 12}; 
Off[General::spell]; 

    Off[General::spell1]; 
PageWidth -> 70; \)

Needs["Calculus`VectorAnalysis`"]Needs["Graphics`PlotField`"]Needs["Graphics`PlotField3D`"]

Clear["Global'*"];

<< "D:\Mma\Inits\ch2init.m"

2.4 Problems

2.4.3  Electricity and Magnetism

Problem 4:  The Magnetic Vector Potential of a Linear Current

Part (a)  Vector potential perpendicular to the midpoint of the wire for large L.

Az[r_] = Integrate[I0/Sqrt[z^2 + r^2], {z, -L, L}] // Simplify

A[x_, y_, z_] = {0, 0, Az[Sqrt[x^2  +  y^2]]}

Part (b)  Calculate magnetic field and take the limit as L->∞.

B[x_, y_, z_] = Curl[A[x, y, z], Cartesian[x, y, z]] // Simplify

BLimit[x_, y_, z_] = Limit[B[x, y, z], L -> Infinity]

Part (c)  Plot the magnetic field ofan infinite wire in 2 and 3 dimensions.

\(\(p1 = 
      PlotVectorField3D[BLimit[x, y, z] /. I0 -> 1

        		, {x, \(-1\), 1}, {y, \(-1\), 1}, {z, \(-1\), 1}
	\ \ , 
        PlotPoints -> 8
		, VectorHeads -> True
		, 
        ColorFunction -> Hue
		, 
        Graphics`PlotField3D`ScaleFunction -> \((1&)\)]; \)\)

Show[p1, ViewPoint -> {2, 2, 16}];

\(\(p2 = 
      PlotVectorField[Drop[BLimit[x, y, z], \(-1\)] /. I0 -> 1

        		, {x, \(-3\), 3}, {y, \(-3\), 3}
	\ \ , PlotPoints -> 24
		, 
        VectorHeads -> True
		, ColorFunction -> Hue
		, 
        Graphics`PlotField3D`ScaleFunction -> \((1&)\)]; \)\)

Acylind[r_] = {0, 0, Az[r]}

Bcylind[r_] = 
      Curl[Acylind[r], Cylindrical[r, θ, ϕ]] // Simplify // 
        Limit[#, L -> Infinity]&