{"id":3826,"date":"2014-05-01T00:08:38","date_gmt":"2014-05-01T04:08:38","guid":{"rendered":"http:\/\/pages.vassar.edu\/magnes\/?p=3826"},"modified":"2014-05-01T00:45:20","modified_gmt":"2014-05-01T04:45:20","slug":"final-data-3","status":"publish","type":"post","link":"https:\/\/pages.vassar.edu\/magnes\/2014\/05\/01\/final-data-3\/","title":{"rendered":"Final Data"},"content":{"rendered":"<p>The next phase of my project involved actually creating some models of the magnetic field of a magnetic dipole. \u00a0This proved to require more steps and creativity than previously thought, but in the end I did get some useful plots. \u00a0The three finalized Mathematica files that I refer to throughout this post can be found via the link at the bottom of this post.<\/p>\n<p>The first breakthrough I had was using a different technique to convert the expression for the magnetic field from spherical to cartesian coordinates so that Mathematica can plot some version of its information. \u00a0This technique worked way better than using Mathematica&#8217;s built in TransformedField function, which produced some weird results (see Preliminary Data post). \u00a0Instead, I decided, with the help of Shelly Johnson, to write out the explicit cartesian forms of $r$, $\\theta$, and $\\phi$ as well as the explicit spherical forms of $\\hat{r}$ $\\hat{\\theta}$, and $\\hat{\\phi}$, and then let Mathematica substitute these expressions in the larger expression for the magnetic field. \u00a0This worked pretty well to give the three components of the magnetic field, $\\vec{B_x}$, $\\vec{B_y}$, and $\\vec{B_z}$, as can be seen at the top of my Mathematica file titled &#8220;3D_vector_graphs.nb&#8221;.<\/p>\n<p>When these expressions are plotted using VectorPlot3D, however, the results are pretty uninformative.<\/p>\n<div id=\"attachment_3830\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3Dvectorplot.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3830\" class=\"size-medium wp-image-3830\" alt=\"3D vector plot of the magnetic field of a magnetic dipole\" src=\"http:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3Dvectorplot-300x275.jpg\" width=\"300\" height=\"275\" srcset=\"https:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3Dvectorplot-300x275.jpg 300w, https:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3Dvectorplot.jpg 412w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-3830\" class=\"wp-caption-text\">3D vector plot of the magnetic field of a magnetic dipole<\/p><\/div>\n<p>Even zoomed in and seen from a more right angle, this field is not helpful.<\/p>\n<div id=\"attachment_3831\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3Dvectorplot2.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3831\" class=\"size-medium wp-image-3831\" alt=\"Same plot as above, but seen zoomed in and in the xz plane\" src=\"http:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3Dvectorplot2-300x276.jpg\" width=\"300\" height=\"276\" srcset=\"https:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3Dvectorplot2-300x276.jpg 300w, https:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3Dvectorplot2.jpg 402w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-3831\" class=\"wp-caption-text\">Same plot as above, but seen zoomed in and in the xz plane<\/p><\/div>\n<p>Since this approach didn&#8217;t work well, for reasons discussed more in my next Conclusion post, and my previous attempts at plotting the vector field at representative points was getting complicated as well, I decided to try to use this new transformation by substitution method to try Contour plots instead.<\/p>\n<p>I began by forming one expression for the magnetic field value at points in space, with no vector information. \u00a0This expression ends up being pretty manageable, and the contours of this can be made effectively using ContourPlot3D. \u00a0Some different results are shown below, taken from my Mathematica file &#8220;3D_contour_graphs&#8221;.<\/p>\n<div id=\"attachment_3838\" style=\"width: 282px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3Dcontour1simple.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3838\" class=\"size-medium wp-image-3838 \" alt=\"3Dcontour1simple\" src=\"http:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3Dcontour1simple-272x300.jpg\" width=\"272\" height=\"300\" srcset=\"https:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3Dcontour1simple-272x300.jpg 272w, https:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3Dcontour1simple.jpg 380w\" sizes=\"auto, (max-width: 272px) 100vw, 272px\" \/><\/a><p id=\"caption-attachment-3838\" class=\"wp-caption-text\">3D contour of my expression for the magnitude of the magnetic field of a magnetic dipole. This contour is for when the magnetic field equals 1<\/p><\/div>\n<div id=\"attachment_3839\" style=\"width: 296px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3dcontourhalf.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3839\" class=\"size-medium wp-image-3839\" alt=\"The same plot as above, but this time zoomed in and shown &quot;cut in half&quot; to see what happens on the inside of the symmetric circular outer portion\" src=\"http:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3dcontourhalf-286x300.jpg\" width=\"286\" height=\"300\" srcset=\"https:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3dcontourhalf-286x300.jpg 286w, https:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3dcontourhalf.jpg 395w\" sizes=\"auto, (max-width: 286px) 100vw, 286px\" \/><\/a><p id=\"caption-attachment-3839\" class=\"wp-caption-text\">The same plot as above, but this time zoomed in and shown &#8220;cut in half&#8221; to see what happens on the inside of the symmetric circular outer portion<\/p><\/div>\n<p>These results are pretty promising, so I then added in a few more contours, to see how the different values looked relative to one another.<\/p>\n<div id=\"attachment_3840\" style=\"width: 295px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3dcontourmultiple.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3840\" class=\"size-medium wp-image-3840\" alt=\"Similar plot to the above, but this time with three contours.  From the inner to outer contours, these surfaces represent the places where the magnitude of the magnetic field equals 0.75, 0.5, and 0.28 respectively.\" src=\"http:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3dcontourmultiple-285x300.jpg\" width=\"285\" height=\"300\" srcset=\"https:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3dcontourmultiple-285x300.jpg 285w, https:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3dcontourmultiple.jpg 399w\" sizes=\"auto, (max-width: 285px) 100vw, 285px\" \/><\/a><p id=\"caption-attachment-3840\" class=\"wp-caption-text\">Similar plot to the above, but this time with three contours. From the inner to outer contours, these surfaces represent the places where the magnitude of the magnetic field equals 0.75, 0.5, and 0.28 respectively.<\/p><\/div>\n<p>This is pretty good, but where are these surfaces in relation to the small current loop that is supposed to be creating these magnetic field contours? \u00a0My next few contours include a small yellow ring at the origin, which indicates the placement of the loop, and also plots both positive and negative contours, which gives the whole picture both above and below the ring (which, looking at the original equation, should be symmetric).<\/p>\n<div id=\"attachment_3842\" style=\"width: 292px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3dcontoursidewithring.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3842\" class=\"size-medium wp-image-3842\" alt=\"The same three contours as above, along with their negative counterparts, and a small yellow ring representing the current loop that creates the magnetic field modeled.\" src=\"http:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3dcontoursidewithring-282x300.jpg\" width=\"282\" height=\"300\" srcset=\"https:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3dcontoursidewithring-282x300.jpg 282w, https:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3dcontoursidewithring.jpg 391w\" sizes=\"auto, (max-width: 282px) 100vw, 282px\" \/><\/a><p id=\"caption-attachment-3842\" class=\"wp-caption-text\">The same three contours as above, along with their negative counterparts, and a small yellow ring representing the current loop that creates the magnetic field modeled.<\/p><\/div>\n<div id=\"attachment_3824\" style=\"width: 302px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3Dcontour.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3824\" class=\"size-medium wp-image-3824\" alt=\"A different view of the above graph, which allows one to look into the part of the contour that has been &quot;cut open&quot;.\" src=\"http:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3Dcontour-292x300.jpg\" width=\"292\" height=\"300\" srcset=\"https:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3Dcontour-292x300.jpg 292w, https:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3Dcontour.jpg 370w\" sizes=\"auto, (max-width: 292px) 100vw, 292px\" \/><\/a><p id=\"caption-attachment-3824\" class=\"wp-caption-text\">A different view of the above graph, which allows one to look into the part of the contour that has been &#8220;cut open&#8221;.<\/p><\/div>\n<p>Now that there is a current loop in our models, what happens when the current in this loop is increased? \u00a0The above models were made with a magnetic dipole moment, $m=1$, but the below image increased the current so that $m=2$.<em><br \/>\n<\/em><\/p>\n<div id=\"attachment_3841\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3dcontourmultiplebiggerB.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3841\" class=\"size-medium wp-image-3841\" alt=\"Similar plot to above, but with a stronger magnetic field (m=2).\" src=\"http:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3dcontourmultiplebiggerB-300x287.jpg\" width=\"300\" height=\"287\" srcset=\"https:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3dcontourmultiplebiggerB-300x287.jpg 300w, https:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3dcontourmultiplebiggerB.jpg 403w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-3841\" class=\"wp-caption-text\">Similar plot to above, but with a stronger magnetic field (m=2).<\/p><\/div>\n<p>Putting images with $m=1$, $m=2$, and $m=3$ side by side shows that the same contours move farther away (and change curvature a bit) for models with larger <em>m\u00a0<\/em>values, which is expected because larger\u00a0<em>m<\/em> values indicate larger magnetic fields.<\/p>\n<dl class=\"wp-caption alignright\" id=\"attachment_3844\" style=\"width: 188px\">\n<dt class=\"wp-caption-dt\"><\/dt>\n<\/dl>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3Dcontour.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-3824 alignleft\" alt=\"A different view of the above graph, which allows one to look into the part of the contour that has been &quot;cut open&quot;.\" src=\"http:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3Dcontour-292x300.jpg\" width=\"175\" height=\"180\" srcset=\"https:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3Dcontour-292x300.jpg 292w, https:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3Dcontour.jpg 370w\" sizes=\"auto, (max-width: 175px) 100vw, 175px\" \/><\/a><a style=\"line-height: 1.714285714;font-size: 1rem\" href=\"http:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3dcontourmultiplebiggerB.jpg\"><img loading=\"lazy\" decoding=\"async\" alt=\"Similar plot to above, but with a stronger magnetic field (m=2).\" src=\"http:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3dcontourmultiplebiggerB-300x287.jpg\" width=\"180\" height=\"172\" \/><\/a><span style=\"line-height: 1.714285714;font-size: 1rem\">\u00a0<\/span><a style=\"line-height: 1.714285714;font-size: 1rem\" href=\"http:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3dcontourmultiplebiggerB2.jpg\"><img loading=\"lazy\" decoding=\"async\" alt=\"3dcontourmultiplebiggerB2\" src=\"http:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/3dcontourmultiplebiggerB2-296x300.jpg\" width=\"178\" height=\"180\" \/><\/a><span style=\"line-height: 1.714285714;font-size: 1rem\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span><\/p>\n<p>From left to right, Contours with m = 1, m = 2, and m = 3.<\/p>\n<p>This is all pretty good, but what are these contour surfaces actually telling us about the magnetic field? \u00a0These contour surfaces represent places where the magnitude of the magnetic field is at a constant value, so these shapes represent equipotential surfaces. \u00a0While equipotential surfaces are not often talked about when talking about magnetic fields, the general principle that field vectors are perpendicular to equipotential surfaces is true of magnetic fields as well as electric. \u00a0Therefore, these contours actually tell us something about the magnetic field of a dipole, albeit in an indirect manner.<\/p>\n<p>To try and get a better picture of what the field lines look like around this current loop, I plotted these contour surfaces in 2D by removing any y dependence, so that the 2D contours plotted are shown in the xz plane. \u00a0This doesn&#8217;t lose much information again because of the $\\phi$ independence of the magnetic field of a dipole. \u00a0The result is shown below, which is taken from my Mathematica file &#8220;2D_contour_graphs&#8221;.<\/p>\n<div id=\"attachment_3829\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/2Dcontour1.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3829\" class=\"size-medium wp-image-3829\" alt=\"2D contour, showing 20 different contour lines, both positive and negative.\" src=\"http:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/2Dcontour1-300x300.jpg\" width=\"300\" height=\"300\" srcset=\"https:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/2Dcontour1-300x300.jpg 300w, https:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/2Dcontour1-150x150.jpg 150w, https:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/2Dcontour1.jpg 360w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-3829\" class=\"wp-caption-text\">2D contour, showing 20 different contour lines, both positive and negative.<\/p><\/div>\n<p>This gives us a representation where the vector field lines may be easier to picture, and easier to compare to the lines shown in Griffiths&#8217; &#8220;Introduction to Electrodynamics&#8221; 5.4.3 &#8211; pg. 255, which are shown in 2D. \u00a0It took some squinting, but I can see that lines perpendicular to these (and more) contour lines forms loops expected of a magnetic dipole. \u00a0I overlaid a few representative loops over my 2D contour image in paint to illustrate this idea.<\/p>\n<div id=\"attachment_3828\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/2Dcontour.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-3828\" class=\"size-medium wp-image-3828\" alt=\"Same image as above, but with (approximate) magnetic field lines overlaid in thick black.\" src=\"http:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/2Dcontour-300x300.jpg\" width=\"300\" height=\"300\" srcset=\"https:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/2Dcontour-300x300.jpg 300w, https:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/2Dcontour-150x150.jpg 150w, https:\/\/pages.vassar.edu\/magnes\/files\/2014\/04\/2Dcontour.jpg 360w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-3828\" class=\"wp-caption-text\">Same image as above, but with (approximate) magnetic field lines overlaid in thick black.<\/p><\/div>\n<p>Link to final Mathematica files: <a href=\"https:\/\/drive.google.com\/folderview?id=0B0lqHmJPnFabREFMZnphbFZlbTg&amp;usp=sharing\">3 Final Mathematica Files<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The next phase of my project involved actually creating some models of the magnetic field of a magnetic dipole. \u00a0This proved to require more steps and creativity than previously thought, but in the end I did get some useful plots. \u00a0The three finalized Mathematica files that I refer to throughout this post can be found [&hellip;]<\/p>\n","protected":false},"author":1991,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[54054],"tags":[],"class_list":["post-3826","post","type-post","status-publish","format-standard","hentry","category-brian"],"_links":{"self":[{"href":"https:\/\/pages.vassar.edu\/magnes\/wp-json\/wp\/v2\/posts\/3826","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pages.vassar.edu\/magnes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pages.vassar.edu\/magnes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pages.vassar.edu\/magnes\/wp-json\/wp\/v2\/users\/1991"}],"replies":[{"embeddable":true,"href":"https:\/\/pages.vassar.edu\/magnes\/wp-json\/wp\/v2\/comments?post=3826"}],"version-history":[{"count":10,"href":"https:\/\/pages.vassar.edu\/magnes\/wp-json\/wp\/v2\/posts\/3826\/revisions"}],"predecessor-version":[{"id":3863,"href":"https:\/\/pages.vassar.edu\/magnes\/wp-json\/wp\/v2\/posts\/3826\/revisions\/3863"}],"wp:attachment":[{"href":"https:\/\/pages.vassar.edu\/magnes\/wp-json\/wp\/v2\/media?parent=3826"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pages.vassar.edu\/magnes\/wp-json\/wp\/v2\/categories?post=3826"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pages.vassar.edu\/magnes\/wp-json\/wp\/v2\/tags?post=3826"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}