Skip to content

RCCA Insertion Planes #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions models/openmc/beavrs/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,13 @@
class BEAVRS(object):
""" Main BEAVRS class"""

def __init__(self, boron_ppm=c.nominalBoronPPM, is_symmetric=False, is_2d=False):
def __init__(self, boron_ppm=c.nominalBoronPPM, is_symmetric=False, is_2d=False, rcca_z = c.rcca_bank_steps_withdrawn_default):
""" We build the entire geometry in memory in the constructor """

# TODO: make the control rod bank insertion heights attributes

# Setup the materials
self.mats = openmc_materials(ppm=boron_ppm)

self.pincells = Pincells(self.mats)
self.pincells = Pincells(self.mats, rcca_z)
self.assemblies = Assemblies(self.pincells, self.mats)
self.baffle = Baffle(self.assemblies, self.mats)
self.core = Core(self.pincells, self.assemblies, self.baffle, is_symmetric=is_symmetric)
Expand Down
3 changes: 1 addition & 2 deletions models/openmc/beavrs/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
############## Geometry paramters ##############

## Steps withdrawn for each RCCA bank
rcca_bank_steps_withdrawn = {
rcca_bank_steps_withdrawn_default = {
'A': 228,
'B': 228,
'C': 228,
Expand All @@ -20,7 +20,6 @@
'SD': 228,
'SE': 228,
}
rcca_banks = rcca_bank_steps_withdrawn.keys()

## pincell parameters
pelletOR = 0.39218 #
Expand Down
10 changes: 6 additions & 4 deletions models/openmc/beavrs/pincells.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@

class Pincells(object):

def __init__(self, mats):
def __init__(self, mats, rcca_insertion_steps):
""" Creates BEAVRS pincell universes """

self.mats = mats

self.rcca_z = rcca_insertion_steps

self._add_structural_axials()
self._add_dummy_universe()
self._add_grid_pincells()
Expand Down Expand Up @@ -364,8 +366,8 @@ def _add_rcca_pincells(self):
self.s_rcca_b4c_top = {}
self.s_rcca_spacer_top = {}
self.s_rcca_plenum_top = {}
for b in sorted(c.rcca_banks):
d = c.rcca_bank_steps_withdrawn[b]*c.rcca_StepWidth
for b in sorted(self.rcca_z.keys()):
d = self.rcca_z[b]*c.rcca_StepWidth
self.s_rcca_rod_bot[b] = openmc.ZPlane(name='Bottom of RCCA rod bank {0}'.format(b), z0=c.rcca_Rod_bot + d)
self.s_rcca_lowerFitting_top[b] = openmc.ZPlane(name='Top of RCCA rod lower fitting bank {0}'.format(b), z0=c.rcca_LowerFitting_top + d)
self.s_rcca_aic_top[b] = openmc.ZPlane(name='Top of RCCA rod AIC bank {0}'.format(b), z0=c.rcca_AIC_top + d)
Expand Down Expand Up @@ -402,7 +404,7 @@ def _add_rcca_pincells(self):
# RCCA rod axial stack

self.u_rcca = {}
for b in sorted(c.rcca_banks):
for b in sorted(self.rcca_z):
self.u_rcca[b] = AxialPinCell(name='RCCA bank {0}'.format(b))
self.u_rcca[b].add_axial_section(self.s_struct_supportPlate_bot, self.mats['Borated Water'])
self.u_rcca[b].add_axial_section(self.s_struct_lowerNozzle_top, self.mats['Water SPN'])
Expand Down
12 changes: 11 additions & 1 deletion models/openmc/make_beavrs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import os
from beavrs.builder import BEAVRS
import beavrs.constants as c
from optparse import OptionParser

try:
Expand All @@ -17,11 +18,20 @@
p.add_option('-s', '--symmetric', action='store_true', dest='is_symmetric',
default=False, help='Create octant-symmetric input files,' \
+ ' not symmetric by default')
p.add_option('-z', '--rcca_d_z', dest='rcca_d_z',
help='The number of steps withdrawn for RCCA bank D, 0 by default',
type=int, default=0)
(options, args) = p.parse_args()

if not len(args) == 0:
p.print_help()

b = BEAVRS(is_symmetric=options.is_symmetric, is_2d=options.is_2d)
if options.rcca_d_z < 0 or options.rcca_d_z > 228:
raise Exception('The insertion step for RCCA bank D must be between 0 and 228!')

insertions = c.rcca_bank_steps_withdrawn_default
insertions['D'] = options.rcca_d_z

b = BEAVRS(is_symmetric=options.is_symmetric, is_2d=options.is_2d, rcca_z=insertions)
b.write_openmc_model()