API
Here are all the exported functions of Skyrmions3D.
Basic operations
Skyrmions3D.Skyrmion — TypeSkyrmion(lp::Int64, ls::Float64; kwargs...)
Skyrmion([lpx, lpy, lpx], [lsx, lsy, lsz]; kwargs...)Create a vacuum skyrme field with lp lattice points and ls lattice spacing.
Optional arguments
mpi = 0.0: sets the pion mass for this Skyrme fieldFpi = 180: sets the pion decay constant for this Skyrme field, given in MeVee = 4.0: sets the Skyrme constant for this Skyrme fieldphysical = false: whether the Skyrmion is using physical unitsvac = [0.0, 0.0, 0.0, 1.0]: the value the vacuum pion field takesboundary_conditions = "dirichlet": the boundary conditions for the pion field
The default values of Fpi and ee are taken to roughly approximate experimental values [4].
References
- [4] Adkins et al. Nuclear Physics B 228, 552–566 (1983).
Skyrmions3D.check_if_normalised — Methodcheck_if_normalised(skyrmion)Check if skyrmion is normalised.
Throws an error if any point is not normalised, i.e. the pion field does not have norm 1.
Skyrmions3D.get_field — Methodget_field(skyrmion)Returns the array of pion fields [π1, π2, π3, π0] of skyrmion, which can be used in integrals.
Skyrmions3D.get_grid — Methodget_grid(skyrmion)Returns an array of 3D arrays [x, y, z], which can be used in integrals.
Skyrmions3D.load_skyrmion — Methodload_skyrmion(path)Loads a Skyrmion, which has been previously saved in path. Returns the loaded skyrmion.
See also save_skyrmion.
Skyrmions3D.normer! — MethodSkyrmions3D.normer — MethodSkyrmions3D.save_skyrmion — Methodsave_skyrmion(skyrmion::Skyrmion, path, overwrite, additional_metadata)Save a skyrmion to a folder at path. If overwrite is true, function will delete the given folder (if valid Skyrmion3D output) and replace with new data. User can specify additional metadata by specifying a dict additional_metadata.
See also load_skyrmion.
Skyrmions3D.set_Fpi! — Methodset_Fpi!(skyrmion, Fpi)Sets the pion decay constant of skyrmion to Fpi.
Skyrmions3D.set_dirichlet! — Methodset_dirichlet!(skyrmion)Sets the skyrmion to have periodic boundary conditions.
Skyrmions3D.set_ee! — Methodset_ee!(skyrmion, ee)Sets the Skyrme coupling constant of skyrmion to ee.
Skyrmions3D.set_lattice! — Methodset_lattice!(skyrmion, lp = [lpx, lpy, lpz], ls = [lsx, lsy, lsz])Sets the underlying lattice to one with lpxxlpyxlpz points and lsxxlsyxlsz spacings, and reinterpolates skyrmion on the new grid.
Skyrmions3D.set_mpi! — Methodset_mpi!(skyrmion, mpi)Set the pion mass of skyrmion to mpi.
Skyrmions3D.set_neumann! — Methodset_neumann!(skyrmion::Skyrmion)Sets the skyrmion to have Neumann boundary conditions.
Skyrmions3D.set_periodic! — Methodset_periodic!(skyrmion)Sets the skyrmion to have periodic boundary conditions.
Skyrmions3D.set_physical! — Methodset_physical!(skyrmion, is_physical; Fpi = Fpi, ee = ee)Sets skyrmion to use physical units (as opposed to Skyrme units [5]) when is_physical is true, and prints the physical units.
Also used to turn off physical units by setting is_physical=false.
The physical energy unit is $\frac{F_\pi}{4e}$ MeV and the physical length unit is $\frac{2\hbar}{e F_\pi}$ fm (where $\hbar \approx 197.327$ MeV fm is the reduced Planck constant).
References
- [5] Manton. Skyrmions: a theory of nuclei (2022).
Grid
Skyrmions3D.Grid — TypeGrid([lpx, lpy, lpx], [lsx, lsy, lsz], boundary_conditions::String)Create a Grid field with lp lattice points and ls lattice spacing.
The current accepted values for boundary_conditions are "dirichlet", "neumann", and "periodic". If a different value is provided, a warning is given.
Create
Skyrmions3D.R_from_axis_angle — MethodR_from_axis_angle(th, n)Creates the rotation matrix which acts via left multiplication on a vector to rotate it by angle -th about axis n. The vector n is automatically normalised.
Skyrmions3D.make_ADHM! — Functionmake_ADHM!(skyrmion, L, M = nothing; tsteps = 42)Writes an ADHM skyrmion in to skyrmion. The ADHM data is given by L and M. L and M should be given by B and BxB arrays of Quaternions, from the Quaternions package.
If M is nothing then it is assumed L is a (B+1)xB array containing all the ADHM data.
tsteps determines the number of steps used to numerically compute the holonomy of the ADHM gauge field.
Example
using Quaternions
B=2
L = [ Quaternion(0.0,0.0,0.0,0.0) for a in 1:B ]
M = [ Quaternion(0.0,0.0,0.0,0.0) for a in 1:B, b in 1:B ]
L[1] = Quaternion(0.0, 0.0, 0.0, sqrt(2.0))
L[2] = Quaternion(0.0, 0.0, sqrt(2.0), 0.0)
M[1,1] = Quaternion(1.0, 0.0, 0.0, 0.0)
M[1,2] = Quaternion(0.0, 1.0, 0.0, 0.0)
M[2,1] = Quaternion(0.0, 1.0, 0.0, 0.0)
M[2,2] = Quaternion(-1.0, 0.0, 0.0, 0.0)
my_skyrmion = Skyrmion(30,0.2)
make_ADHM!(my_skyrmion, L, M)Skyrmions3D.make_RM_product! — Methodmake_RM_product!(skyrmion, X_list)Makes a product approximation of many rational map skyrmions, determined through the list X_list. The final field is written into skyrmion.
The formatting of the list is as follow: X_list = [ data_1, data_2, data_3, ... ] where data_1 = [ p(z), q(z), f(r), X, θiso, n_iso, θrot, n_rot ]
See also [product]
Example of list
p1(z) = z; q1(z) = 1; f1(r) = 4*atan(exp(-r));
p2(z) = z^2; q2(z) = 1; f2(r) = 4*atan(exp(-0.7*r));
X_list = [ [ p1, q1, f1, [0.0,0.0,1.5], 0.0, [0.0,0.0,1.0], 0.0, [0.0,0.0,1.0] ], [ p2, q2, f2, [0.0,0.0,-1.5], pi, [1.0,0.0,0.0], 0.0, [0.0,0.0,1.0] ] ]Technical details
The product is taken pairwise in order. E.g. for a list of 3 skyrmions, we first calculate the symmetrised product of the first and second skyrmions then calculate the symmtrised product with the third skyrmion. Hence the final solution is not symmetric under permutations.
Skyrmions3D.make_rational_map! — Functionmake_rational_map!(skyrmion, pfn, qfn, prof = nothing; kwargs...)Writes a rational map skyrmion in to skyrmion. The rational map is given by the polynomials pfn and qfn as R(z) = p(z)/q(z), and the profile f(r) is prof.
If prof is nothing, the function will find an OK approximation for the profile.
Optional arguments
baryon = nothing: if the baryon number is not provided, it will be determined from the rational mapX = [0.0, 0.0, 0.0]: translate the initial skyrmion byXiTH = 0.0: isorotate initial skyrmion byiTHabouti_ni_n = [0.0, 0.0, 1.0]: axis about which to isorotate skyrmionjTH = 0.0: rotate initial skyrmion byjTHaboutj_nj_n = [0.0, 0.0, 1.0]: axis about which to rotate skyrmionverbose = true: determines whether the function will print the found baryon number (if it is not given)
Transform
Skyrmions3D.center_skyrmion! — Methodcenter_skyrmion!(skyrmion; steps = 10, tolerance = 1e-9)Translates skyrmion so that the center of mass is (0, 0, 0).
The method works by succesively finding the center of mass of skyrmion and translating by it, either until the L1 difference between the center of mass and (0, 0, 0) is less than tolerance, or until steps many translations have occurred. This process should converge provided the Skyrme field of skyrmion is small at the boundary of the grid.
Skyrmions3D.evaluate_sk — Methodevaluate_sk(skyrmion, y)Evaluates the Skyrme field at the spatial position y, using a quadratic B-spline interpolation method.
See also quadratic_spline_interpolation.
Skyrmions3D.isorotate_sk! — Methodisorotate_sk!(skyrmion; theta = 0, n = [0, 0, 1])Isorotates skyrmion by theta around the vector n. The given vector is automatically normalised.
See also isorotate_sk.
Skyrmions3D.isorotate_sk — Methodisorotate_sk(skyrmion; theta = 0, n = [0, 0, 1])Returns skyrmion isorotated by theta around the vector n. The given vector is automatically normalised.
See also isorotate_sk!.
Skyrmions3D.product_approx! — Methodproduct_approx!(skyrmion1, skyrmion2)Makes the symmetrised product approximation of skyrmion1 and skyrmion2. The output is written in to skyrmion1. The returned field is normalised.
See also product_approx.
Skyrmions3D.product_approx — Methodproduct_approx(skyrmion1, skyrmion2)Returns the symmetrised product approximation of skyrmion1 and skyrmion2. The returned field is normalised.
See also product_approx!.
Skyrmions3D.quadratic_spline_interpolation — Methodquadratic_spline_interpolation(pion_field, x)Provides a function which interpolates pion_field on the grid x
In particular, the return object is an array of interpolation objects from the package Interpolations, one for each component of the pion field. These are constructed using a quadatic b-spline.
Skyrmions3D.rotate_sk! — Methodrotate_sk!(skyrmion; theta = 0, n = [0, 0, 1])Rotates skyrmion by theta around the vector n. The given vector is automatically normalised.
See also rotate_sk.
Skyrmions3D.rotate_sk — Methodrotate_sk(skyrmion; theta = 0, n = [0, 0, 1])Returns skyrmion rotated by theta around the vector n. The given vector is automatically normalised.
See also rotate_sk!.
Skyrmions3D.translate_sk! — Methodtranslate_sk!(skyrmion; X = [0.0, 0.0, 0.0])Translates skyrmion by the 3-Vector X, e.g. X = [1.0, 0.0, 0.0]
See also translate_sk.
Skyrmions3D.translate_sk — Methodtranslate_sk(skyrmion; X = [0.0, 0.0, 0.0])Returns skyrmion translated by 3-Vector X, e.g. X = [1.0, 0.0, 0.0]
See also translate_sk!.
Properties
Skyrmions3D.Baryon — MethodBaryon(skyrmion; density = false, moment = 0, component = 0)Compute baryon number of skyrmion.
Set 'density = true' to output the baryon density and moment to n to calculate the nth moment of the baryon density. Setting also component to i (i=1,2,3) returns the ith component of the density.
Note that this method sums over the grid. If the grid is not sufficiently large, the computed baryon number will be smaller than the 'true' value.
See also get_baryon_density!.
Skyrmions3D.Energy — MethodEnergy(skyrmion; density = false, moment = 0)Compute energy of skyrmion.
Set 'density = true' to output the energy density and moment to n to calculate the nth moment of the energy density.
If skyrmion.physical is false, then the returned value is the $\frac{1}{12\pi^2}$ times the integral of the energy density, reflecting the Fadeev bound on the energy of a 1-skyrmion [6] that $E \geq 12 \pi^2$. Otherwise, the returned value is in the appropriate physical units, and including the factor of $12 \pi^2$.
Note that this method sums over the grid. If the grid is not sufficiently large, the computed energy will be smaller than the 'true' value.
See also get_energy_density!.
References
- [6] Manton. Geometry of Skyrmions (1987).
Skyrmions3D.center_of_mass — Methodcenter_of_mass(skyrmion)Compute the center of mass of skyrmion, based on the energy density.
Note that this method sums over the grid. If the Skyrme field is not sufficientl small at the boundary of the grid, the computed center of mass may not accurately reflect the 'true' expected value from how the field was initialised.
Skyrmions3D.compute_current — Methodcompute_current(skyrmion; label = "uMOI", indices = [0, 0], density = false, moment = 0)Compute a variety of currents in the Skyrme model, based on a skyrmion.
You can calculate specific indices using e.g. indices = [1,2]. If indices = [0,0], the function will calculate all indices. If density = false, the function will return the integrated densities, while density = true it will return the densities.
The possible currents are:
uMOI: the isospin moment of inertia.wMOI: the mixed moment of inertia.vMOI: the spin moment of inertia.uAxial: the u-axial moment of inertia.wAxial: the w-axial moment of inertia.NoetherIso: the Noether vector current.NoetherAxial: the Noether axial current.stress: the stress tensor.
Skyrmions3D.get_baryon_density! — Methodget_baryon_density!(baryon_density, sk; moment = 0, component = 0)Write the baryon density of the skyrmion sk to the array baryon_density.
Set the moment to n to calculate the nth moment of the density. Set component to i (i=1,2,3) to calculate ith component of the density.
See also Baryon.
Skyrmions3D.get_energy_density! — Methodget_energy_density!(density, sk; moment = 0)Write the energy density of the skyrmion sk to the array density.
Set the moment to n to calculate the nth moment of the density.
See also Energy.
Skyrmions3D.overview — Methodoverview(skyrmion)Displays an overview of skyrmion's properties.
Skyrmions3D.rms_baryon — Methodrms_baryon(skyrmion; component = 0)Compute root mean square charge radius of a skyrmion, using the baryon density.
Set component to i (i=1,2,3) to calculate the rms radius for just the ith component.
The returned value is given in the units determined by skyrmion.physical.
Flow
Skyrmions3D.arrested_newton_flow! — Methodarrested_newton_flow!(skyrmion; skyrmion_dot = zero_array, steps = 1, tolerance = 0.0, dt = ls/10.0, checks = max(100, steps), verbose = true, method = "RK4")Applies an arrested Newton flow to skyrmion whose initial time derivative field is skyrmion_dot (an array of the correct shape initialised with value 0.0) with timestep dt (where ls is the lattice spacing in the first direction), either for steps steps or until the error falls below tolerance. The error is checked every checks steps.
The flow is verbose, incrementally describing the error and new energy, if verbose is true. method determines how each timestep is carried out: accepted values are "RK4" or "leapfrog".
See also gradient_flow!.
Skyrmions3D.gradient_flow! — Methodgradient_flow!(skyrmion; steps = 1, tolerance = 0.0, dt = ls^2/100.0, checks = max(100, steps), verbose = true, dEdp = zero_array)Applies a gradient flow to skyrmion with timestep dt (where ls is the average lattice spacing), either for steps steps or until the error falls below tolerance. The error is checked every checks steps.
dEdp is an array, initialised to be the correct shape and 0.0 everywhere, which stores the change in energy density. The flow is verbose, incrementally describing the error and new energy, if verbose is true.
See also arrested_newton_flow!.
Visualise
Skyrmions3D.plot_baryon_density — Methodplot_baryon_density(skyrmion; iso_value = 0.25*(max(BD) + min(BD)), juggling = false, kwargs...)Plots an isosurface of constant baryon density, with value iso_value (where BD which determines the default value is the baryon density of skyrmion over its grid). The isosurface is coloured to reveal the pion field structure as originally described in [7].
Can use a juggling ball colouring scheme by setting juggling = true.
Optional argument
Can accept any arguments used in Axis3 from the Makie package.
References
- [7] Manton. Classical Skyrmions—static solutions and dynamics (2012).
Skyrmions3D.plot_field — Methodplot_field(skyrmion; component = 3, iso_value = 0.5, kwargs...)Plots an isosurface of constant value, skyrme_field[component] = iso_value.
Optional argument
Can accept any arguments used in Axis3 from the Makie package.
Skyrmions3D.plot_overview — Methodplot_overview(skyrmion; iso_value = 0.5)Plots the pion fields and a baryon density of skyrmion.
Pion field isosurfaces are taken at the value iso_value, while the baryon density isosurface is taken at halfway between the minimum and maximum density value.