Hello everyone
I’d like to ask you a few questions.
Firstly, When calculating the burnup, the volume refers to the volume of the entire fuel area or the volume of the entire fuel, then if the calculation object is TRISO particles, is it the entire fuel area ×pf
Secondly, When I used all the threads to compute, I always reported the OpenMC aborted unexpectedly.
WARNING: Could not find material 16 specified in plot 5
WARNING: Could not find material 18 specified in plot 5
These problems, but I think my modeling is OK, the code is below, please help me check, thank you.
from math import pi
import numpy as np
#import openmoc
import openmc
import openmc.model
import openmc.mgxs as mgxs
import openmc.data
import math
fuel = openmc.Material(name=‘Fuel’)
fuel.add_nuclide(‘U235’, 7.11163507e-03)
fuel.add_nuclide(‘U238’, 1.63842133e-02)
fuel.add_nuclide(‘O16’, 4.69916967e-02)
buff = openmc.Material(name=‘Buffer’)
buff.set_density(‘g/cm3’, 1.0)
buff.add_element(‘C’, 1.0)
buff.add_s_alpha_beta(‘c_Graphite’)
PyC1 = openmc.Material(name=‘PyC1’)
PyC1.set_density(‘g/cm3’, 1.9)
PyC1.add_element(‘C’, 1.0)
PyC1.add_s_alpha_beta(‘c_Graphite’)
PyC2 = openmc.Material(name=‘PyC2’)
PyC2.set_density(‘g/cm3’, 1.87)
PyC2.add_element(‘C’, 1.0)
PyC2.add_s_alpha_beta(‘c_Graphite’)
SiC = openmc.Material(name=‘SiC’)
SiC.set_density(‘g/cm3’, 3.2)
SiC.add_element(‘C’, 0.5)
SiC.add_element(‘Si’, 0.5)
graphite = openmc.Material()
graphite.set_density(‘g/cm3’, 1.1995)
graphite.add_element(‘C’, 1.0)
graphite.add_s_alpha_beta(‘c_Graphite’)
Zr = openmc.Material(name=‘Zr’)
Zr.temperature = 300.0
Zr.set_density(‘atom/b-cm’, 1.776679E-02)
Zr.add_nuclide(‘Fe54’, 7.99520E-04)
Zr.add_nuclide(‘Fe56’, 1.22590E-02)
Zr.add_nuclide(‘Fe57’, 2.66510E-04)
Zr.add_nuclide(‘Cr52’, 3.55340E-03)
Zr.add_nuclide(‘Al27’, 8.88360E-04)
Matrix = openmc.Material(name=‘Matrix’)
Matrix.temperature = 300.0
Matrix.set_density(‘atom/b-cm’, 9.55241E-02)
Matrix.add_nuclide(‘C0’, 4.77620E-02)
Matrix.add_nuclide(‘Si28’, 4.40510E-02)
Matrix.add_nuclide(‘Si29’, 2.23050E-03)
Matrix.add_nuclide(‘Si30’, 1.48060E-03)
Water = openmc.Material(name=‘Water’)
Water.temperature = 300.0
Water.set_density(‘atom/b-cm’, 1.00500E-01)
Water.add_nuclide(‘H1’, 2.0)
Water.add_nuclide(‘O16’,1.0)
Water.add_s_alpha_beta(‘c_H_in_H2O’)
Gd2O3=openmc.Material(name=‘Gd2O3’)
Gd2O3.set_density(‘g/cm3’, 8.33)
Gd2O3.add_nuclide(‘Gd152’,0.167639,‘wo’)
Gd2O3.add_nuclide(‘Gd154’,1.851335,‘wo’)
Gd2O3.add_nuclide(‘Gd155’,12.650508,‘wo’)
Gd2O3.add_nuclide(‘Gd156’,17.609904,‘wo’)
Gd2O3.add_nuclide(‘Gd157’,13.550727,‘wo’)
Gd2O3.add_nuclide(‘Gd158’,21.643699,‘wo’)
Gd2O3.add_nuclide(‘Gd160’,19.288733,‘wo’)
Gd2O3.add_nuclide(‘O16’,13.237456,‘wo’)
Create TRISO universe
spheres = [openmc.Sphere(r=1e-4*r)
for r in [215., 315., 350., 385.]]
cells = [openmc.Cell(fill=Gd2O3, region=-spheres[0]),
openmc.Cell(fill=Gd2O3, region=+spheres[0] & -spheres[1]),
openmc.Cell(fill=Gd2O3, region=+spheres[1] & -spheres[2]),
openmc.Cell(fill=Gd2O3, region=+spheres[2] & -spheres[3]),
openmc.Cell(fill=Gd2O3, region=+spheres[3])]
triso_univ = openmc.Universe(cells=cells)
wide_fuel=2
height_fuel=0.36
wide_water=wide_fuel+0.2
height_water=height_fuel+0.2
min_x = openmc.XPlane(x0=-wide_water/2, boundary_type=‘reflective’)
max_x = openmc.XPlane(x0=wide_water/2, boundary_type=‘reflective’)
min_y = openmc.YPlane(y0=-height_water/2, boundary_type=‘reflective’)
max_y = openmc.YPlane(y0=height_water/2, boundary_type=‘reflective’)
min_z = openmc.ZPlane(z0=-0.4, boundary_type=‘reflective’)
max_z = openmc.ZPlane(z0=0.4, boundary_type=‘reflective’)
fuel_or=openmc.model.rectangular_prism(width=wide_fuel,height=height_fuel)
zr_or=openmc.model.rectangular_prism(width=wide_fuel+0.1,height=height_fuel+0.1)
triso_region = fuel_or&(-max_z&+min_z)
zr_cell=openmc.Cell(region=zr_or&~fuel_or&-max_z&+min_z)
water_cell=openmc.Cell(region=~zr_or&(-max_z& +min_z&-max_x&+min_x&+min_y&-max_y))
outer_radius = 425*1e-4
pf=0.1
centers = openmc.model.pack_spheres(radius=outer_radius, region=triso_region, pf=pf)
trisos = [openmc.model.TRISO(outer_radius, triso_univ, center) for center in centers]
triso_fuel_cell = openmc.Cell(region=triso_region)
lower_left, upper_right = triso_fuel_cell.region.bounding_box
shape = (7, 7, 7)
pitch = (upper_right - lower_left)/shape
lattice = openmc.model.create_triso_lattice(
trisos, lower_left, pitch, shape, fuel)
triso_fuel_cell.fill = lattice
zr_cell.fill=Zr
water_cell.fill=Water
univ = openmc.Universe(cells=[zr_cell,water_cell,triso_fuel_cell])
geom = openmc.Geometry(univ)
geom.export_to_xml()
mats = list(geom.get_all_materials().values())
openmc.Materials(mats).export_to_xml()
settings = openmc.Settings()
settings.batches = 500
settings.inactive = 10
settings.particles = 10000
settings.export_to_xml()
openmc.run()