<HTML>
<CENTER><A HREF = "Manual.html">Previous Section</A> - <A HREF = "https://sparta.github.io">SPARTA WWW Site</A> - <A HREF = "Manual.html">SPARTA Documentation</A> - <A HREF = "Section_commands.html#comm">SPARTA Commands</A> - <A HREF = "Section_start.html">Next Section</A> 
</CENTER>






<HR>

<H3>1. Introduction 
</H3>
<P>These sections provide an overview of what SPARTA can do, describe
what it means for SPARTA to be an open-source code, and acknowledge
the funding and people who have contributed to SPARTA.
</P>
1.1 <A HREF = "#intro_1">What is SPARTA</A><BR>
1.2 <A HREF = "#intro_2">SPARTA features</A><BR>
1.3 <A HREF = "#intro_3">Grids and surfaces in SPARTA</A><BR>
1.4 <A HREF = "#intro_4">Open source distribution</A><BR>
1.5 <A HREF = "#intro_5">Acknowledgments and citations</A> <BR>

<HR>

<A NAME = "intro_1"></A><H4>1.1 What is SPARTA 
</H4>
<P>SPARTA is a Direct Simulation Montel Carlo code that models rarefied
gases, using collision, chemistry, and boundary condition models.  It
uses a hierarchical Cartesian grid to track and group particles for 3d
or 2d or axisymmetric models.  Objects emedded in the gas are
represented as triangulated surfaces and cut through grid cells.
</P>
<P>For examples of SPARTA simulations, see the <A HREF = "https://sparta.github.io">SPARTA WWW Site</A>.
</P>
<P>SPARTA runs efficiently on single-processor desktop or laptop
machines, but is designed for parallel computers.  It will run on any
parallel machine that compiles C++ and supports the <A HREF = "http://www-unix.mcs.anl.gov/mpi">MPI</A>
message-passing library.  This includes distributed- or shared-memory
parallel machines as well as commodity clusters.
</P>


<P>SPARTA can model systems with only a few particles up to millions or
billions.  See <A HREF = "Section_perf.html">Section 8</A> for information on SPARTA
performance and scalability, or the Benchmarks section of the <A HREF = "https://sparta.github.io">SPARTA
WWW Site</A>.
</P>
<P>SPARTA is a freely-available open-source code, distributed under the
terms of the <A HREF = "http://www.gnu.org/copyleft/gpl.html">GNU Public License</A>, or sometimes by request under
the terms of the <A HREF = "gnu2">GNU Lesser General Public License (LGPL)</A>,
which means you can use or modify the code however you wish.  The only
restrictions imposed by the GPL or LGPL are on how you distribute the
code further.  See <A HREF = "#intro_4">Section 1.4</A> below for a brief discussion
of the open-source philosophy.
</P>


<P>SPARTA is designed to be easy to modify or extend with new
capabilities, such as new collision or chemistry models, boundary
conditions, or diagnostics.  See <A HREF = "Section_modify.html">Section 10</A> for
more details.
</P>
<P>SPARTA is written in C++ which is used at a hi-level to structure the
code and its options in an object-oriented fashion.  The kernel
computations use simple data structures and C-like code for effciency.
So SPARTA is really written in an object-oriented C style.
</P>
<P>SPARTA was developed with internal funding at <A HREF = "http://www.sandia.gov">Sandia National
Laboratories</A>, a US Department of Energy lab.  See <A HREF = "#intro_5">Section
1.5</A> below for more information on SPARTA funding and
individuals who have contributed to SPARTA.
</P>


<HR>

