I am creating a surrounding water for the box and I increased the height of the box as 200 cm. Now, It takes 35 mins just to generate the xml files with a pf=0.35. Now, When I tried to run the K-effective it is stuck in
.........................
and not goes to first batch even after 30 mins. Below is the code I am using. What am I doing wrong. I first encounter the issue when I tried to generate a TRISO containing cylinder like fuel rods. That code was hanging, I tried the example code as it is, and just increased the height and the pf. But, the issue is still there. Does is possible to design a TRISO fuel rod in OpenMC? how?
import openmc
from math import pi
from IPython.display import Image
import numpy as np
import matplotlib.pyplot as plt
import openmc.model
# OpenMC simulation parameters
batches = 120
inactive = 20
particles = 10000
###############################################################################
# Exporting to OpenMC material.xml file
###############################################################################
# Material
water = openmc.Material()
water.set_density('g/cm3', 0.6928)
water.add_nuclide('H1', 0.11190, 'wo')
water.add_nuclide('O16', 0.88810, 'wo')
water.add_nuclide('B10', 1.4e-4, 'wo')
fuel = openmc.Material()
fuel.set_density('g/cm3', 10.5)
fuel.add_nuclide('U235', 4.6716e-02)
fuel.add_nuclide('U238', 2.8697e-01)
fuel.add_nuclide('O16', 5.0000e-01)
fuel.add_element('C', 1.6667e-01)
buff = openmc.Material()
buff.set_density('g/cm3', 1.0)
buff.add_element('C', 1.0)
buff.add_s_alpha_beta('c_Graphite')
PyC1 = openmc.Material()
PyC1.set_density('g/cm3', 1.9)
PyC1.add_element('C', 1.0)
PyC1.add_s_alpha_beta('c_Graphite')
PyC2 = openmc.Material()
PyC2.set_density('g/cm3', 1.87)
PyC2.add_element('C', 1.0)
PyC2.add_s_alpha_beta('c_Graphite')
SiC = openmc.Material()
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')
# Instantiate a Materials collection and export to XML
materials_file = openmc.Materials([water, fuel, buff, PyC1, PyC2, SiC, graphite])
materials_file.export_to_xml()
###############################################################################
# Exporting to OpenMC geometry.xml file
###############################################################################
########################################################## Instantiate Surfaces
X_0 = openmc.XPlane(x0=0, name='X_0')
Y_0 = openmc.YPlane(y0=0, name='Y_0')
Z_0 = openmc.ZPlane(z0=0, name='Z_0')
min_x = openmc.XPlane(x0=-0.5)
max_x = openmc.XPlane(x0=0.5)
min_y = openmc.YPlane(y0=-0.5)
max_y = openmc.YPlane(y0=0.5)
min_z = openmc.ZPlane(z0=-108.3, boundary_type='reflective')
max_z = openmc.ZPlane(z0=91.7, boundary_type='reflective')
fuel_B_water = openmc.ZCylinder(x0=0, y0=0, r=3.0, boundary_type= 'reflective')
########################################################### Instantiate Cells
spheres = [openmc.Sphere(r=1e-3*r)
for r in [45.0, 51.0, 54.5, 58.0]]
cells = [openmc.Cell(fill=fuel, region=-spheres[0]),
openmc.Cell(fill=buff, region=+spheres[0] & -spheres[1]),
openmc.Cell(fill=PyC1, region=+spheres[1] & -spheres[2]),
openmc.Cell(fill=SiC, region=+spheres[2] & -spheres[3]),
openmc.Cell(fill=PyC2, region=+spheres[3])]
triso_univ = openmc.Universe(cells=cells)
region = +min_x & -max_x & +min_y & -max_y & +min_z & -max_z
outer_radius = 61.5*1e-3
centers = openmc.model.pack_spheres(radius=outer_radius, region=region, pf=0.35)
trisos = [openmc.model.TRISO(outer_radius, triso_univ, c) for c in centers]
box = openmc.Cell(region=region)
lower_left, upper_right = box.region.bounding_box
shape = (1, 1, 1)
pitch = (upper_right - lower_left)/shape
lattice = openmc.model.create_triso_lattice(trisos, lower_left, pitch, shape, graphite)
box.fill = lattice
Bundle_B_water = openmc.Cell(region= -fuel_B_water & +X_0 & +max_x & +min_z & -max_z | -fuel_B_water &-X_0 & -min_x & +min_z & -max_z | -fuel_B_water &-Y_0 & -min_y & +min_z & -max_z | -fuel_B_water &+Y_0 & +max_y & +min_z & -max_z, fill= water)
########################################################### Instantiate Universes
root = openmc.Universe(universe_id=0)
root.add_cells([box, Bundle_B_water])
geometry = openmc.Geometry(root)
geometry.export_to_xml()
###############################################################################
# Exporting to OpenMC settings.xml file
###############################################################################
# Instantiate a Settings object, set all runtime parameters, and export to XML
settings_file = openmc.Settings()
settings_file.batches = batches
settings_file.inactive = inactive
settings_file.particles = particles
bounds = [-0.5,-0.5,-108.3,0.5,0.5,91.7]
uniform_dist = openmc.stats.Box(bounds[:3], bounds[3:] )#only_fissionable=True)
settings_file.source = openmc.source.Source(space=uniform_dist)
settings_file.export_to_xml()
###############################################################################
# Exporting to OpenMC plot.xml file
###############################################################################
plot_6 = openmc.Plot()
plot_6.basis ='xy'
plot_6.origin = [0, 0, 0]
plot_6.width = [4, 4]
plot_6.pixels = [500, 500]
plot_6.color_by = 'material'
plot = openmc.Plot()
plot.basis ='xz'
plot.origin = [0, 0, 0]
plot.width = [50, 450]
plot.pixels = [500, 500]
plot.color_by = 'material'
plots = openmc.Plots()
plots += [plot_6, plot]
plots.export_to_xml()
My fuel rod containing TRISO is below. Here instead of a box region, I used a cylinder region and keep everything else to generate TRISO as same as example.