SPARTA DSMC Simulations + Monte Carlo particle simulations for simulation of cryogenic buffer gas beams. Developed for the PolyEDM Experiment.
Which command runs SPARTA (e.g. spa_kokkos_omp
, spa_mpi
, ...) depends on installation. Run a SPARTA script with sparta_command < path/to/script
. See here for SPARTA documentation and here for an example SPARTA script.
The Julia script DrawCell.jl includes functions for generating 2D geometry for input to SPARTA. See a run script for an example of its use.
The particle simulations are run using the Julia program ParticleTracing.jl. It requires as input a list of surfaces with the --geom
flag (generated with dump surfs surf all 100000 data/cell.surfs id v1x v1y v2x v2y
) and a list of temperatures, densities, and velocities with the --flow
flag (generated with compute temp thermal/grid all He temp; compute rhov grid all He nrho massrho u v w; fix out ave/grid all 1000 100 100000 c_temp[*] c_rhov[*]; dump out grid all 100000 data/DS2FF.DAT xc yc f_out[*]
) from a SPARTA simulation. Other command line options can be found by running julia ParticleTracing.jl --help
. A list of the final positions and velocities of the simulated particles (e.g. here) will be printed (and can be redirected to a file with > path/to/file
). Statistics on where particles collide can be output with the --stats
and --exitstats
flags.
See RunCells.jl for an example script which automatically runs a DSMC simulation and then particle simulations on the cluster. This is the recommended way to run the code, since it simplifies running parameter scans. The script is straightforward to modify for different simulations or parameters.