mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 13:15:39 -04:00
squashed distribcells commits and merged to develop
This commit is contained in:
parent
3b277799ce
commit
bd87f77325
38 changed files with 1872 additions and 186 deletions
|
|
@ -156,3 +156,18 @@ plot_file = openmc.PlotsFile()
|
|||
plot_file.add_plot(plot_xy)
|
||||
plot_file.add_plot(plot_yz)
|
||||
plot_file.export_to_xml()
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Exporting to OpenMC tallies.xml File
|
||||
###############################################################################
|
||||
|
||||
# Instantiate a distribcell Tally
|
||||
tally = openmc.Tally(tally_id=1)
|
||||
tally.add_filter(openmc.Filter(type='distribcell', bins=[cell2.id]))
|
||||
tally.add_score('total')
|
||||
|
||||
# Instantiate a TalliesFile, register Tally/Mesh, and export to XML
|
||||
tallies_file = openmc.TalliesFile()
|
||||
tallies_file.add_tally(tally)
|
||||
tallies_file.export_to_xml()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue