Skip to content

Commit

Permalink
WIP add to paper
Browse files Browse the repository at this point in the history
  • Loading branch information
musoke committed Jun 30, 2023
1 parent fb107b3 commit e17e493
Show file tree
Hide file tree
Showing 2 changed files with 287 additions and 31 deletions.
208 changes: 205 additions & 3 deletions joss/paper.bib
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ @Article{Edwards:2018ccc
primaryclass = {astro-ph.CO},
}

@Article{2023xxx,
author = {Authors},
title = {In progress},
year = {2023},
}

@Article{Glennon:2022huu,
author = {Glennon, Noah and Nadler, Ethan O. and Musoke, Nathan and Banerjee, Arka and Prescod-Weinstein, Chanda and Wechsler, Risa H.},
journal = {Physical Review D},
Expand All @@ -20,7 +26,6 @@ @Article{Glennon:2022huu
number = {12},
pages = {123540},
volume = {105},
abstract = {Ultralight axions (ULAs) are promising dark matter candidates that can have a distinct impact on the formation and evolution of structure on nonlinear scales relative to the cold, collisionless dark matter (CDM) paradigm. However, most studies of structure formation in ULA models do not include the effects of self-interactions, which are expected to arise generically. Here, we study how the tidal evolution of solitons is affected by ULA self-interaction strength and sign. Specifically, using the pseudospectral solver UltraDark.jl, we simulate the tidal disruption of self-interacting solitonic cores as they orbit a $10^{11}~M_{\mathrm{\odot}}$ Navarro-Frenk-White CDM host halo potential for a range of orbital parameters, assuming a fiducial ULA particle mass of $10^{-22}\mathrm{eV}$. We find that repulsive (attractive) self-interactions significantly accelerate (decelerate) soliton tidal disruption. We also identify a degeneracy between the self-interaction strength and soliton mass that determines the efficiency of tidal disruption, such that disruption timescales are affected at the $\sim 50\%$ level for variations in the dimensionless ULA self-coupling from $\lambda=-10^{-92}$ to $\lambda=10^{-92}$.},
archiveprefix = {arXiv},
copyright = {Creative Commons Attribution Non Commercial No Derivatives 4.0 International},
date = {2022-05-20},
Expand All @@ -40,7 +45,6 @@ @Article{Glennon:2023jsp
number = {6},
pages = {063520},
volume = {107},
abstract = {As constraints on ultralight axion-like particles (ALPs) tighten, models with multiple species of ultralight ALP are of increasing interest. We perform simulations of two-ALP models with particles in the currently supported range [arXiv:1307.1705] of plausible masses. The code we modified, UltraDark.jl, not only allows for multiple species of ultralight ALP with different masses, but also different self-interactions and inter-field interactions. This allows us to perform the first three-dimensional simulations of two-field ALPs with self-interactions and inter-field interactions. Our simulations show that having multiple species and interactions introduces different phenomenological effects as compared to a single field, non-interacting scenarios. In particular, we explore the dynamics of solitons. Interacting multi-species ultralight dark matter has different equilibrium density profiles as compared to single-species and/or non-interacting ultralight ALPs. As seen in earlier work [arXiv:2011.09510], attractive interactions tend to contract the density profile while repulsive interactions spread out the density profile. We also explore collisions between solitons comprised of distinct axion species. We observe a lack of interference patterns in such collisions, and that resulting densities depend on the relative masses of the ALPs and their interactions.},
archiveprefix = {arXiv},
copyright = {Creative Commons Attribution Non Commercial No Derivatives 4.0 International},
date = {2023-02-08},
Expand All @@ -56,7 +60,6 @@ @Article{Glennon:2023oqa
title = {Scalar dark matter vortex stabilization with black holes},
year = {2023},
month = {1},
abstract = {Galaxies and their dark-matter halos are commonly presupposed to spin. But it is an open question how this spin manifests in halos and soliton cores made of scalar dark matter (SDM, including fuzzy/wave/ultralight-axion dark matter). One way spin could manifest in a necessarily irrotational SDM velocity field is with a vortex. But recent results have cast doubt on this scenario, finding that vortices are generally unstable except with substantial repulsive self-interaction. In this paper, we introduce an alternative route to stability: in both (non-relativistic) analytic calculations and simulations, a black hole or other central mass at least as massive as a soliton can stabilize a vortex within it. This conclusion may also apply to stellar-scale Bose stars.},
archiveprefix = {arXiv},
copyright = {Creative Commons Attribution Non Commercial No Derivatives 4.0 International},
doi = {10.48550/ARXIV.2301.13220},
Expand All @@ -65,3 +68,202 @@ @Article{Glennon:2023oqa
primaryclass = {astro-ph.CO},
publisher = {arXiv},
}

@article{Julia-2017,
pages = {65--98},
author = {Bezanson, Jeff and Edelman, Alan and Karpinski, Stefan and Shah, Viral B},
journal = {SIAM {R}eview},
title = {Julia: A fresh approach to numerical computing},
publisher = {SIAM},
number = {1},
doi = {10.1137/141000671},
year = {2017},
url = {https://epubs.siam.org/doi/10.1137/141000671},
volume = {59}
}

@article{FFTW.jl-2005,
number = {2},
pages = {216--231},
doi = {10.1109/JPROC.2004.840301},
author = {Frigo, Matteo and Johnson, Steven~G.},
note = {Special issue on ``Program Generation, Optimization, and Platform Adaptation''},
year = {2005},
volume = {93},
journal = {Proceedings of the IEEE},
title = {The Design and Implementation of {FFTW3}}
}

@article{DanischKrumbiegel2021,
doi = {10.21105/joss.03349},
url = {https://doi.org/10.21105/joss.03349},
year = {2021},
publisher = {The Open Journal},
volume = {6},
number = {65},
pages = {3349},
author = {Simon Danisch and Julius Krumbiegel},
title = {{Makie.jl}: Flexible high-performance data visualization for {Julia}},
journal = {Journal of Open Source Software}
}

@Article{Parker:2022,
author = {Wendy S. Parker},
title = {Evidence and Knowledge from Computer Simulation},
year = {2022},
issn = {0165-0106},
pages = {1521-1538},
volume = {87},
doi = {10.1007/s10670-020-00260-1},
}

@Article{Parker:2009,
author = {Wendy S. Parker},
title = {Does matter really matter? Computer simulations, experiments, and materiality},
year = {2009},
issn = {0039-7857},
pages = {483-496},
volume = {169},
doi = {10.1007/s11229-008-9434-3},
}

@Article{Boge_2021,
author = {Florian Johannes Boge},
journal = {The British Journal for the Philosophy of Science},
title = {Why trust a simulation? Models, parameters, and robustness in simulation-infected experiments},
year = {2021},
issn = {0007-0882},
month = {jul},
doi = {10.1086/716542},
publisher = {University of Chicago Press},
}

@Article{Maley_2021,
author = {Corey Maley},
journal = {The British Journal for the Philosophy of Science},
title = {Analog Computation and Representation},
year = {2021},
issn = {0007-0882},
month = {apr},
doi = {10.1086/715031},
publisher = {University of Chicago Press},
}

@Article{Eschle:2023ikn,
author = {Eschle, J. and others},
title = {Potential of the {Julia} programming language for high energy physics computing},
year = {2023},
month = {6},
archiveprefix = {arXiv},
eprint = {2306.03675},
primaryclass = {hep-ph},
}

@misc{anim:vortex,
author = {Glennon, Noah and
Mirasola, Anthony E. and
Musoke, Nathan and
Neyrinck, Mark C. and
Prescod-Weinstein, Chanda},
title = {{Supplementary animations for "Scalar dark matter vortex stabilization with black holes"}},
month = feb,
year = 2023,
publisher = {Zenodo},
doi = {10.5281/zenodo.7675830},
url = {https://doi.org/10.5281/zenodo.7675830}
}

@misc{anim:multi,
author = {Glennon, Noah and
Musoke, Nathan and
Prescod-Weinstein, Chanda},
title = {{Supplementary animations for "Simulations of multi-field ultralight axion-like dark matter"}},
month = feb,
year = 2023,
publisher = {Zenodo},
doi = {10.5281/zenodo.7675775},
url = {https://doi.org/10.5281/zenodo.7675775}
}

@Article{Musoke:2019ima,
author = {Musoke, Nathan and Hotchkiss, Shaun and Easther, Richard},
journal = {Phys. Rev. Lett.},
title = {Lighting the Dark: Evolution of the Postinflationary Universe},
year = {2020},
number = {6},
pages = {061301},
volume = {124},
archiveprefix = {arXiv},
doi = {10.1103/PhysRevLett.124.061301},
eprint = {1909.11678},
primaryclass = {astro-ph.CO},
readstatus = {read},
}

@inproceedings{padmanabhan2020simulating,
title={Simulating ultralight dark matter in Chapel},
author={Padmanabhan, Nikhil and Ronaghan, Elliot and Zagorac, J Luna and Easther, Richard},
booktitle={2020 IEEE International Parallel and Distributed Processing Symposium Workshops (IPDPSW)},
pages={678--678},
year={2020},
organization={IEEE}
}

@misc{folds,
author = {Takafumi Arakaki},
title = {Folds: sequential, threaded, and distributed fold interface for Julia},
year = {2020},
publisher = {GitHub},
journal = {GitHub repository},
url = {https://github.com/JuliaFolds/Folds.jl}
}

@software{PencilArrays,
author = {Polanco, Juan Ignacio},
doi = {10.5281/zenodo.5148035},
license = {MIT},
month = jul,
title = {{PencilArrays.jl: Distributed Julia arrays using the MPI protocol}},
url = {https://github.com/jipolanco/PencilArrays.jl},
version = {0.9.9},
year = {2021}
}

@software{PencilFFTs,
author = {Polanco, Juan Ignacio},
doi = {10.5281/zenodo.3618781},
license = {MIT},
month = jul,
title = {{PencilFFTs.jl: FFTs of MPI-distributed Julia arrays}},
url = {https://github.com/jipolanco/PencilFFTs.jl},
version = {0.12.4},
year = {2021}
}

@Article{Schwabe:2020eac,
author = {Schwabe, Bodo and Gosenca, Mateja and Behrens, Christoph and Niemeyer, Jens C. and Easther, Richard},
journal = {Phys. Rev. D},
title = {Simulating mixed fuzzy and cold dark matter},
year = {2020},
number = {8},
pages = {083518},
volume = {102},
archiveprefix = {arXiv},
doi = {10.1103/PhysRevD.102.083518},
eprint = {2007.08256},
primaryclass = {astro-ph.CO},
}

@Article{JuliaBiologists,
author = {Roesch, Elisabeth and Greener, Joe G. and MacLean, Adam L. and Nassar, Huda and Rackauckas, Christopher and Holy, Timothy E. and Stumpf, Michael P. H.},
title = {Julia for Biologists},
year = {2021},
month = sep,
archiveprefix = {arXiv},
copyright = {Creative Commons Attribution 4.0 International},
doi = {10.48550/ARXIV.2109.09973},
eprint = {2109.09973},
keywords = {Quantitative Methods (q-bio.QM), FOS: Biological sciences},
primaryclass = {q-bio.QM},
publisher = {arXiv},
}
110 changes: 82 additions & 28 deletions joss/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,52 +21,106 @@ bibliography: paper.bib

# Summary

UltraDark.jl is a Julia package for the simulation of cosmological scalar fields.
Scalar fields are proposed solutions to two of the fundamental questions in cosmology: the nature of dark matter and the universe's initial conditions.
Modeling their dynamics requires solving the Gross-Pitaevskii-Poisson equations, which is analytically challenging.
This makes simulations essential to understanding their implications.
UltraDark.jl is an open, performant and user friendly option to simulate these equations.


# Statement of need

Scalar fields are ubiquitous in physics.
In cosmology, they are potential solutions to two of the most fundamental open questions.
As dark matter candidates, scalar fields including axion-like particles (ALPs) would explain the nature of the missing 85% of the universe's matter.
As inflaton candidates, scalar fields are proposed to explain the beginning of the universe, causing a phase of accelerated expansion that sets the stage for big bang nucleosynthesis.

# Mathematics

Single dollars ($) are required for inline mathematics e.g. $f(x) = e^{\pi/x}$
Subject to reasonable conditions, cosmological scalar fields obey the coupled Gross-Pitaevskii equation for the scalar field,
\begin{equation}
\label{eq:gpp}
i \hbar \frac{\partial \psi}{\partial t} = -\frac{\hbar^2}{2 m a(t)^2} \nabla^2 \psi + m \Phi \psi
\end{equation}
and Poisson equation for the gravitational potential
\begin{equation}
\label{eq:poisson}
\nabla^2 \Phi = \frac{4\pi G}{a(t)} m {|\psi|}^2.
\end{equation}
where $\psi$ is the scalar field in question, $m$ is its mass, $a(t)$ is the scale factor characterising the expansion of the universe, and $\Phi$ is the gravitational potential.

Double dollars make self-standing equations:

$$\Theta(x) = \left\{\begin{array}{l}
0\textrm{ if } x < 0\cr
1\textrm{ else}
\end{array}\right.$$
These equations are difficult to solve analytically -- even static equilibrium solutions do not have a closed form -- and necessitate the use of computer simulations.
There are previous codes which also solve equations \autoref{eq:gpp} and \autoref{eq:poisson}.
Each of these has its own strengths and weaknesses.
UltraDark.jl is most similar to PyUltraLight [@Edwards:2018ccc], so that will be used as a point of comparison.
A similar algorithm has also been implemented in Chapel; it is highly parallel but not public [@padmanabhan2020simulating].
AxionNyx includes other fields, adaptive mesh refinement and background expansion, but its numerous features make it unwieldy for plain ULDM simulations [@Schwabe:2020eac].

You can also use plain \LaTeX for equations
\begin{equation}\label{eq:fourier}
\hat f(\omega) = \int_{-\infty}^{\infty} f(x) e^{i\omega x} dx
\end{equation}
and refer to \autoref{eq:fourier} from text.

# Citations
UltraDark.jl solves equations @eq:gpp and @eq:poisson with a pseudo-spectral symmetrized split-step method, in which each time step consists of four sub-steps:
\begin{gather*}
\label{eq:update_phase_1}
\psi \to \exp\left( - i\frac{h}{2} \Phi \right) \exp\left(-i \frac{h}{2} \kappa |\psi|^2 \right) \psi
\\
\label{eq:update_density}
\psi \to \mathcal{F}^{-1}\left\{ \exp\left(-i h \frac{k^2}{2} \right) \mathcal{F}\left\{ \psi \right\} \right\}
\\
\Phi = \mathcal{F}^{-1}\left\{ - \frac{4\pi}{a k^2} \mathcal{F}\left\{ |\psi|^2\right\}\right\}
\\
\label{eq:update_phase_2}
\psi \to \exp\left( - i\frac{h}{2} \Phi \right) \exp\left(-i \frac{h}{2} \kappa |\psi|^2 \right) \psi
,
\end{gather*}
where $\mathcal{F}$ is a Fourier transform, $k$ are the corresponding frequencies, and $h$ is the time step.


This is similar to PyUltraLight, but there are some significant differences.
UltraDark.jl has adaptive time steps which allow it to accelerate simulations while preserving numerical convergence.
This is particularly useful in an expanding universe, where the time step is roughly $h \propto a^2$.
Such time steps accelerated a previous version of this code by orders of magnitude when simulating collapse of an inflaton field in the early universe [@Musoke:2019ima].

![Wall time for a single time step, as a function of number of CPUs.\label{fig:cpus}](../benchmarks/time_step/cpus.pdf){ width=100% }

Julia [@Julia-2017] has seen increasing use in scientific computing; see for example @Eschle:2023ikn and @JuliaBiologists for overviews of its use in high energy physics and biology.
The use of Julia is one of the choices that separates UltraDark.jl from similar codes.
Parallelism is difficult in Python, with PyUltraLight resorting to baroque methods.
In contrast, Julia has rich parallelism capabilities.
The `Threads.@threads` macro provides simple parallelisation of for loops.
Folds.jl even enables simple parallelisation of reduction operations [@folds].
This thread-level parallelism is demonstrated in \autoref{@fig:cpus}.
In a cluster environment, PencilArrays.jl and PencilFFTs.jl enable straightforward cross-node parallelism, a capability that is challenging to reproduce in Python [@PencilArrays, @PencilFFTs].


Citations to entries in paper.bib should be in
[rMarkdown](http://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html)
format.
Despite these features, UltraDark.jl is straightforward to run.
Indeed, the canonic stationary soliton test is as simple as
```julia
using UltraDark

If you want to cite a software repository URL (e.g. something on GitHub without a preferred
citation) then you can do it with the example BibTeX entry below for @ fidgit.
grids = Grids(10.0, 64)

For a quick reference, the following citation commands can be used:
include("../../examples/init_soliton.jl")
mass = 10
add_soliton(grids, mass, [0, 0, 0], [0, 0, 0], 0, 0) # simplfy this some more

- @Glennon:2023oqa -> "Author et al. (2001)"
- [@Glennon:2023jsp] -> "(Author et al., 2001)"
- [Edwards:2018ccc; @Glennon:2022huu] -> "(Author1 et al., 2001; Author2 et al., 2002)"
output_times = 0:0.1:1
output_config = OutputConfig("output_directory", output_times)
options = Config.SimulationConfig()

# Figures
simulate!(grids, options, output_config) == nothing
```
Furthermore, Julia's type system enables rich extensibility through multiple dispatch; see the documentation for more details.

Figures can be included like this:
![Caption for example figure.\label{fig:example}](../benchmarks/time_step/cpus.pdf)
and referenced from text using \autoref{fig:example}.

Figure sizes can be customized by adding an optional second parameter:
![Caption for example figure.](../benchmarks/time_step/resol.pdf){ width=20% }
The features described above have allowed UltraDark.jl to produce results presented in 4 publications, each exploring the small scale structure of ultralight dark matter.
It has been used to explore tidal disruption of self-interacting dark matter [@Glennon:2022huu], perform the first simulations of multi-species ALPs with intra- and inter-species interactions [@Glennon:2023jsp] and has been used to discover a novel mechanism for vortex stabilisation in SDM [@Glennon:2023oqa].
Work in preparation will examine the effect of self-interactions on dynamical friction [@2023xxx].
More sample output can be found in @anim:vortex and @anim:multi.

# Acknowledgements

- NeSI
- Marsden
- This work was performed in part at Aspen Center for Physics, which is supported by National Science Foundation under Grant No. PHY-1607611.
- Makie

# References

0 comments on commit e17e493

Please sign in to comment.