OpenNeoMC:an Open-source Tool for Particle Transport Optimization that Combining OpenMC with NEORL

Related tags

NetworkingOpenNeoMC
Overview

OpenNeoMC:an Open-source Tool for Particle Transport Optimization that Combining OpenMC with NEORL

OpenMC is a community-developed Monte Carlo neutron and photon transport simulation code for particle transport. OpenMC was originally developed by members of the Computational Reactor Physics Group at the Massachusetts Institute of Technology starting in 2011.

NEORL (NeuroEvolution Optimization with Reinforcement Learning) is a set of implementations of hybrid algorithms combining neural networks and evolutionary computation based on a wide range of machine learning and evolutionary intelligence architectures. NEORL aims to solve large-scale optimization problems relevant to operation & optimization research, engineering, business, and other disciplines. NEORL was established in MIT back in 2020 with feedback, validation, and usage of different colleagues.

In OpenNeoMC, we combine these two open-source tools to empower particle transport with state-of-the-art optimization techniques. We firstly provide users with easy ways to install the framework that combines NEORL with OpenMC, and a simple example is available to test the framework. Then we offer two practical engineering optimization applications in nuclear physics. More applications that involve both optimization and nuclear physics will be added in the future. We highly welcome users and researchers in the nuclear area to contribute OpenNeoMC and solve engineering problems in this framework.

Installing OpenNeoMC

Installation on Linux/Mac with conda

Install Conda

Please install conda before proceeding, it will bring you convenience to install anaconda directly, which includes conda and other necessary python packages.

Install OpenMC

conda config --add channels conda-forge
conda search openmc

Create a new virtual environment named openneomc

conda create -n openneomc openmc

Test OpenMC

Follow with the official examples to test the OpenMC

Cross Section Configuration

You may encounter the no cross_sections.xml error when running OpenMC. This is caused by the missing of nuclear data, you could solve it refer to Cross Section Configuration

Download cross section data

Various cross section data are available on the OpenMC official website, from the OpenMC team, LANL, etc. In OpenNeoMC, we use ENDF/B-VII.1 in default. But if you have specific purpose, you can use other data that you need.

After downloading the cross-section data file, configure it as an environmental variable as follows.

Add environmental variables

## Temporary methods
# in python
import os
os.environ['OPENMC_CROSS_SECTIONS'] = '/PATH/cross_sections.xml'
# in shell
export OPENMC_CROSS_SECTIONS=../cross_sections.xml

## Once for all: you can modify the ~/.bashrc to configure environmental variables
# open ~/.bashrc
vim ~/.bashrc
# add the following command in the end 
export OPENMC_CROSS_SECTIONS=/PATH/cross_sections.xml
# update 
source ~/.bashrc

Install NEORL

Install python 3.7 to make sure the stable run of tensorflow-1.14.0

conda install python=3.7 
pip install neorl==1.6

Check the version of sciki-learn, if it is 1.x, downgrade the scikit-learn version to 0.24.2

# check version
python -c 'import sklearn; print(sklearn.__version__)'

# downgrade the sklearn version if necessary
pip install scikit-learn==0.24.2

Check if you have install NEORL successfully by unit test.

neorl

If you see the 'NEORL' logo, then you have prepared the OpenNeoMC framework, congratulations!

Test OpenNeoMC

Let's test OpenNeoMC by the 'pin_cell_test.py' example.

Remember to configure environmental variables as above!

# run 
python pin_cell_test.py

If you see the 'NEORL' logo and the log information of OpenMC, then congratulations!

Installing OpenNeoMC with Docker on Linux/Mac/Windows

Installing OpenNeoMC with docker is highly recommended! In this way, you need not worry about issues like cross-section data and software compatibility, etc. All you need to do are simply pull the image and run it in your own machine with any OS.

Install Docker

Follow the official tutorial to Install docker on your machine: get docker

Install OpenNeoMC

After installing docker, your can easily install use OpenNeoMC framework within only four steps:

# Pull docker images from dock hub  
sudo docker pull 489368492/openneomc

# Check the openmc docker images
sudo docker images

# Run the openmc images to create container named `openneomc`
sudo docker run -tid --shm-size=8G --gpus all --name openneomc -v /LocalWorkingDir/:/workspace/ 489368492/openneomc

# Execute the container
sudo docker exec -it openneomc /bin/bash

Note: in docker run step, the -v flag mounts the current working directory into the container, which is very convenient for users.

Please refer to Docker CLI for docker command-line descriptions.

Other commonly used commands

# Exit the container
exit

# Stop the container
sudo docker stop openneomc

# Start the container
sudo docker start openneomc

# Delete the container
sudo docker rm openneomc

# Delete the image(remove the container first)
sudo docker image rm 489368492/openneomc

Test OpenNeoMC

Let's test OpenNeoMC by the 'pin_cell_test.py' example, which can be found at /home

# cd /home
cd /home

# run 
python pin_cell_test.py

If you see the 'NEORL' logo and the log information of OpenMC, then congratulations!

The program runs around 3 minutes(may vary depending on your CPU), and the results are like:

------------------------ JAYA Summary --------------------------
Best fitness (y) found: 0.0015497217274231812
Best individual (x) found: [2.01355604]
--------------------------------------------------------------
---JAYA Results---
x: [2.01355604]
y: 0.0015497217274231812
JAYA History:
 [0.018311916874464318, 0.0017114252626817539, 0.0017114252626817539, 0.0017114252626817539, 0.0015497217274231812]
