Skip to content
This repository has been archived by the owner on Aug 15, 2023. It is now read-only.

Commit

Permalink
Merge pull request #8 from fusion-energy/develop
Browse files Browse the repository at this point in the history
updated docs and targeting develop branch on DAGMC repo
  • Loading branch information
shimwell authored Jul 12, 2021
2 parents cf0cbe1 + 1dc4100 commit d91d12e
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 54 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ RUN git clone --single-branch --branch main https://github.com/pshriwise/double-
RUN mkdir DAGMC && \
cd DAGMC && \
# git clone --single-branch --branch 3.2.0 --depth 1 https://github.com/svalinn/DAGMC.git && \
git clone --single-branch --branch 9b59a53311e94b8a49c8405d730aeef84f4ca3e2 --depth 1 https://github.com/svalinn/DAGMC.git && \
git clone --single-branch --branch develop --depth 1 https://github.com/svalinn/DAGMC.git && \
mkdir build && \
cd build && \
cmake ../DAGMC -DBUILD_TALLY=ON \
Expand Down
13 changes: 1 addition & 12 deletions docs/source/example_neutronics_simulations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,7 @@ Examples - Neutronics Simulations
=================================

These are minimal examples of neutronics simulations that demonstrate the core
functionality of the neutronics features. In general it easy to export geomtry
in h5m format for use in DAGMC enabled simulations. There are two options for
this export. The Trelis method of converting geometry imprints and merges
surfaces while the PyMoab converts the geoemtry without imprinting and merging
surfaces.

The resulting h5m files can be used in DAGMC enabled neutronics codes such as
OpenMC and MCNP. There is also a class (NeutronicsModel) that facilitates
adding tallies, materials and a source to the geoemtry to create a complete
OpenMC neutronics model which can be simulated. The simulated results are also
extracted from the statepoint.h5 file that OpenMC produces and converted to
vtk, png and JSON files depending on the tally.
functionality of the neutronics features.


ball_reactor.ipynb
Expand Down
55 changes: 27 additions & 28 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ generating using the `Paramak <https://github.com/fusion-energy/paramak>`_
:maxdepth: 1

install
paramak_neutronics.neutronics_model
example_neutronics_simulations
paramak_neutronics.neutronics_model
tests

History
Expand All @@ -20,31 +20,33 @@ neutronics simulations of fusion reactors.

The Paramak-neutronics source code is distributed with a permissive open-source
license (MIT) and is available from the GitHub repository
`https://github.com/fusion-energy/paramak <https://github.com/fusion-energy/paramak>`_
`https://github.com/fusion-energy/paramak-neutronics <https://github.com/fusion-energy/paramak-neutronics>`_


Features
--------

In general Paramak-neutronics takes a Paramak.Reactor or Paramak.Shape object and
allows tallies to be easily added and processes the results for ease of access.
In general Paramak-neutronics takes a Paramak.Reactor or Paramak.Shape object
and allows tallies, materials and a source term to be easily added to create
a complete neutronics model. The Paramal-neutronics package will also post
processes the results of the neutronics simulation to allow easy access to the
outputs. The simulated results are extracted from the statepoint.h5 file that
OpenMC produces and converted to vtk, png and JSON files depending on the tally.

The Paramak supports automated neutronics model creation and subsequent
simulation.
The Paramak supports automated geometry creation and the Paramak-neutronics
allows subsequent neutronics simulations to be carried out on the geometry.

The neutronics models created are DAGMC models and are therefore compatible
with a suite of neutronics codes (MCNP, Fluka, Geant4, OpenMC).
The neutronics geometry created by the Paramak are DAGMC models (h5m files) and
are therefore compatible with a suite of neutronics codes (MCNP, Fluka,
Geant4, OpenMC).

The automated simulations supported within the paramak are via OpenMC however
one could also carry out simulations in other neutronics codes using the
dagmc.h5m file created. Moab can be used to inspect the dagmc.h5 file and file
the material tag names.
h5m file created by the Parmaak.

.. code-block:: bash

mbsize -ll dagmc.h5m | grep 'mat:'
The creation of the dagmc.h5m file can be carried out via three routes.
The creation of the dagmc.h5m file using the Paramak can be carried out via
two routes:

