Make number of rings configurable

This commit is contained in:
Paul Romano 2018-01-17 06:27:01 -06:00
parent 96b1ae8513
commit a20d15c0cb
4 changed files with 16908 additions and 11617 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,11 +1,13 @@
"""Instantiate pin cell Cells and Universes for core model."""
from math import sqrt
import numpy as np
import openmc
from openmc.model import subdivide
from .materials import mats
from .surfaces import surfs, n_rings, bottom_fuel_rod, top_active_core
from .surfaces import surfs, pellet_OR, bottom_fuel_rod, top_active_core
def make_pin(name, surfaces, materials, grid=None):
@ -140,7 +142,7 @@ def make_pin_stack(name, zsurfaces, universes, boundary, pin_universe):
return universe
def pin_universes():
def pin_universes(num_rings=10):
# Create dictionary to store pin universes
univs = {}
@ -686,7 +688,11 @@ def pin_universes():
axial_surfs = [openmc.ZPlane(z0=z) for z in axial_splits]
# Get z-cylinder surfaces for each ring
rings = [surfs['fuel ring {}'.format(i)] for i in range(1, n_rings)]
rings = []
for i in range(num_rings):
R = sqrt(i*pellet_OR**2/num_rings)
cyl = openmc.ZCylinder(R=R, name='fuel ring {}'.format(i))
rings.append(cyl)
# Create universe for UO2 alone with axial/radial subdivision
uo2_cells = []

View file

@ -14,7 +14,7 @@ NuScale DC application, chapter 4: https://www.nrc.gov/docs/ML1701/ML17013A274.p
"""
import copy
from math import tan, pi, sqrt
from math import tan, pi
import numpy as np
import openmc
@ -127,14 +127,6 @@ neutron_shield_NEtop_SWbot = tan(-pi/6)
surfs = {}
# Create radii for rings in fuel
n_rings = 10
for i in range(1, n_rings):
R = sqrt(i*pellet_OR**2/n_rings)
name = 'fuel ring {}'.format(i)
surfs[name] = openmc.ZCylinder(R=R, name=name)
surfs['pellet OR'] = openmc.ZCylinder(
R=pellet_OR, name='Pellet OR')
surfs['plenum spring OR'] = openmc.ZCylinder(