Hi All,
I’m quite new to OpenMC and I’m attempting to replicate an experiment I have carried out in OpenMC. The experiment is an AmBe neutron source in middle-bottom of a large graphite stack.
import openmc
# create graphite - 100% carbon, density 2.26g/cm^3
graphite = openmc.Material()
graphite.add_element('C', 1.0)
graphite.set_density('g/cm3', 2.26)
materials = openmc.Materials([graphite])
# cuboid - simple graphite cube for now
graphite_surface = openmc.model.RectangularParallelepiped(-70.0, 70.0, -70.0, 70.0, 0, 210.0, boundary_type='vacuum')
graphite_cell = openmc.Cell(fill=graphite, region=-graphite_surface)
# universe with graphite cell - i think this is right
root_universe = openmc.Universe(cells=[graphite_cell])
# geometry - i think this is right
geometry = openmc.Geometry(root_universe)
#source (AmBe) - confident on this part
source = openmc.IndependentSource()
source.space = openmc.stats.Point((0,0,10))
source.angle = openmc.stats.Isotropic()
source.energy = openmc.stats.Discrete([4.2e6], [1]) #average energy of neutrons from AmBe source is 4.2MeV, want to have a spectrum eventually
# settings - this works but not sure if its ideal
settings = openmc.Settings()
settings.source = source
settings.particles = 2500
settings.batches = 20
settings.inactive = 5
settings.output= {'tallies': True}
# figure out how to tally neutrons?
# export to xml
geometry.export_to_xml()
materials.export_to_xml()
settings.export_to_xml()
# run - is this what i want or do I want something else if i'm just trying to get neutron flux/counts
openmc.run()
Above is what I’ve made so far but not sure how to progress to what I want to get which is ideally a flux measurement throughout the graphite cube
Thanks,
Nooradin