SPARTA Direct Simulation Monte Carlo (DSMC) Simulator
The generation of random numbers is too important to be left to
chance. -- Robert Coveyou
God does not play dice. -- Albert Einstein
SPARTA is an acronym for Stochastic PArallel Rarefied-gas
SPARTA is a parallel DSMC or Direct Simulation Montel Carlo code for
performing simulations of low-density gases in 2d or 3d. Particles
advect through a hierarchical Cartesian grid that overlays the
simulation box. The grid is used to group particles by grid cell for
purposes of performing collisions and chemistry. Physical objects
with triangulated surfaces can be embedded in the grid, creating cut
and split grid cells. The grid is also used to efficiently find
SPARTA runs on single processors or in parallel using message-passing
techniques and a spatial-decomposition of the simulation domain. The
code is designed to be easy to modify or extend with new
SPARTA is distributed as an open source code under
the terms of the GPL, or sometimes (by request) under the terms
of the GNU Lesser General Public License (LGPL). The current
version can be downloaded here.
SPARTA was developed at Sandia National Laboratories, a US
Department of Energy (DOE) laboratory. The chief authors are
Steve Plimpton and Michael Gallis who can be contacted at
sjplimp at sandia.gov and magalli at sandia.gov respectively. Funding
for SPARTA development has come from the DOE.
The SPARTA web site is hosted by Sandia National Laboratories, which
has this Privacy and Security statement.
Recent SPARTA News
- (1/20) Added support for transparent
surfaces which tally statistics when
particles pass throught them.
- (10/19) Added these commands for
ablation modeling of implicit
surface elements: fix ablate, compute
- (4/19) Added support for implicit 2d and
3d surface elements defined by a grid corner point values in a read-in
file. These are in contrast to explicit surface elements defined by
line segments (2d) or triangles (3d).
- (2/19) Added support for distributed
surface elements so that complex surfaces with huge element counts
can be modeled, with the elements stored acrossed processors.
- (8/18) SPARTA development is now
supported on GitHub and with a
- (1/18) Added new sections to the
Benchmark page with performance results using the new Kokkos
accelerator options on a variety of new machines and hardware,
including multi-core CPUs (via threading), GPUs, and KNLs.
- (12/17) Added a KOKKOS package to the
code to allow building with the open-source Kokkos library which
provides support for running SPARTA on different architectures,
including multi-core CPUs (via threading), GPUs, and KNLs. See this
section of the manual for details.
- (4/17) Added a subsonic pressure boundary
condition via a surf_collide piston command,
as well as a 2d/3d FFT capability for grid based quantities on regular
grids via the compute fft/grid
- (8/16) Added fix
ave/histo and fix
ave/histo/weight commands to enable
histogramming of various quantities during a simulation.
- (1/16) Added grid-style
variables so that user-defined per-grid quantities
can be calculated on-the-fly and output more easily.
- (10/15) Added a near-neighbor collision
model for selecting pairs of collision
- (9/15) Posted slides for a half-day
tutorial short-course on SPARTA, taught at the biennial DSMC15
conference. See the Tutorials link above.
- (8/15) Added static and on-the-fly grid
adaptivity via the adapt_grid and fix
adapt commands. Also added commands to
move or remove surface
- (5/15) Added a fix
emit/surf command to enable particle outflux
from surface elements, including their use as a global influx
- (5/15) Surface reaction models have been
added via the surf_react command. The full set
of dissociation, ionization, exchange, and recombination reactions,
for both gas-phase and surface chemitstry are now implemented.
- (5/15) Added an ambipolar approximation
for modeling charged plasmas. See this howto
discussion for an explanation of
using the various new commands and command options that enable the
- (2/15) Added a fix
emit/face/file command to enable
spatially-varying particle influx through a simulation box face, as
defined by a file of mesh points and values.
- (12/14) Added two new reaction styles to
the react command, for the Quantum-Kinetic (QK) model
and a hybrid Total Collision Energy / Quantum Kinetic (TCE/QK)
- (10/14) Added two Python
scripts which can convert SPARTA
output files to ParaView format for interactive 3d viz.
Paraview is a popular freely-available
- (8/14) Added a stl2surf.py
tool to convert STL-format
triangulation files into the SPARTA surface file
- (8/14) Enabled axi-symmetric 2d models.
See Section 4.2 of the manual for
- (7/14) Initial open-source release of
(see the Pictures & Movies page for more examples of
This is work by Michael Gallis (magalli at sandia.gov) at Sandia.
This calculation was done to model Richtmyer/Meshkov mixing which
occurs when a light gas is on top of a heavier gas and a shock induces
mixing and turbulent effects.
This is a large 2d calculation of He (green) on top of Ar (red). 4.5B
particles were run with 400M grid cells for 240K timesteps. The
simulation was run on 32K nodes (16 cores per node, 512K MPI tasks) of
the Sequoia BG/Q machine at Lawrence Livermore National Labs (LLNL).
Snapshot images of the simulation were created using SPARTA's dump
image command, rather than saving particle data
to disk. The first 2 images are the initial and final state of the
simulation. The rightmost image is a movie of the simulation.
2 images and a 0.5 Mb QuickTime movie
This paper has further details about the mixing model:
Direct Simulation Monte Carlo: The Quest for Speed, M. A. Gallis,
J. R. Torczynski, S. J. Plimpton, D. J. Rader, and T. Koehler,
Proceedings of the 29th Rarefied Gas Dynamics (RGD) Symposium, Xi'an,
China, July 2014. (to be published by AIP)