File:Ferromagnet hysteresis.webm

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file(WebM audio/video file, VP9, length 1 min 20 s, 1,156 × 500 pixels, 1 Mbps overall, file size: 9.54 MB)

Captions

Captions

Add a one-line explanation of what this file represents

Summary

[edit]
Description
English: n a ferromagnet the equilibrium configuration is with all magnetic moments aligned with each other. If we want to flip them, we need to flip all of them at the same time, which requires a stronger field than if the moments were independent.
Date
Source https://twitter.com/j_bertolotti/status/1671865946632253446
Author Jacopo Bertolotti
Permission
(Reusing this file)
https://twitter.com/j_bertolotti/status/1030470604418428929

Mathematica 13.1 code

[edit]
\[Gamma] = 1; \[Lambda] = 0.1; dt = 0.05; J = 0.2;
steps = 6000;
nx = 11; ny = 11; n = nx*ny;
adjacency = Normal@AdjacencyMatrix[TorusGraph[{nx, ny}] ];
M0 = (#/Norm[#] &) /@ 
   Table[{RandomReal[{-0.1, 0.1}], RandomReal[{-0.1, 0.1}], 1}, {n}];
M = M0;(* M[[Floor[nx/2]*ny+Floor[ny/2] +1]]={1,1,0};*)
Hext[j_] := 2 {0, 0, (1 - 2 j/steps)};
evo = Reap[For[j = 1, j <= steps, j++,
     M = (#/Norm[#] &) /@ M;
     
     Heff = J*adjacency . M + Threaded[Hext[j] ]; (****)
     M = 
      Table[M[[j]] + 
         dt*(-\[Gamma] Cross[M[[j]], Heff[[j]] ] - \[Lambda] Cross[
              M[[j]], Cross[M[[j]], Heff[[j]] ]]), {j, 1, 
         n}] + (RandomReal[{-0.01, 0.01}, {n, 3}]);
     M = (#/Norm[#] &) /@ M;
     Sow[M];
     ]][[2, 1]];
Hext2[j_] := 2 {0, 0, (-1 + 2 j/steps)}(*8{0,0,(1-2j/steps)}*);
evo2 = Reap[For[j = 1, j <= steps, j++,
     M = (#/Norm[#] &) /@ M;
     
     Heff = J*adjacency . M + Threaded[Hext2[j] ]; (****)
     M = 
      Table[M[[j]] + 
         dt*(-\[Gamma] Cross[M[[j]], Heff[[j]] ] - \[Lambda] Cross[
              M[[j]], Cross[M[[j]], Heff[[j]] ]]), {j, 1, 
         n}] + (RandomReal[{-0.01, 0.01}, {n, 3}]);
     M = (#/Norm[#] &) /@ M;
     Sow[M];
     ]][[2, 1]];
frames1 = Table[
   Grid[{{Graphics3D[{
        Black,
        Table[
         Sphere[{Mod[j, Sqrt[n], 1], Quotient[j, Sqrt[n], 1] + 1, 0}, 
          0.08], {j, 1, n}],
        Table[
         Sphere[{Mod[j, Sqrt[n], 1], Quotient[j, Sqrt[n], 1] + 1, 
            0} + \[Alpha]*evo[[k, j]], 0.05], {j, 1, n}],
        Thick, 
        Flatten@Table[
          Line[{{Mod[j, Sqrt[n], 1], Quotient[j, Sqrt[n], 1] + 1, 
             0}, {Mod[j, Sqrt[n], 1], Quotient[j, Sqrt[n], 1] + 1, 
              0} + \[Alpha]*evo[[k, j]]} ], {j, 1, n}],
        Sphere[{-1.5, Sqrt[n]/2, 0}, 0.1], Arrowheads[.025], 
        Arrow[{{-1.5, Sqrt[n]/2, 0}, {-1.5, Sqrt[n]/2, 
           Hext[k][[3]]}}], 
        Text[Style["\!\(\*SubscriptBox[\(H\), \(ext\)]\)", Black, 
          Bold, FontSize -> 20], {-1.5, Sqrt[n]/2 + 1.5, 0}],
        Red,
        Table[
         Line[({Mod[j, Sqrt[n], 1], Quotient[j, Sqrt[n], 1] + 1, 
               0} + # &) /@ (\[Alpha]*
             evo[[Max[1, k - 50] ;; k, j]]) ], {j, 1, n}],
        Opacity[0.5], Gray, 
        Cuboid[{0, 0, 0}, {Sqrt[n] + 1, Sqrt[n] + 1, -0.1}]
        }, 
       PlotRange -> {{-2, Sqrt[n] + 1}, {-1, Sqrt[n] + 1}, {-2, 2}}, 
       ImageSize -> 500, Lighting -> "Neutral", Boxed -> False]
      ,
      ListPlot[Table[{Hext[j][[3]], Mean[evo[[j]]][[3]]}, {j, 1, k}], 
       PlotRange -> {{-2, 2}, {-1.2, 1.2}}, Joined -> True, 
       PlotStyle -> {Thick, Black}, Ticks -> None, 
       AxesLabel -> {"\!\(\*SubscriptBox[\(H\), \(ext\)]\)", 
         "\!\(\*SubscriptBox[\(M\), \(z\)]\)"}, 
       LabelStyle -> {Bold, Black}, ImageSize -> Medium]
      }}]
   , {k, 1, 6000, 10}];
frames2 = Table[
   Grid[{{Graphics3D[{
        Black,
        Table[
         Sphere[{Mod[j, Sqrt[n], 1], Quotient[j, Sqrt[n], 1] + 1, 0}, 
          0.08], {j, 1, n}],
        Table[
         Sphere[{Mod[j, Sqrt[n], 1], Quotient[j, Sqrt[n], 1] + 1, 
            0} + \[Alpha]*evo2[[k, j]], 0.05], {j, 1, n}],
        Thick, 
        Flatten@Table[
          Line[{{Mod[j, Sqrt[n], 1], Quotient[j, Sqrt[n], 1] + 1, 
             0}, {Mod[j, Sqrt[n], 1], Quotient[j, Sqrt[n], 1] + 1, 
              0} + \[Alpha]*evo2[[k, j]]} ], {j, 1, n}],
        Sphere[{-1.5, Sqrt[n]/2, 0}, 0.1], Arrowheads[.025], 
        Arrow[{{-1.5, Sqrt[n]/2, 0}, {-1.5, Sqrt[n]/2, 
           Hext2[k][[3]]}}], 
        Text[Style["\!\(\*SubscriptBox[\(H\), \(ext\)]\)", Black, 
          Bold, FontSize -> 20], {-1.5, Sqrt[n]/2 + 1.5, 0}],
        Red,
        Table[
         Line[({Mod[j, Sqrt[n], 1], Quotient[j, Sqrt[n], 1] + 1, 
               0} + # &) /@ (\[Alpha]*
             evo2[[Max[1, k - 50] ;; k, j]]) ], {j, 1, n}],
        Opacity[0.5], Gray, 
        Cuboid[{0, 0, 0}, {Sqrt[n] + 1, Sqrt[n] + 1, -0.1}]
        }, 
       PlotRange -> {{-2, Sqrt[n] + 1}, {-1, Sqrt[n] + 1}, {-2, 2}}, 
       ImageSize -> 500, Lighting -> "Neutral", Boxed -> False]
      ,
      ListPlot[{Table[{Hext[j][[3]], Mean[evo[[j]]][[3]]}, {j, 1, 
          steps}], 
        Table[{Hext2[j][[3]], Mean[evo2[[j]]][[3]]}, {j, 1, k}]}, 
       PlotRange -> {{-2, 2}, {-1.2, 1.2}}, Joined -> True, 
       PlotStyle -> Directive[Thick, Black], Ticks -> None, 
       AxesLabel -> {"\!\(\*SubscriptBox[\(H\), \(ext\)]\)", 
         "\!\(\*SubscriptBox[\(M\), \(z\)]\)"}, 
       LabelStyle -> {Bold, Black}, ImageSize -> Medium]
      }}]
   , {k, 1, 6000, 10}];
ListAnimate[Join[frames1, frames2]]

Licensing

[edit]
I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current15:35, 23 June 20231 min 20 s, 1,156 × 500 (9.54 MB)Berto (talk | contribs)Imported media from uploads:d78db9d2-11da-11ee-8357-92f549fe63c7

The following page uses this file:

Transcode status

Update transcode status
Format Bitrate Download Status Encode time
VP9 480P 507 kbps Completed 15:36, 23 June 2023 52 s
Streaming 480p (VP9) 507 kbps Completed 08:16, 7 February 2024 1.0 s
VP9 360P 318 kbps Completed 15:35, 23 June 2023 39 s
Streaming 360p (VP9) 318 kbps Completed 05:02, 15 March 2024 1.0 s
VP9 240P 172 kbps Completed 15:35, 23 June 2023 26 s
Streaming 240p (VP9) 173 kbps Completed 09:16, 21 December 2023 1.0 s
WebM 360P 345 kbps Completed 15:35, 23 June 2023 16 s
Streaming 144p (MJPEG) 529 kbps Completed 12:25, 11 November 2023 2.0 s

Metadata