Updating source definitions in examples (#2571)

This commit is contained in:
Patrick Shriwise 2023-06-22 21:36:33 -05:00 committed by GitHub
parent 93a0855c7f
commit 8cc1c33463
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 10 additions and 10 deletions

View file

@ -18,7 +18,7 @@ settings = openmc.Settings()
settings.run_mode = 'fixed source'
settings.batches = 10
settings.particles = 1000
source = openmc.IndependentSource()
source = openmc.CompiledSource()
source.library = 'build/libsource.so'
settings.source = source
settings.export_to_xml()

View file

@ -115,7 +115,7 @@ settings_file.particles = particles
# Create an initial uniform spatial source distribution over fissionable zones
bounds = [-1, -1, -1, 1, 1, 1]
uniform_dist = openmc.stats.Box(bounds[:3], bounds[3:], only_fissionable=True)
settings_file.source = openmc.source.Source(space=uniform_dist)
settings_file.source = openmc.IndependentSource(space=uniform_dist)
settings_file.keff_trigger = {'type' : 'std_dev', 'threshold' : 5E-4}
settings_file.trigger_active = True

View file

@ -125,7 +125,7 @@ settings_file.particles = particles
# Create an initial uniform spatial source distribution over fissionable zones
bounds = [-1, -1, -1, 1, 1, 1]
uniform_dist = openmc.stats.Box(bounds[:3], bounds[3:], only_fissionable=True)
settings_file.source = openmc.source.Source(space=uniform_dist)
settings_file.source = openmc.IndependentSource(space=uniform_dist)
settings_file.export_to_xml()

View file

@ -116,7 +116,7 @@ settings_file.particles = particles
# Create an initial uniform spatial source distribution over fissionable zones
bounds = [-1, -1, -1, 1, 1, 1]
uniform_dist = openmc.stats.Box(bounds[:3], bounds[3:], only_fissionable=True)
settings_file.source = openmc.source.Source(space=uniform_dist)
settings_file.source = openmc.IndependentSource(space=uniform_dist)
settings_file.trigger_active = True
settings_file.trigger_max_batches = 100

View file

@ -18,7 +18,7 @@ settings = openmc.Settings()
settings.run_mode = 'fixed source'
settings.batches = 10
settings.particles = 1000
source = openmc.IndependentSource()
source = openmc.CompiledSource()
source.library = 'build/libparameterized_source.so'
source.parameters = 'radius=3.0, energy=14.08e6'
settings.source = source

View file

@ -68,7 +68,7 @@ settings.particles = 1000
lower_left = (-pitch/2, -pitch/2, -1)
upper_right = (pitch/2, pitch/2, 1)
uniform_dist = openmc.stats.Box(lower_left, upper_right, only_fissionable=True)
settings.source = openmc.source.Source(space=uniform_dist)
settings.source = openmc.IndependentSource(space=uniform_dist)
# For source convergence checks, add a mesh that can be used to calculate the
# Shannon entropy

View file

@ -27,7 +27,7 @@ settings.particles = 10000
# Create an initial uniform spatial source distribution over fissionable zones
bounds = [-0.62992, -0.62992, -1, 0.62992, 0.62992, 1]
uniform_dist = openmc.stats.Box(bounds[:3], bounds[3:], only_fissionable=True)
settings.source = openmc.source.Source(space=uniform_dist)
settings.source = openmc.IndependentSource(space=uniform_dist)
entropy_mesh = openmc.RegularMesh()
entropy_mesh.lower_left = [-0.39218, -0.39218, -1.e50]

View file

@ -72,7 +72,7 @@ settings.particles = 1000
# Create an initial uniform spatial source distribution over fissionable zones
bounds = [-0.62992, -0.62992, -1, 0.62992, 0.62992, 1]
uniform_dist = openmc.stats.Box(bounds[:3], bounds[3:], only_fissionable=True)
settings.source = openmc.source.Source(space=uniform_dist)
settings.source = openmc.IndependentSource(space=uniform_dist)
entropy_mesh = openmc.RegularMesh()
entropy_mesh.lower_left = [-0.39218, -0.39218, -1.e50]

View file

@ -114,7 +114,7 @@ settings.particles = 1000
lower_left = (-pitch/2, -pitch/2, -1)
upper_right = (pitch/2, pitch/2, 1)
uniform_dist = openmc.stats.Box(lower_left, upper_right, only_fissionable=True)
settings.source = openmc.source.Source(space=uniform_dist)
settings.source = openmc.IndependentSource(space=uniform_dist)
settings.export_to_xml()
###############################################################################

View file

@ -62,7 +62,7 @@ def model():
# 10 keV neutron point source at the origin
space = openmc.stats.Point()
energy = openmc.stats.Discrete(x=[1e4], p=[1.0])
settings.source = openmc.Source(space=space, energy=energy)
settings.source = openmc.IndependentSource(space=space, energy=energy)
return openmc.Model(geometry=geometry, settings=settings)