Dispersion of a nanotube in vortex state#
This notebook will calculate the dispersion relation of a nanotube with 60 nm outer and 40 nm inner diameters, permalloy material parameters. The obtained dispersion(s) must be equivalent to that(those) calculated analytically as well as with micromagnetic simulations published in Ref. 1.
In the last section we compute the same dispersion with the newly added geometry type, namely the Axial waveguides and compare the results.
First we import the TetraX package.
[1]:
import tetrax as tx
Here, we create a sample, a waveguide with the cross section of a tube, with permalloy-like material parameters. Note, by default the material parameters are set to those of permalloy.
[2]:
r_in = 20
r_out = 30
lc = 3
tube = tx.Sample(tx.geometries.waveguide.tube(r_in, r_out, lc),
name="Nanotube_20_30"
)
tube.material["Msat"] = 800e3 # A/m
tube.material["Aex"] = 13e-12 # J/m
The tube (created sample) parameters, such as material and mesh, can be listed by typing tube.
[3]:
tube
[3]:
Sample
| attribute | value |
|---|---|
| name | Nanotube_20_30 |
| magnetic_order | FM |
| interactions | ['exchange', 'dipole', 'zeeman', 'uniaxial_anisotropy', 'cubic_anisotropy', 'dmi_bulk', 'dmi_interfacial'] |
| external_field (avrg.) | [0. 0. 0.] T |
| antenna | None |
| mag (avrg.) | [0. 0. 1.] |
SampleMesh (Sample.mesh) of 'Nanotube_20_30'
| attribute | value | description |
|---|---|---|
| geometry_type | waveguide | geometry type |
| nx | 273 | total nodes |
| nb | 105 | boundary nodes |
| scale | 1e-09 |
SampleMaterial (Sample.material) of 'Nanotube_20_30'
| name | average | description |
|---|---|---|
| Msat | 800000.0 A/m | saturation magnetization |
| Aex | 1.2999999999999999e-11 J/m | exchange stiffness |
| gamma | 176085964399.99997 radHz/T | gyromagnetic ratio |
| alpha | 0.008 (is_global) | Gilbert damping |
| Ku1 | 0.0 J/m^3 | first-order unaxial-anistropy constant |
| e_u | [0. 0. 1.] | uniaxial anistropy direction |
| Dbulk | 0 (is_global) | bulk DMI constant |
| Didmi | 0 (is_global) | interfacial DMI constant |
| e_d | [0. 1. 0.] | interfacial DMI direction |
| Kc1 | 0.0 J/m^3 | first-order cubic-anistropy constant |
| e_c1 | [1. 0. 0.] | first cubic anistropy direction |
| e_c2 | [0. 1. 0.] | second cubic anistropy direction |
| e_c3 | [0. 0. 1.] | third cubic anistropy direction |
Hint: You can use Sample.get_field('interaction_name'). Same with get_energy and get_interaction.
Here we set an initial state and visualize it.
[4]:
tube.mag = tx.vectorfields.helical(tube.mesh.xyz, 60, 1)
tube.show()
/Users/attilak/micromag/tetrax-tests/fresh_environement_test/venv/lib/python3.13/site-packages/traittypes/traittypes.py:97: UserWarning: Given trait value dtype "float32" does not match required type "float32". A coerced copy has been created.
warnings.warn(
[4]:

[5]:
Bphi = tx.vectorfields.helical(tube.mesh.xyz, 90, 1) * 0.08
tube.external_field = Bphi
tube.show([tube.mag,tube.external_field])
[5]:

Computation and visualization of the equilibrium state.
[6]:
success = False
while not success:
relax = tx.experiments.relax(tube,tolerance=1e-13)
success = relax.was_success
tube.show()
Minimizing energy in using 'L-BFGS-B' (tolerance 1e-13) ...
energy length density: -6.727228940911428e-11 J/m, <mag.x> = 0.00, <mag.y> = 0.00, <mag.z> = 0.00000
Success!
/Users/attilak/micromag/tetrax-tests/fresh_environement_test/venv/lib/python3.13/site-packages/traittypes/traittypes.py:97: UserWarning: Given trait value dtype "float32" does not match required type "float32". A coerced copy has been created.
warnings.warn(
[6]:

Now let us calculate the spin-wave spectra:
[7]:
tube.spectrum = tx.experiments.eigenmodes(tube, num_cpus=-1, num_modes=10, kmin=-40e6, kmax=40e6, num_k=81)
100%|███████████████████| 41/41 [00:01<00:00, 28.28it/s]
We plot the dispersion for the first 5 modes (n=[0,4]), using the built-in plot() method.
[8]:
tube.spectrum.plot(n=[0,4], renderer="notebook") # remove the renderer argument when running on your computer
The same dispersion can be computed using the waveguide-axial sample geometry, as we show in the following:#
Here again we define the tube, set material parametes, magnetization, external field, relax the initial state and compute the spectrum.
[9]:
tube_axial = tx.Sample(tx.geometries.waveguide_axial.tube(r_in, r_out, 1),
name="Nanotube_axial_20_30"
)
[10]:
tube_axial.material["Msat"] = 800e3 # A/m
tube_axial.material["Aex"] = 13e-12 # J/m
tube_axial.mag = tx.vectorfields.helical(tube_axial.mesh.xyz,60,1)
tube_axial.external_field = 80e-3 * tx.vectorfields.helical(tube_axial.mesh.xyz,90,1)
Here we compute the equilibrium, that is expected to be in the \(\phi\) direction. (\(x\),\(y\),\(z\)) coordinates for the axial waveguide mean (\(\rho\),\(\phi\),\(z\)).
[11]:
success = False
while not success:
relax_axial = tx.experiments.relax(tube_axial, tolerance=1e-18)
success = relax_axial.was_success
Minimizing energy in using 'L-BFGS-B' (tolerance 1e-18) ...
energy area density: -1.072744950755669e-02 J/(rad m), <mag.x> = -0.00, <mag.y> = 1.00, <mag.z> = -0.00
Failure. Returning initial state.
Minimizing energy in using 'L-BFGS-B' (tolerance 1e-18) ...
energy area density: -1.072744950755065e-02 J/(rad m), <mag.x> = 0.00, <mag.y> = 1.00, <mag.z> = -0.000
Success!
[12]:
tube_axial.spectrum = tx.experiments.eigenmodes(tube_axial,num_cpus=-1, num_modes=10, kmin=-40e6, kmax=40e6, num_k=81)
100%|████████████████| 446/446 [00:01<00:00, 338.57it/s]
[13]:
tube_axial.spectrum.plot(m=[-2,2], n=0, renderer="notebook") # remove the renderer argument when running on your computer