-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdcll_materials.py
More file actions
138 lines (129 loc) · 4.17 KB
/
dcll_materials.py
File metadata and controls
138 lines (129 loc) · 4.17 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
import openmc
import json
import material_db_tools as mdbt
def mix_material_data():
"""
Returns material dictionary with composition and citation information
"""
material_dict = {
"sol": {
"composition": {"Void": 1.0},
"citation": "DavisFusEngDes_2018",
},
"fw_armor": {
"composition": {"W": 1.0},
"density_factor": 0.91,
"citation": "ZhouEUDEMOHCPB_2023",
},
"fw": {
"composition": {"MF82H": 0.34, "HeNIST": 0.66},
"citation": "ZhouEUDEMOHCPB_2023",
},
"be_multiplier": {
"composition": {"Be": 1.0},
"citation": "DavisFusEngDes_2018",
},
"breeder": {
"composition": {
"Pb157Linat": 0.737,
"SiC": 0.039,
"HeNIST": 0.149,
"MF82H": 0.075,
},
"citation": "ZhouEUDEMOHCPB_2023",
}, # fix this
"bw": {
"composition": {"MF82H": 0.8, "HeNIST": 0.2},
"citation": "DavisFusEngDes_2018",
},
"manifold": {
"composition": {"MF82H": 0.3, "HeNIST": 0.7},
"citation": "DavisFusEngDes_2018",
},
"hts_front_plate": {
"composition": {"HeNIST": 0.2, "MF82H": 0.28, "BMF82H": 0.52},
"citation": "DavisFusEngDes_2018",
},
"hts": {
"composition": {"HeNIST": 0.2, "MF82H": 0.28, "BMF82H": 0.52},
"citation": "DavisFusEngDes_2018",
},
"hts_back_plate": {
"composition": {"HeNIST": 0.2, "MF82H": 0.28, "BMF82H": 0.52},
"citation": "DavisFusEngDes_2018",
},
"gap_1": {
"composition": {"Void": 1.0},
"citation": "DavisFusEngDes_2018",
},
"vv_front_plate": {
"composition": {"SS316L": 1.0},
"citation": "DavisFusEngDes_2018",
},
"vv_fill": {
"composition": {"HeNIST": 0.4, "Cr3FS": 0.6},
"citation": "DavisFusEngDes_2018",
},
"vv_back_plate": {
"composition": {"SS316LN": 1.0},
"citation": "DavisFusEngDes_2018",
},
"gap_2": {
"composition": {"AirSTP": 1.0},
"citation": "ZhouEUDEMOHCPB_2023",
},
"lts_front_plate": {
"composition": {"Cr3FS": 0.39, "BMF82H": 0.29, "Water": 0.32},
"citation": "DavisFusEngDes_2018",
},
"lts": {
"composition": {"Cr3FS": 0.39, "BMF82H": 0.29, "Water": 0.32},
"citation": "DavisFusEngDes_2018",
},
"lts_back_plate": {
"composition": {"Cr3FS": 0.39, "BMF82H": 0.29, "Water": 0.32},
"citation": "DavisFusEngDes_2018",
},
"thermal_insulator": {
"composition": {"AirSTP": 1.0},
"citation": "ZhouEUDEMOHCPB_2023",
},
"coil_pack_front_plate": {
"composition": {"SS316LN": 1.0},
"citation": "DavisFusEngDes_2018",
},
"coil_pack": {
"composition": {"SS316LN": 1.0},
"citation": "DavisFusEngDes_2018",
},
}
return material_dict
def mix_materials(material_dict):
"""
Uses material dictionary and material_db_tools to create a PyNE material library
"""
# Load pure material library
mat_lib = mdbt.MaterialLibrary()
mat_lib.from_json("PureFusionMaterials_libv1.json")
# create material library object
mixmat_lib = mdbt.MaterialLibrary()
for mat_name, mat_data in material_dict.items():
if "Void" in mat_data["composition"].keys():
continue
mixmat_lib[mat_name] = mdbt.mix_by_volume(
mat_lib,
mat_data["composition"],
mat_data["citation"],
density_factor=mat_data.get("density_factor", 1),
)
return mixmat_lib
# write DCLL material library
def main():
"""
Writes OpenMC materials object file
"""
material_dict = mix_material_data()
mixmat_lib = mix_materials(material_dict)
mixmat_lib.write_openmc("mixedMaterialsDCLL_libv1.xml")
if __name__ == "__main__":
main()