Dear Discourse Group,
I am attempting to generate a fixed source simulation. It is a cube of non-fissile shielding material. I want to have one of the surfaces to act as a mono-energetic (1MeV) isotropic surface source normal to the surface of a fixed intensity. I then want to tally the flux and capture rates in bins at varying distance form the surface source surface. I was wondering if OpenMC has the functionality to perform such a calculation and how I would go about defining such a source. Any help would be greatly appreciated.
Kind Regards,
Jimmy
Hi @jimmyvdw very doable yes, so you want a source of plane parallel neutrons leaving the plane of one of the faces of the cube so, assuming for example that you want the plane of your source to be in the x-y plane, with neutrons travelling in the +z direction then using the python interface you would need something like this
# mono energetic
energy_distribution = openmc.stats.Discrete(x=[1.0e6], p=[1.0])
# uniform in x and y
x_dist = openmc.stats.Uniform(-10,10)
y_dist = openmc.stats.Uniform(-10,10)
# note a little offset from z=-10 to avoid particles starting on the surface
z_dist = openmc.stats.Discrete(x=[-10 + 1e-7], p=[1.0])
spatial_distribution = openmc.stats.CartesianIndependent(x=x_dist, y=y_dist, z=d_dist)
# particles travelling along +z
direction_distribution = openmc.stats.Monodirectional(reference_uvw = [0.0, 0.0, 1.0])
neutron_source = openmc.IndependentSource(
energy=energy_distribution,
spatial=spatial_distribution,
direction = direction_distribution)
# Add fixed source and ray sampling source to settings file
settings.source = [neutron_source]
I’ve not tested it, but this should get you going in the right direction
Hey,
That approach looks more sensible compared to what I was currently doing (see below). Thank you.
Jimmy
source_1 = openmc.Source()
source_1.space = openmc.stats.Box((-10.0, -10.0, -10.1), (10.0, 10.0, -10.0))
source_1.angle = openmc.stats.Monodirectional([0.0, 0.0, 1.0])
source_1.energy = openmc.stats.Discrete([1000000.0], [1.0])
source_1.strength = 1e15
source_1.particle = ‘neutron’