File:Nuclear magnetization relaxation.gif

Nuclear_magnetization_relaxation.gif(534 × 497 pixels, file size: 2.43 MB, MIME type: image/gif, looped, 200 frames, 20 s)

Summary

Description
English: Relaxation of the nuclear magnetization in the presence of an external magnetic field, as described by the Bloch equations. The chosen values for the relaxation times are not realistic and were selected to result in a simple visualization more than Physical realism.
Date
Source https://twitter.com/j_bertolotti/status/1369962983074455552
Author Jacopo Bertolotti
Permission
(Reusing this file)
https://twitter.com/j_bertolotti/status/1030470604418428929

Mathematica 12.0 code

\[Gamma] = 1; (*gyromagnetic ratio*)
m0 = {1, 0, 0}; (*initial magnetization*)
b = {0, 0, 1}; (*external magnetic field*)
T1 = 1; T2 = 1; (*relaxation times*)
meq = {0, 0, 0.1}; (*equilibrium magnetization*)
matrix[B_] := {{-1/T2, \[Gamma] B[[3]], -\[Gamma] B[[2]]}, {-\[Gamma] B[[3]], -1/T2, \[Gamma] B[[1]]}, {\[Gamma] B[[2]], -\[Gamma] B[[1]], -1/T1}}; (*evolution matrix*)
dt = 0.05; (*time step*)
m = m0;
evo = Reap[Do[
     m = m/Norm[m]; (*make sure the vector is normalized*)
     m = m + dt*(matrix[b] . m + meq/T1);
     Sow[m]
     , 1000]][[2, 1]];
frames = Table[
   Graphics3D[{
     Black, Sphere[{0, 0, 0}, 0.05], Sphere[evo[[j]], 0.02], Thick, Line[{{0, 0, 0}, evo[[j]]}],
     Orange, Line[evo[[1 ;; j]] ],
     Black, Arrow[{{-1, -1, 0}, {-1, -1, 0.8}}],
     Text[Style["\!\(\*SubscriptBox[OverscriptBox[\(B\), \(\[Rule]\)], \\(ext\)]\)", Black, Bold], {-1, -1, 1}],
     Thin, Gray, 
     Line[{{-1, -1, 0}, {-1, 1, 0}, {1, 1, 0}, {1, -1, 0}, {-1, -1, 0}}],
     Black, Thick,
     Arrow[{{-1, 1, 0}, {-1, 1, 0.5}}], 
     Arrow[{{-1, 1, 0}, {-0.5, 1, 0}}], 
     Arrow[{{-1, 1, 0}, {-1, 0.5, 0}}],
     Text[Style["y", Black, Bold], {-0.4, 1, 0}],
     Text[Style["x", Black, Bold], {-1, 0.4, 0}],
     Text[Style["z", Black, Bold], {-1, 1, 0.6}]
     }, PlotRange -> {{-1.2, 1.2}, {-1.2, 1.2}, {0, 1.2}}, 
    Boxed -> False, ImageSize -> 400]
   , {j, 2, 1000, 5}];
ListAnimate[frames]

Licensing

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.

Captions

Relaxation of the nuclear magnetization following the Bloch equations

Items portrayed in this file

depicts

11 March 2021

File history

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

Date/TimeThumbnailDimensionsUserComment
current14:14, 12 March 2021Thumbnail for version as of 14:14, 12 March 2021534 × 497 (2.43 MB)BertoUploaded own work with UploadWizard
The following pages on the English Wikipedia use this file (pages on other projects are not listed):

Global file usage

The following other wikis use this file:

Metadata