Thanks again for your answer,
I checked the geometry.xml file and changed the surface boundary condition to vacuum to see if that solved the problem. It did for that surface but now it is another surface that is giving me the same error. I have been trying to understand what is wrong with my code but I cant seem to get it. Do I need to change every surface boundary condition to vacuum? does that allow the transport of photons through the surfaces and their respective interactions? or, most probable, Im doing something wrong.
Maybe this is too much to ask but could you check my code and help me figure out what is wrong?
import openmc
%matplotlib inline
mat = openmc.Material()
mat.add_element('Ge',1.0)
mat.set_density('g/cm3',5.3)
mat2 = openmc.Material()
mat2.add_element('Al',1.0)
mat2.set_density('g/cm3',2.698)
mat3 = openmc.Material()
mat3.add_element('Be',1.0)
mat3.set_density('g/cm3',1.848)
materials = openmc.Materials([mat,mat2,mat3])
materials.cross_sections = "/Users/user196949/Documents/antonio/mcnp_endfb71/cross_sections.xml"
materials.export_to_xml()
cil1 = openmc.ZCylinder(r = 2.52)
cil2 = openmc.ZCylinder(r = 3)
cil3 = openmc.ZCylinder(r = 3.81,boundary_type = 'vacuum')
plano1 = openmc.ZPlane(z0 = +3,boundary_type = 'transmission')
plano2 = openmc.ZPlane(z0 = +5.52,boundary_type = 'transmission')
plano3 = openmc.ZPlane(z0 = 0,boundary_type = 'vacuum')
plano4 = openmc.ZPlane(z0 = +6.02,boundary_type = 'transmission')
plano5 = openmc.ZPlane(z0 = +6.07,boundary_type = 'vacuum')
#left = openmc.XPlane(x0 = -4, boundary_type = 'vacuum')
#right = openmc.XPlane(x0 = +4, boundary_type = 'vacuum')
#bot = openmc.YPlane(y0 = -1, boundary_type = 'vacuum')
#top = openmc.YPlane(y0 = +7, boundary_type = 'vacuum')
#box = openmc.rectngular_prism(width = 15,height = 15, boundary_type = 'vacuum')
univ = openmc.Sphere(r = 7, boundary_type = 'vacuum')
ge_detector = -cil1 & +plano1 & -plano2
espacio_vacio = +cil1 & -plano1 & +plano2 & -cil2 & -plano4 & +plano3
capa_aluminio = +cil2 & -cil3 & -plano4 & +plano3
pantalla = +plano4 & -cil3 & -plano5
#box = +left & -right & +bot & -top & +cil3 & +plano5 & -plano3
#box1 = box
univ1 = -univ & +cil3 & +plano5 & -plano3
cell_box = openmc.Cell()
cell_box.region = univ1
cell_detector = openmc.Cell()
cell_detector.region = ge_detector
cell_detector.fill = mat
cell_vacio = openmc.Cell()
cell_vacio.region = espacio_vacio
cell_al = openmc.Cell()
cell_al.region = capa_aluminio
cell_al.fill = mat2
cell_pantalla = openmc.Cell()
cell_pantalla.region = pantalla
cell_pantalla.fill = mat3
universe = openmc.Universe(cells = [cell_box,cell_detector,cell_vacio,cell_al,cell_pantalla])
universe.plot(width = (15.0,15.0),basis='xz',colors = {cell_box: 'fuchsia'})
geometry = openmc.Geometry(universe)
geometry.export_to_xml()
source = openmc.Source()
source.particle = 'photon'
source.space = openmc.stats.Point((0,0,6.05))
source.angle = openmc.stats.Isotropic()
source.energy = openmc.stats.Discrete([1000e3],[1.0])
settings = openmc.Settings()
settings.run_mode = 'fixed source'
settings.source = source
settings.batches = 100
settings.inactive = 5
settings.particles = 1000
settings.export_to_xml()
tally_flujo = openmc.Tally(name = "espectro")
tally_flujo.scores = ['flux']
filtro_celda = openmc.filter.CellFilter(cell_detector.id)
tally_flujo.filters = [filtro_celda]
tallies = openmc.Tallies([tally_flujo])
tallies.export_to_xml()
The source is supposed to be on top of the screen cell (cell_pantalla) but I put it in the middle to avoid getting the first error I mentioned in this post.