
SPARTA Users Manual
16 Mar 2017 version
http://sparta.sandia.gov - Sandia National Laboratories
Copyright (2014) Sandia Corporation. This software and manual is distributed under the GNU General Public License.

Table of Contents
SPARTA Documentation...............................................................................................................................1
16 Mar 2017 version................................................................................................................................1
Version info:.....................................................................................................................................1
1. Introduction.........................................................................................................................................3
1.1 What is SPARTA........................................................................................................................3
1.2 SPARTA features........................................................................................................................3
General features................................................................................................................................4
Models...............................................................................................................................................4
Geometry...........................................................................................................................................4
Gas-phase collisions and chemistry..................................................................................................4
Surface collisions and chemistry......................................................................................................4
Performance......................................................................................................................................4
Diagnostics........................................................................................................................................5
Output...............................................................................................................................................5
Pre- and post-processing...................................................................................................................5
1.3 Grids and surfaces in SPARTA..................................................................................................5
1.4 Open source distribution.............................................................................................................7
1.5 Acknowledgments and citations.................................................................................................8
2. Getting Started.....................................................................................................................................9
2.1 What's in the SPARTA distribution............................................................................................9
2.2 Making SPARTA........................................................................................................................9
2.3 Making SPARTA with optional packages................................................................................15
2.4 Building SPARTA as a library.................................................................................................16
2.5 Running SPARTA....................................................................................................................18
2.6 Command-line options..............................................................................................................19
2.7 SPARTA screen output.............................................................................................................21
3. Commands.........................................................................................................................................23
3.1 SPARTA input script................................................................................................................23
3.2 Parsing rules..............................................................................................................................24
3.3 Input script structure.................................................................................................................25
3.4 Commands listed by category...................................................................................................26
3.5 Individual commands................................................................................................................27
Fix styles.........................................................................................................................................27
Compute styles................................................................................................................................27
Collide styles...................................................................................................................................27
Surface collide styles......................................................................................................................28
Surface reaction styles....................................................................................................................28
4. How-to discussions............................................................................................................................29
6.1 2d simulations...........................................................................................................................29
4.2 Axisymmetric simulations........................................................................................................29
4.3 Running multiple simulations from one input script................................................................30
4.4 Output from SPARTA (stats, dumps, computes, fixes, variables)...........................................31
4.5 Visualizing SPARTA snapshots...............................................................................................34
4.6 Library interface to SPARTA...................................................................................................35
4.7 Coupling SPARTA to other codes............................................................................................36
4.8 Details of grid geometry in SPARTA.......................................................................................37
4.9 Details of surfaces in SPARTA................................................................................................40
4.10 Restarting a simulation...........................................................................................................41
SPARTA Users Manual
i

Table of Contents
4.11 Using the ambipolar approximation........................................................................................42
5. Example problems.............................................................................................................................45
5. Performance & scalability.................................................................................................................46
7. Additional tools.................................................................................................................................47
dump2cfg tool.................................................................................................................................47
dump2xyz tool................................................................................................................................48
grid_refine tool................................................................................................................................48
log2txt tool......................................................................................................................................48
logplot tool......................................................................................................................................48
paraview tools.................................................................................................................................49
stl2surf tool.....................................................................................................................................49
surf_create tool................................................................................................................................49
surf_transform tool..........................................................................................................................49
8. Modifying & extending SPARTA.....................................................................................................50
8.1 Compute styles..........................................................................................................................51
8.2 Fix styles...................................................................................................................................52
8.3 Region styles.............................................................................................................................52
8.4 Collision styles..........................................................................................................................52
8.5 Surface collision styles.............................................................................................................53
8.6 Chemistry styles........................................................................................................................53
8.7 Dump styles..............................................................................................................................53
8.8 Input script commands..............................................................................................................54
9. Python interface to SPARTA............................................................................................................55
9.1 Building SPARTA as a shared library......................................................................................56
9.2 Installing the Python wrapper into Python................................................................................56
9.3 Extending Python with MPI to run in parallel..........................................................................57
9.4 Testing the Python-SPARTA interface.....................................................................................58
9.5 Using SPARTA from Python....................................................................................................60
9.6 Example Python scripts that use SPARTA...............................................................................62
10. Errors...............................................................................................................................................63
10.1 Common problems..................................................................................................................63
10.2 Reporting bugs........................................................................................................................64
10.3 Error & warning messages......................................................................................................64
Errors:.............................................................................................................................................64
Warnings:........................................................................................................................................86
11. Future and history............................................................................................................................88
11.1 Coming attractions..................................................................................................................88
11.2 Past versions............................................................................................................................88
adapt_grid command.............................................................................................................................89
balance_grid command..........................................................................................................................94
bound_modify command.......................................................................................................................97
boundary command...............................................................................................................................99
clear command.....................................................................................................................................101
collide command.................................................................................................................................102
collide_modify command....................................................................................................................105
compute command...............................................................................................................................108
compute boundary command..............................................................................................................110
compute count command.....................................................................................................................113
SPARTA Users Manual
ii