<A NAME = "intro_2"></A><H4>1.2 SPARTA features 
</H4>
<P>This section highlights SPARTA features, with links to specific
commands which give more details.  The <A HREF = "#intro_3">next section</A>
illustrates the kinds of grid geometries and surface definitions which
SPARTA supports.
</P>
<P>If SPARTA doesn't have your favorite collision model, boundary
condition, or diagnostic, see <A HREF = "Section_modify.html">Section 10</A> of the
manual, which describes how it can be added to SPARTA.
</P>
<H4>General features 
</H4>
<UL><LI>  runs on a single processor or in parallel
<LI>  distributed-memory message-passing parallelism (MPI)
<LI>  spatial-decomposition of simulation domain for parallelism
<LI>  open-source distribution
<LI>  highly portable C++
<LI>  optional libraries used: MPI
<LI>  <A HREF = "Section_modify.html">easy to extend</A> with new features and functionality
<LI>  runs from an <A HREF = "Section_commands.html">input script</A>
<LI>  syntax for defining and using <A HREF = "variable.html">variables and formulas</A>
<LI>  syntax for <A HREF = "jump.html">looping over runs</A> and breaking out of loops
<LI>  run one or <A HREF = "Section_howto.html#howto_3">multiple simulations simultaneously</A> (in parallel) from one script
<LI>  <A HREF = "Section_start.html#start_4">build as library</A>, invoke SPARTA thru <A HREF = "Section_howto.html#howto_6">library interface</A> or provided <A HREF = "Section_python.html">Python wrapper</A>
<LI>  <A HREF = "Section_howto.html#howto_7">couple with other codes</A>: SPARTA calls other code, other code calls SPARTA, umbrella code calls both 
</UL>
<H4>Models 
</H4>
<UL><LI>  <A HREF = "dimension.html">3d or 2d</A> or <A HREF = "Section_howto.html#howto_2">2d-axisymmetric</A> domains
<LI>  variety of <A HREF = "boundary.html">global boundary conditions</A>
<LI>  <A HREF = "create_particles.html">create particles</A> within flow volume
<LI>  emit particles from simulation box faces due to <A HREF = "fix_emit_face.html">flow properties</A>
<LI>  emit particles from simulation box faces due to <A HREF = "fix_emit_face_file.html">profile defined in file</A>
<LI>  emit particles from surface elements due to <A HREF = "fix_emit_surf.html">normal and flow properties</A>
<LI>  <A HREF = "Section_howto.html#howto_11">ambipolar</A> approximation for ionized plasmas 
</UL>
<H4>Geometry 
</H4>
<UL><LI>  <A HREF = "#intro_3">Cartesian, heirarchical grids</A> with multiple levels of local refinement
<LI>  <A HREF = "create_grid.html">create grid from input script</A> or <A HREF = "read_grid.html<A HREF = "#intro_3">>read from file</A>
<LI>  embed :triangulated (3d) or line-segmented (2d) surfaces</A> in grid, <A HREF = "read_surf.html">read in from file</A> 
</UL>
<H4>Gas-phase collisions and chemistry 
</H4>
<UL><LI>  collisions between all particles or pairs of species groups within grid cells
<LI>  <A HREF = "collide.html">collision models:</A> VSS (variable soft sphere), VHS (variable hard sphere), HS (hard sphere)
<LI>  <A HREF = "react.html">chemistry models:</A> TCE, QK 
</UL>
<H4>Surface collisions and chemistry 
</H4>
<UL><LI>  for surface elements or global simulation box <A HREF = "bound_modify.html">boundaries</A>
<LI>  <A HREF = "surf_collide.html">collisions:</A> specular or diffuse
<LI>  <A HREF = "surf_react.html">reactions</A> 
</UL>
<H4>Performance 
</H4>
<UL><LI>  <A HREF = "global.html">grid cell weighting</A> of particles
<LI>  <A HREF = "adapt_grid.html">adaptation</A> of the grid cells between runs
<LI>  <A HREF = "fix_adapt.html">on-the-fly adaptation</A> of the grid cells
<LI>  <A HREF = "balance_grid.html">static</A> load-balancing of grid cells or particles
<LI>  <A HREF = "fix_balance.html">dynamic</A> load-balancing of grid cells or particles 
</UL>
<H4>Diagnostics 
</H4>
<UL><LI>  <A HREF = "compute_boundary.html">global boundary statistics</A>
<LI>  <A HREF = "compute_grid.html">per grid cell statistics</A>
<LI>  <A HREF = "compute_surf.html">per surface element statistics</A>
<LI>  time-averaging of <A HREF = "fix_ave_time.html">global</A>, <A HREF = "fix_ave_grid.html">grid</A>, <A HREF = "fix_ave_surf.html">surface</A> statistics 
</UL>
<H4>Output 
</H4>
<UL><LI>  <A HREF = "stats_style.html">log file of statistical info</A>
<LI>  <A HREF = "dump.html">dump files</A> (text or binary) of per particle, per grid cell, per surface element values
<LI>  binary <A HREF = "restart.html">restart files</A>
<LI>  on-the-fly <A HREF = "dump_image.html">rendered images and movies</A> of particles, grid cells, surface elements 
</UL>
<H4>Pre- and post-processing 
</H4>
<UL><LI>Various pre- and post-processing serial tools are packaged with
SPARTA; see <A HREF = "Section_tools.html">Section 9</A> of the manual. 

<LI>Our group has also written and released a separate toolkit called
<A HREF = "https://lammps.github.io/pizza">Pizza.py</A> which provides tools for doing setup, analysis,
plotting, and visualization for SPARTA simulations.  Pizza.py is
written in <A HREF = "http://www.python.org">Python</A> and is available for download from <A HREF = "https://lammps.github.io/pizza">the
Pizza.py WWW site</A>. 
</UL>




<HR>

<A NAME = "intro_3"></A><H4>1.3 Grids and surfaces in SPARTA 
</H4>
<P>SPARTA overlays a grid over the simulation domain which is used to
track particles and to co-locate particles in the same grid cell for
performing collision and chemistry operations.  SPARTA uses a
Cartesian hierarchical grid.  Cartesian means that the faces of a grid
cell are aligned with the Cartesian xyz axes.  Hierarchical means that
individual grid cells can be sub-divided into smaller cells,
recursively.  This allows for flexible grid cell refinement in any
region of the simulation domain.  E.g. around a surface, or in a
high-density region of the gas flow.
</P>
<P>An example 2d hierarchical grid is shown in the diagram, for a
circular surface object (in red) with the grid refined on the upwind
side of the object (flow from left to right).
</P>
<CENTER><IMG SRC = "JPG/refine_grid.jpg">
</CENTER>
<P>Objects represented with a surface triangulation (line segments in 2d)
can also be read in to define objects which particles flow around.
Individual surface elements are assigned to grid cells they intersect
with, so that particle/surface collisions can be efficiently computed.
</P>
<P>As an example, here is coarsely triangulated representation of the
space shuttle (only 616 triangles!), which could be embedded in a
simulation box.  Click on the image for a larger picture.
</P>
<CENTER><A HREF = "JPG/shuttle.jpg"><IMG SRC = "JPG/shuttle_small.jpg"></A>
</CENTER>
<P>See <A HREF = "Section_howto.html#howto_9">Sections 4.9</A> and
<A HREF = "Section_howto.html#">4.10</A> for more details of both the grids and
surface objects that SPARTA supports and how to define them.
</P>
<HR>

<A NAME = "intro_4"></A><H4>1.4 Open source distribution 
</H4>
<P>SPARTA comes with no warranty of any kind.  As each source file states
in its header, it is a copyrighted code that is distributed free-of-
charge, under the terms of the <A HREF = "http://www.gnu.org/copyleft/gpl.html">GNU Public License</A> (GPL).  This
is often referred to as open-source distribution - see
<A HREF = "http://www.gnu.org">www.gnu.org</A> or <A HREF = "http://www.opensource.org">www.opensource.org</A> for more
details.  The legal text of the GPL is in the LICENSE file that is
included in the SPARTA distribution.
</P>




