"Previous Section"_Section_commands.html - "SPARTA WWW Site"_sws - "SPARTA Documentation"_sd - "SPARTA Commands"_sc - "Next Section"_Section_example.html :c
:link(sws,http://sparta.sandia.gov)
:link(sd,Manual.html)
:link(sc,Section_commands.html#comm)
:line
6. How-to discussions :h3
The following sections describe how to perform common tasks using
SPARTA, as well as provide some techinical details about how
SPARTA works.
6.1 "2d simulations"_#howto_1
6.2 "Axisymmetric simulations"_#howto_2
6.3 "Running multiple simulations from one input script"_#howto_3
6.4 "Output from SPARTA (stats, dumps, computes, fixes, variables)"_#howto_4
6.5 "Visualizing SPARTA snapshots"_#howto_5
6.6 "Library interface to SPARTA"_#howto_6
6.7 "Coupling SPARTA to other codes"_#howto_7
6.8 "Details of grid geometry in SPARTA"_#howto_8
6.9 "Details of surfaces in SPARTA"_#howto_9
6.10 "Restarting a simulation"_#howto_10
6.11 "Using the ambipolar approximation"_#howto_11
6.12 "Using multiple vibrational energy levels"_#howto_12
6.13 "Surface elements: explicit, implicit, distributed"_#howto_13
6.14 "Implicit surface ablation"_#howto_14
6.15 "Transparent surface elements"_#howto_15
6.15 "Visualizing SPARTA output with ParaView"_#howto_16 :all(b)
The example input scripts included in the SPARTA distribution and
highlighted in "Section 5"_Section_example.html of the manual also
show how to setup and run various kinds of simulations.
:line
:line
6.1 2d simulations :link(howto_1),h4
In SPARTA, as in other DSMC codes, a 2d simulation means that
particles move only in the xy plane, but still have all 3 xyz
components of velocity. Only the xy components of velocity are used
to advect the particles, so that they stay in the xy plane, but all 3
components are used to compute collision parameters, temperatures,
etc. Here are the steps to take in an input script to setup a 2d
model.
Use the "dimension"_dimension.html command to specify a 2d simulation. :ulb,l
Make the simulation box periodic in z via the "boundary"_boundary.html
command. This is the default. :l
Using the "create box"_create_box.html command, set the z boundaries
of the box to values that straddle the z = 0.0 plane. I.e. zlo < 0.0
and zhi > 0.0. Typical values are -0.5 and 0.5, but regardless of the
actual values, SPARTA computes the "volume" of 2d grid cells as if
their z-dimension length is 1.0, in whatever "units"_units.html are
defined. This volume is used with the "global nrho"_global.html
setting to calculate numbers of particles to create or insert. It is
also used to compute collision frequencies. :l
If surfaces are defined via the "read_surf"_read_surf.html command,
use 2d objects defined by line segements. :l,ule
Many of the example input scripts included in the SPARTA distribution
are for 2d models.
:line
6.2 Axisymmetric simulations :link(howto_2),h4
In SPARTA, an axi-symmetric model is a 2d model. An example input
script is provided in the examples/axisymm directory.
An axi-symmetric problem can be setup using the following commands:
Set dimension = 2 via the "dimension"_dimension.html command.
Set the y-dimension lower boundary to "a" via the "boundary"_boundary.html command.
The y-dimension upper boundary can be anything except "a" or "p" for periodic.
Use the "create_box"_create_box.html command to define a 2d simulation box with ylo = 0.0. :ul
If desired, grid cell weighting can be enabled via the "global
weight"_global.html command. The {volume} or {radial} setting can be
used for axi-symmetric models.
Grid cell weighting affects how many particles per grid cell are
created when using the "create_particles"_create_particles.html and
"fix emit"_fix_emit_face.html command variants.
During a run, it also triggers particle cloning and destruction as
particles move from grid cell to grid cell. This can be important for
inducing every grid cell to contain roughly the same number of
particles, even if cells are of varying volume, as they often are in
axi-symmetric models. Note that the effective volume of an
axi-symmetric grid cell is the volume its 2d area sweeps out when
rotated around the y=0 axis of symmetry.
:line
6.3 Running multiple simulations from one input script :link(howto_3),h4
This can be done in several ways. See the documentation for
individual commands for more details on how these examples work.
If "multiple simulations" means continue a previous simulation for
more timesteps, then you simply use the "run"_run.html command
multiple times. For example, this script
read_grid data.grid
create_particles 1000000
run 10000
run 10000
run 10000
run 10000
run 10000 :pre
would run 5 successive simulations of the same system for a total of
50,000 timesteps.
If you wish to run totally different simulations, one after the other,
the "clear"_clear.html command can be used in between them to
re-initialize SPARTA. For example, this script
read_grid data.grid
create_particles 1000000
run 10000
clear
read_grid data.grid2
create_particles 500000
run 10000 :pre
would run 2 independent simulations, one after the other.
For large numbers of independent simulations, you can use
"variables"_variable.html and the "next"_next.html and
"jump"_jump.html commands to loop over the same input script multiple
times with different settings. For example, this script, named
in.flow
variable d index run1 run2 run3 run4 run5 run6 run7 run8
shell cd $d
read_grid data.grid
create_particles 1000000
run 10000
shell cd ..
clear
next d
jump in.flow :pre
would run 8 simulations in different directories, using a data.grid
file in each directory. The same concept could be used to run the
same system at 8 different gas densities, using a density variable and
storing the output in different log and dump files, for example
variable a loop 8
variable rho index 1.0e18 4.0e18 1.0e19 4.0e19 1.0e20 4.0e20 1.0e21 4.0e21
log log.$a
read data.grid
global nrho $\{rho\}
...
compute myGrid grid all all n temp
dump 1 grid all 1000 dump.$a id c_myGrid
run 100000
clear
next rho
next a
jump in.flow :pre
All of the above examples work whether you are running on 1 or
multiple processors, but assumed you are running SPARTA on a single
partition of processors. SPARTA can be run on multiple partitions via
the "-partition" command-line switch as described in "Section
2.5"_Section_start.html#start_6 of the manual.
In the last 2 examples, if SPARTA were run on 3 partitions, the same
scripts could be used if the "index" and "loop" variables were
replaced with {universe}-style variables, as described in the
"variable"_variable.html command. Also, the "next rho" and "next a"
commands would need to be replaced with a single "next a rho" command.
With these modifications, the 8 simulations of each script would run
on the 3 partitions one after the other until all were finished.
Initially, 3 simulations would be started simultaneously, one on each
partition. When one finished, that partition would then start the 4th
simulation, and so forth, until all 8 were completed.
:line
6.4 Output from SPARTA (stats, dumps, computes, fixes, variables) :link(howto_4),h4
There are four basic kinds of SPARTA output:
"Statistical output"_stats_style.html, which is a list of quantities
printed every few timesteps to the screen and logfile. :ulb,l
"Dump files"_dump.html, which contain snapshots of particle, grid
cell, or surface element quantities and are written at a specified
frequency. :l
Certain fixes can output user-specified quantities directly to files:
"fix ave/time"_fix_ave_time.html for time averaging, and "fix
print"_fix_print.html for single-line output of
"variables"_variable.html. Fix print can also output to the
screen. :l
"Restart files"_restart.html. :l,ule
A simulation prints one set of statistical output and (optionally)
restart files. It can generate any number of dump files and fix
output files, depending on what "dump"_dump.html and "fix"_fix.html
commands you specify.
As discussed below, SPARTA giv
没有合适的资源?快使用搜索试试~ 我知道了~
SPARTADSMC软件包的公共开发项目httpsparta.sandia.gov___下载.zip
共2000个文件
hpp:538个
cpp:486个
h:208个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 184 浏览量
2023-04-16
20:25:50
上传
评论
收藏 23.11MB ZIP 举报
温馨提示
SPARTADSMC软件包的公共开发项目httpsparta.sandia.gov___下载.zip
资源推荐
资源详情
资源评论
收起资源包目录
SPARTADSMC软件包的公共开发项目httpsparta.sandia.gov___下载.zip (2000个子文件)
dump.grid.3d.g++.1 421KB
dump.grid.2d.g++.1 26KB
log.7Jul14.sphere.icc.1M.1 7KB
log.7Jul14.sphere.icc.100K.1 7KB
log.7Jul14.sphere.icc.10K.1 7KB
log.7Jul14.collide.icc.10M.1 6KB
log.7Jul14.collide.icc.100K.1 6KB
log.7Jul14.collide.icc.1M.1 6KB
log.7Jul14.collide.icc.10K.1 6KB
log.7Jul14.free.icc.10M.1 6KB
log.7Jul14.free.icc.1M.1 6KB
log.7Jul14.free.icc.100K.1 6KB
log.7Jul14.free.icc.10K.1 6KB
log.collideInterspecies.13Dec18.g++.1 3KB
log.7Jul14.sphere.icc.10M.1 2KB
sdata.100x100 1.05MB
binary.101x101 10KB
grid.200 128KB
dump.grid.2d 26KB
log.05Apr23.mpi_4.ablation.2d 6KB
log.05Apr23.mpi_1.ablation.2d 5KB
log.05Apr23.mpi_4.jagged.2d 5KB
log.05Apr23.mpi_1.jagged.2d 5KB
in.ablation.2d 2KB
in.implicit.2d 1KB
in.fft.2d 1KB
in.jagged.2d 1KB
log.05Apr23.mpi_4.ablation.3d 6KB
log.05Apr23.mpi_1.ablation.3d 6KB
in.jagged.3d 2KB
in.ablation.3d 2KB
in.fft.3d 1KB
dump.grid.3d.g++.4 421KB
dump.grid.2d.g++.4 26KB
log.collideInterspecies.13Dec18.g++.4 3KB
log.7Jul14.sphere.icc.1M.8 7KB
log.7Jul14.sphere.icc.100K.8 7KB
log.7Jul14.sphere.icc.10K.8 7KB
log.7Jul14.collide.icc.10M.8 6KB
log.7Jul14.collide.icc.1M.8 6KB
log.7Jul14.collide.icc.100K.8 6KB
log.7Jul14.collide.icc.10K.8 6KB
log.7Jul14.free.icc.10M.8 6KB
log.7Jul14.free.icc.1M.8 6KB
log.7Jul14.free.icc.100K.8 6KB
log.7Jul14.free.icc.10K.8 6KB
log.jagged.3d.distributed.12Feb19.g++.8 5KB
log.jagged.3d.12Feb19.g++.8 5KB
log.7Jul14.sphere.icc.10M.8 2KB
log.05Apr23.mpi_4.surf.add 9KB
log.05Apr23.mpi_1.surf.add 9KB
in.surf.add 1KB
log.05Apr23.mpi_4.circle.adiabatic 5KB
log.05Apr23.mpi_1.circle.adiabatic 5KB
log.05Apr23.mpi_4.beam.adiabatic 4KB
log.05Apr23.mpi_1.beam.adiabatic 4KB
in.beam.adiabatic 1KB
in.circle.adiabatic 1KB
dump.12Jul22.mpi_1.sphere.adjust 22KB
dump.12Jul22.mpi_4.sphere.adjust 22KB
dump.12Jul22.mpi_1.circle.adjust 8KB
dump.12Jul22.mpi_4.circle.adjust 8KB
log.05Apr23.mpi_4.sphere.adjust 6KB
log.05Apr23.mpi_1.sphere.adjust 6KB
log.05Apr23.mpi_4.circle.adjust 6KB
log.05Apr23.mpi_1.circle.adjust 6KB
in.circle.adjust 2KB
in.sphere.adjust 2KB
log.12May15.linux.mpi_1.ambi 6KB
in.ambi 2KB
sdata.apollo 1.41MB
Makefile.astra_kokkos 3KB
in.axi 1KB
generate_makefile.bash 19KB
gnu_generate_makefile.bash 17KB
test_config_run.bash 4KB
build_code.bash 2KB
test_config_options_list.bash 2KB
run_tests.bash 1KB
test_config_arch_list.bash 1KB
test_config_device_list.bash 1KB
checkout_repos.bash 507B
run_benchmark.bash 365B
test_config.bash 155B
data.beam 385B
data.beam 146B
in.bfield 2KB
Makefile.bgq 2KB
Makefile.bgq_big 2KB
Makefile.bgq_xlr 2KB
in.implicit.3d.big 2KB
fibers-101x101x101.binary 1006KB
log.05Apr23.mpi_4.emit.surf.boundary 5KB
log.05Apr23.mpi_1.emit.surf.boundary 5KB
in.emit.surf.boundary 1KB
mpi.c 17KB
TestCInterface.c 61B
cuda_compute_capability.cc 4KB
Makefile.chama 2KB
Makefile.chama_big 2KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9152
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功