Table of Contents
compute distsurf/grid command..........................................................................................................115
compute eflux/grid command..............................................................................................................117
compute grid command.......................................................................................................................119
compute ke/particle command.............................................................................................................124
compute lambda/grid command..........................................................................................................125
compute pflux/grid command..............................................................................................................128
compute property/grid command........................................................................................................131
compute reduce command...................................................................................................................133
compute sonine/grid command............................................................................................................136
compute surf command.......................................................................................................................139
compute temp command......................................................................................................................143
compute thermal/grid command..........................................................................................................144
compute tvib/grid command................................................................................................................147
create_box command...........................................................................................................................149
create_grid command..........................................................................................................................150
create_particles command...................................................................................................................154
dimension command............................................................................................................................159
dump command...................................................................................................................................160
dump image command........................................................................................................................160
dump image command........................................................................................................................167
dump movie command........................................................................................................................167
Rendering of particles...................................................................................................................170
Rendering of grid cells..................................................................................................................171
Rendering of surface elements......................................................................................................171
dump_modify command......................................................................................................................177
echo command.....................................................................................................................................187
fix command........................................................................................................................................188
fix adapt command..............................................................................................................................191
fix ambipolar command.......................................................................................................................193
fix ave/grid command..........................................................................................................................195
fix ave/histo command........................................................................................................................198
fix ave/histo/weight command............................................................................................................198
fix ave/surf command..........................................................................................................................203
fix ave/time command.........................................................................................................................206
fix balance command...........................................................................................................................211
fix emit/face command........................................................................................................................214
fix emit/face/file command..................................................................................................................218
fix emit/surf command........................................................................................................................224
fix grid/check command......................................................................................................................228
fix move/surf command.......................................................................................................................229
fix print command...............................................................................................................................231
fix vibmode command.........................................................................................................................233
global command..................................................................................................................................235
group command...................................................................................................................................239
if command..........................................................................................................................................242
include command.................................................................................................................................245
jump command....................................................................................................................................246
label command.....................................................................................................................................248
SPARTA Users Manual
iii

Table of Contents
log command.......................................................................................................................................249
mixture command................................................................................................................................250
move_surf command...........................................................................................................................254
next command.....................................................................................................................................256
partition command...............................................................................................................................258
print command.....................................................................................................................................259
quit command......................................................................................................................................261
react command.....................................................................................................................................262
react_modify command.......................................................................................................................267
read_grid command.............................................................................................................................268
read_particles command......................................................................................................................271
read_restart command.........................................................................................................................272
read_surf command.............................................................................................................................275
region command..................................................................................................................................281
remove_surf command........................................................................................................................283
reset_timestep command.....................................................................................................................284
restart command..................................................................................................................................285
run command.......................................................................................................................................287
scale_particles command.....................................................................................................................290
seed command.....................................................................................................................................291
shell command.....................................................................................................................................292
species command.................................................................................................................................294
stats command.....................................................................................................................................296
stats_modify command........................................................................................................................297
stats_style command............................................................................................................................299
surf_collide command.........................................................................................................................303
surf_modify command.........................................................................................................................306
surf_react command............................................................................................................................308
timestep command...............................................................................................................................311
uncompute command...........................................................................................................................312
undump command...............................................................................................................................313
unfix command....................................................................................................................................314
units command.....................................................................................................................................315
variable command...............................................................................................................................317
Math Operators.............................................................................................................................322
Math Functions.............................................................................................................................322
Special Functions..........................................................................................................................324
Particle Vectors.............................................................................................................................325
Compute References.....................................................................................................................325
Fix References..............................................................................................................................325
Surface Collision and Surface Reaction Model References.........................................................326
Variable References......................................................................................................................326
write_grid command............................................................................................................................330
write_restart command........................................................................................................................332
write_surf command............................................................................................................................334
SPARTA Users Manual
iv
评论0