VortexPasta.jl
A vortex filament solver for the simulation of quantum vortex flows.
This solver implements the methods described in Polanco (2025) for the fast evaluation of Biot–Savart integrals in periodic domains.
Introduction
Physical context
Quantum vortices are one of the most important features of superfluids such as low-temperature liquid helium or Bose–Einstein condensates. These are topological defects – which in three dimensions take the form of spatial curves – where the velocity of the superfluid is singular. The main property of quantum vortices is that they have a quantised circulation. That is, they induce a rotating velocity field around them whose intensity is quantised in terms of the quantum of circulation
In the case of helium-4, superfluidity takes place at temperatures below about 2.17 K, and the thickness of quantum vortices is about 1 Å (
In the VFM, each quantum vortex induces a velocity field around it given by the Biot–Savart law:
where
Numerical considerations
From a numerical standpoint, simulating large sets of quantum vortices using the VFM is expensive. Indeed, assuming that vortex lines are discretised by a set of
The VortexPasta.jl solver provides an efficient and accurate implementation of the VFM (Polanco, 2025), specifically intended for vortex flows in periodic domains. Its efficiency comes from the use of a splitting technique derived from the Ewald summation method, which splits the Biot–Savart integral into a short-range and a long-range parts. This kind of methods is routinely used in the context of molecular dynamics simulations to compute electrostatic Coulomb interactions between point charges. In the modified short-range integral, pair interactions decay exponentially with
Installation
Installing Julia
The easiest way of installing (and updating) Julia is using the official juliaup installer.
On Linux and Mac, one can install juliaup by executing in a terminal
curl -fsSL https://install.julialang.org | shThis will automatically install the latest Julia release and make it available from your terminal using the julia command.
To get started with using Julia, the Modern Julia Workflows blog is a great source of practical information. See in particular the section on writing Julia code.
Some convenient packages
When developing Julia code, it is highly recommended to have the Revise.jl package in the global environment. This package keeps track of modifications of included code when working from a Julia session, which means that one doesn't need to re-include a Julia file each time it is modified. To install it, launch Julia in a terminal, enter package mode using ], and then:
(@v1.11) pkg> add ReviseAnother very widely used package is OhMyREPL.jl, which adds syntax highlighting to the REPL among other nice things. It can be installed in the same way as Revise.jl.
One usually wants to load these packages every time a Julia session is started. This can be done automatically by creating a startup file in ~/.julia/config/startup.jl[1] with the following content:
try
using Revise
using OhMyREPL
catch e
@warn "Error importing Revise or OhMyREPL. Use `]add Revise OhMyREPL` to install them."
endLocal environments
Above, both packages have been installed in the global environment (@v1.X), which is convenient because we want to load these packages no matter which Julia project we're currently working on.
For more specific things (such as doing simulations using VortexPasta.jl), it is recommended to install things in a local environment, which allows (among other things) to avoid conflicts between package versions when working on different Julia projects.
To create a new local environment in the current folder, launch Julia using:[2]
julia --project=.Packages will then be installed in this environment. For example, enter package mode using ] and install the GLMakie.jl package:
(simulation) pkg> add GLMakieThis will install the GLMakie package (for plotting) and all its dependencies. It will also precompile installed packages, which can take a few minutes (especially for GLMakie, which is a large package with many dependencies), but which makes loading the package faster when it is actually imported from a Julia session or script.
One can check that the project now contains a single package:
(simulation) pkg> status
Status `/path/to/simulation/Project.toml`
[e9467ef8] GLMakie v0.11.2Moreover, the current directory now contains two new files, Project.toml and Manifest.toml, which describe the packages installed by local environment. The Project.toml file lists the packages that we have directly installed (so just GLMakie for now). The Manifest.toml file is much larger, as it also contains the list of all installed packages associated to the environment, including the direct and indirect dependencies of GLMakie, and the precise versions of the installed packages. This file is automatically generated and is very useful for reproducibility.
Once the new project has been created, one can simply start Julia using
julia --projectfrom the same directory (simulation in this example). (Note that, this time, we haven't told Julia where the project is located.) Julia will automatically detect the presence of the Project.toml file in the current directory and enable the local environment.
Installing VortexPasta.jl
It is recommended to install VortexPasta.jl in a local environment, for example in the same environment as in the previous example (which already includes GLMakie).
To install it, one should first add the VortexRegistry package registry, which contains information on how to install VortexPasta.jl:
(simulation) pkg> registry add https://github.com/jipolanco/VortexRegistry.jl.gitNow we can easily install VortexPasta.jl:
(simulation) pkg> add VortexPastaAs before, this will install all dependencies and precompile VortexPasta.jl and other installed packages. Now the status of the local environment should look something like:
(simulation) pkg> status
Status `~/path/to/simulation/Project.toml`
[e9467ef8] GLMakie v0.11.2
[3d0f1e53] VortexPasta v0.26.1Installing VortexPasta.jl in development mode
The above procedure installs VortexPasta.jl in a read-only directory somewhere in ~/.julia. If, instead, we would like to make modifications to VortexPasta.jl, we should install it in "development" mode using dev (or develop) instead of add:
(simulation) pkg> dev VortexPastaThis will install the development version of VortexPasta.jl to ~/.julia/dev/VortexPasta. Any modifications to the code there will be visible when running scripts or code in the local environment.
Running the code
See the vortex ring tutorial for an example on how to prepare and run vortex filament simulations, from initialising a vortex filament with the wanted geometry, to computing its self-induced velocity, running simulations and saving the results for further analysis.
Replace
~/.juliawith$JULIA_DEPOT_PATHin case you have defined this environment variable. ↩︎Alternatively, one can start Julia without the
--projectflag, and then] activate .in package mode, as described in the official docs. ↩︎