Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

branching_ratios_for_multiple_reactions #88

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions depletion/add_branching_ratios.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
import argparse
import json
from pathlib import Path

import openmc.deplete

parser = argparse.ArgumentParser()
parser.add_argument('chain_in')
parser.add_argument('branching_ratios')
parser.add_argument('chain_out')
parser.add_argument('-i', '--chain_in', type=Path, required=True, help='Path of the input chain file')
parser.add_argument('-b', '--branching_ratios', type=Path, required=True, help='Path of the input branching ratios JSON file')
parser.add_argument('-o', '--chain_out', type=Path, required=True, help='Path of the produced chain file')
args = parser.parse_args()

# Load existing chain
chain = openmc.deplete.Chain.from_xml(args.chain_in)

# Set branching ratios
with open(args.branching_ratios) as fh:
br = json.load(fh)
chain.set_branch_ratios(br, strict=False)
all_branch_ratios = json.load(fh)

for reaction, branch_ratios in all_branch_ratios.items():

chain.set_branch_ratios(
branch_ratios=branch_ratios,
reaction=reaction,
strict=False
)

# Export to new XML file
chain.export_to_xml(args.chain_out)
106 changes: 105 additions & 1 deletion depletion/branching_ratios_pwr.json
Original file line number Diff line number Diff line change
@@ -1 +1,105 @@
{"Na23": {"Na24": 0.232, "Na24_m1": 0.768}, "Cl37": {"Cl38": 0.8809, "Cl38_m1": 0.1191}, "Sc45": {"Sc46": 0.556, "Sc46_m1": 0.444}, "Co59": {"Co60": 0.444, "Co60_m1": 0.556}, "Ge72": {"Ge73": 0.5012, "Ge73_m1": 0.4988}, "Ge74": {"Ge75": 0.666, "Ge75_m1": 0.334}, "Ge76": {"Ge77": 0.4005, "Ge77_m1": 0.5995}, "Se76": {"Se77": 0.7409, "Se77_m1": 0.2591}, "Se78": {"Se79": 0.1178, "Se79_m1": 0.8822}, "Se80": {"Se81": 0.8454, "Se81_m1": 0.1546}, "Se82": {"Se83": 0.1402, "Se83_m1": 0.8598}, "Br79": {"Br80": 0.7687, "Br80_m1": 0.2313}, "Br81": {"Br82": 0.0914, "Br82_m1": 0.9086}, "Kr78": {"Kr79": 0.9704, "Kr79_m1": 0.0296}, "Kr80": {"Kr81": 0.6031, "Kr81_m1": 0.3969}, "Kr82": {"Kr83": 0.333, "Kr83_m1": 0.667}, "Kr84": {"Kr85": 0.1839, "Kr85_m1": 0.8161}, "Rb85": {"Rb86": 0.8791, "Rb86_m1": 0.1209}, "Sr84": {"Sr85": 0.253, "Sr85_m1": 0.747}, "Sr86": {"Sr87": 0.1988, "Sr87_m1": 0.8012}, "Y89": {"Y90": 0.9979, "Y90_m1": 0.0021}, "Y90": {"Y91": 0.7496, "Y91_m1": 0.2504}, "Nb93": {"Nb94": 0.3101, "Nb94_m1": 0.6899}, "Nb94": {"Nb95": 0.961, "Nb95_m1": 0.039}, "Mo92": {"Mo93": 0.9978, "Mo93_m1": 0.0022}, "Rh103": {"Rh104": 0.924, "Rh104_m1": 0.076}, "Rh105": {"Rh106": 0.904, "Rh106_m1": 0.096}, "Pd106": {"Pd107": 0.9527, "Pd107_m1": 0.0473}, "Pd108": {"Pd109": 0.9779, "Pd109_m1": 0.0221}, "Pd110": {"Pd111": 0.85, "Pd111_m1": 0.15}, "Ag107": {"Ag108": 0.9898, "Ag108_m1": 0.0102}, "Ag109": {"Ag110": 0.954, "Ag110_m1": 0.046}, "Cd110": {"Cd111": 0.9945, "Cd111_m1": 0.0055}, "Cd112": {"Cd113": 0.8685, "Cd113_m1": 0.1315}, "Cd114": {"Cd115": 0.8812, "Cd115_m1": 0.1188}, "Cd116": {"Cd117": 0.666, "Cd117_m1": 0.334}, "In113": {"In114": 0.4191, "In114_m1": 0.5809}, "Sn112": {"Sn113": 0.7253, "Sn113_m1": 0.2747}, "Sn116": {"Sn117": 0.9568, "Sn117_m1": 0.0432}, "Sn118": {"Sn119": 0.9794, "Sn119_m1": 0.0206}, "Sn120": {"Sn121": 0.9875, "Sn121_m1": 0.0125}, "Sn122": {"Sn123": 0.0112, "Sn123_m1": 0.9888}, "Sn124": {"Sn125": 0.0375, "Sn125_m1": 0.9625}, "Sn126": {"Sn127": 0.3018, "Sn127_m1": 0.6982}, "Sb121": {"Sb122": 0.9369, "Sb122_m1": 0.0631}, "Te120": {"Te121": 0.8871, "Te121_m1": 0.1129}, "Te122": {"Te123": 0.6448, "Te123_m1": 0.3552}, "Te124": {"Te125": 0.9912, "Te125_m1": 0.0088}, "Te126": {"Te127": 0.8689, "Te127_m1": 0.1311}, "Te128": {"Te129": 0.9245, "Te129_m1": 0.0755}, "Te130": {"Te131": 0.8559, "Te131_m1": 0.1441}, "Te132": {"Te133": 0.8517, "Te133_m1": 0.1483}, "I129": {"I130": 0.413, "I130_m1": 0.587}, "I131": {"I132": 0.9839, "I132_m1": 0.0161}, "Xe124": {"Xe125": 0.83, "Xe125_m1": 0.17}, "Xe126": {"Xe127": 0.8691, "Xe127_m1": 0.1309}, "Xe128": {"Xe129": 0.8923, "Xe129_m1": 0.1077}, "Xe130": {"Xe131": 0.9164, "Xe131_m1": 0.0836}, "Xe132": {"Xe133": 0.8867, "Xe133_m1": 0.1133}, "Xe133": {"Xe134": 0.96, "Xe134_m1": 0.04}, "Xe134": {"Xe135": 0.9853, "Xe135_m1": 0.0147}, "Cs133": {"Cs134": 0.907, "Cs134_m1": 0.093}, "Cs134": {"Cs135": 0.996, "Cs135_m1": 0.004}, "Cs135": {"Cs136": 0.984, "Cs136_m1": 0.016}, "Cs137": {"Cs138": 0.9021, "Cs138_m1": 0.0979}, "Ba130": {"Ba131": 0.8871, "Ba131_m1": 0.1129}, "Ba132": {"Ba133": 0.9175, "Ba133_m1": 0.0825}, "Ba134": {"Ba135": 0.9263, "Ba135_m1": 0.0737}, "Ba135": {"Ba136": 0.9978, "Ba136_m1": 0.0022}, "Ba136": {"Ba137": 0.9731, "Ba137_m1": 0.0269}, "Ce136": {"Ce137": 0.8662, "Ce137_m1": 0.1338}, "Ce138": {"Ce139": 0.9787, "Ce139_m1": 0.0213}, "Pr141": {"Pr142": 0.6519, "Pr142_m1": 0.3481}, "Pr143": {"Pr144": 0.31, "Pr144_m1": 0.69}, "Pm147": {"Pm148": 0.533, "Pm148_m1": 0.467}, "Eu153": {"Eu154": 0.984, "Eu154_m1": 0.016}, "Dy164": {"Dy165": 0.37, "Dy165_m1": 0.63}, "Ho165": {"Ho166": 0.949, "Ho166_m1": 0.051}, "Er166": {"Er167": 0.2503, "Er167_m1": 0.7497}, "Lu175": {"Lu176": 0.3331, "Lu176_m1": 0.6669}, "Lu176": {"Lu177": 0.999, "Lu177_m1": 0.001}, "Hf179": {"Hf180": 0.991, "Hf180_m1": 0.009}, "W182": {"W183": 0.8699, "W183_m1": 0.1301}, "W184": {"W185": 0.9983, "W185_m1": 0.0017}, "Re185": {"Re186": 0.999, "Re186_m1": 0.001}, "Re187": {"Re188": 0.9729, "Re188_m1": 0.0271}, "Au197": {"Au198": 0.999, "Au198_m1": 0.001}, "Hg196": {"Hg197": 0.966, "Hg197_m1": 0.034}, "Hg198": {"Hg199": 0.9918, "Hg199_m1": 0.0082}, "Pb206": {"Pb207": 0.9783, "Pb207_m1": 0.0217}, "Bi209": {"Bi210": 0.6791, "Bi210_m1": 0.3209}, "Pa233": {"Pa234": 0.4871, "Pa234_m1": 0.5129}, "U234": {"U235": 0.5, "U235_m1": 0.5}, "Np235": {"Np236": 0.4, "Np236_m1": 0.6}, "Np239": {"Np240": 0.3573, "Np240_m1": 0.6427}, "Pu236": {"Pu237": 0.5001, "Pu237_m1": 0.4999}, "Am241": {"Am242": 0.919, "Am242_m1": 0.081}, "Am243": {"Am244": 0.0626, "Am244_m1": 0.9374}, "Bk247": {"Bk248": 0.4, "Bk248_m1": 0.6}, "Es253": {"Es254": 0.032, "Es254_m1": 0.968}, "Es255": {"Es256": 0.984, "Es256_m1": 0.016}}
{
"(n,gamma)": {
"Na23": {"Na24": 0.232, "Na24_m1": 0.768},
"Cl37": {"Cl38": 0.8809, "Cl38_m1": 0.1191},
"Sc45": {"Sc46": 0.556, "Sc46_m1": 0.444},
"Co59": {"Co60": 0.444, "Co60_m1": 0.556},
"Ge72": {"Ge73": 0.5012, "Ge73_m1": 0.4988},
"Ge74": {"Ge75": 0.666, "Ge75_m1": 0.334},
"Ge76": {"Ge77": 0.4005, "Ge77_m1": 0.5995},
"Se76": {"Se77": 0.7409, "Se77_m1": 0.2591},
"Se78": {"Se79": 0.1178, "Se79_m1": 0.8822},
"Se80": {"Se81": 0.8454, "Se81_m1": 0.1546},
"Se82": {"Se83": 0.1402, "Se83_m1": 0.8598},
"Br79": {"Br80": 0.7687, "Br80_m1": 0.2313},
"Br81": {"Br82": 0.0914, "Br82_m1": 0.9086},
"Kr78": {"Kr79": 0.9704, "Kr79_m1": 0.0296},
"Kr80": {"Kr81": 0.6031, "Kr81_m1": 0.3969},
"Kr82": {"Kr83": 0.333, "Kr83_m1": 0.667},
"Kr84": {"Kr85": 0.1839, "Kr85_m1": 0.8161},
"Rb85": {"Rb86": 0.8791, "Rb86_m1": 0.1209},
"Sr84": {"Sr85": 0.253, "Sr85_m1": 0.747},
"Sr86": {"Sr87": 0.1988, "Sr87_m1": 0.8012},
"Y89": {"Y90": 0.9979, "Y90_m1": 0.0021},
"Y90": {"Y91": 0.7496, "Y91_m1": 0.2504},
"Nb93": {"Nb94": 0.3101, "Nb94_m1": 0.6899},
"Nb94": {"Nb95": 0.961, "Nb95_m1": 0.039},
"Mo92": {"Mo93": 0.9978, "Mo93_m1": 0.0022},
"Rh103": {"Rh104": 0.924, "Rh104_m1": 0.076},
"Rh105": {"Rh106": 0.904, "Rh106_m1": 0.096},
"Pd106": {"Pd107": 0.9527, "Pd107_m1": 0.0473},
"Pd108": {"Pd109": 0.9779, "Pd109_m1": 0.0221},
"Pd110": {"Pd111": 0.85, "Pd111_m1": 0.15},
"Ag107": {"Ag108": 0.9898, "Ag108_m1": 0.0102},
"Ag109": {"Ag110": 0.954, "Ag110_m1": 0.046},
"Cd110": {"Cd111": 0.9945, "Cd111_m1": 0.0055},
"Cd112": {"Cd113": 0.8685, "Cd113_m1": 0.1315},
"Cd114": {"Cd115": 0.8812, "Cd115_m1": 0.1188},
"Cd116": {"Cd117": 0.666, "Cd117_m1": 0.334},
"In113": {"In114": 0.4191, "In114_m1": 0.5809},
"Sn112": {"Sn113": 0.7253, "Sn113_m1": 0.2747},
"Sn116": {"Sn117": 0.9568, "Sn117_m1": 0.0432},
"Sn118": {"Sn119": 0.9794, "Sn119_m1": 0.0206},
"Sn120": {"Sn121": 0.9875, "Sn121_m1": 0.0125},
"Sn122": {"Sn123": 0.0112, "Sn123_m1": 0.9888},
"Sn124": {"Sn125": 0.0375, "Sn125_m1": 0.9625},
"Sn126": {"Sn127": 0.3018, "Sn127_m1": 0.6982},
"Sb121": {"Sb122": 0.9369, "Sb122_m1": 0.0631},
"Te120": {"Te121": 0.8871, "Te121_m1": 0.1129},
"Te122": {"Te123": 0.6448, "Te123_m1": 0.3552},
"Te124": {"Te125": 0.9912, "Te125_m1": 0.0088},
"Te126": {"Te127": 0.8689, "Te127_m1": 0.1311},
"Te128": {"Te129": 0.9245, "Te129_m1": 0.0755},
"Te130": {"Te131": 0.8559, "Te131_m1": 0.1441},
"Te132": {"Te133": 0.8517, "Te133_m1": 0.1483},
"I129": {"I130": 0.413, "I130_m1": 0.587},
"I131": {"I132": 0.9839, "I132_m1": 0.0161},
"Xe124": {"Xe125": 0.83, "Xe125_m1": 0.17},
"Xe126": {"Xe127": 0.8691, "Xe127_m1": 0.1309},
"Xe128": {"Xe129": 0.8923, "Xe129_m1": 0.1077},
"Xe130": {"Xe131": 0.9164, "Xe131_m1": 0.0836},
"Xe132": {"Xe133": 0.8867, "Xe133_m1": 0.1133},
"Xe133": {"Xe134": 0.96, "Xe134_m1": 0.04},
"Xe134": {"Xe135": 0.9853, "Xe135_m1": 0.0147},
"Cs133": {"Cs134": 0.907, "Cs134_m1": 0.093},
"Cs134": {"Cs135": 0.996, "Cs135_m1": 0.004},
"Cs135": {"Cs136": 0.984, "Cs136_m1": 0.016},
"Cs137": {"Cs138": 0.9021, "Cs138_m1": 0.0979},
"Ba130": {"Ba131": 0.8871, "Ba131_m1": 0.1129},
"Ba132": {"Ba133": 0.9175, "Ba133_m1": 0.0825},
"Ba134": {"Ba135": 0.9263, "Ba135_m1": 0.0737},
"Ba135": {"Ba136": 0.9978, "Ba136_m1": 0.0022},
"Ba136": {"Ba137": 0.9731, "Ba137_m1": 0.0269},
"Ce136": {"Ce137": 0.8662, "Ce137_m1": 0.1338},
"Ce138": {"Ce139": 0.9787, "Ce139_m1": 0.0213},
"Pr141": {"Pr142": 0.6519, "Pr142_m1": 0.3481},
"Pr143": {"Pr144": 0.31, "Pr144_m1": 0.69},
"Pm147": {"Pm148": 0.533, "Pm148_m1": 0.467},
"Eu153": {"Eu154": 0.984, "Eu154_m1": 0.016},
"Dy164": {"Dy165": 0.37, "Dy165_m1": 0.63},
"Ho165": {"Ho166": 0.949, "Ho166_m1": 0.051},
"Er166": {"Er167": 0.2503, "Er167_m1": 0.7497},
"Lu175": {"Lu176": 0.3331, "Lu176_m1": 0.6669},
"Lu176": {"Lu177": 0.999, "Lu177_m1": 0.001},
"Hf179": {"Hf180": 0.991, "Hf180_m1": 0.009},
"W182": {"W183": 0.8699, "W183_m1": 0.1301},
"W184": {"W185": 0.9983, "W185_m1": 0.0017},
"Re185": {"Re186": 0.999, "Re186_m1": 0.001},
"Re187": {"Re188": 0.9729, "Re188_m1": 0.0271},
"Au197": {"Au198": 0.999, "Au198_m1": 0.001},
"Hg196": {"Hg197": 0.966, "Hg197_m1": 0.034},
"Hg198": {"Hg199": 0.9918, "Hg199_m1": 0.0082},
"Pb206": {"Pb207": 0.9783, "Pb207_m1": 0.0217},
"Bi209": {"Bi210": 0.6791, "Bi210_m1": 0.3209},
"Pa233": {"Pa234": 0.4871, "Pa234_m1": 0.5129},
"U234": {"U235": 0.5, "U235_m1": 0.5},
"Np235": {"Np236": 0.4, "Np236_m1": 0.6},
"Np239": {"Np240": 0.3573, "Np240_m1": 0.6427},
"Pu236": {"Pu237": 0.5001, "Pu237_m1": 0.4999},
"Am241": {"Am242": 0.919, "Am242_m1": 0.081},
"Am243": {"Am244": 0.0626, "Am244_m1": 0.9374},
"Bk247": {"Bk248": 0.4, "Bk248_m1": 0.6},
"Es253": {"Es254": 0.032, "Es254_m1": 0.968},
"Es255": {"Es256": 0.984, "Es256_m1": 0.016}
}
}
Loading