Compare commits

..

24 commits

Author SHA1 Message Date
Paul Romano
db5c6bfaf8 Fix sourcepoint write in core scripts 2022-06-08 14:26:56 -05:00
Paul Romano
b47c173471 Fix --no-multipole argument for build-assembly.py 2022-06-08 12:44:21 -05:00
Paul Romano
057e6910d9
Merge pull request #18 from mit-crpg/assembly-update
Fix the build-assembly.py script
2022-06-08 11:25:18 -05:00
Paul Romano
ca7d63327f Add a --clone argument for build-assembly.py 2022-06-08 11:23:52 -05:00
Paul Romano
7805e62674 Fix assembly assignment in build-assembly.py 2022-06-08 11:23:49 -05:00
Paul Romano
30dfc4395e
Merge pull request #17 from mit-crpg/cleanup
Small cleanup
2022-06-06 22:09:05 -05:00
Paul Romano
3bdd23096a Put clone function in smr/materials.py 2022-06-06 22:07:36 -05:00
Paul Romano
f62a9c610f Add markdown description of milestone models 2022-06-06 22:01:59 -05:00
Paul Romano
c7b89db265
Merge pull request #16 from mit-crpg/fullcore-long
Add scripts for core models used in AD-SE-08-73 milestone
2022-06-06 21:53:22 -05:00
Paul Romano
9c4c8c87fb Only modify lattice_pitch in build-core-short/long.py scripts 2022-06-06 21:39:28 -05:00
Paul Romano
30355e218c Add script for building full length core model 2022-06-06 17:12:37 -05:00
Paul Romano
2a8764b04f Change enrichment pattern to flatten power distribution 2022-06-06 17:12:37 -05:00
Paul Romano
c9554e003a Fix volume assignment to clad/gap, use proper assemblies 2022-06-06 17:12:37 -05:00
Paul Romano
1713a4df1b Fix volumes in fullcore short model 2022-06-06 17:12:37 -05:00
Paul Romano
6abc157770 Add script for building short full core, manually change lattice_pitch 2022-06-06 17:12:37 -05:00
Paul Romano
0b3546f23a Remove assemblies with burnable absorber pins 2022-06-06 17:11:40 -05:00
Paul Romano
c375e6d9cc
Merge pull request #15 from mit-crpg/whitespace
Whitespace improvements
2022-06-06 17:11:09 -05:00
Paul Romano
f9624e3e2c Remove unnecessary import in surfaces.py 2022-06-06 17:10:03 -05:00
Paul Romano
4ad8676efc Only whitespace changes 2022-06-06 17:09:55 -05:00
Paul Romano
631fefebb8
Merge pull request #14 from mit-crpg/optional-differentiation
Make differentiation of materials optional for assembly-long and core-fresh
2022-06-06 16:59:53 -05:00
Paul Romano
1718798735 Make differentiation of materials optional for assembly-long and core-fresh 2022-06-06 16:49:18 -05:00
Paul Romano
2b8e9e9f5d Remove tallies, don't clone materials unless needed 2022-06-06 13:34:02 -05:00
Paul Romano
e53ffa6ece
Merge pull request #13 from mit-crpg/ecp-assembly-long
Add script for assembly model used in AD-SE-08-61 milestone
2022-06-06 13:21:41 -05:00
Paul Romano
b5b6f4611a Make sure model build doesn't fail if rings == 1 2022-06-06 13:03:35 -05:00
11 changed files with 138 additions and 93 deletions

View file

@ -1,7 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import argparse import argparse
import copy
from math import pi, isclose from math import pi, isclose
from pathlib import Path from pathlib import Path
@ -9,10 +8,9 @@ import numpy as np
from tqdm import tqdm from tqdm import tqdm
import openmc import openmc
from smr.materials import materials, mats from smr.materials import materials, clone
from smr.surfaces import surfs, lattice_pitch, pin_pitch, bottom_fuel_stack, \ from smr.surfaces import surfs, lattice_pitch, pin_pitch, bottom_fuel_stack, \
top_active_core, pellet_OR, clad_OR, clad_IR, guide_tube_IR, guide_tube_OR, \ top_active_core, pellet_OR, active_fuel_length
active_fuel_length
from smr.pins import pin_universes, make_stack from smr.pins import pin_universes, make_stack
@ -20,14 +18,18 @@ from smr.pins import pin_universes, make_stack
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('--multipole', action='store_true', parser.add_argument('--multipole', action='store_true',
help='Use multipole cross sections') help='Use multipole cross sections')
parser.add_argument('--no-multipole', action='store_false', parser.add_argument('--no-multipole', dest='multipole', action='store_false',
help='Do not use multipole cross sections') help='Do not use multipole cross sections')
parser.add_argument('--clone', action='store_true',
help='Clone materials for each cell instance')
parser.add_argument('--no-clone', dest='clone', action='store_false',
help='Do not clone materials for each cell instance')
parser.add_argument('-a', '--axial', type=int, default=100, parser.add_argument('-a', '--axial', type=int, default=100,
help='Number of axial subdivisions in fuel') help='Number of axial subdivisions in fuel')
parser.add_argument('-d', '--depleted', action='store_true', parser.add_argument('-d', '--depleted', action='store_true',
help='Whether UO2 compositions should represent depleted fuel') help='Whether UO2 compositions should represent depleted fuel')
parser.add_argument('-o', '--output-dir', type=Path, default=None) parser.add_argument('-o', '--output-dir', type=Path, default=None)
parser.set_defaults(multipole=True) parser.set_defaults(clone=False, multipole=True)
args = parser.parse_args() args = parser.parse_args()
# Make directory for inputs # Make directory for inputs
@ -101,11 +103,22 @@ h = active_fuel_length / args.axial
fuel_mats = {} fuel_mats = {}
# Count the number of instances for each cell and material
if args.clone:
geometry.determine_paths(instances_only=True)
for cell in tqdm(geometry.get_all_material_cells().values(), for cell in tqdm(geometry.get_all_material_cells().values(),
desc='Assigning volume'): desc='Differentiating materials / assigning volume'):
if cell.fill in materials: if cell.fill in materials:
# Determine if this material is fuel
is_fuel = 'UO2 Fuel' in cell.fill.name
# Fill cell with list of "differentiated" materials if requested
if args.clone:
cell.fill = [clone(cell.fill) for i in range(cell.num_instances)]
# Determine volume of each fuel material # Determine volume of each fuel material
if 'UO2 Fuel' in cell.fill.name: if is_fuel:
upper_right = cell.region.bounding_box[1] upper_right = cell.region.bounding_box[1]
if isclose(upper_right[0], rings[0]): if isclose(upper_right[0], rings[0]):
ri, ro = 0.0, rings[0] ri, ro = 0.0, rings[0]
@ -113,14 +126,25 @@ for cell in tqdm(geometry.get_all_material_cells().values(),
ri, ro = rings[0], rings[1] ri, ro = rings[0], rings[1]
else: else:
ri, ro = rings[1], pellet_OR ri, ro = rings[1], pellet_OR
if ri not in fuel_mats:
cell.fill = cell.fill.clone() if args.clone:
cell.fill.volume = pi * (ro*ro - ri*ri) * h for mat in cell.fill:
fuel_mats[ri] = cell.fill mat.volume = pi * (ro*ro - ri*ri) * h
else: else:
cell.fill = fuel_mats[ri] # In non-clone mode, we still need to create a copy of the
# material for each ring since they get different volumes
if ri not in fuel_mats:
cell.fill = cell.fill.clone()
cell.fill.volume = pi * (ro*ro - ri*ri) * h
fuel_mats[ri] = cell.fill
else:
cell.fill = fuel_mats[ri]
else: else:
cell.fill.volume = 1.0 if args.clone:
for mat in cell.fill:
mat.volume = 1.0
else:
cell.fill.volume = 1.0
#### Create OpenMC "materials.xml" file #### Create OpenMC "materials.xml" file
print('Getting materials...') print('Getting materials...')
@ -150,14 +174,13 @@ settings.particles = 10000
settings.output = {'tallies': False, 'summary': False} settings.output = {'tallies': False, 'summary': False}
settings.source = source settings.source = source
settings.sourcepoint = {'write': False} settings.sourcepoint = {'write': False}
settings.temperature = {
if args.multipole: 'default': 531.5,
settings.temperature = { 'method': 'interpolation',
'multipole': True,
'tolerance': 1000,
'default': 531.5,
'method': 'interpolation',
'range': (500.0, 1300.0) 'range': (500.0, 1300.0)
} }
if args.multipole:
settings.temperature['multipole'] = True
settings.temperature['tolerance'] = 1000
settings.export_to_xml(str(directory / 'settings.xml')) settings.export_to_xml(str(directory / 'settings.xml'))

View file

@ -1,7 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import argparse import argparse
import copy
from math import pi, isclose from math import pi, isclose
from pathlib import Path from pathlib import Path
@ -9,7 +8,7 @@ import numpy as np
from tqdm import tqdm from tqdm import tqdm
import openmc import openmc
from smr.materials import materials, mats from smr.materials import materials, clone
from smr.surfaces import surfs, lattice_pitch, pin_pitch, bottom_fuel_stack, \ from smr.surfaces import surfs, lattice_pitch, pin_pitch, bottom_fuel_stack, \
top_active_core, pellet_OR, clad_OR, clad_IR, guide_tube_IR, guide_tube_OR top_active_core, pellet_OR, clad_OR, clad_IR, guide_tube_IR, guide_tube_OR
from smr.pins import pin_universes from smr.pins import pin_universes
@ -85,14 +84,6 @@ for halfspace in surfs['lat grid box inner']:
# Define geometry with a single assembly # Define geometry with a single assembly
geometry = openmc.Geometry(root_universe) geometry = openmc.Geometry(root_universe)
def clone(material):
"""Perform copy of material but share nuclide densities"""
shared_mat = copy.copy(material)
shared_mat.id = None
return shared_mat
#### "Differentiate" the geometry if using distribmats #### "Differentiate" the geometry if using distribmats
h = 10.0*pin_pitch / args.axial h = 10.0*pin_pitch / args.axial
if args.tallies == 'mat': if args.tallies == 'mat':

View file

@ -1,17 +1,15 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import argparse import argparse
import copy
from pathlib import Path from pathlib import Path
import numpy as np import numpy as np
from tqdm import tqdm from tqdm import tqdm
import openmc import openmc
from smr.materials import materials from smr.materials import materials, clone
from smr.surfaces import surfs, lattice_pitch, bottom_fuel_stack, top_active_core, pellet_OR from smr.surfaces import surfs, lattice_pitch, bottom_fuel_stack, top_active_core, pellet_OR
from smr.assemblies import assembly_universes from smr.assemblies import assembly_universes
from smr.plots import assembly_plots
from smr import inlet_temperature from smr import inlet_temperature
@ -19,8 +17,12 @@ from smr import inlet_temperature
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('--multipole', action='store_true', parser.add_argument('--multipole', action='store_true',
help='Use multipole cross sections') help='Use multipole cross sections')
parser.add_argument('--no-multipole', action='store_false', parser.add_argument('--no-multipole', dest='multipole', action='store_false',
help='Do not use multipole cross sections') help='Do not use multipole cross sections')
parser.add_argument('--clone', action='store_true',
help='Clone materials for each cell instance')
parser.add_argument('--no-clone', dest='clone', action='store_false',
help='Do not clone materials for each cell instance')
parser.add_argument('-t', '--tallies', choices=('cell', 'mat'), default='mat', parser.add_argument('-t', '--tallies', choices=('cell', 'mat'), default='mat',
help='Whether to use distribmats or distribcells for tallies') help='Whether to use distribmats or distribcells for tallies')
parser.add_argument('-r', '--rings', type=int, default=10, parser.add_argument('-r', '--rings', type=int, default=10,
@ -30,7 +32,7 @@ parser.add_argument('-a', '--axial', type=int, default=196,
parser.add_argument('-d', '--depleted', action='store_true', parser.add_argument('-d', '--depleted', action='store_true',
help='Whether UO2 compositions should represent depleted fuel') help='Whether UO2 compositions should represent depleted fuel')
parser.add_argument('-o', '--output-dir', type=Path, default=None) parser.add_argument('-o', '--output-dir', type=Path, default=None)
parser.set_defaults(multipole=True) parser.set_defaults(clone=False, multipole=True)
args = parser.parse_args() args = parser.parse_args()
# Make directory for inputs # Make directory for inputs
@ -49,25 +51,17 @@ if args.rings > 1:
else: else:
ring_radii = None ring_radii = None
assembly = assembly_universes(ring_radii, args.axial, args.depleted) assembly = assembly_universes(ring_radii, args.axial, args.depleted)
lattice_sides = openmc.model.get_rectangular_prism(lattice_pitch, lattice_pitch, lattice_sides = openmc.model.rectangular_prism(lattice_pitch, lattice_pitch,
boundary_type='reflective') boundary_type='reflective')
main_cell = openmc.Cell( main_cell = openmc.Cell(
fill=assembly['Assembly (3.1%) 16BA'], fill=assembly['Assembly (3.1%)'],
region=lattice_sides & +surfs['lower bound'] & -surfs['upper bound'] region=lattice_sides & +surfs['lower bound'] & -surfs['upper bound']
) )
root_univ = openmc.Universe(cells=[main_cell]) root_univ = openmc.Universe(cells=[main_cell])
geometry = openmc.Geometry(root_univ) geometry = openmc.Geometry(root_univ)
def clone(material):
"""Perform copy of material but share nuclide densities"""
shared_mat = copy.copy(material)
shared_mat.id = None
return shared_mat
#### "Differentiate" the geometry if using distribmats #### "Differentiate" the geometry if using distribmats
if args.tallies == 'mat': if args.clone:
# Count the number of instances for each cell and material # Count the number of instances for each cell and material
geometry.determine_paths(instances_only=True) geometry.determine_paths(instances_only=True)
@ -107,7 +101,7 @@ settings.inactive = 100
settings.particles = 10000 settings.particles = 10000
settings.output = {'tallies': False, 'summary': False} settings.output = {'tallies': False, 'summary': False}
settings.source = source settings.source = source
settings.sourcepoint_write = False settings.sourcepoint = {'write': False}
settings.temperature = { settings.temperature = {
'default': inlet_temperature, 'default': inlet_temperature,
'method': 'interpolation', 'method': 'interpolation',
@ -149,7 +143,3 @@ elif args.tallies == 'mat':
tallies.append(tally) tallies.append(tally)
tallies.export_to_xml(str(directory / 'tallies.xml')) tallies.export_to_xml(str(directory / 'tallies.xml'))
# Create plots
plots = assembly_plots(main_cell.fill)
plots.export_to_xml(str(directory / 'plots.xml'))

View file

@ -1,17 +1,14 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import os
import shutil
import copy
import argparse import argparse
from math import pi from math import pi
from pathlib import Path from pathlib import Path
import numpy as np import numpy as np
import openmc import openmc
from smr.materials import materials from tqdm import tqdm
from smr.plots import core_plots
from smr.materials import materials, clone
from smr.surfaces import lattice_pitch, bottom_fuel_stack, top_active_core, \ from smr.surfaces import lattice_pitch, bottom_fuel_stack, top_active_core, \
pellet_OR, active_fuel_length pellet_OR, active_fuel_length
from smr.core import core_geometry from smr.core import core_geometry
@ -22,8 +19,12 @@ from smr import inlet_temperature
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('--multipole', action='store_true', parser.add_argument('--multipole', action='store_true',
help='Use multipole cross sections') help='Use multipole cross sections')
parser.add_argument('--no-multipole', action='store_false', parser.add_argument('--no-multipole', dest='multipole', action='store_false',
help='Do not use multipole cross sections') help='Do not use multipole cross sections')
parser.add_argument('--clone', action='store_true',
help='Clone materials for each cell instance')
parser.add_argument('--no-clone', dest='clone', action='store_false',
help='Do not clone materials for each cell instance')
parser.add_argument('-r', '--rings', type=int, default=10, parser.add_argument('-r', '--rings', type=int, default=10,
help='Number of annular regions in fuel') help='Number of annular regions in fuel')
parser.add_argument('-a', '--axial', type=int, default=196, parser.add_argument('-a', '--axial', type=int, default=196,
@ -31,7 +32,7 @@ parser.add_argument('-a', '--axial', type=int, default=196,
parser.add_argument('-d', '--depleted', action='store_true', parser.add_argument('-d', '--depleted', action='store_true',
help='Whether UO2 compositions should represent depleted fuel') help='Whether UO2 compositions should represent depleted fuel')
parser.add_argument('-o', '--output-dir', type=Path, default=None) parser.add_argument('-o', '--output-dir', type=Path, default=None)
parser.set_defaults(multipole=True) parser.set_defaults(clone=False, multipole=True)
args = parser.parse_args() args = parser.parse_args()
# Make directory for inputs # Make directory for inputs
@ -53,22 +54,36 @@ geometry = core_geometry(ring_radii, args.axial, args.depleted)
h = active_fuel_length / args.axial h = active_fuel_length / args.axial
fuel_mats = {} fuel_mats = {}
# Count the number of instances for each cell and material
if args.clone:
geometry.determine_paths(instances_only=True)
fuel_volume = pi * pellet_OR**2 * h / args.rings fuel_volume = pi * pellet_OR**2 * h / args.rings
for cell in geometry.get_all_cells().values(): for cell in tqdm(geometry.get_all_cells().values(),
desc='Differentiating materials / assigning volume'):
if cell.fill in materials: if cell.fill in materials:
# Determine if this material is fuel
name = cell.fill.name
is_fuel = 'UO2 Fuel' in name
# Determine volume of each fuel material # Determine volume of each fuel material
if 'UO2 Fuel' in cell.fill.name: if is_fuel:
r_o = cell.region.bounding_box[1][0] if args.clone:
if r_o not in fuel_mats: # Fill cell with list of "differentiated" materials if requested
cell.fill = cell.fill.clone() cell.fill = [clone(cell.fill) for i in range(cell.num_instances)]
cell.fill.volume = fuel_volume for mat in cell.fill:
fuel_mats[r_o] = cell.fill mat.volume = fuel_volume
else: else:
cell.fill = fuel_mats[r_o] r_o = cell.region.bounding_box[1][0]
if (name, r_o) not in fuel_mats:
cell.fill = cell.fill.clone()
cell.fill.volume = fuel_volume
fuel_mats[name, r_o] = cell.fill
else:
cell.fill = fuel_mats[name, r_o]
else: else:
cell.fill.volume = 1.0 cell.fill.volume = 1.0
#### Create OpenMC "materials.xml" file #### Create OpenMC "materials.xml" file
all_materials = geometry.get_all_materials() all_materials = geometry.get_all_materials()
materials = openmc.Materials(all_materials.values()) materials = openmc.Materials(all_materials.values())
@ -93,8 +108,7 @@ settings.inactive = 100
settings.particles = 10000 settings.particles = 10000
settings.output = {'tallies': False, 'summary': False} settings.output = {'tallies': False, 'summary': False}
settings.source = source settings.source = source
settings.sourcepoint_write = False settings.sourcepoint = {'write': False}
settings.temperature = { settings.temperature = {
'default': inlet_temperature, 'default': inlet_temperature,
'method': 'interpolation', 'method': 'interpolation',
@ -105,4 +119,3 @@ if args.multipole:
settings.temperature['tolerance'] = 1000 settings.temperature['tolerance'] = 1000
settings.export_to_xml(str(directory / 'settings.xml')) settings.export_to_xml(str(directory / 'settings.xml'))

View file

@ -6,17 +6,17 @@ from pathlib import Path
import openmc import openmc
from smr.materials import materials from smr.materials import materials
from smr.surfaces import lattice_pitch, bottom_fuel_stack, top_active_core, \ from smr.surfaces import bottom_fuel_stack, top_active_core, \
pellet_OR, pin_pitch, clad_IR, clad_OR, active_fuel_length pellet_OR, pin_pitch, clad_IR, clad_OR, active_fuel_length
from smr.core import core_geometry from smr.core import core_geometry
from smr import inlet_temperature from smr import inlet_temperature
import smr.surfaces
# Define command-line options # Define command-line options
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('--multipole', action='store_true', parser.add_argument('--multipole', action='store_true',
help='Use multipole cross sections') help='Use multipole cross sections')
parser.add_argument('--no-multipole', action='store_false', parser.add_argument('--no-multipole', dest='multipole', action='store_false',
help='Do not use multipole cross sections') help='Do not use multipole cross sections')
parser.add_argument('-a', '--axial', type=int, default=100, parser.add_argument('-a', '--axial', type=int, default=100,
help='Number of axial subdivisions in fuel') help='Number of axial subdivisions in fuel')
@ -36,6 +36,9 @@ else:
directory = args.output_dir directory = args.output_dir
directory.mkdir(exist_ok=True) directory.mkdir(exist_ok=True)
# Modify lattice pitch
smr.surfaces.lattice_pitch = lattice_pitch = 17*smr.surfaces.pin_pitch
ring_radii = [0.1*pin_pitch, 0.2*pin_pitch] ring_radii = [0.1*pin_pitch, 0.2*pin_pitch]
geometry = core_geometry(ring_radii, args.axial, args.depleted) geometry = core_geometry(ring_radii, args.axial, args.depleted)
@ -93,8 +96,7 @@ settings.inactive = 100
settings.particles = 20_000_000 settings.particles = 20_000_000
settings.output = {'tallies': False, 'summary': False} settings.output = {'tallies': False, 'summary': False}
settings.source = source settings.source = source
settings.sourcepoint_write = False settings.sourcepoint = {'write': False}
settings.temperature = { settings.temperature = {
'default': inlet_temperature, 'default': inlet_temperature,
'method': 'interpolation', 'method': 'interpolation',

View file

@ -1,25 +1,18 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import os
import shutil
import copy
import argparse import argparse
from math import pi, isclose from math import pi, isclose
from pathlib import Path from pathlib import Path
import numpy as np
import openmc import openmc
from smr.materials import materials from smr.materials import materials
from smr.plots import core_plots from smr.surfaces import bottom_fuel_stack, top_active_core, \
from smr.surfaces import lattice_pitch, bottom_fuel_stack, top_active_core, \
pellet_OR, surfs, pin_pitch, clad_IR, clad_OR pellet_OR, surfs, pin_pitch, clad_IR, clad_OR
import smr.surfaces import smr.surfaces
import smr.pins import smr.pins
from smr.core import core_geometry from smr.core import core_geometry
from smr import inlet_temperature from smr import inlet_temperature
# Define command-line options # Define command-line options
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('--multipole', action='store_true', parser.add_argument('--multipole', action='store_true',
@ -44,6 +37,9 @@ else:
directory = args.output_dir directory = args.output_dir
directory.mkdir(exist_ok=True) directory.mkdir(exist_ok=True)
# Modify lattice pitch
smr.surfaces.lattice_pitch = lattice_pitch = 17*smr.surfaces.pin_pitch
# Modify fuel length # Modify fuel length
length = 3. * pin_pitch length = 3. * pin_pitch
smr.surfaces.active_fuel_length = length smr.surfaces.active_fuel_length = length
@ -113,8 +109,7 @@ settings.inactive = 100
settings.particles = 10000 settings.particles = 10000
settings.output = {'tallies': False, 'summary': False} settings.output = {'tallies': False, 'summary': False}
settings.source = source settings.source = source
settings.sourcepoint_write = False settings.sourcepoint = {'write': False}
settings.temperature = { settings.temperature = {
'default': inlet_temperature, 'default': inlet_temperature,
'method': 'interpolation', 'method': 'interpolation',

20
smr/milestones.md Normal file
View file

@ -0,0 +1,20 @@
# Milestone Models
- **AD-SE-08-61, Coupled Multiphysics Driver Implementation** --- This milestone
used the singlerod short/long problems. Generating the model was done with the
script `tests/singlerod/make_openmc_model.py` from the ENRICO repository
(there is a `--short` command line option to generate the short version)
- **AD-SE-08-66, Coupled Assembly Analysis** --- This milestone used the
assembly short and long (v2) problems. Generating the model was done with
`smr/build-assembly-long.py -a 100 --clone` on the ecp-benchmarks repository
(git commit `631fefe`, after pull request #14). In these models, materials are
fully differentiated across each fuel ring/axial segment.
- **AD-SE-08-73, Full core coupled-physics simulation** --- This milestone used
the core-short and core-long (90 layer) models. Generating the models was done
with `smr/build-core-short.py` and `smr/build-assembly-long.py -a 90` on the
ecp-benchmarks repository (git commit `c7b89db`, after pull request #16). In
these models, materials are not differentiated and no grid spacers are
present. The lattice pitch is modified to be exactly 17 times the pin pitch
(slightly different than NuScale specification).

View file

@ -5,9 +5,9 @@ import numpy as np
import openmc import openmc
from .materials import mats from .materials import mats
from .surfaces import surfs, lattice_pitch
from .reflector import reflector_universes from .reflector import reflector_universes
from .assemblies import assembly_universes from .assemblies import assembly_universes
from smr import surfaces
def core_geometry(ring_radii, num_axial, depleted): def core_geometry(ring_radii, num_axial, depleted):
@ -34,6 +34,7 @@ def core_geometry(ring_radii, num_axial, depleted):
# Construct main core lattice # Construct main core lattice
core = openmc.RectLattice(name='Main core') core = openmc.RectLattice(name='Main core')
lattice_pitch = surfaces.lattice_pitch
core.lower_left = (-9*lattice_pitch/2, -9*lattice_pitch/2) core.lower_left = (-9*lattice_pitch/2, -9*lattice_pitch/2)
core.pitch = (lattice_pitch, lattice_pitch) core.pitch = (lattice_pitch, lattice_pitch)
universes = np.tile(reflector['solid'], (9, 9)) universes = np.tile(reflector['solid'], (9, 9))
@ -119,6 +120,7 @@ def core_geometry(ring_radii, num_axial, depleted):
core.universes = universes core.universes = universes
root_univ = openmc.Universe(universe_id=0, name='root universe') root_univ = openmc.Universe(universe_id=0, name='root universe')
surfs = surfaces.surfs
# Cylinder filled with core lattice # Cylinder filled with core lattice
cell = openmc.Cell(name='Main core') cell = openmc.Cell(name='Main core')

View file

@ -1,5 +1,7 @@
"""Instantiate the OpenMC Materials needed by the core model.""" """Instantiate the OpenMC Materials needed by the core model."""
import copy
import openmc import openmc
from openmc.data import atomic_weight, atomic_mass, water_density from openmc.data import atomic_weight, atomic_mass, water_density
@ -252,3 +254,10 @@ mats['UO2 3.1 depleted'] = mat
# Construct a collection of Materials to export to XML # Construct a collection of Materials to export to XML
materials = openmc.Materials(mats.values()) materials = openmc.Materials(mats.values())
def clone(material):
"""Perform copy of material but share nuclide densities"""
shared_mat = copy.copy(material)
shared_mat.id = None
return shared_mat

View file

@ -12,7 +12,7 @@ converted to actual dimensions by scaling according to the width of an assembly.
import openmc import openmc
from .materials import mats from .materials import mats
from .surfaces import lattice_pitch from smr import surfaces
def make_reflector(name, parameters): def make_reflector(name, parameters):
@ -91,6 +91,7 @@ def reflector_universes():
# All pixel widths are scaled according to the actual width of an assembly # All pixel widths are scaled according to the actual width of an assembly
# divided by the width of an assembly in pixels # divided by the width of an assembly in pixels
lattice_pitch = surfaces.lattice_pitch
scale = lattice_pitch/width scale = lattice_pitch/width
# Physical positions # Physical positions

View file

@ -69,8 +69,7 @@ spacer_height = 1.750*INCHES # ML17013A274, Figure 4.2-7
# assembly parameters # assembly parameters
assembly_length = 95.89*INCHES # ML17013A274, Table 4.1-2 assembly_length = 95.89*INCHES # ML17013A274, Table 4.1-2
pin_pitch = 0.496*INCHES # ML17013A274, Table 4.1-2 pin_pitch = 0.496*INCHES # ML17013A274, Table 4.1-2
#lattice_pitch = 8.466*INCHES # ML17013A274, Table 4.1-2 lattice_pitch = 8.466*INCHES # ML17013A274, Table 4.1-2
lattice_pitch = 17*pin_pitch
grid_strap_side = 21.47270 grid_strap_side = 21.47270
top_nozzle_height = 3.551*INCHES # ML17013A274, Figure 4.2-2 top_nozzle_height = 3.551*INCHES # ML17013A274, Figure 4.2-2
top_nozzle_width = 8.406*INCHES # ML17013A274, Figure 4.2-2 top_nozzle_width = 8.406*INCHES # ML17013A274, Figure 4.2-2