OpenMC/docs/source/usersguide/scripts.rst

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

57 lines
1.9 KiB
ReStructuredText
Raw Permalink Normal View History

2017-03-23 13:49:03 -05:00
.. _usersguide_scripts:
=======================
Executables and Scripts
=======================
.. _scripts_openmc:
----------
``openmc``
----------
Once you have a model built (see :ref:`usersguide_basics`), you can either run
the openmc executable directly from the directory containing your XML input
files, or you can specify as a command-line argument the directory containing
the XML input files.
.. warning::
OpenMC models should be treated as code, and it is important to be careful with code from untrusted sources.
For example, if your XML input files are in the directory
2017-03-23 13:49:03 -05:00
``/home/username/somemodel/``, one way to run the simulation would be:
.. code-block:: sh
cd /home/username/somemodel
openmc
Alternatively, you could run from any directory:
.. code-block:: sh
openmc /home/username/somemodel
Note that in the latter case, any output files will be placed in the present
2017-04-05 07:11:57 -05:00
working directory which may be different from
``/home/username/somemodel``. ``openmc`` accepts the following command line
2017-03-23 13:49:03 -05:00
flags:
-c, --volume Run in stochastic volume calculation mode
-e, --event Run using event-based parallelism
2017-03-23 13:49:03 -05:00
-g, --geometry-debug Run in geometry debugging mode, where cell overlaps are
checked for after each move of a particle
-n, --particles N Use *N* particles per generation or batch
-p, --plot Run in plotting mode
-r, --restart file Restart a previous run from a state point or a particle
restart file
-s, --threads N Run with *N* OpenMP threads
2022-05-31 07:32:29 -05:00
-t, --track Write tracks for all particles (up to max_tracks)
-q, --verbosity V Set the output verbosity to *V*
2017-03-23 13:49:03 -05:00
-v, --version Show version information
-h, --help Show help message
2017-04-05 07:11:57 -05:00
.. note:: If you're using the Python API, :func:`openmc.run` is equivalent to
running ``openmc`` from the command line.