File:Ferromagnet hysteresis.webm
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
Summary
[edit]DescriptionFerromagnet hysteresis.webm |
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]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.
http://creativecommons.org/publicdomain/zero/1.0/deed.enCC0Creative Commons Zero, Public Domain Dedicationfalsefalse |
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 15:35, 23 June 2023 | 1 min 20 s, 1,156 × 500 (9.54 MB) | Berto (talk | contribs) | Imported media from uploads:d78db9d2-11da-11ee-8357-92f549fe63c7 |
You cannot overwrite this file.
File usage on Commons
The following page uses this file:
Transcode status
Update transcode statusMetadata
This file contains additional information such as Exif metadata which may have been added by the digital camera, scanner, or software program used to create or digitize it. If the file has been modified from its original state, some details such as the timestamp may not fully reflect those of the original file. The timestamp is only as accurate as the clock in the camera, and it may be completely wrong.
User comments | Created with the Wolfram Language : www.wolfram.com |
---|---|
Software used |