Installation

Prerequisites

To use the paramak tool you will need Python 3 installed using Miniconda or Anaconda, or Miniforge

Once you have a version of Conda installed then proceed with the OS specific steps.

Install (conda)

This is the recommended method.

Create a new environment (Python 3.8 and 3.9 are supported).

conda create --name paramak_env python=3.8

Then activate the new environment.

conda activate paramak_env

Then install the Paramak.

conda install -c fusion-energy -c cadquery -c conda-forge paramak

Now you should be ready to import paramak from your new python environment.

Install (conda + pip)

Create a new environment (Python 3.8 and 3.9 are supported).

conda create --name paramak_env python=3.8

Then activate the new environment.

conda activate paramak_env

Then install the CadQuery.

conda install -c cadquery -c conda-forge cadquery=master

If you want to make use of the prototype export_dagmc_h5m() method the you will need MOAB and PyMoab for the export_dagmc_h5m() feature to work. The MOAB Conda install does not currently support Windows and therefore Windows users will have to compile MOAB. If the export_dagmc_h5m() feature is not needed then this stage can be skipped.

conda install -c conda-forge gmsh=4.9.4
conda install -c conda-forge python-gmsh=4.9.4
conda install -c conda-forge 'moab>=5.3.0'

Then pip install the Paramak.

pip install paramak

Now you should be ready to import paramak from your new python environment.

Optional Jupyter-CadQuery install

Jupyter-Cadquery is an extension to CadQuery that allows objects to be rendered in JupyterLab. This can improve the visualization experience for Paramak users running Jupyter.

Terminal command to install Jupyter-Cadquery

pip install jupyter-cadquery

Optional neutronics install

The Paramak is ideal for making CAD geometry including stp and stl files. This forms part of the neutronics workflow which includes other packages that might be of interest.

  • cad_to_h5m allows automated conversion of stp or sat cad files to h5m files compatible with DAGMC enabled neutronics codes.

  • stl_to_h5m allows automated conversion of stl files to h5m files compatible with DAGMC enabled neutronics codes.

  • openmc_dagmc_wrapper allows one to quickly utilise the h5m geometry files in a range of standard neutronics simulations.

  • openmc_data_downloader facilitates on the fly downloading of nuclear data needed for OpenMC neutronics simulations.

  • OpenMC The OpenMC project, a Monte Carlo particle transport code based on modern methods.

  • DAGMC Direct Accelerated Geometry Monte Carlo Toolkit

  • Svalinn Cubit Plugin A plugin and command extensions for Cubit that allows h5m files to be exported.

  • Coreform Cubit Advanced meshing for challenging simulations. Supports imprinting and merging of surfaces which speed up the neutronics transport time required for simulations through faceteted geometry.

  • MOAB and pymoab The Mesh-Oriented datABase MOAB is a component for representing and evaluating mesh data.

Developer Installation

If you want to contribute to the paramak or then you might want to install the package using setup tools.

Download and install MiniConda, create a new python environment and activate the environment as covered in the installation procedure above.

Then install CadQuery.

conda install -c conda-forge -c cadquery cadquery=master

Then clone the repository

git clone https://github.com/fusion-energy/paramak.git

Navigate to the paramak repository and within the terminal install the paramak package and the dependencies using pip with e -e (developer option).

cd paramak
pip install -e .

Docker Image Installation

Another option is to use the Docker image which contains all the required dependencies.

1. Install Docker CE for Ubuntu , Mac OS or Windows including the part where you enable docker use as a non-root user.

2. Pull the docker image from the store by typing the following command in a terminal window, or Windows users might prefer PowerShell.

docker pull ghcr.io/fusion-energy/paramak

3. Now that you have the docker image you can enable graphics linking between your os and docker, and then run the docker container by typing the following commands in a terminal window.

sudo docker run -p 8888:8888 ghcr.io/fusion-energy/paramak

4. A URL should be displayed in the terminal and can now be opened in the internet browser of your choice. This will load up the examples folder where you can view the 3D objects created.

Alternatively the Docker image can be run in interactive terminal mode .

docker run -it --entrypoint /bin/bash ghcr.io/fusion-energy/paramak

You may also want to make use of the –volume flag when running Docker so that you can retrieve files from the Docker environment to your base system.