Option 1. Use of `PyMoab <https://bitbucket.org/fathomteam/moab>`_ which is
distributed with MOAB. Thus method can not imprint or merge the surfaces of the
Expand All @@ -53,28 +55,25 @@ components or components that touch on flat surfaces. Curved surfaces converted
via this method can potentially overlap and cause errors with the particle
tracking.

Option 2. Use of `Trelis <https://www.coreform.com/products/trelis/>`_ by
Coreform along with the DAGMC
Option 2. Use of `Cubit <https://cubit.sandia.gov/>`_ or
`Cubit Corefoam <https://www.coreform.com/>`_ along with the DAGMC
`plugin <https://svalinn.github.io/DAGMC/install/plugin.html>`_ / This method
can support imprinting and merging of shared surfaces between components and is
therefore suitable for converting more complex CAD geometry to the PyMoab
therefore suitable for converting more complex CAD geometry than the PyMoab
method.

Option 3. Use of the `PPP <https://github.com/ukaea/parallel-preprocessor>`_
and `OCC_Faceter <https://github.com/makeclean/occ_faceter/>`_ . This option
has not yet been fully demonstrated but is partly included to test the
promising new method.

To create a model it is also necessary to define the source and the materials
used.

For fusion simulations you might want to used the parametric-plasma-source
`Git repository <https://github.com/open-radiation-sources/parametric-plasma-source>`_

Details of the Neutronics Material Maker are available from the
The Paramak accepts native OpenMC materials and also Neutronics Material Maker
materials. Further details on the Neutronics Material Maker is avaialbe via online
`documentation <https://neutronics-material-maker.readthedocs.io/en/latest/>`_
and the `source code repository <https://github.com/ukaea/neutronics_material_maker>`_
. However openmc.Materials can also be used directly.
and the `source code repository <https://github.com/fusion-energy/neutronics_material_maker>`_
.

For magnetic confinment fusion simulations you might want to use the parametric-plasma-source
`Git repository <https://github.com/open-radiation-sources/parametric-plasma-source>`_

The `OpenMC workshop <https://github.com/ukaea/openmc_workshop>`_ also has
The `OpenMC workshop <https://github.com/fusion-energy/openmc_workshop>`_ also has
some Paramak with DAGMC and OpenMC based tasks that might be of interest.
31 changes: 19 additions & 12 deletions docs/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,46 @@ Installation
Prerequisites
-------------

To use the paramak-neutronics module you will need the Python, Paramak, DAGMC and OpenMC installed.
To use the paramak-neutronics module you will need the Python, Paramak, DAGMC
and OpenMC installed.

* `Python 3 <https://www.python.org/downloads/>`_
The recommended method is to install Python 3 using Anaconda or Miniconda

Python 3 and can be installed using Conda or Miniconda (recommended)

* `Anaconda <https://www.anaconda.com/>`_
* `Miniconda <https://docs.conda.io/en/latest/miniconda.html>`_
* `Miniconda <https://docs.conda.io/en/latest/miniconda.html>`_ (preferable to avoid hdf5 conflicts)
* `Anaconda https://www.anaconda.com/>`_

Once you have Conda or MiniConda installed then CadQuery can be installed
into a new enviroment and that environment can be activated using Anaconda or Miniconda.
into a new enviroment and that environment can be activated using Conda.

First create a new Conda environment.

.. code-block:: python
conda create -n paramak_env
conda create -n my_env
Then activated the conda environment,

.. code-block:: python
conda activate paramak_env
conda activate my_env
Then install CadQuery:

.. code-block:: python
conda install -c conda-forge -c cadquery cadquery=2.1
Then install the paramak-neutronics package
Then install the paramak-neutronics package using Pip.

.. code-block:: python
# conda install not working yet, try pip install paramak-neutronics
conda install -c fusion-energy paramak-neutronics
pip install paramak-neutronics
To complete the software stack OpenMC, DAGMC, Cubit and the DAGMC/Cubit plugin
will also need installing. We don't have simple instructions for these packages
yet but one option is to duplicate the stages in the `Dockerfile <https://github.com/fusion-energy/paramak-neutronics/blob/main/Dockerfile>`_

Docker Image Installation
-------------------------
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="paramak_neutronics",
version="0.0.1",
version="0.0.3",
author="The Paramak Development Team",
author_email="[email protected]",
description="Perform neutronics simulations on models generated with the Paramak",
Expand Down

0 comments on commit d91d12e

Please sign in to comment.