Standard problem 4#
Problem specification#
The sample is a thin film cuboid with dimensions:
length \(l_{x} = 500 \,\text{nm}\),
width \(l_{y} = 125 \,\text{nm}\), and
thickness \(l_{z} = 3 \,\text{nm}\).
The material parameters (similar to permalloy) are:
exchange energy constant \(A = 1.3 \times 10^{-11} \,\text{J/m}\),
magnetisation saturation \(M_\text{s} = 8 \times 10^{5} \,\text{A/m}\).
Magnetisation dynamics are governed by the Landau-Lifshitz-Gilbert equation
where \(\gamma_{0} = 2.211 \times 10^{5} \,\text{m}\,\text{A}^{-1}\,\text{s}^{-1}\) and Gilbert damping \(\alpha=0.02\).
In the standard problem 4, the system is first relaxed at zero external magnetic field and then, starting from the obtained equlibrium configuration, the magnetisation dynamics are simulated for two external magnetic fields \(\mathbf{B}_{1} = (-24.6, 4.3, 0.0) \,\text{mT}\) and \(\mathbf{B}_{2} = (-35.5, -6.3, 0.0) \,\text{mT}\).
More detailed specification of Standard problem 4 can be found in Ref. 1.
Simulation#
Import modules#
In the first step, we import the required modules and configure pyvista for static rendering.
[1]:
import matplotlib.pyplot as plt
import numpy as np
import pyvista as pv
from scipy import constants
import neuralmag as nm
pv.set_jupyter_backend("static")
2025-05-12 21:31:01 NeuralMag:INFO [NeuralMag] Version 0.9.1
Setup mesh and state#
In the first stage, we need to setup the mesh and the simulation state. We chose a cell size of \(5 \times 5 \times 3 \,\text{nm}^3\) resulting in \(100 \times 25 \times 1\) cells simulate for the geometry defined for this standard problem.
[2]:
mesh = nm.Mesh([100, 25, 1], [5e-9, 5e-9, 3e-9], [0.0, 0.0, 0.0])
state = nm.State(mesh)
2025-05-12 21:31:01 NeuralMag:INFO [Mesh] 3D, 100 x 25 x 1 (size = 5e-09 x 5e-09 x 3e-09)
2025-05-12 21:31:02 NeuralMag:INFO [NeuralMag] Backend set to 'jax'.
2025-05-12 21:31:02 NeuralMag:INFO [NeuralMag] Set default device to 'TFRT_CPU_0'.
2025-05-12 21:31:02 NeuralMag:INFO [NeuralMag] Set default dtype to 'float32'.
2025-05-12 21:31:02 NeuralMag:INFO [State] Running on device: TFRT_CPU_0 (dtype = float32, backend = jax)
Setup material parameters and define initial magnetization#
In the next step, we set the material parameters \(M_s\), \(A\) and \(\alpha\) according to the requirements of the standard problem.
[3]:
state.material.Ms = 8e5
state.material.A = 1.3e-11
state.material.alpha = 0.02
We have to provide an initial magnetisation configuration that is going to be relaxed subsequently. We choose the uniform configuration in xy-direction that is know to relax into the requires s-state.
[4]:
state.m = nm.VectorFunction(state).fill((0.5**0.5, 0.5**0.5, 0))
Register effectiv-field contributions#
Now we initialize the effecitive field contributions that are required for the relaxation of the initial magnetization. Namely, we set up a total field consisting of the exchange field and the demagnetization field.
[5]:
nm.ExchangeField().register(state, "exchange")
nm.DemagField().register(state, "demag")
nm.TotalField("exchange", "demag").register(state)
2025-05-12 21:31:03 NeuralMag:INFO [ExchangeField] Register state methods (field: 'h_exchange', energy: 'E_exchange')
2025-05-12 21:31:03 NeuralMag:INFO [DemagField] Register state methods (field: 'h_demag', energy: 'E_demag')
2025-05-12 21:31:03 NeuralMag:INFO [DemagField]: Set up demag tensor
2025-05-12 21:31:05 NeuralMag:INFO [TotalField] Register state methods (field: 'h', energy: 'E')
Minimize energy to find the initial stable state#
We initialze the LLG solver and use the relax method in order relax the system into the stable s-state configuration.
[6]:
llg = nm.LLGSolver(state)
llg.relax()
state.write_vti(["m"], "standard-problem-4/s-state.vti")
# Plot the flower state
mesh = pv.read("standard-problem-4/s-state.vti")
glyphs = mesh.glyph(orient="m", scale="m", factor=1e-8)
p = pv.Plotter()
p.add_mesh(glyphs, color="white", lighting=True, smooth_shading=True)
p.show()
2025-05-12 21:31:05 NeuralMag:INFO [LLGSolverJAX] Initialize RHS function
2025-05-12 21:31:08 NeuralMag:INFO [LLGSolverJAX] Relaxation started, initial energy E = 1.78526e-18 J
2025-05-12 21:31:12 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 1.23503e+10) 1/s
2025-05-12 21:31:17 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 7.95043e+09) 1/s
2025-05-12 21:31:17 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 6.64984e+09) 1/s
2025-05-12 21:31:17 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 5.6196e+09) 1/s
2025-05-12 21:31:17 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 4.72191e+09) 1/s
2025-05-12 21:31:17 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 4.10889e+09) 1/s
2025-05-12 21:31:17 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 3.60299e+09) 1/s
2025-05-12 21:31:17 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 3.27347e+09) 1/s
2025-05-12 21:31:17 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 2.99727e+09) 1/s
2025-05-12 21:31:17 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 2.84968e+09) 1/s
2025-05-12 21:31:17 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 2.71943e+09) 1/s
2025-05-12 21:31:17 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 2.74717e+09) 1/s
2025-05-12 21:31:17 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 2.68192e+09) 1/s
2025-05-12 21:31:17 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 2.68738e+09) 1/s
2025-05-12 21:31:17 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 2.57365e+09) 1/s
2025-05-12 21:31:17 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 2.53996e+09) 1/s
2025-05-12 21:31:17 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 2.4156e+09) 1/s
2025-05-12 21:31:17 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 2.33666e+09) 1/s
2025-05-12 21:31:17 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 2.22955e+09) 1/s
2025-05-12 21:31:17 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 2.15463e+09) 1/s
2025-05-12 21:31:17 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 2.03638e+09) 1/s
2025-05-12 21:31:18 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 1.97609e+09) 1/s
2025-05-12 21:31:18 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 1.84581e+09) 1/s
2025-05-12 21:31:18 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 1.79799e+09) 1/s
2025-05-12 21:31:18 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 1.66496e+09) 1/s
2025-05-12 21:31:18 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 1.62505e+09) 1/s
2025-05-12 21:31:18 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 1.50757e+09) 1/s
2025-05-12 21:31:18 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 1.43938e+09) 1/s
2025-05-12 21:31:18 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 1.35844e+09) 1/s
2025-05-12 21:31:18 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 1.30983e+09) 1/s
2025-05-12 21:31:18 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 1.22248e+09) 1/s
2025-05-12 21:31:18 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 1.18487e+09) 1/s
2025-05-12 21:31:18 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 1.09025e+09) 1/s
2025-05-12 21:31:18 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 1.07067e+09) 1/s
2025-05-12 21:31:18 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 9.76053e+08) 1/s
2025-05-12 21:31:18 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 9.50718e+08) 1/s
2025-05-12 21:31:18 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 8.78952e+08) 1/s
2025-05-12 21:31:18 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 8.4075e+08) 1/s
2025-05-12 21:31:19 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 7.88137e+08) 1/s
2025-05-12 21:31:19 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 7.68521e+08) 1/s
2025-05-12 21:31:19 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 7.02116e+08) 1/s
2025-05-12 21:31:19 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 6.97737e+08) 1/s
2025-05-12 21:31:19 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 6.23397e+08) 1/s
2025-05-12 21:31:19 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 6.24377e+08) 1/s
2025-05-12 21:31:19 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 5.58621e+08) 1/s
2025-05-12 21:31:19 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 5.48315e+08) 1/s
2025-05-12 21:31:19 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 5.04099e+08) 1/s
2025-05-12 21:31:19 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 4.87865e+08) 1/s
2025-05-12 21:31:19 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 4.52102e+08) 1/s
2025-05-12 21:31:19 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 4.50857e+08) 1/s
2025-05-12 21:31:19 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 4.07065e+08) 1/s
2025-05-12 21:31:19 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 4.12021e+08) 1/s
2025-05-12 21:31:19 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 3.74562e+08) 1/s
2025-05-12 21:31:19 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 3.66486e+08) 1/s
2025-05-12 21:31:19 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 3.44439e+08) 1/s
2025-05-12 21:31:19 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 3.40619e+08) 1/s
2025-05-12 21:31:19 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 3.24023e+08) 1/s
2025-05-12 21:31:19 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 3.16462e+08) 1/s
2025-05-12 21:31:20 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 3.04191e+08) 1/s
2025-05-12 21:31:20 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 2.97535e+08) 1/s
2025-05-12 21:31:20 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 2.85321e+08) 1/s
2025-05-12 21:31:20 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 2.79992e+08) 1/s
2025-05-12 21:31:20 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 2.68114e+08) 1/s
2025-05-12 21:31:20 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 2.61812e+08) 1/s
2025-05-12 21:31:20 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 2.51303e+08) 1/s
2025-05-12 21:31:20 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 2.46433e+08) 1/s
2025-05-12 21:31:20 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 2.36429e+08) 1/s
2025-05-12 21:31:20 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 2.30246e+08) 1/s
2025-05-12 21:31:20 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 2.21156e+08) 1/s
2025-05-12 21:31:20 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 2.17266e+08) 1/s
2025-05-12 21:31:20 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 2.07177e+08) 1/s
2025-05-12 21:31:21 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 2.03795e+08) 1/s
2025-05-12 21:31:21 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 1.94069e+08) 1/s
2025-05-12 21:31:21 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 1.90399e+08) 1/s
2025-05-12 21:31:21 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 1.8163e+08) 1/s
2025-05-12 21:31:21 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 1.78495e+08) 1/s
2025-05-12 21:31:21 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 1.70697e+08) 1/s
2025-05-12 21:31:21 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 1.66375e+08) 1/s
2025-05-12 21:31:21 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 1.59264e+08) 1/s
2025-05-12 21:31:21 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 1.57365e+08) 1/s
2025-05-12 21:31:21 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 1.49088e+08) 1/s
2025-05-12 21:31:21 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 1.47018e+08) 1/s
2025-05-12 21:31:21 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 1.39257e+08) 1/s
2025-05-12 21:31:21 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 1.37632e+08) 1/s
2025-05-12 21:31:21 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 1.30397e+08) 1/s
2025-05-12 21:31:21 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 1.28682e+08) 1/s
2025-05-12 21:31:21 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 1.22539e+08) 1/s
2025-05-12 21:31:21 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 1.19911e+08) 1/s
2025-05-12 21:31:21 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 1.14023e+08) 1/s
2025-05-12 21:31:21 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 1.13788e+08) 1/s
2025-05-12 21:31:21 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 1.06705e+08) 1/s
2025-05-12 21:31:22 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 1.05988e+08) 1/s
2025-05-12 21:31:22 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 9.93389e+07) 1/s
2025-05-12 21:31:22 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 9.94332e+07) 1/s
2025-05-12 21:31:22 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 9.31488e+07) 1/s
2025-05-12 21:31:22 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 9.19996e+07) 1/s
2025-05-12 21:31:22 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 8.75564e+07) 1/s
2025-05-12 21:31:22 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 8.63027e+07) 1/s
2025-05-12 21:31:22 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 8.13572e+07) 1/s
2025-05-12 21:31:22 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 8.21615e+07) 1/s
2025-05-12 21:31:22 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 7.59377e+07) 1/s
2025-05-12 21:31:22 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 7.61276e+07) 1/s
2025-05-12 21:31:22 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 7.04277e+07) 1/s
2025-05-12 21:31:22 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 7.11793e+07) 1/s
2025-05-12 21:31:22 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 6.63023e+07) 1/s
2025-05-12 21:31:22 NeuralMag:INFO [LLGSolverJAX] Relaxation step (max dm/dt = 6.53792e+07) 1/s
2025-05-12 21:31:22 NeuralMag:INFO [LLGSolverJAX] Relaxation finished, final energy E = 6.33835e-19 J
Apply external field#
In the next step we initialize the an external field to switch the magnetization as defined in the standard problem. In order to include this additional field, we update the total field and reset the LLG solver.
[7]:
# Setup Zeeman field
h_ext = nm.VectorFunction(state).fill(
[-24.6e-3 / constants.mu_0, 4.3e-3 / constants.mu_0, 0.0] # B1
# [-35.5e-3 / constants.mu_0, -6.3e-3 / constants.mu_0, 0.0] # B2
)
nm.ExternalField(h_ext).register(state, "external")
# Update total field
nm.TotalField("exchange", "demag", "external").register(state)
# Reset LLGSolver
llg.reset()
2025-05-12 21:31:23 NeuralMag:INFO [ExternalField] Register state methods (field: 'h_external', energy: 'E_external')
2025-05-12 21:31:23 NeuralMag:INFO [TotalField] Register state methods (field: 'h', energy: 'E')
2025-05-12 21:31:23 NeuralMag:INFO [LLGSolverJAX] Initialize RHS function
Simulate switching#
Finally, we can run the switching simulation using the LLGSolver. We run the magnetisation evolution for \(t=1 \,\text{ns}\). We set up a logger to save the averaged magnetization as well as a time series of the full magnetization configuration and log the simulation state every \(10\,\text{ps}\).
[8]:
logger = nm.Logger("standard-problem-4", ["t", "m"], ["m"])
while state.t < 1e-9:
llg.step(1.0e-11)
logger.log(state)
2025-05-12 21:31:23 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 0s
2025-05-12 21:31:27 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 1e-11s
2025-05-12 21:31:27 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 2e-11s
2025-05-12 21:31:28 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 3e-11s
2025-05-12 21:31:28 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 4e-11s
2025-05-12 21:31:28 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 5e-11s
2025-05-12 21:31:28 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 6e-11s
2025-05-12 21:31:28 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 7e-11s
2025-05-12 21:31:28 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 8e-11s
2025-05-12 21:31:28 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 9e-11s
2025-05-12 21:31:28 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 1e-10s
2025-05-12 21:31:28 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 1.1e-10s
2025-05-12 21:31:28 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 1.2e-10s
2025-05-12 21:31:28 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 1.3e-10s
2025-05-12 21:31:29 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 1.4e-10s
2025-05-12 21:31:29 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 1.5e-10s
2025-05-12 21:31:29 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 1.6e-10s
2025-05-12 21:31:29 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 1.7e-10s
2025-05-12 21:31:29 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 1.8e-10s
2025-05-12 21:31:29 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 1.9e-10s
2025-05-12 21:31:29 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 2e-10s
2025-05-12 21:31:29 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 2.1e-10s
2025-05-12 21:31:29 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 2.2e-10s
2025-05-12 21:31:29 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 2.3e-10s
2025-05-12 21:31:30 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 2.4e-10s
2025-05-12 21:31:30 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 2.5e-10s
2025-05-12 21:31:30 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 2.6e-10s
2025-05-12 21:31:30 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 2.7e-10s
2025-05-12 21:31:30 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 2.8e-10s
2025-05-12 21:31:30 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 2.9e-10s
2025-05-12 21:31:30 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 3e-10s
2025-05-12 21:31:30 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 3.1e-10s
2025-05-12 21:31:30 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 3.2e-10s
2025-05-12 21:31:30 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 3.3e-10s
2025-05-12 21:31:31 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 3.4e-10s
2025-05-12 21:31:31 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 3.5e-10s
2025-05-12 21:31:31 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 3.6e-10s
2025-05-12 21:31:31 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 3.7e-10s
2025-05-12 21:31:31 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 3.8e-10s
2025-05-12 21:31:31 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 3.9e-10s
2025-05-12 21:31:31 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 4e-10s
2025-05-12 21:31:31 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 4.1e-10s
2025-05-12 21:31:31 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 4.2e-10s
2025-05-12 21:31:31 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 4.3e-10s
2025-05-12 21:31:32 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 4.4e-10s
2025-05-12 21:31:32 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 4.5e-10s
2025-05-12 21:31:32 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 4.6e-10s
2025-05-12 21:31:32 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 4.7e-10s
2025-05-12 21:31:32 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 4.8e-10s
2025-05-12 21:31:32 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 4.9e-10s
2025-05-12 21:31:32 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 5e-10s
2025-05-12 21:31:32 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 5.1e-10s
2025-05-12 21:31:32 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 5.2e-10s
2025-05-12 21:31:32 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 5.3e-10s
2025-05-12 21:31:33 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 5.4e-10s
2025-05-12 21:31:33 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 5.5e-10s
2025-05-12 21:31:33 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 5.6e-10s
2025-05-12 21:31:33 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 5.7e-10s
2025-05-12 21:31:33 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 5.8e-10s
2025-05-12 21:31:33 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 5.9e-10s
2025-05-12 21:31:33 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 6e-10s
2025-05-12 21:31:33 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 6.1e-10s
2025-05-12 21:31:33 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 6.2e-10s
2025-05-12 21:31:33 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 6.3e-10s
2025-05-12 21:31:34 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 6.4e-10s
2025-05-12 21:31:34 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 6.5e-10s
2025-05-12 21:31:34 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 6.6e-10s
2025-05-12 21:31:34 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 6.7e-10s
2025-05-12 21:31:34 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 6.8e-10s
2025-05-12 21:31:34 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 6.9e-10s
2025-05-12 21:31:34 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 7e-10s
2025-05-12 21:31:34 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 7.1e-10s
2025-05-12 21:31:34 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 7.2e-10s
2025-05-12 21:31:34 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 7.3e-10s
2025-05-12 21:31:35 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 7.4e-10s
2025-05-12 21:31:35 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 7.5e-10s
2025-05-12 21:31:35 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 7.6e-10s
2025-05-12 21:31:35 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 7.7e-10s
2025-05-12 21:31:35 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 7.8e-10s
2025-05-12 21:31:35 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 7.9e-10s
2025-05-12 21:31:35 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 8e-10s
2025-05-12 21:31:35 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 8.1e-10s
2025-05-12 21:31:36 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 8.2e-10s
2025-05-12 21:31:36 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 8.3e-10s
2025-05-12 21:31:36 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 8.40001e-10s
2025-05-12 21:31:36 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 8.50001e-10s
2025-05-12 21:31:36 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 8.60001e-10s
2025-05-12 21:31:36 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 8.70001e-10s
2025-05-12 21:31:36 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 8.80001e-10s
2025-05-12 21:31:36 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 8.90001e-10s
2025-05-12 21:31:36 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 9.00001e-10s
2025-05-12 21:31:36 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 9.10001e-10s
2025-05-12 21:31:36 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 9.20001e-10s
2025-05-12 21:31:37 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 9.30001e-10s
2025-05-12 21:31:37 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 9.40001e-10s
2025-05-12 21:31:37 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 9.50001e-10s
2025-05-12 21:31:37 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 9.60001e-10s
2025-05-12 21:31:37 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 9.70001e-10s
2025-05-12 21:31:37 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 9.80001e-10s
2025-05-12 21:31:37 NeuralMag:INFO [LLGSolverJAX] Step: dt = 1e-11s, t = 9.90001e-10s
Postprocessing#
Finally, we want to plot the average magnetization configuration as a function of time t:
[9]:
data = np.loadtxt("standard-problem-4/log.dat")
plt.plot(data[:, 0], data[:, 1], label="m_x")
plt.plot(data[:, 0], data[:, 2], label="m_y")
plt.plot(data[:, 0], data[:, 3], label="m_z")
plt.legend()
plt.xlabel("t [s]")
plt.ylabel("m_i")
plt.show()
References#
[1] µMAG Site Directory: http://www.ctcms.nist.gov/~rdm/mumag.org.html
This tutorial was adapted from Ubermag.