Skip to content

Commit

Permalink
reset tally between simulations
Browse files Browse the repository at this point in the history
  • Loading branch information
shimwell committed Jan 18, 2024
1 parent f774625 commit 8d674c9
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,18 @@
print('tally result {tally.mean} with std. dev. {tally.std_dev}')

results=[]
enrichments = [0.07, 0.25, 0.50, 0.75, 0.99]
enrichments = [0.0001, 0.25, 0.50, 0.75, 0.9999]
# now we will run the simulation 5 times
for enrichment in enrichments: # percentage enrichment from 0% Li6 to 100% Li6

# resets the tally to 0 so we don't combine result with previous simulation
openmc.lib.hard_reset()

# we modify the python material object here,
# this helps get the new densities when updating the openmc.lib material
breeder_material.remove_element('Li')
breeder_material.add_nuclide('Li6', enrichment)
breeder_material.add_nuclide('Li7', 1.-enrichment)
breeder_material.add_nuclide('Li6', 15.8 * enrichment)
breeder_material.add_nuclide('Li7', 15.8 * (1.-enrichment))

# get the breeder material nuclides and densities in atom/b-cm
new_composition = breeder_material.get_nuclide_atom_densities()
Expand Down

0 comments on commit 8d674c9

Please sign in to comment.