mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Updating source definitions in examples (#2571)
This commit is contained in:
parent
93a0855c7f
commit
8cc1c33463
10 changed files with 10 additions and 10 deletions
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
||||
###############################################################################
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue