mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
removed old command line scripts (#3300)
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
parent
be4396c12b
commit
11587786e0
16 changed files with 23 additions and 1284 deletions
|
|
@ -111,11 +111,11 @@ The voxel plot data is written to an :ref:`HDF5 file <io_voxel>`. The voxel file
|
|||
can subsequently be converted into a standard mesh format that can be viewed in
|
||||
`ParaView <https://www.paraview.org/>`_, `VisIt
|
||||
<https://wci.llnl.gov/simulation/computer-codes/visit>`_, etc. This typically
|
||||
will compress the size of the file significantly. The provided
|
||||
:ref:`scripts_voxel` script can convert the HDF5 voxel file to VTK formats. Once
|
||||
processed into a standard 3D file format, colors and masks can be defined using
|
||||
the stored ID numbers to better explore the geometry. The process for doing this
|
||||
will depend on the 3D viewer, but should be straightforward.
|
||||
will compress the size of the file significantly. The
|
||||
:func:`openmc.voxel_to_vtk` function can convert the HDF5 voxel file to VTK
|
||||
formats. Once processed into a standard 3D file format, colors and masks can be
|
||||
defined using the stored ID numbers to better explore the geometry. The process
|
||||
for doing this will depend on the 3D viewer, but should be straightforward.
|
||||
|
||||
.. note:: 3D voxel plotting can be very computer intensive for the viewing
|
||||
program (Visit, ParaView, etc.) if the number of voxels is large (>10
|
||||
|
|
|
|||
|
|
@ -41,12 +41,9 @@ Plotting in 2D
|
|||
--------------
|
||||
|
||||
The `example notebook`_ also demonstrates how to plot a structured mesh tally in
|
||||
two dimensions using the Python API. One can also use the :ref:`scripts_plot`
|
||||
script which provides an interactive GUI to explore and plot structured mesh
|
||||
tallies for any scores and filter bins.
|
||||
|
||||
.. image:: ../_images/plotmeshtally.png
|
||||
:width: 400px
|
||||
two dimensions using the Python API. One can also use the `openmc-plotter
|
||||
<https://github.com/openmc-dev/plotter/>`_ application that provides an
|
||||
interactive GUI to explore and plot a much wider variety of tallies.
|
||||
|
||||
.. _usersguide_track:
|
||||
|
||||
|
|
@ -81,7 +78,7 @@ of three, e.g., if we wanted particles 3 and 4 from batch 1 and generation 2::
|
|||
After running OpenMC, the working directory will contain a file of the form
|
||||
"track_(batch #)_(generation #)_(particle #).h5" for each particle tracked.
|
||||
These track files can be converted into VTK poly data files with the
|
||||
:ref:`scripts_track` script.
|
||||
:class:`openmc.Tracks` class.
|
||||
|
||||
----------------------
|
||||
Source Site Processing
|
||||
|
|
|
|||
|
|
@ -53,142 +53,3 @@ flags:
|
|||
|
||||
.. note:: If you're using the Python API, :func:`openmc.run` is equivalent to
|
||||
running ``openmc`` from the command line.
|
||||
|
||||
.. _scripts_ace:
|
||||
|
||||
----------------------
|
||||
``openmc-ace-to-hdf5``
|
||||
----------------------
|
||||
|
||||
This script can be used to create HDF5 nuclear data libraries used by OpenMC if
|
||||
you have existing ACE files. There are four different ways you can specify ACE
|
||||
libraries that are to be converted:
|
||||
|
||||
1. List each ACE library as a positional argument. This is very useful in
|
||||
conjunction with the usual shell utilities (``ls``, ``find``, etc.).
|
||||
2. Use the ``--xml`` option to specify a pre-v0.9 cross_sections.xml file.
|
||||
3. Use the ``--xsdir`` option to specify a MCNP xsdir file.
|
||||
4. Use the ``--xsdata`` option to specify a Serpent xsdata file.
|
||||
|
||||
The script does not use any extra information from cross_sections.xml/ xsdir/
|
||||
xsdata files to determine whether the nuclide is metastable. Instead, the
|
||||
``--metastable`` argument can be used to specify whether the ZAID naming convention
|
||||
follows the NNDC data convention (1000*Z + A + 300 + 100*m), or the MCNP data
|
||||
convention (essentially the same as NNDC, except that the first metastable state
|
||||
of Am242 is 95242 and the ground state is 95642).
|
||||
|
||||
The optional ``--fission_energy_release`` argument will accept an HDF5 file
|
||||
containing a library of fission energy release (ENDF MF=1 MT=458) data. A
|
||||
library built from ENDF/B-VII.1 data is released with OpenMC and can be found at
|
||||
openmc/data/fission_Q_data_endb71.h5. This data is necessary for
|
||||
'fission-q-prompt' and 'fission-q-recoverable' tallies, but is not needed
|
||||
otherwise.
|
||||
|
||||
-h, --help show help message and exit
|
||||
|
||||
-d DESTINATION, --destination DESTINATION
|
||||
Directory to create new library in
|
||||
|
||||
-m META, --metastable META
|
||||
How to interpret ZAIDs for metastable nuclides. META
|
||||
can be either 'nndc' or 'mcnp'. (default: nndc)
|
||||
|
||||
--xml XML Old-style cross_sections.xml that lists ACE libraries
|
||||
|
||||
--xsdir XSDIR MCNP xsdir file that lists ACE libraries
|
||||
|
||||
--xsdata XSDATA Serpent xsdata file that lists ACE libraries
|
||||
|
||||
--fission_energy_release FISSION_ENERGY_RELEASE
|
||||
HDF5 file containing fission energy release data
|
||||
|
||||
.. _scripts_plot:
|
||||
|
||||
--------------------------
|
||||
``openmc-plot-mesh-tally``
|
||||
--------------------------
|
||||
|
||||
``openmc-plot-mesh-tally`` provides a graphical user interface for plotting mesh
|
||||
tallies. The path to the statepoint file can be provided as an optional arugment
|
||||
(if omitted, a file dialog will be presented).
|
||||
|
||||
.. _scripts_track_combine:
|
||||
|
||||
------------------------
|
||||
``openmc-track-combine``
|
||||
------------------------
|
||||
|
||||
This script combines multiple HDF5 :ref:`particle track files
|
||||
<usersguide_track>` into a single HDF5 particle track file. The filenames of the
|
||||
particle track files should be given as posititional arguments. The output
|
||||
filename can also be changed with the ``-o`` flag:
|
||||
|
||||
-o OUT, --out OUT Output HDF5 particle track file
|
||||
|
||||
.. _scripts_track:
|
||||
|
||||
-----------------------
|
||||
``openmc-track-to-vtk``
|
||||
-----------------------
|
||||
|
||||
This script converts HDF5 :ref:`particle track files <usersguide_track>` to VTK
|
||||
poly data that can be viewed with ParaView or VisIt. The filenames of the
|
||||
particle track files should be given as posititional arguments. The output
|
||||
filename can also be changed with the ``-o`` flag:
|
||||
|
||||
-o OUT, --out OUT Output VTK poly filename
|
||||
|
||||
------------------------
|
||||
``openmc-update-inputs``
|
||||
------------------------
|
||||
|
||||
If you have existing XML files that worked in a previous version of OpenMC that
|
||||
no longer work with the current version, you can try to update these files using
|
||||
``openmc-update-inputs``. If any of the given files do not match the most
|
||||
up-to-date formatting, then they will be automatically rewritten. The old
|
||||
out-of-date files will not be deleted; they will be moved to a new file with
|
||||
'.original' appended to their name.
|
||||
|
||||
Formatting changes that will be made:
|
||||
|
||||
geometry.xml
|
||||
Lattices containing 'outside' attributes/tags will be replaced with lattices
|
||||
containing 'outer' attributes, and the appropriate cells/universes will be
|
||||
added. Any 'surfaces' attributes/elements on a cell will be renamed 'region'.
|
||||
|
||||
materials.xml
|
||||
Nuclide names will be changed from ACE aliases (e.g., Am-242m) to HDF5/GNDS
|
||||
names (e.g., Am242_m1). Thermal scattering table names will be changed from
|
||||
ACE aliases (e.g., HH2O) to HDF5/GNDS names (e.g., c_H_in_H2O).
|
||||
|
||||
----------------------
|
||||
``openmc-update-mgxs``
|
||||
----------------------
|
||||
|
||||
This script updates OpenMC's deprecated multi-group cross section XML files to
|
||||
the latest HDF5-based format.
|
||||
|
||||
-i IN, --input IN Input XML file
|
||||
-o OUT, --output OUT Output file in HDF5 format
|
||||
|
||||
.. _scripts_voxel:
|
||||
|
||||
---------------------------
|
||||
``openmc-voxel-to-vtk``
|
||||
---------------------------
|
||||
|
||||
When OpenMC generates :ref:`voxel plots <usersguide_voxel>`, they are in an
|
||||
:ref:`HDF5 format <io_voxel>` that is not terribly useful by itself. The
|
||||
``openmc-voxel-to-vtk`` script converts a voxel HDF5 file to a `VTK
|
||||
<https://vtk.org/>`_ file. To run this script, you will need to have the VTK
|
||||
Python bindings installed. To convert a voxel file, simply provide the path to
|
||||
the file:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
openmc-voxel-to-vtk voxel_1.h5
|
||||
|
||||
The ``openmc-voxel-to-vtk`` script also takes the following optional
|
||||
command-line arguments:
|
||||
|
||||
-o, --output Path to output VTK file
|
||||
|
|
|
|||
|
|
@ -751,11 +751,10 @@ instance, whereas the :meth:`openmc.Track.filter` method returns a new
|
|||
with more than one process, a separate track file will be written for
|
||||
each MPI process with the filename ``tracks_p#.h5`` where # is the
|
||||
rank of the corresponding process. Multiple track files can be
|
||||
combined with the :ref:`scripts_track_combine` script:
|
||||
combined with the :meth:`openmc.Tracks.combine` method::
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
openmc-track-combine tracks_p*.h5 --out tracks.h5
|
||||
track_files = [f"tracks_p{rank}.h5" for rank in range(32)]
|
||||
openmc.Tracks.combine(track_files, "tracks.h5")
|
||||
|
||||
-----------------------
|
||||
Restarting a Simulation
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue