[go: up one dir, main page]

100% found this document useful (1 vote)
169 views6 pages

Torus Magnetic Moment

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 6

Calculating the Magnetic Dipole Moment of a

Charged Rotating Torus.


Ben Waterglow (Electric Mage)
August 17, 2020

1 Magnetic Dipole Moment Equations


The magnetic dipole moment of a chaged, rotating object is given by


→ 1 − → −

m= r × I dl (1)
2

where −→
m is the magnetic dipole moment vector, − →
r is the position vector of a


point on the surface, I is the current, and dl is the element of surface area.
Integrating over a torus with a major radius A and minor radius a gives us


→ 1 ( )
m = Q 2A2 + 3a2 ωẑ (2)
8
where Q is the total charge, ω is the angular velocity, and ẑ is the unit vector
along the axis of rotation.

2 Calculating Capacitance
Since, by definition, Q = CV , we need to calulate the capacitance of a torus.
This can be accomplished by using the following formula:

C = 16ε0 ᚠ(x) A2 − a2 ;

1 Q−1/2 (x) ∑ Qn−1/2 (x)
ᚠ(x) = + ; (3)
2 P−1/2 (x) n=1 Pn−1/2 (x)
A
x= ;
a
where ε0 is the permittivity of free space, and Qn−1/2 (x) and Pn−1/2 (x) are
Legendre functions.

1
These functions, for half-integer degree, are defined as:

Q−1/2 (x) = kK;


K −E
Q1/2 (x) = 2 − kK;
k
2
P−1/2 (x) = kK ′ ;
π( )
2 2E ′ (4)
P1/2 (x) = − kK ′ ;
π k
2mx Qm−1/2 (x) − (m − 1/2) Qm−1/2−1 (x)
Qm+1/2 = ;
m + 1/2
2mx Pm−1/2 (x) − (m − 1/2) Pm−1/2−1 (x)
Pm+1/2 = ;
m + 1/2

where K and E are the complete elliptic integrals of first and second kinds,
with modulus √
2
k= (5)
x+1
and K ′ and E ′ have the modulus

k′ = 1 − k2 (6)

Note that we can factor π2 out of the Pn−1/2 (x) functions, perform the
summation, and multiply the result by π2 to complete the calculation of ᚠ(x),
if desired.

The complete elliptic integrals are the following, irreducible functions:


( π) ∫ π2

K = F k, = F (k) = √
2 0 1 − k 2 sin2 ϕ
∫ π √
(7)
( π) 2
E = E k, = E(k) = 1 − k 2 sin2 ϕdϕ
2 0

While it is not currently understood how to evaluate these integrals


symbolically, they can be evaluated quite effectively by using the
arithmetic-geometric mean method. An implementation written in C can be
found later in this document.

3 Completing the Fomula


Using the capacitance formula (equation 3), we now have the following:
√ ( )
m̂ = 2ε0 ᚠ(x) A2 − a2 2A2 + 3a2 V ωẑ (8)

2
Because ᚠ(x) only depends on the ratio Aa , this can be rewritten as:
√ ( )
1 3
m̂ = 2ε0 ᚠ(x) 1 − 2 2 + 2 A3 V ωẑ (9)
x x
A
Since this scales with A3 , we can see how the a ratio affects the magnetic dipole
moment:

√ ( )
Figure 1: ᚠ(x) 1 − 1
x2 2 + 3 x12 for values of 1
x between 0 and 1

Interestingly, the formula for the magnetic dipole moment of a chaged rotating
spherical shell is

m̂ = ε0 A3 V ωẑ (10)
3
which means that, for a sphere with a radius equal to the major radius A, a
ratio of 0.38572893788 has the same magnetic dipole moment, given an equal
voltage and angular velocity. It is, however, impossible to achieve equal results
using a sphere with radius equal to the total radius of the torus, IE A + a.

4 Example C Implementation

#include <stdio.h>
#include <stdlib.h>

#include <math.h>
#include <float.h>

// Set up some aliases for easily changing the data type.

3
typedef long double real;

#define sq_root(x) sqrtl(x)


#define abs_val(x) fabsl(x)

#define epsilon LDBL_EPSILON

// permittivity of free space, multiplied by 10e12, for calculations in


picofarads.
#define e_0_pf 8.854187812813L

// There is no long double definition for pi.


// Store in global variable, and calculate on first use.
real pi_val = 0;
static inline real getPi() {
if (!pi_val) {
pi_val = acosl(-1.0L);
}
return pi_val;
}
#define pi getPi()

// Returns x^2
static inline real square(real x) {
return x * x;
}

// Caculate K and E using AGM.


static void ellipticKE(real m, real *Kout, real *Eout) {
real
a = 1.0,
b = sq_root(1.0 - (m)),
E = 1 - (m)/2.0,
i = 1;
while (abs_val(a - b) > epsilon) {
real a1 = (a + b)/2.0,
b1 = sq_root(a*b);
E -= i * square((a-b)/2.0);
i *= 2.0;
a = a1;
b = b1;
}
real K = pi/(2.0 * a);
*Kout = K;
*Eout = E * K;
}

// calculate the value of fehu(x)


static real fehu(real x) {

4
real
m = 2.0/(x + 1.0),
k = sq_root(m),

K,Kprime,E,Eprime;

// Make sure 0 < m < 1.0.


// Casting to float because of some odd behavior
// for values very close to 1.0 on GCC and mingw32.
// Different compiler and/or env may behave differently.
if (m <= 0.0 || ((float) m) >= 1.0) {
return (real) nan("");
}

ellipticKE(m, &K, &E);


ellipticKE(1.0 - m, &Kprime, &Eprime);

real
lastQ = k * K,
Q = (2.0 * (K - E) / k) - lastQ,
lastP = (k * Kprime),
P = (((2.0 * Eprime)/k) - lastP),

sum = ((lastQ / lastP) / 2.0) + (Q/P);

unsigned long long j;


for (j = 1; j <= ~0; j++) {
real
i = j,
modifier1 = (2.0 * x * i) / (i + 0.5),
modifier2 = (i - 0.5) / (i + 0.5),

nextQ = (modifier1 * Q) - (modifier2 * lastQ),


nextP = (modifier1 * P) - (modifier2 * lastP);

lastQ = Q;
lastP = P;
Q = nextQ;
P = nextP;

real term = Q/P;


if (abs_val(term) > epsilon) {
sum += term;
} else {
return sum * pi/2.0;
}
}
}

// Get the capacitance in picofarads.

5
real capacitancePf(real A, real a) {
return 16.0 * e_0_pf * fehu(A/a) * sq_root(square(A) - square(a));
}

// Get the magnetic dipole moment, without V or omega.


real magneticMoment(real A, real a) {
return 2.0 * e_0_pf * fehu(A/a) * sq_root(square(A) - square(a)) *
((2.0 * square(A)) + (3.0 * square(a)));
}

// Get the multiplier for magnetic moment. Needs to be multiplied by 2.0


* e0 * V * omega * R^3.
real magneticMomentMultiplier(real ratio) {
return sq_root(1.0 - square(ratio)) * (2.0 + (3.0 * square(ratio)))
* fehu(1.0/ratio);

// Print a CSV of magnetic moment multipliers (need to be multiplied by


2.0 * e0 * V * omega * R^3) for various sizes of torus.
int main(int argc, char *argv[]) {
real
ratio_initial = 0.001L,
ratio_step = 0.001L,
ratio_last = 1.0L - ratio_step,
ratio = ratio_initial;

printf("Ratio,Magnetic Dipole Moment Multiplier\n");


do {
printf("%.3f,%.100f\n", (double) ratio, (double)
magneticMomentMultiplier(ratio));
} while (ratio <= ratio_last && (ratio += ratio_step));

return EXIT_SUCCESS;
}

You might also like