
Skyrmion phases
Compute skyrmion phases using stochastic LLG
A Julia package for classical spin dynamics and micromagnetic simulations with GPU support.
using MicroMagnetic
@using_gpu() # Import available GPU packages such as CUDA, AMDGPU, oneAPI, or Metal
# Define simulation parameters
args = (
task = "Relax", # Specify the type of simulation task (e.g., relaxation)
mesh = FDMesh(nx=80, ny=80, nz=30, dx=2e-9, dy=2e-9, dz=2e-9), # Define the mesh grid for the simulation with 80x80x30 cells and 2 nm cell size
shape = Cylinder(radius=50e-9, height=40e-9), # Define the shape of the magnetic structure as a cylinder with 50 nm radius and 40 nm height
Ms = 3.87e5, # Set the saturation magnetization (A/m)
A = 8.78e-12, # Set the exchange stiffness constant (J/m)
D = 1.58e-3, # Set the Dzyaloshinskii-Moriya interaction constant (J/m^2)
demag = true, # Enable demagnetization effects in the simulation
m0 = (1,1,1), # Set the initial magnetization direction
stopping_dmdt = 0.1 # Set the stopping criterion for the simulation based on the rate of change of magnetization dynamics
);
# Run the simulation with the specified parameters
sim = sim_with(args);
# Save the magnetization and the stray field into vtk.
save_vtk(sim, "m_demag", fields=["demag"])
The magnetization and the stray field around the cylindrical sample are stored in m_demag.vts
, which can be opened using Paraview.