You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the code is ease enough if this is useful we can add an example
# coupled photon transport can be enabled for a neutron transport# with the settings.photon_transport = True# that is fairly standard and we need to enable photon production and transport# for tallies like heat, dose and it is important to transport the photon# as it will not deposit its energy locally.# Charged particles will deposit their energy locally so they don't need to be transported# However this example is somewhat different# This examples shows that a 4MeV photon source creates neutrons# We do this by creating a photon source and tallying neutron flux# You could try changing the material to a lower Z atom like Be or Li and the# flux should go up partly because these shield photons to a lesser extent.importopenmc# MATERIALSmaterial=openmc.Material()
material.add_element('Fe', 1)
material.set_density('g/cm3', 7)
my_materials=openmc.Materials([material])
# GEOMETRY# surfacesvessel_inner=openmc.Sphere(r=500, boundary_type='vacuum')
# cellsinner_vessel_region=-vessel_innerinner_vessel_cell=openmc.Cell(region=inner_vessel_region)
inner_vessel_cell.fill=materialmy_geometry=openmc.Geometry([inner_vessel_cell])
# SIMULATION SETTINGS# Instantiate a Settings objectmy_settings=openmc.Settings()
my_settings.batches=10my_settings.inactive=0my_settings.particles=500my_settings.run_mode='fixed source'# Create a photon point sourcemy_source=openmc.Source()
my_source.space=openmc.stats.Point((0, 0, 0))
my_source.angle=openmc.stats.Isotropic()
my_source.particle='photon'# default would otherwise be neutronmy_source.energy=openmc.stats.Discrete([4e6], [1])
my_settings.source=my_source# added a cell tally for neutron flux productioncell_filter=openmc.CellFilter(inner_vessel_cell)
flux_tally=openmc.Tally(name='flux')
flux_tally.filters= [cell_filter]
flux_tally.scores= ['flux']
my_tallies=openmc.Tallies([flux_tally])
# Run OpenMC!model=openmc.model.Model(my_geometry, my_materials, my_settings, my_tallies)
sp_filename=model.run()
# open the results filesp=openmc.StatePoint(sp_filename)
# access the tally using pandas dataframesflux_tally=sp.get_tally(name='flux')
# printing the tally shows that we get a neutron flux as the tally is not 0print(flux_tally.mean, flux_tally.std_dev)
# printed results are ...# >>> [[[14.42136056]]] [[[0.14143424]]]
The text was updated successfully, but these errors were encountered:
Not certain but i think this should give a zero value, the photonuclear cross section threshold for Iron is above 10 MeV,
Lead or Be are typical low threshold materials for photonuclear reactions.
does the tally need a particle filter?
the code is ease enough if this is useful we can add an example
The text was updated successfully, but these errors were encountered: