Example #1
0
#                   Exporting to OpenMC plots.xml File
###############################################################################

plot_1 = openmc.Plot(plot_id=1)
plot_1.filename = 'plot_1'
plot_1.origin = [0.0, 0.0, 0.0]
plot_1.width = [64.26, 64.26]
plot_1.pixels = [500, 500]
plot_1.color = 'mat'
plot_1.basis = 'xy'

plot_2 = openmc.Plot(plot_id=2)
plot_2.filename = 'plot_2'
plot_2.origin = [0.0, 21.42, 0.0]
plot_2.width = [64.26, 64.26]
plot_2.pixels = [500, 500]
plot_2.color = 'mat'
plot_2.basis = 'xz'

# Instantiate a Plots collection and export to XML
plot_file = openmc.Plots([plot_1, plot_2])
plot_file.export_to_xml()

###############################################################################
#                   Exporting to OpenMC tallies.xml File
###############################################################################

# Instantiate a Tallies and export to XML
tallies_file = openmc.Tallies(tallies.values())
tallies_file.export_to_xml()
Example #2
0
    [-32.13, -10.71, -1.0], [10.71, 32.13, 1.0], only_fissionable=True))
settings_file.entropy_lower_left = [-32.13, -32.13, -1.E50]
settings_file.entropy_upper_right = [32.13, 32.13, 1.E50]
settings_file.entropy_dimension = [51, 51, 1]
settings_file.export_to_xml()


###############################################################################
#                   Exporting to OpenMC plots.xml File
###############################################################################

plot_1 = openmc.Plot(plot_id=1)
plot_1.filename = 'plot_1'
plot_1.origin = [0.0, 0.0, 0.0]
plot_1.width = [64.26, 64.26]
plot_1.pixels = [500, 500]
plot_1.color = 'mat'
plot_1.basis = 'xy'

# Instantiate a Plots collection and export to XML
plot_file = openmc.Plots([plot_1])
plot_file.export_to_xml()

###############################################################################
#                   Exporting to OpenMC tallies.xml File
###############################################################################

# Instantiate a Tallies, register Tally/Mesh, and export to XML
tallies_file = openmc.Tallies(tallies.values())
tallies_file.export_to_xml()