I have tried running a problem of a 2x2 cube filled with TRISO fuel to try to break down a discrepancy I am getting when I try running a TRISO filled pin cell model in OpenMC compared to Serpent. However, even with this very simplified model I am getting a discrepancy between the results for K_eff; with the OpenMC model yielding a k_eff = 1.03492, while in Serpent I get k_eff = 1.19.
What could this discrepancy be due to in such a simplified model? I am using the same TRISO coordinates for both models.
Here is the code for the OpenMC model:
#2x2 TRISO region
# Materials definitions
# cross sections file
openmc.Materials.cross_sections = "/home/annamaria/Documents/DataLibraries/ENDFB7-0/h5Files/cross_sections.xml"
#materials
f34 = openmc.Material(name='3.4%', temperature = 300)
f34.set_density('g/cm3', 10.5)
f34.add_nuclide('U235', 4.6716e-02)
f34.add_nuclide('U238', 2.8697e-01)
f34.add_nuclide('O16', 5.000e-01)
f34.add_nuclide('C0', 1.6667e-01)
buffer = openmc.Material(name='Buffer', temperature = 300)
buffer.set_density('g/cm3', 1.0)
buffer.add_nuclide('C0', 1.0)
buffer.add_s_alpha_beta('c_Graphite')
PyC1 = openmc.Material(name='IPyC', temperature= 300)
PyC1.set_density('g/cm3', 1.9)
PyC1.add_nuclide('C0', 1.9)
PyC1.add_s_alpha_beta('c_Graphite')
PyC2 = openmc.Material(name='IPyC', temperature= 300)
PyC2.set_density('g/cm3', 1.87)
PyC2.add_nuclide('C0', 1.0)
PyC2.add_s_alpha_beta('c_Graphite')
SiC = openmc.Material(name='SiC', temperature=300)
SiC.set_density('g/cm3', 3.2)
SiC.add_nuclide('Si28', 0.5)
SiC.add_nuclide('C0', 0.5)
SiC.add_s_alpha_beta('c_Graphite')
OverMat = openmc.Material(name='OverMat', temperature=300)
OverMat.set_density('g/cm3', 1.9995)
OverMat.add_nuclide('C0', 1.0)
OverMat.add_s_alpha_beta('c_Graphite')
# Instantiate a Materials collection
materials_list = [f34, buffer, PyC1, SiC, PyC2, OverMat]
materials_file = openmc.Materials(materials_list)
materials_file.export_to_xml()
# Geometry definitions for TRISO particles
triso_outer_radius = 0.046
kernelsph = openmc.Sphere(r=0.03)
buffsph = openmc.Sphere(r=0.036)
IPyCsph = openmc.Sphere(r=0.039)
SiCsph = openmc.Sphere(r=0.0415)
OPyCsph = openmc.Sphere(r=0.046)
OvMatSph = openmc.Sphere(r=triso_outer_radius)
layers = [kernelsph, buffsph, IPyCsph, SiCsph, OPyCsph]
triso_mats = [f34, buffer, PyC1, SiC, PyC2]
triso_cells = []
for i in range(5):
if (i == 0):
triso_cells.append(openmc.Cell(fill=triso_mats[0], region=-layers[0]))
else:
triso_cells.append(openmc.Cell(fill=triso_mats[i], region=+layers[i-1] & -layers[i]))
triso_universe = openmc.Universe(cells=triso_cells)
triso_universe.plot(width = (0.1, 0.1))
TRISOPTH = '/home/annamaria/Documents/HTTR_AM/OPENMC/FuelBlock/Pin2D/PinCellDebug/PinCellDebugSerpent/part_box.inp'
coordinates = []
with open(TRISOPTH, 'r') as file:
for line in file:
values = line.split()
x = float(values[0])
y = float(values[1])
z = float(values[2])
coordinates.append(np.array([x,y,z]))
triso_particles = [openmc.model.TRISO(triso_outer_radius, fill=triso_universe, center=c) for c in coordinates]
min_x = openmc.XPlane(x0=-1, boundary_type='reflective')
max_x = openmc.XPlane(x0=1, boundary_type='reflective')
min_y = openmc.YPlane(y0=-1, boundary_type='reflective')
max_y = openmc.YPlane(y0=1, boundary_type='reflective')
min_z = openmc.ZPlane(z0=-1, boundary_type='reflective')
max_z = openmc.ZPlane(z0=1, boundary_type='reflective')
box = openmc.Cell(region=+min_x & -max_x & +min_y & -max_y & +min_z & -max_z)
lower_left, upper_right = box.bounding_box
shape=(3,3,3)
pitch = (upper_right - lower_left)/shape
lattice = openmc.model.create_triso_lattice(triso_particles, lower_left, pitch, shape, OverMat)
box.fill = lattice
univ = openmc.Universe(cells=[box])
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.run_mode = 'plot'
settings.export_to_xml()
batches=20
inactive=10
particles = 500
settings = openmc.Settings()
settings.batches=batches
settings.inactive = inactive
settings.particles=particles
settings.generations_per_batch = 5
settings.run_mode = 'eigenvalue'
settings.export_to_xml()
bounds = [-1, -1, -1, 1, 1, 1]
uniform_dist = openmc.stats.Box(bounds[:3], bounds[3:], only_fissionable=True)
settings.source = openmc.Source(space=uniform_dist)
settings.export_to_xml()
openmc.run()
Here is the code for the Serpent model:
set title "httr_single_block"
% -----------------------------------------------------------------------------
% Geometry
% -----------------------------------------------------------------------------
particle 11
fuel34 0.03
buffer 0.036
pyc1 0.039
sic 0.0415
pyc2 0.046
matrix_overcoat
pbed 12 13 "/home/annamaria/Documents/HTTR_AM/OPENMC/FuelBlock/Pin2D/PinCellDebug/PinCellDebugSerpent/part_box.inp"
surf 17 cube 0.0 0.0 0.0 1.0
cell 32 0 fill 12 -17
cell 18 0 outside 17
% Define cell of infinite graphite
cell 19 13 matrix_overcoat -17
% -----------------------------------------------------------------------------
% Material data:
% -----------------------------------------------------------------------------
% -- Fuel: UO2, 3.4% enriched
% -- Fuel: UO2 3.4% enriched
mat fuel34 -10.5 tmp 300
92235.70c -4.6716E-02
92238.70c -2.8697E-01
8016.70c -5.000E-01
6000.70c -1.667E-07
% --- 1st coating layer
mat buffer -1.0 moder grph 6000 tmp 300
6000.70c -1.0
% --- 2nd coating layer
mat pyc1 -1.9 moder grph 6000 tmp 300
6000.70c -1.9
% --- 3rd coating layer
mat sic -3.2 moder grph 6000 tmp 300
14028.70c -0.5
6000.70c -0.5
% 4th coating layer
mat pyc2 -1.87 moder grph 6000 tmp 300
6000.70c -1.0
% --- Graphite overcoat
mat matrix_overcoat -1.9995 moder grph 6000 tmp 300
6000.70c -1.0
therm grph 300 grph.10t grph.11t
% -----------------------------------------------------------------------------
% Calculation parameters
% -----------------------------------------------------------------------------
% --- Cross section library file path:
set acelib "/home/annamaria/Documents/DataLibraries/ENDFB7-0/aceFiles/sss_endfb70.xsdata"
set gcu 0
set nfg 2 0.625e-6
set ures 1
set mcvol 100000000
set micro wms172
set cfe 10.0
set pop 1000 500 20
%set genrate 1.0
set power 1.0E6
set bc 2
src 1 n sm fuel34 sr 92235.72c 18
% --- Geometry and mesh plots:
plot 3 500 500
% -----------------------------------------------------------------------------
% Detectors:
% -----------------------------------------------------------------------------
ene 1 1 0.0 0.625e-6 1.96403E+01
det fuel_fiss n de 1 dm fuel34 dr -6 void
det fuel_cap n de 1 dm fuel34 dr -2 void
det buffer_cap n de 1 dm buffer dr -2 void
det pyc_cap n de 1 dm pyc1 dr -2 void
det sic_cap n de 1 dm sic dr -2 void
det matrix_overcoat_cap n de 1 dm matrix_overcoat dr -2 void