File:Current-loop-field-3D.png
Summary
Description |
English: 3D plot of the absolute value of the magnetic field B of two a circular coil. The coil radius is set to 1. The B-field is given in units of the field in the ring center . |
Date | |
Source | Own work Category:PNG created with Mathematica#Current-loop-field-3D.png |
Author | Geek3 |
Mathematica Source Code
Bx[x_, z_, R_] =
If[Abs[x/R] < 10^-5, 0, z/(2 Pi x) (\[Beta] = (x + R)^2 + z^2;
m = 4 x*R/\[Beta];
1/Sqrt[\[Beta]] ((R^2 + x^2 + z^2)/((R - x)^2 + z^2) EllipticE[
m] - EllipticK[m]))];
Bz[x_, z_, R_] = 1/(2 Pi) (\[Beta] = (x + R)^2 + z^2;
m = 4 x*R/\[Beta];
1/Sqrt[\[Beta]] ((R^2 - x^2 - z^2)/((R - x)^2 + z^2) EllipticE[
m] + EllipticK[m]));
B[x_, z_, R_] = {Bx[x, z, R], Bz[x, z, R]};
ColorFunc[x_] =
Blend[{{0, Hue[0.65, 0.6, 1]}, {1/4, Hue[1/3, 0.7, 0.8]}, {1/2,
Hue[1/6, 0.9, 0.8]}, {1, RGBColor[0.95, 0.2, 0.2]}}, x];
R = 1;
plot = Plot3D[2 R Norm[B[x, z, R]],
{x, -2, 2}, {z, -2, 2}, PlotRange -> {0, 2},
BoxRatios -> {5, 5, 2},
AxesLabel -> {"\[Rho]", "z", "\!\(\*FractionBox[\"B\",
RowBox[{\"B\",
RowBox[{\"(\", \"0\", \")\"}]}]]\)"},
AxesEdge -> {{-1, -1}, {1, -1}, {1, 1}}, PlotPoints -> 21,
MaxRecursion -> 5, Method -> {Refinement -> {ControlValue -> 0.05}},
ImageSize -> 800, ClippingStyle -> None,
Mesh -> {7, 7, Range[0, 3/2, 1/2]},
MeshFunctions -> {#1 &, #2 &, #3 &},
MeshStyle -> {Black, Black, {LightGray, Thickness[0.002]}},
ColorFunction -> (Directive[SurfaceColor@Darker[ColorFunc[#3], 0.2],
Glow@Darker[ColorFunc[#3], 0.8], Specularity[0.3, 40]] &),
BaseStyle -> {FontSize -> 20}, ViewPoint -> {4, -10, 5}]
SetDirectory[NotebookDirectory[]];
Export["Current-loop-field-3D.png", plot, ImageResolution -> 300];
Licensing
I, the copyright holder of this work, hereby publish it under the following license:
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
- You are free:
- to share – to copy, distribute and transmit the work
- to remix – to adapt the work
- Under the following conditions:
- attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.