rl-based-reactor-design-optimization
Source code for nuclear fusion reactor design optimization through deep reinforcement learning
https://github.com/zinzinbin/rl-based-reactor-design-optimization
Science Score: 57.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 4 DOI reference(s) in README -
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.9%) to scientific vocabulary
Keywords
Repository
Source code for nuclear fusion reactor design optimization through deep reinforcement learning
Basic Info
- Host: GitHub
- Owner: ZINZINBIN
- Language: Jupyter Notebook
- Default Branch: main
- Homepage: https://arxiv.org/abs/2409.08231
- Size: 91.9 MB
Statistics
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
Design Optimization of Tokamak Fusion Reactor through Deep Reinforcement Learning
Introduction
This is a git repository of python codes for designing an optimal tokamak fusion reactors through deep reinforcement learning. Based on the reference, it is possible to determine the optimal plasma and design parameters, which satisfies conditions for steady state operation. We implemented our own reactor design computation code based on Friedberg's paper. You can check the validity of the tokamak design and performance through this computation code.
Our reactor design computation code can also provide the designed reactor performance, like lawson condition and the minimum requirements for steady-state operation, as given below. The below is from the reference design suggested by Friedberg's paper.
The framework for optimizing the design configuration of a tokamak is based on proximal policy optimization. As the scheme given below, the reactor design computation code acts as an environment for interacting with the agent, which determines the input design parameters required for computing plasma parameters. The training process of the agents equals to the optimization process of a tokamak reactor design. In this research, however, it is required to design specific reward functions for inducing the agent to avoid operational limits. In our case, the minimum requirements for steady-state operation are represented as tanh function of (1-x) formula, which can prevent the parameters being close to limits.
How to execute
Computation of the desired tokamak design
- Exectue main.py with modifying the configuration of the device in config/device_info.py
- You can print the detail of the tokamak design and its performance from Lawson criteria
python3 main.py --save_dir {directory name} --tag {tag name} --use_benchmark {True or False} --use_rl {True or False}### Find the optimal tokamak design with reinforcement learning - We use Gridserach and Deep Reinforcement learning algorithm for reactor design optimization.
- In the case of RL, we use modified PPO algorithm to find out the optimal tokamak design which satisfies operation limits
- We designed the optimal tokamak which achieves high energy confinement while satisfying minimum cost (=size of tokamak).
- You can execute the design optmization codes as below.
Gridsearch
python3 find_gridsearch.py --blanket_type {'solid' or 'liquid'} --num_episode {# of episodes} --n_grid {# of grids}Bayesian optimization
python3 find_bo.py --blanket_type {'solid' or 'liquid'} --num_episode {# of episodes} --init_random {# for random sampling}Deep Reinforcement Learning
Single CPU version
python3 find_drl.py --blanket_type {'solid' or 'liquid'} --num_episode {# of episodes} --buffer_size {buffer size} --lr {learning rate}
- Multiple CPU version (Parallelization)
python3 find_drl_parallel.py --blanket_type {'solid' or 'liquid'} --num_episode {# of episodes} --buffer_size {buffer size} --lr {learning rate} --n_workers {number of workers}
Design optimization result based on RL
The figures below represent the comparison between original designed tokamak (left) and optimal designed tokamak based on DRL (right). We use the initial configuration of the tokamak from the grid search algorithm to find out the naive solution which satisfies the conditions for operation limit. Using single-step PPO algorithm, we can obtain the optimal design configuration of the tokamak which satisfies both the conditions and minimum cost condition, despite of some reduction in Q factor.
Lawson criteria
Overall performance (Left:reference, Right:PPO)
Design configuration (Left:reference, Right:PPO)
📖 Citation
If you use this repository in your research, please cite the following:
📜 Research Article
Design Optimization of Nuclear Fusion Reactor through Deep Reinforcement Learning
Jinsu Kim, Jaemin Seo, Arxiv, 2024.
📌 Code Repository
Jinsu Kim (2024). RL-based-Reactor-Design-Optimization. GitHub.
https://github.com/ZINZINBIN/RL-based-Reactor-Design-Optimization/
📚 BibTeX:
bibtex
@software{Kim_RL_based_Fusion_2024,
author = {Kim, Jinsu},
doi = {https://doi.org/10.48550/arXiv.2409.08231},
license = {MIT},
month = sep,
title = {{Deep Reinforcement Learning based Fusion Reactor Design Optimization Code}},
url = {https://github.com/ZINZINBIN/RL-based-Reactor-Design-Optimization/},
howpublished = {\url{https://github.com/ZINZINBIN/RL-based-Reactor-Design-Optimization/}},
version = {1.0.0},
year = {2024}
}
Owner
- Name: KIM JINSU
- Login: ZINZINBIN
- Kind: user
- Location: Seoul, Republic of Korea
- Company: Seoul National University
- Repositories: 6
- Profile: https://github.com/ZINZINBIN
BS : Nuclear Engineering / Physics
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use this software, please cite our article and repository."
authors:
- family-names: "Kim"
given-names: "Jinsu"
orcid: "https://orcid.org/0009-0000-2610-4551"
title: "Deep Reinforcement Learning based Fusion Reactor Design Optimization Code"
version: "1.0.0"
doi: "https://doi.org/10.48550/arXiv.2409.08231" # Replace with your DOI
url: "https://github.com/ZINZINBIN/Fusion-Reactor-Design-Optimization"
date-released: "2024-09-12"
license: "MIT"
GitHub Events
Total
- Watch event: 1
- Push event: 3
Last Year
- Watch event: 1
- Push event: 3