Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arfc/openmcyclus
Repository of Cyclus archetypes to couple Cyclus with OpenMc
https://github.com/arfc/openmcyclus
Last synced: about 2 months ago
JSON representation
Repository of Cyclus archetypes to couple Cyclus with OpenMc
- Host: GitHub
- URL: https://github.com/arfc/openmcyclus
- Owner: arfc
- License: bsd-3-clause
- Created: 2023-01-10T19:51:48.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-18T17:19:47.000Z (5 months ago)
- Last Synced: 2024-08-02T15:12:07.053Z (5 months ago)
- Language: Jupyter Notebook
- Size: 26.3 MB
- Stars: 0
- Watchers: 1
- Forks: 4
- Open Issues: 4
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.rst
- Contributing: CONTRIBUTING.rst
- License: LICENSE
Awesome Lists containing this project
- awesome-nuclear - OpenMCyclus
README
OpenMCyclus
------------
.. image:: https://github.com/arfc/openmcyclus/actions/workflows/test-openmcyclus.yml/badge.svg?branch=mainLibrary of Cyclus archetypes to couple Cyclus with OpenMC.
Installation
============Dependencies
~~~~~~~~~~~~You will need to have `Cyclus `_, `OpenMC `_,
and their required dependencies. Both are available via conda binaries or can
be installed from source via their github repositories. Please note
the versions listed below, as these are *required versions, not minimum versions*.+---------------+----------+
| Dependency | Version |
+===============+==========+
| Cyclus | 1.6 |
+---------------+----------+
| OpenMC | 0.14 |
+---------------+----------+
| SciPy | 1.11 |
+---------------+----------+Directions to install Cyclus and OpenMC [1]_
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~It is advised to create a new conda environment for installing all of the dependencies.
.. code-block:: bash
~ $ conda install -y mamba~ $ mamba install -y cyclus openmc=0.14.0 scipy=1.11
~ $ git clone https://github.com/cyclus/cyclus.git
~ $ cd cyclus
~/cyclus $ python install.py
If desired, Cycamore can be installed from `source `_
or from Conda/Mamba. Cycamore is *highly* recommended, as it contains other archetypes for creating a
fuel cycle model in Cyclus, but it is not a dependency for OpenMCyclus.Install OpenMCyclus
~~~~~~~~~~~~~~~~~~~To install OpenMCyclus:
.. code-block:: bash
~ $ git clone https://github.com/arfc/openmcyclus.git
~ $ cd openmcyclus
~/openmcyclus/ $ pip install .
To run the tests:
.. code-block:: bash
~/openmcyclus $ pytest tests/
Running
=======This archetype assumes that you have a defined material file for OpenMC (``.xml``),
a flux value for the fuel assemblies, and the required microscopic cross sections
(``.csv`` file) for the model.
The cross section data must be saved as a ``.csv`` file. These files must
all be in the same location. Information about these can be found on the
`OpenMC docpages `_.This archetype is then called during a Cyclus simulation by calling
the ``DepleteReactor`` archetype from the ``openmcyclus.DepleteReactor``
library. The input structure is:.. code-block:: xml
string
string
double
double
string
string
string
string
string
string
double
int
int
int
int
double
string
string
double
double
Some notes about this input structure:
- ``fuel_prefs`` and ``fuel_inrecipes`` must be equal in length to
``fuel_incommods`` and ``fuel_outrecipes`` must be equal in length to ``fuel_outcommods``.- The ``model_path`` variable is the location of the files for OpenMC (can be
relative or absolute path): one-group cross sections, materials, and depletion
chain file. If using a relative path, it must be relative to the directory you are
running the Cyclus input file from, not the location of the file that defines the
prototype.- The archetype assumes that
the OpenMC materials are in the file called ``materials.xml`` and that the cross
section data is in a file called ``micro_xs.csv``.- The ``chain_file`` variable
is the depletion chain file, and the user provides the name of this file.- Each material in the ``materials.xml`` file that are fuel materials must
be marked as ``depletable`` and have the name ``assembly_#``. Define one material
for each assembly in the reactor core (matches with ``n_assem_core``),
the number assigned to each material name is irrelevant, just as long as
there is one.Outputs
~~~~~~~
The results of the simulation will be written to `cyclus.sqlite`
or the file name provided when Cyclus was called... [1] More installation options and instructions for installing OpenMC
can be found at https://docs.openmc.org/en/stable/quickinstall.html