Berechnung des Magnetfelds von Stromschleifen

Definition benötigter Vektoren

<< Calculus`VectorAnalysis`<< Graphics`PlotField`<< DiscreteMath`RSolve`Off[General::"spell1"]\(vr = {x, 0, z}; 

    eφ = {\(-Sin[φ]\), Cos[φ], 0}; 

    eρ = {Cos[φ], Sin[φ], 0}; 
ez = {0, 0, 1}; 

    On[General::"spell1"]\)

Definition des Magnetfeldintegrals für eine Stromschleife

\(intB = 
      CrossProduct[eφ, \((vr - eρ)\)]
          \/\((\@\(\((vr - eρ)\).\((vr - eρ)\)\))\)\^3; 

    intB1 = intB[\([1]\)] // Simplify; 
intB2 = intB[\([2]\)] // Simplify; 

    intB3 = intB[\([3]\)] // Simplify; 

    b1[cx_, cz_] := 
      NIntegrate[intB1 /. {x -> cx, z -> cz}, {φ, 0, 2  π}, 
        AccuracyGoal -> 3]\)b2[cx_, cz_] := 
      NIntegrate[intB2 /. {x -> cx, z -> cz}, {φ, 0, 2  π}, 
        AccuracyGoal -> 3]b3[cx_, cz_] := 
      NIntegrate[intB3 /. {x -> cx, z -> cz}, {φ, 0, 2  π}, 
        AccuracyGoal -> 3]

Integration auf einer Viertelebene und Spiegelung des Feldes

Off[General::"spell1"]\(tab = 
      Table[Table[{b1[x, z], b3[x, z]}, {x, .1, 2, .1}], {z, .1, 2, .1}]; 

    On[General::"spell1"]\)\(tab1 = Reverse[tab]; 

    tab2 = Inner[Times, Transpose[Reverse[Transpose[tab1]]], {\(-1\), 1}, 
        List]; 
tab4 = Inner[Times, Reverse[tab1], {\(-1\), 1}, List]; 

    tab3 = Inner[Times, Reverse[tab2], {\(-1\), 1}, List]; 

    tab1234 = 
      Join[Transpose[Join[Transpose[tab2], Transpose[tab1]]], 
        Transpose[Join[Transpose[tab3], Transpose[tab4]]]]; \)

Darstellung des Feldes in der x-z Ebene

ListPlotVectorField[tab1234]

Definition des Magnetfeldintegrals für eine Helmholzspule

Bedingung für das homogenste Feld

Definition des Feldes zweier Spulen mit Radius 1 und Abstand 2d

\(intB = 
      CrossProduct[eφ, \((vr - eρ - d\ ez)\)]
            \/\((\@\(\((vr - eρ - d\ ez)\).\((vr - eρ - d\ ez)\)\))
              \)\^3 + CrossProduct[eφ, \((vr - eρ + d\ ez)\)]
            \/\((\@\(\((vr - eρ + d\ ez)\).\((vr - eρ + d\ ez)\)\))
              \)\^3; 
intB1 = intB[\([1]\)] // Simplify; 

    intB2 = intB[\([2]\)] // Simplify; 
intB3 = intB[\([3]\)] // Simplify; 
    \)

Für welchen Abstand hängt das Feld um das Zentrum am wenigsten von x ab?

Solve[
      (∫_0
            ^(2  π))SeriesCoefficient[
              Series[intB3 /. z -> 0 // Simplify, {x, 0, 2}], 2] 
            \[DifferentialD]φ == 0, d]

Für welchen Abstand hängt das Feld um das Zentrum am wenigsten von z ab?

Solve[
      (∫_0
            ^(2  π))SeriesCoefficient[
              Series[intB3 /. x -> 0 // Simplify, {z, 0, 2}], 2] 
            \[DifferentialD]φ == 0, d]

Das Feld in einer Helmholzspule ist daher am homogensten, wenn der Abstand 2d der Spulen gerade dem Spulenradius entspricht.

\(intB = 
      CrossProduct[eφ, \((vr - eρ - \(1\/2\) ez)\)]
            \/\((\@\(\((vr - eρ - \(1\/2\) ez)\).
                  \((vr - eρ - \(1\/2\) ez)\)\))\)\^3 + 
        CrossProduct[eφ, \((vr - eρ + \(1\/2\) ez)\)]
            \/\((\@\(\((vr - eρ + \(1\/2\) ez)\).
                  \((vr - eρ + \(1\/2\) ez)\)\))\)\^3; 

    intB1 = intB[\([1]\)] // Simplify; 
intB2 = intB[\([2]\)] // Simplify; 

    intB3 = intB[\([3]\)] // Simplify; 

    b1[cx_, cz_] := 
      NIntegrate[intB1 /. {x -> cx, z -> cz}, {φ, 0, 2  π}, 
        AccuracyGoal -> 3]\)b2[cx_, cz_] := 
      NIntegrate[intB2 /. {x -> cx, z -> cz}, {φ, 0, 2  π}, 
        AccuracyGoal -> 3]b3[cx_, cz_] := 
      NIntegrate[intB3 /. {x -> cx, z -> cz}, {φ, 0, 2  π}, 
        AccuracyGoal -> 3]

Integration auf einer Viertelebene und Spiegelung des Feldes

Off[General::"spell1"]\(tab = 
      Table[Table[{b1[x, z], b3[x, z]}, {x, 0, 2, .15}], {z, 0, 2, .15}]; 

    On[General::"spell1"]\)\(tab1 = Reverse[tab]; 

    tab2 = Inner[Times, Transpose[Reverse[Transpose[tab1]]], {\(-1\), 1}, 
        List]; 
tab4 = Inner[Times, Reverse[tab1], {\(-1\), 1}, List]; 

    tab3 = Inner[Times, Reverse[tab2], {\(-1\), 1}, List]; 

    tab1234 = 
      Join[Transpose[Join[Transpose[tab2], Transpose[tab1]]], 
        Transpose[Join[Transpose[tab3], Transpose[tab4]]]]; \)

Darstellung des Feldes in der x-z Ebene

ListPlotVectorField[tab1234]

Definition des Magnetfeldintegrals einer Quadrupolanordnung

\(intB = 
      CrossProduct[eφ, \((vr - eρ - \(1\/2\) ez)\)]
            \/\((\@\(\((vr - eρ - \(1\/2\) ez)\).
                  \((vr - eρ - \(1\/2\) ez)\)\))\)\^3 - 
        CrossProduct[eφ, \((vr - eρ + \(1\/2\) ez)\)]
            \/\((\@\(\((vr - eρ + \(1\/2\) ez)\).
                  \((vr - eρ + \(1\/2\) ez)\)\))\)\^3; 

    intB1 = intB[\([1]\)] // Simplify; 
intB2 = intB[\([2]\)] // Simplify; 

    intB3 = intB[\([3]\)] // Simplify; 

    b1[cx_, cz_] := 
      NIntegrate[intB1 /. {x -> cx, z -> cz}, {φ, 0, 2  π}, 
        AccuracyGoal -> 3]\)b2[cx_, cz_] := 
      NIntegrate[intB2 /. {x -> cx, z -> cz}, {φ, 0, 2  π}, 
        AccuracyGoal -> 3]b3[cx_, cz_] := 
      NIntegrate[intB3 /. {x -> cx, z -> cz}, {φ, 0, 2  π}, 
        AccuracyGoal -> 3]

Integration auf einer Viertelebene und Spiegelung des Feldes

Off[General::"spell1"]\(tab = 
      Table[Table[{b1[x, z], b3[x, z]}, {x, 0, 2, .15}], {z, 0, 2, .15}]; 

    On[General::"spell1"]\)\(tab1 = Reverse[tab]; 

    tab2 = Inner[Times, Transpose[Reverse[Transpose[tab1]]], {\(-1\), 1}, 
        List]; 
tab4 = Inner[Times, Reverse[tab1], {1, \(-1\)}, List]; 

    tab3 = Inner[Times, Reverse[tab2], {1, \(-1\)}, List]; 

    tab1234 = 
      Join[Transpose[Join[Transpose[tab2], Transpose[tab1]]], 
        Transpose[Join[Transpose[tab3], Transpose[tab4]]]]; \)

Darstellung des Feldes in der x-z Ebene

ListPlotVectorField[tab1234]