Svirl is an open source solver of complex Ginzburg-Landau (GL) equations mainly used to describe magnetic vortices in superconductors. It consists of two parts: (i) time-dependent Ginzburg-Landau (TDGL) solver [1] and (ii) GL free energy minimizer with uses modified non-linear conjugate gradient method.
The current version of Svirl can be used for two-dimensional (2D) systems only, the work on three-dimensional (3D) solver is in progress.
Svirl has intuitive Python3 API and requires nVidia GPU to run. The idea of GPU-acceletrated TDGL solver was initially developed in the framework of OSCon project for infinite GL parameter limit.
import numpy as np
from svirl import GLSolver
gl = GLSolver(
dx = 0.5, dy = 0.5,
Lx = 64, Ly = 64,
order_parameter = 'random',
gl_parameter = 5.0, # np.inf
normal_conductivity = 200.0,
homogeneous_external_field = 0.1,
dtype = np.float64,
)
gl.solve.td(dt=0.1, Nt=1000)
gl.solve.cg(n_iter = 1000)
vx, vy, vv = gl.params.fixed_vortices.vortices
print('Order parameter: array of shape', gl.vars.order_parameter.shape)
print('%d vortices detected' % vx.size)
print('Free energy: ', gl.observables.free_energy)
ch, cv = gl.observables.current_density
print('Total current density: two arrays of shape', ch.shape, '[horizontal links] and', cv.shape, '[vertical links]')
ch, cv = gl.observables.supercurrent_density
print('Supercurrent density: two arrays of shape', ch.shape, '[horizontal links] and', cv.shape, '[vertical links]')
print('Magnetic field: array of shape', gl.observables.magnetic_field.shape)
We follow the Microsoft Open Source Code of Conduct.