Re: Magnetic field for a straight conductor with finite length - Biot-Savart Integral

• To: mathgroup at smc.vnet.net
• Subject: [mg91665] Re: [mg91660] Magnetic field for a straight conductor with finite length - Biot-Savart Integral
• From: robert prince-wright <robertprincewright at yahoo.com>
• Date: Wed, 3 Sep 2008 06:45:19 -0400 (EDT)
• Reply-to: robertprincewright at yahoo.com

```Thanks Curtis

the Assume[] function does the trick.

I've been 'assuming' (bad pun) the solution for a current flowing between [0,L] can be used to model a rectangular loop - that should take care of the end conditions?

BTW - does anyone know if there is a good (recent) Mathematica book dealing with electromagnetism? I am looking for best practice ways of using Mathematicas vector based algebra functions to calculate magnetic fields for power transmission and distribution systems. I've seen snippets in Trott's books and Paul Abbot's course notes but nothing that builds on the basics of electromagnetism within an Mathematica framework (ideally Mathematica 6!)

Robert

--- On Tue, 9/2/08, Curtis F. Osterhoudt <cfo at lanl.gov> wrote:

> From: Curtis F. Osterhoudt <cfo at lanl.gov>
> Subject: Re: [mg91660] Magnetic field for a straight conductor with finite      length - Biot-Savart Integral
> To: "robert prince-wright" <robertprincewright at yahoo.com>
> Cc: mathgroup at smc.vnet.net
> Date: Tuesday, September 2, 2008, 8:38 AM
> Hi, Robert,
>
>    The imaginary parts of that first expression are easily
> taken care of:
> They refer to the imaginary parts of the coordinates x, y,
> and z, and
> since you're [presumably] working the problem in real
> space, those
> parts all go to zero. Thus, the general math has to be
> tweaked a little
> bit to get the specific physics. Once that is done (perhaps
> by having
> Mathematica evaluate
> Assuming[x\[Element]Reals &&
> y\[Element]Reals && Im[z] ==0,
> Simplify[Re[sol1]]]
> ), you'll get the usual expression for the magnetic
> field due to an
> infinite, straight, steady current in free space.
>    If you leave out the "GenerateConditions ->
> False" options, you'll get
> a more complicated expression, but it will reduce to the
> one you want
> with the "Assuming" line above, so long as either
> x or y are greater
> than zero.
>
>    The same trick may be used to get your sol2, but
> you'll also have to
> eventually tell Mathematica that L>0.
>
>             Hope that helps,
>                       C.O.
>
> P.S. It turns out to be a pretty interesting exercise to
> get that current
> to suddenly appear and disappear at the origin and L.
> Assuming
> conservation of charge and then splitting the wire into
> many at the ends
> so that the current density goes way down there is one
> (problematic) way.
> Another is to shield the ends (containing charge source and
> sink), where I
> think one finds that accelerating and decelerating charges
> leads to fun
>
>
>
> > I am trying to create a plot which shows the magnetic
> field around a
> > straight line of finite length. I started by looking
> online at Michael
> > Trott's Mathematica Guidebook for Numerics which
> gives an example of how
> > Mathematica can solve the Biot-Savart equation for the
> case of an infinite
> > line running along the Z-axis:
> >
> > infiniteWire[t_] = {0, 0, t};
> > sol1 = Integrate[
> >  Cross[D[infiniteWire[t], t], {x, y, z} -
> infiniteWire[t]]/
> >   Norm[{x, y, z} - infiniteWire[t]]^3, {t, -Infinity,
> Infinity},
> >  GenerateConditions -> False]
> >
> >
> > However, if you evaluate the expression above using
> Mathematica 6 the
> > output is different to the book in that it includes
> Im[] terms. Can
> > someone explain why, and how do I get rid of them? I
> tried Re[] but result
> > is left unevaluated if expr is not a numeric quantity.
> Note I have used
> > the built in Norm[] function, not a user defined
> function like Michael.
> >
> > Ultimately, what I need is the solution for the
> Integral below:
> >
> >
> > sol2 = Integrate[
> >   Cross[D[infiniteWire[t], t], {x, y, z} -
> infiniteWire[t]]/
> >    Norm[{x, y, z} - infiniteWire[t]]^3,
> >   {t, 0, L},
> >   GenerateConditions -> False]
> >
> >
> > This corresponds to the case where current flows in a
> straight line from
> > the origin in x-y-z space to a point at a distance L
> along the Z axis.
> >
> >
> > Robert
> >
> >
> >
> >
> >

```

• Prev by Date: Rotate vetically, sometimes yes, sometimes not
• Next by Date: Re: Controlling the size of the integral sign
• Previous by thread: Re: Magnetic field for a straight conductor with finite
• Next by thread: Re: Integrate with parameter