running time:
 155.2281835079193

Reference

OpenMC: https://docs.openmc.org/en/stable

OpenMC image: https://hub.docker.com/r/openmc/openmc

NEORL: https://neorl.readthedocs.io/en/latest/

OpenNeoMC image: https://hub.docker.com/r/489368492/openneomc

Contact

If you have any suggestions or issues, please feel free to contact Xubo Gu([email protected])

A simple, configurable application and set of services to monitor multiple raspberry pi's on a network.

rpi-info-monitor A simple, configurable application and set of services to monitor multiple raspberry pi's on a network. It can be used in a terminal

Kevin Kirchhoff 11 May 22, 2022
A Simplest TCP client and echo server

Простейшие TCP-клиент и эхо-сервер Цель работы Познакомиться с приемами работы с сетевыми сокетами в языке программирования Python. Задания для самост

Юля Нагубнева 1 Oct 25, 2021
stellar-add-guest is a small tool to generate a new guest for Stellar Wireless (Enterprise mode) in OmniVista 2500 hosted on OmniSwitch with AOS Release 8

stellar-add-guest is a small tool to generate a new guest for Stellar Wireless (Enterprise mode) in OmniVista 2500 hosted on OmniSwitch with AOS Release 8.

BennyE 3 Jan 24, 2022
Tool for ROS 2 IP Discovery + System Monitoring

Monitor the status of computers on a network using the DDS function of ROS2.

Ar-Ray 33 Apr 03, 2022
This is an open project to maintain a list of domain names that serve YouTube ads

The YouTube ads blocklist project This is an open project to maintain a list of domain names that serve YouTube ads. The original project only produce

Evan Pratten 574 Dec 30, 2022
Keep your application settings in sync (OS X/Linux)

Mackup Keep your application settings in sync. Table of content Quickstart Usage What does it do Bullsh*t, what does it really do to my files Supporte

Laurent Raufaste 12.8k Jan 08, 2023
Impacket is a collection of Python classes for working with network protocols.

What is Impacket? Impacket is a collection of Python classes for working with network protocols. Impacket is focused on providing low-level programmat

SecureAuth Corporation 10.4k Jan 09, 2023
A database-based CDN node supporting PostgreSQL and MongoDB backends.

A simple to use database-based deployable CDN node for hobbyist developers who wish to have their own CDN!

Vish M 10 Nov 19, 2022
Automatic Proxy scraper and Proxy-rotating Nitro Generator.

Automatic Proxy scraper and Proxy-rotating Nitro Generator.

Tawren007 2 Nov 08, 2021
league-connection is a python package to communicate to riot client and league client

league-connection is a python package to communicate to riot client and league client.

Sandbox 1 Sep 13, 2022
Utility for converting IP Fabric webhooks into a Teams format.

IP Fabric Webhook Integration for Microsoft Teams and/or Slack Setup IP Fabric Setup Go to Settings Webhooks Add webhook Provide a name URL will b

Community Fabric 1 Jan 26, 2022
PoC code for stealing the WiFi password of a network with a Lovebox IOT device connected

LoveBoxer PoC code for stealing the WiFi password of a network with a Lovebox IOT device connected. This PoC was is what I used in this blogpost Usage

Graham Helton 10 May 24, 2022
libsigrok stacked Protocol Decoder for TPM 2.0 transactions from an SPI bus. BitLocker Volume Master Key (VMK) are automatically extracted.

libsigrok stacked Protocol Decoder for TPM 2.0 transactions from an SPI bus. BitLocker Volume Master Key (VMK) are automatically extracted.

Jordan Ovrè 9 Dec 26, 2022
Ip-Seeker - See Details With Public Ip && Find Web Ip Addresses

IP SEEKER See Details With Public Ip && Find Web Ip Addresses Tool By Heshan

M.D.Heshan Sankalpa 1 Jan 02, 2022
sshuttle: where transparent proxy meets VPN meets ssh

Transparent proxy server that works as a poor man's VPN. Forwards over ssh. Doesn't require admin. Works with Linux and MacOS. Supports DNS tunneling.

9.4k Jan 09, 2023
A website to list Shadowsocks proxies and check them periodically

Shadowmere An automatically tested list of Shadowsocks proxies. Motivation Collecting proxies around the internet is fun, but what if they stop workin

Jorge Alberto Díaz Orozco (Akiel) 29 Dec 21, 2022
A simple, 2-person chat program that runs on a single computer. No Internet, just you

localChat A simple, 2-person chat program that runs on a single computer. No Internet, just you. Simple and Local This was created with ease of use in

Owls 2 Aug 19, 2022
Ping IP addresses and domains in parallel to find the accessible and inaccessible ones.

🚀 IPpy Parallel testing of IP addresses and domains in python. Reads IP addresses and domains from a CSV file and gives two lists of accessible and i

Shivam Mathur 54 May 21, 2022
A Simple Web Server made by Python3.

A Simple Web Server made by Python3.

GGN_2015 2 Nov 27, 2021
A pretty quick and simple interface to paramiko SFTP

A pretty quick and simple interface to paramiko SFTP. Provides multi-threaded routines with progress notifications for reliable, asynchronous transfers. This is a Python3 optimized fork of pysftp wit

14 Dec 21, 2022