1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Magnetic Field Calculation for Spherically Shaped Coil

  1. Jul 1, 2014 #1
    Hello, I'm attempting to calculate the magnetic field [itex]\mathbf{B}[/itex] outside of a coil with current density, [itex]\mathbf{J}[/itex], and whose volume is a section of a sphere. Here is a diagram of the cross-section of the coil:


    (The wire ridges are aesthetic and aren't considered in the calculations - I'm assuming a solid volume. Also, the origin of my coordinate frame is coincident with the spherical center of the coil - where the z and y axes cross in this diagram. ...Also, I've just realized that the diagram doesn't exactly show the volume produced by my integration bound, but that doesn't affect my question.)

    I'm trying to apply the Biot-Savart law:

    [tex]\mathbf{B}(\mathbf{r}) = \frac{\mu_0}{4\pi}\int_{r_a}^{r_b}\int_{\theta_a}^{\theta_b}\int_{-\pi}^\pi\ \frac{\mathbf{J} \times (\mathbf{r}-\mathbf{r}')}{|\mathbf{r}-\mathbf{r}'|^3} \, r'^2\,\sin \theta \,d\phi\,d\theta\,dr'[/tex]

    As can be seen from this triple integral, I'm using spherical components to simplify things.

    Because of the spherical nature of this problem, I figure it's best to use a spherical coordinate frame to describe [itex]\mathbf{r}'[/itex] and [itex]\mathbf{J}[/itex]. However, I confuse myself when trying to do this. Am I correct in thinking:

    [tex]\mathbf{r}' = \begin{pmatrix} r' \\ 0 \\ 0 \end{pmatrix} \quad \mathrm{and} \quad \mathbf{r} = \begin{pmatrix} r \\ 0 \\ 0 \end{pmatrix}[/tex]?

    Additionally, I want my current vector to be tangential to the axis of symmetry of the coil and perpendicular to the cross-sectional plane in the diagram and am unsure if this would be a correct description:

    [tex]\mathbf{J} = J\begin{pmatrix} 1 \\ \pi/2 \\ \phi \end{pmatrix}[/tex]

    Also for reference, I'm confident that these vector quantities are as follows in the Cartesian frame:

    [tex]\mathbf{r}' = \begin{pmatrix} r \sin\theta\cos\phi \\ r \sin\theta\sin\phi \\ r\cos\theta \end{pmatrix} [/tex]

    [tex]\mathbf{J} = J \begin{pmatrix} -\sin\phi \\ \cos \phi \\ 0 \end{pmatrix} [/tex]

    Just to recap, can someone please advise me about my vectors and their description in a spherical frame? Also, do you think a spherical frame is advantageous? Thanks!
    Last edited: Jul 2, 2014
  2. jcsd
  3. Jul 2, 2014 #2


    User Avatar
    Science Advisor
    Gold Member

    The difficulty is that your [itex] \mathbf{r}[/itex] is an arbitrary vector... not as you have written it.
    For vectors I suggest you stick to the Cartesian frame when writing components. ( since you have an [itex] r'^2 [/itex] factor in your integration I'm presuming [itex]\mathbf{r}'[/itex] points to your volume element and [itex]\mathbf{r}[/itex] points to the point at which you want the B field calculated.)

    Your problem may be intractable for the B field at other than the origin or along the z axis. Maybe not... but may be.

    Given the spherical symmetry you can wolog find the B field at a point in say the x,z plane, setting y=0.

    [tex] \mathbf{r} = \langle a, 0 , b\rangle [/tex]
    (in cartesian frame)

    Use this with your cartesian frame [itex]\mathbf{r}' = \langle r \cos\phi \sin\theta, \cdots\rangle[/itex].

    I suspect you'll end up with elliptic integrals.
  4. Jul 3, 2014 #3
    Thanks for the response jambaugh. The position vector in spherical coordinates has always confused me. In my spacecraft mechanics class, the spherical position vector was always [itex]\mathbf{r} = r\,\hat{r} [/itex]. Can you expound on why this position vector is invalid in my situation? Here's an updated diagram, by the way:


    Also, I think you're correct about this problem being insoluble - I attempted to compute the triple integral using Cartesian vectors and my symbolic solver didn't come to an answer. Additionally, I did some snooping around for the magnetic field of a cylindrical coil and that solution has elliptic integrals in it so this one likely will if it's even possible to solve. I'll try again with the 2D version as you recommended and see if that helps at all.

  5. Jul 16, 2014 #4


    User Avatar
    Science Advisor
    Gold Member

    [itex] r\cdot \hat{r}[/itex] is the vector [itex]\mathbf{r}[/itex] provide [itex] |\mathbf{r}|=r[/itex] and provided that [itex]\hat{r}=1/r \mathbf{r}[/itex]. That's true of any vector [itex]\mathbf{r}[/itex] and I'm just stating here a tautology (r/r=1).

    Your initial problem as I see it is in trying to use coordinate bases at a point away from the initial set of coordinates, or at least in dealing with a difference in two position vectors only one of which is at the position indicated by the coordinates.

    What your wrote would be correct if you indicated the distinct bases of the two component expositions:

    [tex]\mathbf{r}' = \begin{pmatrix} r' \\ 0 \\ 0 \end{pmatrix}_{[\hat{r}',\hat{\theta}',\hat{\phi}']} [/tex]
    [tex]\mathbf{r} = \begin{pmatrix} r \\ 0 \\ 0 \end{pmatrix}_{[\hat{r},\hat{\theta},\hat{\phi}]} [/tex]

    Since you are simultaneously talking about two distinct points, the source point from a differential element of current and the point at which your are measuring a magnetic field, you have two distinct sets of coordinates (polar or other) and if you define coordinate bases for vectors you'll have two distinct bases, requiring some transformation to map one to the other...
    or you can use a common basis which will no longer be "coordinate" with at least one of your two points. You might as well make it coordinate with neither and use constant basis, i.e. the cartesian one.

    Final remark: Remember vectors really represent actions (e.g. displacements) not objects, we define position vectors only relative to an original position we all agree to be "the origin". So your problem has 3 distinct points, the origin, the source point, and the point at which you calculate B field.

    So in particular, we have both vectors and position points overlaid but they are really in distinct spaces and in fact distinct types of spaces. But due to flatness they end up isomorphic and we can "identify" them. This is the source of your confusion imnsho as you need to see their distinctness explicitly before you take their identification for granted. In doing that you can appreciate that the vector basis needn't at all correspond with the coordinate system you use. But your confusion is also the beginnings of the higher level abstraction where the question of how we map vectors over there to vectors over here becomes non-trivial when the manifold has curvature and is no longer a vector space. Things get interesting and set the stage for Einstein's GR.
  6. Jul 17, 2014 #5
    Thanks for the clarification! You explained it very well, and it all makes sense now. Thanks for all your help!
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook