Hello all!
I am trying to solve a problem of calculating induced electrical currents in a varying magnetic field. The field originates from current through a coil. I am only interested in the steady state solution, but also the time dependence might be interesting to solve.
I already calculated the A field from the coils. There are two coils, each has 2 layers with 5 turns each, so a total of 2 turns (see code below). This is the field for a constant current of 1A, but my actual field would have a slope of e.g. 1 A/s.
What I am interested now is:
A circular dish is filled with conducting medium, and no current across the dish walls.The dish has a size of e.g. 35mm diameter and 5 mm height, and its bottom center is at the origin. How do the currents look that are induced by the changing field? Can we also determine the distribution of charges?
(*Magnetic Field Simulation for Two Coils*)
(*Coil Parameters*)
x0 = 0.04; (* Coil axis offset from origin = 40 mm *)
n0 = 5; (* Number of turns in each layer *)
d1 = 0.005; (* distance of turns = 5 mm *)
r0 = x0 - (n0 - 1/2)*d1; (* Inner coil radius *)
m0 = 2; (* Number of layers *)
d0 = 0.014; (* distance of layers = 14 mm *)
d2 = 0.006; (* offset from origin = 6 mm *)
i0 = 1.0; (* Current = 1A *)
(* Permeability of free space[H/m] *)
mu0 = 4*Pi*10^-7;
(*Each coil is defined by {xc, r, zc, I}*)
leftCoilTurns =
Flatten[Table[
Table[{-x0, r0 + n*d1, -l*d0 - d2, i0}, {n, 0, n0 - 1}], {l, 0,
m0 - 1}], 1];
rightCoilTurns =
Flatten[Table[
Table[{x0, r0 + n*d1, -l*d0 - d2, -i0}, {n, 0, n0 - 1}], {l, 0,
m0 - 1}], 1];
allTurns = Join[leftCoilTurns, rightCoilTurns];
AFieldTurn[{x_, y_, z_}, {xc_, yc_, zc_}, r_, i_] :=
Module[{dx, dy, dz, rho, k2, k, aphi},
dx = x - xc; dy = y - yc; dz = z - zc;
rho = Sqrt[dx^2 + dy^2];
If[rho != 0,
rho = Sqrt[dx^2 + dy^2];
k2 = 4 r*rho/((r + rho)^2 + dz^2);
k = Sqrt[k2];
aphi = mu0*i/(Pi*k)*Sqrt[r/rho] ((1 - k2/2) EllipticK[k2] - EllipticE[k2]);
{-aphi*dy/rho, aphi*dx/rho, 0},
{0, 0, 0}]
]
AFieldTotalXYZ[x_?NumericQ, y_?NumericQ, z_?NumericQ] :=
Plus @@ (AFieldTurn[{x, y, z}, {#[[1]], 0, #[[3]]}, #[[2]], #[[
4]]] & /@ allTurns)
AMagnitude[x_, y_, z_] := Norm[AFieldTotalXYZ[x, y, z]]
ContourPlot[AMagnitude[x, 0, z], {x, -0.1, 0.1}, {z, 0, 0.05},
Contours -> 20, ColorFunction -> "Rainbow", AspectRatio -> Automatic,
PlotPoints -> 30]
ContourPlot[AMagnitude[x, y, 0], {x, -0.1, 0.1}, {y, -0.05, 0.05},
Contours -> 20, ColorFunction -> "Rainbow", AspectRatio -> Automatic,
PlotPoints -> 30]
Thank you for your ideas and help!
Max