<P>Here is a summary of what the GPL means for SPARTA users:
</P>
<P>(1) Anyone is free to use, modify, or extend SPARTA in any way they
choose, including for commercial purposes.
</P>
<P>(2) If you distribute a modified version of SPARTA, it must remain
open-source, meaning you distribute it under the terms of the GPL.
You should clearly annotate such a code as a derivative version of
SPARTA.
</P>
<P>(3) If you release any code that includes SPARTA source code, then it
must also be open-sourced, meaning you distribute it under the terms
of the GPL.
</P>
<P>(4) If you give SPARTA files to someone else, the GPL LICENSE file and
source file headers (including the copyright and GPL notices) should
remain part of the code.
</P>
<P>In the spirit of an open-source code, these are various ways you can
contribute to making SPARTA better.  You can send email to the
<A HREF = "https://sparta.github.io/authors.html">developers</A> on any of these
topics.
</P>
<UL><LI>Point prospective users to the <A HREF = "https://sparta.github.io">SPARTA WWW Site</A>.  Mention it in
talks or link to it from your WWW site. 

<LI>If you find an error or omission in this manual or on the <A HREF = "https://sparta.github.io">SPARTA WWW
Site</A>, or have a suggestion for something to clarify or include,
send an email to the
<A HREF = "https://sparta.github.io/authors.html">developers</A>. 

<LI>If you find a bug, <A HREF = "Section_errors.html#err_2">Section 12.1</A> describes
how to report it. 

<LI>If you publish a paper using SPARTA results, send the citation (and
any cool pictures or movies) to add to the Publications, Pictures, and
Movies pages of the <A HREF = "https://sparta.github.io">SPARTA WWW Site</A>, with links and attributions
back to you. 

<LI>The tools sub-directory of the SPARTA distribution has various
stand-alone codes for pre- and post-processing of SPARTA data.  More
details are given in <A HREF = "Section_tools.html">Section 9</A>.  If you write a
new tool that others will find useful, it can be added to the SPARTA
distribution. 

<LI>SPARTA is designed to be easy to extend with new code for features
like boundary conditions, collision or chemistry models, diagnostic
computations, etc.  <A HREF = "Section_modify.html">Section 10</A> of the manual
gives details.  If you add a feature of general interest, it can be
added to the SPARTA distribution. 

<LI>The Benchmark page of the <A HREF = "https://sparta.github.io">SPARTA WWW Site</A> lists SPARTA
performance on various platforms.  The files needed to run the
benchmarks are part of the SPARTA distribution.  If your machine is
sufficiently different from those listed, your timing data can be
added to the page. 

<LI>Cash.  Small denominations, unmarked bills preferred.  Paper sack OK.
Leave on desk.  VISA also accepted.  Chocolate chip cookies
encouraged. 
</UL>
<HR>

<H4><A NAME = "intro_5"></A>1.5 Acknowledgments and citations 
</H4>
<P>SPARTA development has been funded by the <A HREF = "http://www.doe.gov">US Department of
Energy</A> (DOE).
</P>


<P>If you use SPARTA results in your published work, please cite the
paper(s) listed under the <A HREF = "https://sparta.github.io/cite.html">Citing SPARTA
link</A> of the SPARTA WWW page, and
include a pointer to the <A HREF = "https://sparta.github.io">SPARTA WWW Site</A>
(https://sparta.github.io):
</P>
<P>The <A HREF = "https://sparta.github.io/papers.html">Publications link</A> on the
SPARTA WWW page lists papers that have cited SPARTA.  If your paper is
not listed there, feel free to send us the info.  If the simulations
in your paper produced cool pictures or animations, we'll be pleased
to add them to the <A HREF = "https://sparta.github.io/pictures.html">Pictures</A>
or <A HREF = "https://sparta.github.io/movies.html">Movies</A> pages of the SPARTA
WWW site.
</P>
<P>The core group of SPARTA developers is at Sandia National Labs:
</P>
<UL><LI>Steve Plimpton, sjplimp at gmail.com
<LI>Michael Gallis, magalli at sandia.gov 
</UL>
</HTML>
