Compare commits

..

11 commits

Author SHA1 Message Date
Paul Romano
500da41c7b Add script for building full length core model 2021-08-25 07:39:01 -05:00
Paul Romano
7ae3941917 Change enrichment pattern to flatten power distribution 2021-08-09 15:13:03 -05:00
Paul Romano
d4a532ba93 Fix volume assignment to clad/gap, use proper assemblies 2021-08-09 12:40:55 -05:00
Paul Romano
246164ab93 Fix volumes in fullcore short model 2021-07-26 22:36:48 -05:00
Paul Romano
b97fc0a57f Add script for building short full core, manually change lattice_pitch 2021-06-21 11:58:42 +07:00
Paul Romano
8b6d1540d0 Remove unnecessary import in surfaces.py 2021-06-21 11:04:47 +07:00
Paul Romano
b9ec9eddf2 Only whitespace changes 2021-06-17 09:15:10 +07:00
Paul Romano
b770e98dc1 Merge branch 'remove-bas' 2021-06-16 17:08:36 +07:00
Paul Romano
33f4ccab52 Remove assemblies with burnable absorber pins 2019-12-19 15:00:03 -06:00
Paul Romano
9b06d74c04 Make sure model build doesn't fail if rings == 1 2019-12-19 14:59:44 -06:00
Paul Romano
dfb861f0b2 Remove tallies, don't clone materials unless needed 2019-12-19 14:32:07 -06:00
11 changed files with 93 additions and 138 deletions

View file

@ -1,6 +1,7 @@
#!/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
@ -8,9 +9,10 @@ import numpy as np
from tqdm import tqdm from tqdm import tqdm
import openmc import openmc
from smr.materials import materials, clone from smr.materials import materials, mats
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, active_fuel_length top_active_core, pellet_OR, clad_OR, clad_IR, guide_tube_IR, guide_tube_OR, \
active_fuel_length
from smr.pins import pin_universes, make_stack from smr.pins import pin_universes, make_stack
@ -18,18 +20,14 @@ 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', dest='multipole', action='store_false', parser.add_argument('--no-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(clone=False, multipole=True) parser.set_defaults(multipole=True)
args = parser.parse_args() args = parser.parse_args()
# Make directory for inputs # Make directory for inputs
@ -103,22 +101,11 @@ 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='Differentiating materials / assigning volume'): desc='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 is_fuel: if 'UO2 Fuel' in cell.fill.name:
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]
@ -126,25 +113,14 @@ 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:
if args.clone: cell.fill = cell.fill.clone()
for mat in cell.fill: cell.fill.volume = pi * (ro*ro - ri*ri) * h
mat.volume = pi * (ro*ro - ri*ri) * h fuel_mats[ri] = cell.fill
else: else:
# In non-clone mode, we still need to create a copy of the cell.fill = fuel_mats[ri]
# 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:
if args.clone: cell.fill.volume = 1.0
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...')
@ -174,13 +150,14 @@ 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 = {
'default': 531.5,
'method': 'interpolation',
'range': (500.0, 1300.0)
}
if args.multipole: if args.multipole:
settings.temperature['multipole'] = True settings.temperature = {
settings.temperature['tolerance'] = 1000 'multipole': True,
'tolerance': 1000,
'default': 531.5,
'method': 'interpolation',
'range': (500.0, 1300.0)
}
settings.export_to_xml(str(directory / 'settings.xml')) settings.export_to_xml(str(directory / 'settings.xml'))

View file

@ -1,6 +1,7 @@
#!/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
@ -8,7 +9,7 @@ import numpy as np
from tqdm import tqdm from tqdm import tqdm
import openmc import openmc
from smr.materials import materials, clone from smr.materials import materials, mats
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
@ -84,6 +85,14 @@ 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,15 +1,17 @@
#!/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, clone from smr.materials import materials
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
@ -17,12 +19,8 @@ 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', dest='multipole', action='store_false', parser.add_argument('--no-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,
@ -32,7 +30,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(clone=False, multipole=True) parser.set_defaults(multipole=True)
args = parser.parse_args() args = parser.parse_args()
# Make directory for inputs # Make directory for inputs
@ -51,17 +49,25 @@ 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.rectangular_prism(lattice_pitch, lattice_pitch, lattice_sides = openmc.model.get_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%)'], fill=assembly['Assembly (3.1%) 16BA'],
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.clone: if args.tallies == 'mat':
# 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)
@ -101,7 +107,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',
@ -143,3 +149,7 @@ 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,14 +1,17 @@
#!/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
from tqdm import tqdm
from smr.materials import materials, clone import openmc
from smr.materials import materials
from smr.plots import core_plots
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
@ -19,12 +22,8 @@ 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', dest='multipole', action='store_false', parser.add_argument('--no-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,
@ -32,7 +31,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(clone=False, multipole=True) parser.set_defaults(multipole=True)
args = parser.parse_args() args = parser.parse_args()
# Make directory for inputs # Make directory for inputs
@ -54,36 +53,22 @@ 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 tqdm(geometry.get_all_cells().values(), for cell in 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 is_fuel: if 'UO2 Fuel' in cell.fill.name:
if args.clone: r_o = cell.region.bounding_box[1][0]
# Fill cell with list of "differentiated" materials if requested if r_o not in fuel_mats:
cell.fill = [clone(cell.fill) for i in range(cell.num_instances)] cell.fill = cell.fill.clone()
for mat in cell.fill: cell.fill.volume = fuel_volume
mat.volume = fuel_volume fuel_mats[r_o] = cell.fill
else: else:
r_o = cell.region.bounding_box[1][0] cell.fill = fuel_mats[r_o]
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())
@ -108,7 +93,8 @@ 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',
@ -119,3 +105,4 @@ 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 bottom_fuel_stack, top_active_core, \ from smr.surfaces import lattice_pitch, 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', dest='multipole', action='store_false', parser.add_argument('--no-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,9 +36,6 @@ 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)
@ -96,7 +93,8 @@ 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,18 +1,25 @@
#!/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.surfaces import bottom_fuel_stack, top_active_core, \ from smr.plots import core_plots
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',
@ -37,9 +44,6 @@ 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
@ -109,7 +113,8 @@ 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',

View file

@ -1,20 +0,0 @@
# 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,7 +34,6 @@ 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))
@ -120,7 +119,6 @@ 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,7 +1,5 @@
"""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
@ -254,10 +252,3 @@ 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 smr import surfaces from .surfaces import lattice_pitch
def make_reflector(name, parameters): def make_reflector(name, parameters):
@ -91,7 +91,6 @@ 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,7 +69,8 @@ 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