一、WSL 安装 Ubuntu22.04
启用 WSL
 
打开 Microsoft Store,安装 Ubuntu22.04
 
设置源,更新
ref: https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/
 
更新:sudo apt update
升级:sudo apt upgrade
- 安装 ZSH、oh-my-zsh
 
参考 zsh & oh-my-zsh 安装配置 
二、安装 openmc with conda
ref: https://docs.openmc.org/en/stable/quickinstall.html
- 参照 Installing on Linux/Mac with Conda,安装 openmc。
 
1 2 3 4 5 6 7 8 9 10 11 12
   | 
  wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh bash ~/Miniconda3-latest-Linux-x86_64.sh
 
  conda config --add channels conda-forge conda config --set channel_priority strict
  conda create --name openmc-env openmc conda activate openmc-env
 
 
  | 
 
安装完成后,运行 openmc 试一下, 提示错误: 找不到材料数据卡 cross_sections.xml。
- 下载材料数据集
 
1 2 3 4
   | git clone https://github.com/openmc-dev/data openmc-dev_data
  cd openmc-dev_data python3 convert_nndc71.py
   | 
 
材料库数据集目录如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
   | . ├── LICENSE ├── README.md ├── combine_libraries.py ├── convert_fendl.py ├── convert_jeff32.py ├── convert_jeff33.py ├── convert_lib80x.py ├── convert_mcnp70.py ├── convert_mcnp71.py ├── convert_nndc71.py   ├── convert_tendl.py ├── convert_tendl_rand.py ├── depletion │   └── ... ├── generate_cendl.py ├── generate_endf.py ├── generate_jeff33.py ├── generate_jendl.py ├── make_compton.py ├── make_stopping_powers.py ├── make_test_data.py ├── nndc-b7.1-ace │   ├── ENDF-B-VII.1-neutron-293.6K │   │   ├── Ac_225_293.6K.ace │   │   ├── Ac_226_293.6K.ace │   │   ... │   │   ├── Zr_095_293.6K.ace │   │   ├── Zr_096_293.6K.ace │   │   └── xsdir │   ├── al.acer │   ├── be.acer │   ... │   └── zrzrh.acer ├── nndc-b7.1-download     │   ├── neutron │   │   ├── ENDF-B-VII.1-neutron-293.6K.tar.gz │   │   └── ENDF-B-VII.1-tsl.tar.gz │   └── photon │       ├── ENDF-B-VII.1-atomic_relax.zip │       └── ENDF-B-VII.1-photoat.zip ├── nndc-b7.1-endf │   ├── atomic_relax │   │   ├── atom-001_H_000.endf │   │   ├── atom-002_He_000.endf │   │   ... │   │   ├── atom-099_Es_000.endf │   │   └── atom-100_Fm_000.endf │   └── photoat │       ├── photoat-001_H_000.endf │       ├── photoat-002_He_000.endf │       ... │       ├── photoat-099_Es_000.endf │       └── photoat-100_Fm_000.endf ├── nndc-b7.1-hdf5 │   ├── cross_sections.xml     │   ├── neutron │   │   ├── Ac225.h5 │   │   ├── Ac226.h5 │   │   ... │   │   ├── c_para_D.h5 │   │   └── c_para_H.h5 │   └── photon │       ├── Ac.h5 │       ├── Ag.h5 │       ... │       ├── Zn.h5 │       └── Zr.h5 ├── sample_sandy.py └── utils.py
   | 
 
把 cross_sections.xml 的路径加入环境变量,或直接在openmc程序中设置:
1 2
   |  config['cross_sections'] = "/home/xxxx/openmc-dev_data/nndc-b7.1-hdf5/cross_sections.xml"
 
  | 
 
- done.