forked from crp/ecp-benchmarks
Began buiding the baffle
This commit is contained in:
parent
f575bef1be
commit
950d77aaf8
3 changed files with 427 additions and 777 deletions
416
smr/baffle.py
Normal file
416
smr/baffle.py
Normal file
|
|
@ -0,0 +1,416 @@
|
|||
import openmc
|
||||
|
||||
from materials import mats
|
||||
from surfaces import surfs, lattice_pitch
|
||||
from pins import univs
|
||||
|
||||
|
||||
# FIXME: is this necessary??
|
||||
latts = {}
|
||||
|
||||
# NORTH BAFFLE
|
||||
|
||||
univs['baffle north dummy'] = openmc.Universe(name='baffle north dummy')
|
||||
|
||||
cell = openmc.Cell(name='baffle dummy SS')
|
||||
cell.material = mats['SS']
|
||||
cell.region = +surfs['baffle north']
|
||||
univs['baffle north dummy'].add_cell(cell)
|
||||
|
||||
cell = openmc.Cell(name='baffle north water')
|
||||
cell.material = mats['H2O']
|
||||
cell.region = -surfs['baffle north']
|
||||
univs['baffle north dummy'].add_cell(cell)
|
||||
|
||||
# FIXME: Is this necessary? Or can we simply fill the lattice with this universe???
|
||||
latts['baffle north'] = openmc.RectLattice(name='baffle north')
|
||||
latts['baffle north'].lower_left = [-lattice_pitch/2., -lattice_pitch/2.]
|
||||
latts['baffle north'].pitch = [lattice_pitch/2., lattice_pitch/2.]
|
||||
latts['baffle north'].universes = [
|
||||
[univs['baffle north dummy'], univs['baffle north dummy']],
|
||||
[univs['water pin'], univs['water pin']]]
|
||||
|
||||
univs['baffle north'] = openmc.Universe(name='baffle north')
|
||||
|
||||
cell = openmc.Cell(name='baffle north')
|
||||
cell.fill = latts['baffle north']
|
||||
cell.region = -surfs['dummy outer']
|
||||
univs['baffle north'].add_cell(cell)
|
||||
|
||||
|
||||
# SOUTH BAFFLE
|
||||
|
||||
univs['baffle south dummy'] = openmc.Universe(name='baffle south dummy')
|
||||
|
||||
cell = openmc.Cell(name='baffle dummy SS')
|
||||
cell.material = mats['H2O']
|
||||
cell.region = +surfs['baffle south']
|
||||
univs['baffle south dummy'].add_cell(cell)
|
||||
|
||||
cell = openmc.Cell(name='baffle south water')
|
||||
cell.material = mats['SS']
|
||||
cell.region = -surfs['baffle south']
|
||||
univs['baffle south dummy'].add_cell(cell)
|
||||
|
||||
# FIXME: Is this necessary? Or can we simply fill the lattice with this universe???
|
||||
latts['baffle south'] = openmc.RectLattice(name='baffle south')
|
||||
latts['baffle south'].lower_left = [-lattice_pitch/2., -lattice_pitch/2.]
|
||||
latts['baffle south'].pitch = [lattice_pitch/2., lattice_pitch/2.]
|
||||
latts['baffle south'].universes = [
|
||||
[univs['water pin'], univs['water pin']],
|
||||
[univs['baffle south dummy'], univs['baffle south dummy']]]
|
||||
|
||||
univs['baffle south'] = openmc.Universe(name='baffle south')
|
||||
|
||||
cell = openmc.Cell(name='baffle south')
|
||||
cell.fill = latts['baffle south']
|
||||
cell.region = -surfs['dummy outer']
|
||||
univs['baffle south'].add_cell(cell)
|
||||
|
||||
|
||||
# EAST BAFFLE
|
||||
|
||||
univs['baffle east dummy'] = openmc.Universe(name='baffle east dummy')
|
||||
|
||||
cell = openmc.Cell(name='baffle dummy SS')
|
||||
cell.material = mats['SS']
|
||||
cell.region = +surfs['baffle east']
|
||||
univs['baffle east dummy'].add_cell(cell)
|
||||
|
||||
cell = openmc.Cell(name='baffle east water')
|
||||
cell.material = mats['H2O']
|
||||
cell.region = -surfs['baffle east']
|
||||
univs['baffle east dummy'].add_cell(cell)
|
||||
|
||||
# FIXME: Is this necessary? Or can we simply fill the lattice with this universe???
|
||||
latts['baffle east'] = openmc.RectLattice(name='baffle east')
|
||||
latts['baffle east'].lower_left = [-lattice_pitch/2., -lattice_pitch/2.]
|
||||
latts['baffle east'].pitch = [lattice_pitch/2., lattice_pitch/2.]
|
||||
latts['baffle east'].universes = [
|
||||
[univs['water pin'], univs['baffle east dummy']],
|
||||
[univs['water pin'], univs['baffle east dummy']]]
|
||||
|
||||
univs['baffle east'] = openmc.Universe(name='baffle east')
|
||||
|
||||
cell = openmc.Cell(name='baffle east')
|
||||
cell.fill = latts['baffle east']
|
||||
cell.region = -surfs['dummy outer']
|
||||
univs['baffle east'].add_cell(cell)
|
||||
|
||||
|
||||
# WEST BAFFLE
|
||||
|
||||
univs['baffle west dummy'] = openmc.Universe(name='baffle west dummy')
|
||||
|
||||
cell = openmc.Cell(name='baffle dummy SS')
|
||||
cell.material = mats['H2O']
|
||||
cell.region = +surfs['baffle west']
|
||||
univs['baffle west dummy'].add_cell(cell)
|
||||
|
||||
cell = openmc.Cell(name='baffle west water')
|
||||
cell.material = mats['SS']
|
||||
cell.region = -surfs['baffle west']
|
||||
univs['baffle west dummy'].add_cell(cell)
|
||||
|
||||
# FIXME: Is this necessary? Or can we simply fill the lattice with this universe???
|
||||
latts['baffle west'] = openmc.RectLattice(name='baffle west')
|
||||
latts['baffle west'].lower_left = [-lattice_pitch/2., -lattice_pitch/2.]
|
||||
latts['baffle west'].pitch = [lattice_pitch/2., lattice_pitch/2.]
|
||||
latts['baffle west'].universes = [
|
||||
[univs['baffle west dummy'], univs['water pin']],
|
||||
[univs['baffle west dummy'], univs['water pin']]]
|
||||
|
||||
univs['baffle west'] = openmc.Universe(name='baffle west')
|
||||
|
||||
cell = openmc.Cell(name='baffle west')
|
||||
cell.fill = latts['baffle west']
|
||||
cell.region = -surfs['dummy outer']
|
||||
univs['baffle west'].add_cell(cell)
|
||||
|
||||
|
||||
# NORTHWEST BAFFLE
|
||||
|
||||
univs['baffle northwest dummy'] = openmc.Universe(name='baffle northwest dummy')
|
||||
|
||||
cell = openmc.Cell(name='baffle northwest dummy 1')
|
||||
cell.material = mats['H2O']
|
||||
cell.region = +surfs['baffle west'] & -surfs['baffle north']
|
||||
univs['baffle northwest dummy'].add_cell(cell)
|
||||
|
||||
cell = openmc.Cell(name='baffle northwest dummy 2')
|
||||
cell.material = mats['SS']
|
||||
cell.region = +surfs['baffle west'] & +surfs['baffle north']
|
||||
univs['baffle northwest dummy'].add_cell(cell)
|
||||
|
||||
cell = openmc.Cell(name='baffle northwest dummy 3')
|
||||
cell.material = mats['SS']
|
||||
cell.region = -surfs['baffle west']
|
||||
univs['baffle northwest dummy'].add_cell(cell)
|
||||
|
||||
# FIXME: Is this necessary? Or can we simply fill the lattice with this universe???
|
||||
latts['baffle northwest'] = openmc.RectLattice(name='baffle northwest')
|
||||
latts['baffle northwest'].lower_left = [-lattice_pitch/2., -lattice_pitch/2.]
|
||||
latts['baffle northwest'].pitch = [lattice_pitch/2., lattice_pitch/2.]
|
||||
latts['baffle northwest'].universes = [
|
||||
[univs['baffle northwest dummy'], univs['baffle north dummy']],
|
||||
[univs['baffle west dummy'], univs['water pin']]]
|
||||
|
||||
univs['baffle northwest'] = openmc.Universe(name='baffle northwest')
|
||||
|
||||
cell = openmc.Cell(name='baffle northwest')
|
||||
cell.fill = latts['baffle northwest']
|
||||
cell.region = -surfs['dummy outer']
|
||||
univs['baffle northwest'].add_cell(cell)
|
||||
|
||||
|
||||
# NORTHEAST BAFFLE
|
||||
|
||||
univs['baffle northeast dummy'] = openmc.Universe(name='baffle northeast dummy')
|
||||
|
||||
cell = openmc.Cell(name='baffle northeast dummy 1')
|
||||
cell.material = mats['H2O']
|
||||
cell.region = -surfs['baffle north'] & -surfs['baffle east']
|
||||
univs['baffle northeast dummy'].add_cell(cell)
|
||||
|
||||
cell = openmc.Cell(name='baffle northeast dummy 2')
|
||||
cell.material = mats['SS']
|
||||
cell.region = +surfs['baffle north'] & -surfs['baffle east']
|
||||
univs['baffle northeast dummy'].add_cell(cell)
|
||||
|
||||
cell = openmc.Cell(name='baffle northeast dummy 3')
|
||||
cell.material = mats['SS']
|
||||
cell.region = +surfs['baffle east']
|
||||
univs['baffle northeast dummy'].add_cell(cell)
|
||||
|
||||
# FIXME: Is this necessary? Or can we simply fill the lattice with this universe???
|
||||
latts['baffle northeast'] = openmc.RectLattice(name='baffle northeast')
|
||||
latts['baffle northeast'].lower_left = [-lattice_pitch/2., -lattice_pitch/2.]
|
||||
latts['baffle northeast'].pitch = [lattice_pitch/2., lattice_pitch/2.]
|
||||
latts['baffle northeast'].universes = [
|
||||
[univs['baffle north dummy'], univs['baffle northeast dummy']],
|
||||
[univs['water pin'], univs['baffle east']]]
|
||||
|
||||
univs['baffle northeast'] = openmc.Universe(name='baffle northeast')
|
||||
|
||||
cell = openmc.Cell(name='baffle northeast')
|
||||
cell.fill = latts['baffle northeast']
|
||||
cell.region = -surfs['dummy outer']
|
||||
univs['baffle northeast'].add_cell(cell)
|
||||
|
||||
|
||||
# SOUTHWEST BAFFLE
|
||||
|
||||
univs['baffle southwest dummy'] = openmc.Universe(name='baffle southwest dummy')
|
||||
|
||||
cell = openmc.Cell(name='baffle southwest dummy 1')
|
||||
cell.material = mats['H2O']
|
||||
cell.region = +surfs['baffle south'] & +surfs['baffle east']
|
||||
univs['baffle southwest dummy'].add_cell(cell)
|
||||
|
||||
cell = openmc.Cell(name='baffle southwest dummy 2')
|
||||
cell.material = mats['SS']
|
||||
cell.region = -surfs['baffle south'] & +surfs['baffle west']
|
||||
univs['baffle southwest dummy'].add_cell(cell)
|
||||
|
||||
cell = openmc.Cell(name='baffle southwest dummy 3')
|
||||
cell.material = mats['SS']
|
||||
cell.region = -surfs['baffle west']
|
||||
univs['baffle southwest dummy'].add_cell(cell)
|
||||
|
||||
# FIXME: Is this necessary? Or can we simply fill the lattice with this universe???
|
||||
latts['baffle southwest'] = openmc.RectLattice(name='baffle southwest')
|
||||
latts['baffle southwest'].lower_left = [-lattice_pitch/2., -lattice_pitch/2.]
|
||||
latts['baffle southwest'].pitch = [lattice_pitch/2., lattice_pitch/2.]
|
||||
latts['baffle southwest'].universes = [
|
||||
[univs['baffle west dummy'], univs['water pin']],
|
||||
[univs['baffle southwest dummy'], univs['baffle south dummy']]]
|
||||
|
||||
univs['baffle southwest'] = openmc.Universe(name='baffle southwest')
|
||||
|
||||
cell = openmc.Cell(name='baffle southwest')
|
||||
cell.fill = latts['baffle southwest']
|
||||
cell.region = -surfs['dummy outer']
|
||||
univs['baffle southwest'].add_cell(cell)
|
||||
|
||||
|
||||
# SOUTHEAST BAFFLE
|
||||
|
||||
univs['baffle southeast dummy'] = openmc.Universe(name='baffle southeast dummy')
|
||||
|
||||
cell = openmc.Cell(name='baffle southeast dummy 1')
|
||||
cell.material = mats['H2O']
|
||||
cell.region = +surfs['baffle south'] & -surfs['baffle east']
|
||||
univs['baffle southeast dummy'].add_cell(cell)
|
||||
|
||||
cell = openmc.Cell(name='baffle southeast dummy 2')
|
||||
cell.material = mats['SS']
|
||||
cell.region = -surfs['baffle south'] & -surfs['baffle east']
|
||||
univs['baffle southeast dummy'].add_cell(cell)
|
||||
|
||||
cell = openmc.Cell(name='baffle southeast dummy 3')
|
||||
cell.material = mats['SS']
|
||||
cell.region = +surfs['baffle east']
|
||||
univs['baffle southeast dummy'].add_cell(cell)
|
||||
|
||||
# FIXME: Is this necessary? Or can we simply fill the lattice with this universe???
|
||||
latts['baffle southeast'] = openmc.RectLattice(name='baffle southeast')
|
||||
latts['baffle southeast'].lower_left = [-lattice_pitch/2., -lattice_pitch/2.]
|
||||
latts['baffle southeast'].pitch = [lattice_pitch/2., lattice_pitch/2.]
|
||||
latts['baffle southeast'].universes = [
|
||||
[univs['water pin'], univs['baffle east dummy']],
|
||||
[univs['baffle south dummy'], univs['baffle southeast dummy']]]
|
||||
|
||||
univs['baffle southwest'] = openmc.Universe(name='baffle southeast')
|
||||
|
||||
cell = openmc.Cell(name='baffle southeast')
|
||||
cell.fill = latts['baffle southeast']
|
||||
cell.region = -surfs['dummy outer']
|
||||
univs['baffle southeast'].add_cell(cell)
|
||||
|
||||
|
||||
# NORTHWEST CORNER BAFFLE
|
||||
|
||||
univs['baffle northwest corner dummy'] = \
|
||||
openmc.Universe(name='baffle northwest corner dummy')
|
||||
|
||||
cell = openmc.Cell(name='baffle northwest corner dummy 1')
|
||||
cell.material = mats['H2O']
|
||||
cell.region = -surfs['baffle west'] & -surfs['baffle north']
|
||||
univs['baffle northwest corner dummy'].add_cell(cell)
|
||||
|
||||
cell = openmc.Cell(name='baffle northwest corner dummy 2')
|
||||
cell.material = mats['H2O']
|
||||
cell.region = +surfs['baffle west']
|
||||
univs['baffle northwest corner dummy'].add_cell(cell)
|
||||
|
||||
cell = openmc.Cell(name='baffle northwest corner dummy 3')
|
||||
cell.material = mats['SS']
|
||||
cell.region = +surfs['baffle north'] & -surfs['baffle west']
|
||||
univs['baffle northwest corner dummy'].add_cell(cell)
|
||||
|
||||
# FIXME: Is this necessary? Or can we simply fill the lattice with this universe???
|
||||
latts['baffle northwest corner'] = openmc.RectLattice(name='baffle northwest corner')
|
||||
latts['baffle northwest corner'].lower_left = [-lattice_pitch/2., -lattice_pitch/2.]
|
||||
latts['baffle northwest corner'].pitch = [lattice_pitch/2., lattice_pitch/2.]
|
||||
latts['baffle northwest corner'].universes = [
|
||||
[univs['baffle northwest corner dummy'], univs['water pin']],
|
||||
[univs['water pin'], univs['water pin']]]
|
||||
|
||||
univs['baffle northwest corner'] = \
|
||||
openmc.Universe(name='baffle northwest corner')
|
||||
|
||||
cell = openmc.Cell(name='baffle northwest corner')
|
||||
cell.fill = latts['baffle northwest corner']
|
||||
cell.region = -surfs['dummy outer']
|
||||
univs['baffle northwest corner'].add_cell(cell)
|
||||
|
||||
|
||||
# NORTHEAST CORNER BAFFLE
|
||||
|
||||
univs['baffle northeast corner dummy'] = \
|
||||
openmc.Universe(name='baffle northeast corner dummy')
|
||||
|
||||
cell = openmc.Cell(name='baffle northeast corner dummy 1')
|
||||
cell.material = mats['H2O']
|
||||
cell.region = +surfs['baffle east'] & -surfs['baffle north']
|
||||
univs['baffle northeast corner dummy'].add_cell(cell)
|
||||
|
||||
cell = openmc.Cell(name='baffle northeast corner dummy 2')
|
||||
cell.material = mats['H2O']
|
||||
cell.region = -surfs['baffle east']
|
||||
univs['baffle northeast corner dummy'].add_cell(cell)
|
||||
|
||||
cell = openmc.Cell(name='baffle northeast corner dummy 3')
|
||||
cell.material = mats['SS']
|
||||
cell.region = +surfs['baffle north'] & -surfs['baffle east']
|
||||
univs['baffle northeast corner dummy'].add_cell(cell)
|
||||
|
||||
# FIXME: Is this necessary? Or can we simply fill the lattice with this universe???
|
||||
latts['baffle northeast corner'] = openmc.RectLattice(name='baffle northeast corner')
|
||||
latts['baffle northeast corner'].lower_left = [-lattice_pitch/2., -lattice_pitch/2.]
|
||||
latts['baffle northeast corner'].pitch = [lattice_pitch/2., lattice_pitch/2.]
|
||||
latts['baffle northeast corner'].universes = [
|
||||
[univs['water pin'], univs['baffle northweast corner dummy']],
|
||||
[univs['water pin'], univs['water pin']]]
|
||||
|
||||
univs['baffle northeast corner'] = \
|
||||
openmc.Universe(name='baffle northeast corner')
|
||||
|
||||
cell = openmc.Cell(name='baffle northeast corner')
|
||||
cell.fill = latts['baffle northeast corner']
|
||||
cell.region = -surfs['dummy outer']
|
||||
univs['baffle northeast corner'].add_cell(cell)
|
||||
|
||||
|
||||
# SOUTHEAST CORNER BAFFLE
|
||||
|
||||
univs['baffle southeast corner dummy'] = \
|
||||
openmc.Universe(name='baffle southeast corner dummy')
|
||||
|
||||
cell = openmc.Cell(name='baffle southeast corner dummy 1')
|
||||
cell.material = mats['H2O']
|
||||
cell.region = +surfs['baffle east'] & +surfs['baffle south']
|
||||
univs['baffle southeast corner dummy'].add_cell(cell)
|
||||
|
||||
cell = openmc.Cell(name='baffle southeast corner dummy 2')
|
||||
cell.material = mats['H2O']
|
||||
cell.region = -surfs['baffle east']
|
||||
univs['baffle southeast corner dummy'].add_cell(cell)
|
||||
|
||||
cell = openmc.Cell(name='baffle southeast corner dummy 3')
|
||||
cell.material = mats['SS']
|
||||
cell.region = -surfs['baffle south'] & +surfs['baffle east']
|
||||
univs['baffle southeast corner dummy'].add_cell(cell)
|
||||
|
||||
# FIXME: Is this necessary? Or can we simply fill the lattice with this universe???
|
||||
latts['baffle southeast corner'] = openmc.RectLattice(name='baffle southeast corner')
|
||||
latts['baffle southeast corner'].lower_left = [-lattice_pitch/2., -lattice_pitch/2.]
|
||||
latts['baffle southeast corner'].pitch = [lattice_pitch/2., lattice_pitch/2.]
|
||||
latts['baffle southeast corner'].universes = [
|
||||
[univs['water pin'], univs['water pin']],
|
||||
[univs['water pin'], univs['baffle southeast corner dummy']]]
|
||||
|
||||
univs['baffle southeast corner'] = \
|
||||
openmc.Universe(name='baffle southeast corner')
|
||||
|
||||
cell = openmc.Cell(name='baffle southeast corner')
|
||||
cell.fill = latts['baffle southeast corner']
|
||||
cell.region = -surfs['dummy outer']
|
||||
univs['baffle southeast corner'].add_cell(cell)
|
||||
|
||||
|
||||
# SOUTHWEST CORNER BAFFLE
|
||||
|
||||
univs['baffle southwest corner dummy'] = \
|
||||
openmc.Universe(name='baffle southwest corner dummy')
|
||||
|
||||
cell = openmc.Cell(name='baffle southwest corner dummy 1')
|
||||
cell.material = mats['H2O']
|
||||
cell.region = -surfs['baffle west'] & +surfs['baffle south']
|
||||
univs['baffle southwest corner dummy'].add_cell(cell)
|
||||
|
||||
cell = openmc.Cell(name='baffle southwest corner dummy 2')
|
||||
cell.material = mats['H2O']
|
||||
cell.region = +surfs['baffle west']
|
||||
univs['baffle southwest corner dummy'].add_cell(cell)
|
||||
|
||||
cell = openmc.Cell(name='baffle southwest corner dummy 3')
|
||||
cell.material = mats['SS']
|
||||
cell.region = -surfs['baffle south'] & -surfs['baffle west']
|
||||
univs['baffle southwest corner dummy'].add_cell(cell)
|
||||
|
||||
# FIXME: Is this necessary? Or can we simply fill the lattice with this universe???
|
||||
latts['baffle southwest corner'] = openmc.RectLattice(name='baffle southwest corner')
|
||||
latts['baffle southwest corner'].lower_left = [-lattice_pitch/2., -lattice_pitch/2.]
|
||||
latts['baffle southwest corner'].pitch = [lattice_pitch/2., lattice_pitch/2.]
|
||||
latts['baffle southwest corner'].universes = [
|
||||
[univs['water pin'], univs['water pin']],
|
||||
[univs['baffle southwest corner dummy'], univs['water pin']]]
|
||||
|
||||
univs['baffle southwest corner'] = \
|
||||
openmc.Universe(name='baffle southwest corner')
|
||||
|
||||
cell = openmc.Cell(name='baffle southwest corner')
|
||||
cell.fill = latts['baffle southwest corner']
|
||||
cell.region = -surfs['dummy outer']
|
||||
univs['baffle southwest corner'].add_cell(cell)
|
||||
776
smr/smr.py
776
smr/smr.py
|
|
@ -33,516 +33,6 @@ def init_data():
|
|||
|
||||
"""
|
||||
|
||||
################## Baffle construction ##################
|
||||
|
||||
|
||||
lo = {'n': 0}
|
||||
latts = {}
|
||||
|
||||
# baffle north
|
||||
|
||||
surfs['baffle surf north'] = { 'order': inc_order(so),
|
||||
'section': comm_t.format("Baffle surfaces"),
|
||||
'comm': comm_t.format("chosen for 2x2 baffle lattice, so w={0}".format(baffleWidth)),
|
||||
'id': new_id(surfIDs),
|
||||
'type': '"y-plane"',
|
||||
'coeffs': '{0:0<8.5}'.format(latticePitch/4 - baffleWidth)}
|
||||
cells['baffle dummy north'] = { 'order': inc_order(co),
|
||||
'section': comm_t.format("Baffle cells"),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': new_id(univIDs),
|
||||
'mat': mats['SS304']['id'],
|
||||
'fill': None,
|
||||
'surfs': '{0}'.format(surfs['baffle surf north']['id'])}
|
||||
cells['baf dummy north 2'] = { 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': cells['baffle dummy north']['univ'],
|
||||
'mat': mats['water-nominal']['id'],
|
||||
'fill': None,
|
||||
'surfs': '-{0}'.format(surfs['baffle surf north']['id'])}
|
||||
latts['baffle north'] = { 'order': inc_order(lo),
|
||||
'comm': comm_t.format("Baffle north"),
|
||||
'id': new_id(univIDs),
|
||||
'type': 'rectangular',
|
||||
'dim': 2,
|
||||
'lleft': -latticePitch/2,
|
||||
'width': latticePitch/2,
|
||||
'univs': """
|
||||
{0:>3} {0:>3}
|
||||
{1:>3} {1:>3}
|
||||
""".format(cells['baffle dummy north']['univ'],cells['water pin']['univ'])}
|
||||
cells['baffle north'] = { 'order': inc_order(co),
|
||||
'comm': comm_t.format("north baffle universe"),
|
||||
'id': new_id(cellIDs),
|
||||
'univ': new_id(univIDs),
|
||||
'fill': latts['baffle north']['id'],
|
||||
'surfs': '-{0}'.format(surfs['dummy outer']['id'])}
|
||||
|
||||
# baffle south
|
||||
|
||||
surfs['baffle surf south'] = { 'order': inc_order(so),
|
||||
'comm': "",
|
||||
'id': new_id(surfIDs),
|
||||
'type': '"y-plane"',
|
||||
'coeffs': '{0:0<8.6}'.format(baffleWidth - latticePitch/4)}
|
||||
cells['baffle dummy south'] = { 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': new_id(univIDs),
|
||||
'mat': mats['water-nominal']['id'],
|
||||
'fill': None,
|
||||
'surfs': '{0}'.format(surfs['baffle surf south']['id'])}
|
||||
cells['baf dummy south 2'] = { 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': cells['baffle dummy south']['univ'],
|
||||
'mat': mats['SS304']['id'],
|
||||
'fill': None,
|
||||
'surfs': '-{0}'.format(surfs['baffle surf south']['id'])}
|
||||
latts['baffle south'] = { 'order': inc_order(lo),
|
||||
'comm': comm_t.format("Baffle south"),
|
||||
'id': new_id(univIDs),
|
||||
'type': 'rectangular',
|
||||
'dim': 2,
|
||||
'lleft': -latticePitch/2,
|
||||
'width': latticePitch/2,
|
||||
'univs': """
|
||||
{1:>3} {1:>3}
|
||||
{0:>3} {0:>3}
|
||||
""".format(cells['baffle dummy south']['univ'],cells['water pin']['univ'])}
|
||||
cells['baffle south'] = { 'order': inc_order(co),
|
||||
'comm': comm_t.format("south baffle universe"),
|
||||
'id': new_id(cellIDs),
|
||||
'univ': new_id(univIDs),
|
||||
'fill': latts['baffle south']['id'],
|
||||
'surfs': '-{0}'.format(surfs['dummy outer']['id'])}
|
||||
|
||||
# bafffle east
|
||||
|
||||
surfs['baffle surf east'] = { 'order': inc_order(so),
|
||||
'comm': "",
|
||||
'id': new_id(surfIDs),
|
||||
'type': '"x-plane"',
|
||||
'coeffs': '{0:0<8.5}'.format(latticePitch/4 - baffleWidth)}
|
||||
cells['baffle dummy east'] = { 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': new_id(univIDs),
|
||||
'mat': mats['SS304']['id'],
|
||||
'fill': None,
|
||||
'surfs': '{0}'.format(surfs['baffle surf east']['id'])}
|
||||
cells['baf dummy east 2'] = { 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': cells['baffle dummy east']['univ'],
|
||||
'mat': mats['water-nominal']['id'],
|
||||
'fill': None,
|
||||
'surfs': '-{0}'.format(surfs['baffle surf east']['id'])}
|
||||
latts['baffle east'] = { 'order': inc_order(lo),
|
||||
'comm': comm_t.format("Baffle east"),
|
||||
'id': new_id(univIDs),
|
||||
'type': 'rectangular',
|
||||
'dim': 2,
|
||||
'lleft': -latticePitch/2,
|
||||
'width': latticePitch/2,
|
||||
'univs': """
|
||||
{1:>3} {0:>3}
|
||||
{1:>3} {0:>3}
|
||||
""".format(cells['baffle dummy east']['univ'],cells['water pin']['univ'])}
|
||||
cells['baffle east'] = { 'order': inc_order(co),
|
||||
'comm': comm_t.format("east baffle universe"),
|
||||
'id': new_id(cellIDs),
|
||||
'univ': new_id(univIDs),
|
||||
'fill': latts['baffle east']['id'],
|
||||
'surfs': '-{0}'.format(surfs['dummy outer']['id'])}
|
||||
|
||||
# baffle west
|
||||
|
||||
surfs['baffle surf west'] = { 'order': inc_order(so),
|
||||
'comm': "",
|
||||
'id': new_id(surfIDs),
|
||||
'type': '"x-plane"',
|
||||
'coeffs': '{0:0<8.6}'.format(baffleWidth - latticePitch/4)}
|
||||
cells['baffle dummy west'] = { 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': new_id(univIDs),
|
||||
'mat': mats['water-nominal']['id'],
|
||||
'fill': None,
|
||||
'surfs': '{0}'.format(surfs['baffle surf west']['id'])}
|
||||
cells['baf dummy west 2'] = { 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': cells['baffle dummy west']['univ'],
|
||||
'mat': mats['SS304']['id'],
|
||||
'fill': None,
|
||||
'surfs': '-{0}'.format(surfs['baffle surf west']['id'])}
|
||||
latts['baffle west'] = { 'order': inc_order(lo),
|
||||
'comm': comm_t.format("Baffle west"),
|
||||
'id': new_id(univIDs),
|
||||
'type': 'rectangular',
|
||||
'dim': 2,
|
||||
'lleft': -latticePitch/2,
|
||||
'width': latticePitch/2,
|
||||
'univs': """
|
||||
{0:>3} {1:>3}
|
||||
{0:>3} {1:>3}
|
||||
""".format(cells['baffle dummy west']['univ'],cells['water pin']['univ'])}
|
||||
cells['baffle west'] = { 'order': inc_order(co),
|
||||
'comm': comm_t.format("west baffle universe"),
|
||||
'id': new_id(cellIDs),
|
||||
'univ': new_id(univIDs),
|
||||
'fill': latts['baffle west']['id'],
|
||||
'surfs': '-{0}'.format(surfs['dummy outer']['id'])}
|
||||
|
||||
|
||||
# baffle NW edges
|
||||
|
||||
cells['baf dummy edges NW'] = { 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': new_id(univIDs),
|
||||
'mat': mats['water-nominal']['id'],
|
||||
'fill': None,
|
||||
'surfs': '{0} -{1}'.format(surfs['baffle surf west']['id'],surfs['baffle surf north']['id'])}
|
||||
cells['baf dmy edges NW 2'] = { 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': cells['baf dummy edges NW']['univ'],
|
||||
'mat': mats['SS304']['id'],
|
||||
'fill': None,
|
||||
'surfs': '{0} {1}'.format(surfs['baffle surf west']['id'],surfs['baffle surf north']['id'])}
|
||||
cells['baf dmy edges NW 3'] = { 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': cells['baf dummy edges NW']['univ'],
|
||||
'mat': mats['SS304']['id'],
|
||||
'fill': None,
|
||||
'surfs': '-{0}'.format(surfs['baffle surf west']['id'])}
|
||||
latts['baffle edges NW'] = { 'order': inc_order(lo),
|
||||
'comm': comm_t.format("Baffle NW edges"),
|
||||
'id': new_id(univIDs),
|
||||
'type': 'rectangular',
|
||||
'dim': 2,
|
||||
'lleft': -latticePitch/2,
|
||||
'width': latticePitch/2,
|
||||
'univs': """
|
||||
{0:>3} {1:>3}
|
||||
{2:>3} {3:>3}
|
||||
""".format(cells['baf dummy edges NW']['univ'],cells['baffle dummy north']['univ'],cells['baffle dummy west']['univ'],cells['water pin']['univ'])}
|
||||
cells['baffle edges NW'] = { 'order': inc_order(co),
|
||||
'comm': comm_t.format("NW edges baffle universe"),
|
||||
'id': new_id(cellIDs),
|
||||
'univ': new_id(univIDs),
|
||||
'fill': latts['baffle edges NW']['id'],
|
||||
'surfs': '-{0}'.format(surfs['dummy outer']['id'])}
|
||||
|
||||
|
||||
# baffle NE edges
|
||||
|
||||
cells['baf dummy edges NE'] = { 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': new_id(univIDs),
|
||||
'mat': mats['water-nominal']['id'],
|
||||
'fill': None,
|
||||
'surfs': '-{0} -{1}'.format(surfs['baffle surf north']['id'],surfs['baffle surf east']['id'])}
|
||||
cells['baf dmy edges NE 2'] = { 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': cells['baf dummy edges NE']['univ'],
|
||||
'mat': mats['SS304']['id'],
|
||||
'fill': None,
|
||||
'surfs': '{0} -{1}'.format(surfs['baffle surf north']['id'],surfs['baffle surf east']['id'])}
|
||||
cells['baf dmy edges NE 3'] = { 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': cells['baf dummy edges NE']['univ'],
|
||||
'mat': mats['SS304']['id'],
|
||||
'fill': None,
|
||||
'surfs': '{0}'.format(surfs['baffle surf east']['id'])}
|
||||
latts['baffle edges NE'] = { 'order': inc_order(lo),
|
||||
'comm': comm_t.format("Baffle NE edges"),
|
||||
'id': new_id(univIDs),
|
||||
'type': 'rectangular',
|
||||
'dim': 2,
|
||||
'lleft': -latticePitch/2,
|
||||
'width': latticePitch/2,
|
||||
'univs': """
|
||||
{0:>3} {1:>3}
|
||||
{2:>3} {3:>3}
|
||||
""".format(cells['baffle dummy north']['univ'],cells['baf dummy edges NE']['univ'],cells['water pin']['univ'],cells['baffle dummy east']['univ'])}
|
||||
cells['baffle edges NE'] = { 'order': inc_order(co),
|
||||
'comm': comm_t.format("NE edges baffle universe"),
|
||||
'id': new_id(cellIDs),
|
||||
'univ': new_id(univIDs),
|
||||
'fill': latts['baffle edges NE']['id'],
|
||||
'surfs': '-{0}'.format(surfs['dummy outer']['id'])}
|
||||
|
||||
# baffle SW edges
|
||||
|
||||
cells['baf dummy edges SW'] = { 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': new_id(univIDs),
|
||||
'mat': mats['water-nominal']['id'],
|
||||
'fill': None,
|
||||
'surfs': '{0} {1}'.format(surfs['baffle surf south']['id'],surfs['baffle surf west']['id'])}
|
||||
cells['baf dmy edges SW 2'] = { 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': cells['baf dummy edges SW']['univ'],
|
||||
'mat': mats['SS304']['id'],
|
||||
'fill': None,
|
||||
'surfs': '-{0} {1}'.format(surfs['baffle surf south']['id'],surfs['baffle surf west']['id'])}
|
||||
cells['baf dmy edges SW 3'] = { 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': cells['baf dummy edges SW']['univ'],
|
||||
'mat': mats['SS304']['id'],
|
||||
'fill': None,
|
||||
'surfs': '-{0}'.format(surfs['baffle surf west']['id'])}
|
||||
latts['baffle edges SW'] = { 'order': inc_order(lo),
|
||||
'comm': comm_t.format("Baffle SW edges"),
|
||||
'id': new_id(univIDs),
|
||||
'type': 'rectangular',
|
||||
'dim': 2,
|
||||
'lleft': -latticePitch/2,
|
||||
'width': latticePitch/2,
|
||||
'univs': """
|
||||
{0:>3} {1:>3}
|
||||
{2:>3} {3:>3}
|
||||
""".format(cells['baffle dummy west']['univ'],cells['water pin']['univ'],cells['baf dummy edges SW']['univ'],cells['baffle dummy south']['univ'])}
|
||||
cells['baffle edges SW'] = { 'order': inc_order(co),
|
||||
'comm': comm_t.format("NE edges baffle universe"),
|
||||
'id': new_id(cellIDs),
|
||||
'univ': new_id(univIDs),
|
||||
'fill': latts['baffle edges SW']['id'],
|
||||
'surfs': '-{0}'.format(surfs['dummy outer']['id'])}
|
||||
|
||||
# baffle SE edges
|
||||
|
||||
cells['baf dummy edges SE'] = { 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': new_id(univIDs),
|
||||
'mat': mats['water-nominal']['id'],
|
||||
'fill': None,
|
||||
'surfs': '{0} -{1}'.format(surfs['baffle surf south']['id'],surfs['baffle surf east']['id'])}
|
||||
cells['baf dmy edges SE 2'] = { 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': cells['baf dummy edges SE']['univ'],
|
||||
'mat': mats['SS304']['id'],
|
||||
'fill': None,
|
||||
'surfs': '-{0} -{1}'.format(surfs['baffle surf south']['id'],surfs['baffle surf east']['id'])}
|
||||
cells['baf dmy edges SE 3'] = { 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': cells['baf dummy edges SE']['univ'],
|
||||
'mat': mats['SS304']['id'],
|
||||
'fill': None,
|
||||
'surfs': '{0}'.format(surfs['baffle surf east']['id'])}
|
||||
latts['baffle edges SE'] = { 'order': inc_order(lo),
|
||||
'comm': comm_t.format("Baffle SE edges"),
|
||||
'id': new_id(univIDs),
|
||||
'type': 'rectangular',
|
||||
'dim': 2,
|
||||
'lleft': -latticePitch/2,
|
||||
'width': latticePitch/2,
|
||||
'univs': """
|
||||
{0:>3} {1:>3}
|
||||
{2:>3} {3:>3}
|
||||
""".format(cells['water pin']['univ'],cells['baffle dummy east']['univ'],cells['baffle dummy south']['univ'],cells['baf dummy edges SE']['univ'])}
|
||||
cells['baffle edges SE'] = { 'order': inc_order(co),
|
||||
'comm': comm_t.format("NE edges baffle universe"),
|
||||
'id': new_id(cellIDs),
|
||||
'univ': new_id(univIDs),
|
||||
'fill': latts['baffle edges SE']['id'],
|
||||
'surfs': '-{0}'.format(surfs['dummy outer']['id'])}
|
||||
|
||||
# baffle NW corner
|
||||
|
||||
cells['baf dummy corner NW'] ={ 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': new_id(univIDs),
|
||||
'mat': mats['water-nominal']['id'],
|
||||
'fill': None,
|
||||
'surfs': '-{0} -{1}'.format(surfs['baffle surf west']['id'],surfs['baffle surf north']['id'])}
|
||||
cells['baf dmy corner NW 2'] ={ 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': cells['baf dummy corner NW']['univ'],
|
||||
'mat': mats['water-nominal']['id'],
|
||||
'fill': None,
|
||||
'surfs': '{0}'.format(surfs['baffle surf west']['id'])}
|
||||
cells['baf dmy corner NW 3'] ={ 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': cells['baf dummy corner NW']['univ'],
|
||||
'mat': mats['SS304']['id'],
|
||||
'fill': None,
|
||||
'surfs': '{0} -{1}'.format(surfs['baffle surf north']['id'],surfs['baffle surf west']['id'])}
|
||||
latts['baffle corner NW'] = { 'order': inc_order(lo),
|
||||
'comm': comm_t.format("Baffle NW corner"),
|
||||
'id': new_id(univIDs),
|
||||
'type': 'rectangular',
|
||||
'dim': 2,
|
||||
'lleft': -latticePitch/2,
|
||||
'width': latticePitch/2,
|
||||
'univs': """
|
||||
{0:>3} {1:>3}
|
||||
{1:>3} {1:>3}
|
||||
""".format(cells['baf dummy corner NW']['univ'],cells['water pin']['univ'])}
|
||||
cells['baffle corner NW'] = { 'order': inc_order(co),
|
||||
'comm': comm_t.format("NW corner baffle universe"),
|
||||
'id': new_id(cellIDs),
|
||||
'univ': new_id(univIDs),
|
||||
'fill': latts['baffle corner NW']['id'],
|
||||
'surfs': '-{0}'.format(surfs['dummy outer']['id'])}
|
||||
|
||||
# baffle NE corner
|
||||
|
||||
cells['baf dummy corner NE'] ={ 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': new_id(univIDs),
|
||||
'mat': mats['water-nominal']['id'],
|
||||
'fill': None,
|
||||
'surfs': '{0} -{1}'.format(surfs['baffle surf east']['id'],surfs['baffle surf north']['id'])}
|
||||
cells['baf dmy corner NE 2'] ={ 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': cells['baf dummy corner NE']['univ'],
|
||||
'mat': mats['water-nominal']['id'],
|
||||
'fill': None,
|
||||
'surfs': '-{0}'.format(surfs['baffle surf east']['id'])}
|
||||
cells['baf dmy corner NE 3'] ={ 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': cells['baf dummy corner NE']['univ'],
|
||||
'mat': mats['SS304']['id'],
|
||||
'fill': None,
|
||||
'surfs': '{0} {1}'.format(surfs['baffle surf north']['id'],surfs['baffle surf east']['id'])}
|
||||
latts['baffle corner NE'] = { 'order': inc_order(lo),
|
||||
'comm': comm_t.format("Baffle NE corner"),
|
||||
'id': new_id(univIDs),
|
||||
'type': 'rectangular',
|
||||
'dim': 2,
|
||||
'lleft': -latticePitch/2,
|
||||
'width': latticePitch/2,
|
||||
'univs': """
|
||||
{1:>3} {0:>3}
|
||||
{1:>3} {1:>3}
|
||||
""".format(cells['baf dummy corner NE']['univ'],cells['water pin']['univ'])}
|
||||
cells['baffle corner NE'] = { 'order': inc_order(co),
|
||||
'comm': comm_t.format("NE corner baffle universe"),
|
||||
'id': new_id(cellIDs),
|
||||
'univ': new_id(univIDs),
|
||||
'fill': latts['baffle corner NE']['id'],
|
||||
'surfs': '-{0}'.format(surfs['dummy outer']['id'])}
|
||||
|
||||
# baffle SE corner
|
||||
|
||||
cells['baf dummy corner SE'] ={ 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': new_id(univIDs),
|
||||
'mat': mats['water-nominal']['id'],
|
||||
'fill': None,
|
||||
'surfs': '{0} {1}'.format(surfs['baffle surf east']['id'],surfs['baffle surf south']['id'])}
|
||||
cells['baf dmy corner SE 2'] ={ 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': cells['baf dummy corner SE']['univ'],
|
||||
'mat': mats['water-nominal']['id'],
|
||||
'fill': None,
|
||||
'surfs': '-{0}'.format(surfs['baffle surf east']['id'])}
|
||||
cells['baf dmy corner SE 3'] ={ 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': cells['baf dummy corner SE']['univ'],
|
||||
'mat': mats['SS304']['id'],
|
||||
'fill': None,
|
||||
'surfs': '-{0} {1}'.format(surfs['baffle surf south']['id'],surfs['baffle surf east']['id'])}
|
||||
latts['baffle corner SE'] = { 'order': inc_order(lo),
|
||||
'comm': comm_t.format("Baffle SE corner"),
|
||||
'id': new_id(univIDs),
|
||||
'type': 'rectangular',
|
||||
'dim': 2,
|
||||
'lleft': -latticePitch/2,
|
||||
'width': latticePitch/2,
|
||||
'univs': """
|
||||
{1:>3} {1:>3}
|
||||
{1:>3} {0:>3}
|
||||
""".format(cells['baf dummy corner SE']['univ'],cells['water pin']['univ'])}
|
||||
cells['baffle corner SE'] = { 'order': inc_order(co),
|
||||
'comm': comm_t.format("SE corner baffle universe"),
|
||||
'id': new_id(cellIDs),
|
||||
'univ': new_id(univIDs),
|
||||
'fill': latts['baffle corner SE']['id'],
|
||||
'surfs': '-{0}'.format(surfs['dummy outer']['id'])}
|
||||
|
||||
# baffle SW corner
|
||||
|
||||
cells['baf dummy corner SW'] ={ 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': new_id(univIDs),
|
||||
'mat': mats['water-nominal']['id'],
|
||||
'fill': None,
|
||||
'surfs': '-{0} {1}'.format(surfs['baffle surf west']['id'],surfs['baffle surf south']['id'])}
|
||||
cells['baf dmy corner SW 2'] ={ 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': cells['baf dummy corner SW']['univ'],
|
||||
'mat': mats['water-nominal']['id'],
|
||||
'fill': None,
|
||||
'surfs': '{0}'.format(surfs['baffle surf west']['id'])}
|
||||
cells['baf dmy corner SW 3'] ={ 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': cells['baf dummy corner SW']['univ'],
|
||||
'mat': mats['SS304']['id'],
|
||||
'fill': None,
|
||||
'surfs': '-{0} -{1}'.format(surfs['baffle surf south']['id'],surfs['baffle surf west']['id'])}
|
||||
latts['baffle corner SW'] = { 'order': inc_order(lo),
|
||||
'comm': comm_t.format("Baffle SW corner"),
|
||||
'id': new_id(univIDs),
|
||||
'type': 'rectangular',
|
||||
'dim': 2,
|
||||
'lleft': -latticePitch/2,
|
||||
'width': latticePitch/2,
|
||||
'univs': """
|
||||
{1:>3} {1:>3}
|
||||
{0:>3} {1:>3}
|
||||
""".format(cells['baf dummy corner SW']['univ'],cells['water pin']['univ'])}
|
||||
cells['baffle corner SW'] = { 'order': inc_order(co),
|
||||
'comm': comm_t.format("SW corner baffle universe"),
|
||||
'id': new_id(cellIDs),
|
||||
'univ': new_id(univIDs),
|
||||
'fill': latts['baffle corner SW']['id'],
|
||||
'surfs': '-{0}'.format(surfs['dummy outer']['id'])}
|
||||
|
||||
baffle = {}
|
||||
baffle['bafn_'] = cells['baffle south']['univ']
|
||||
baffle['bafs_'] = cells['baffle north']['univ']
|
||||
baffle['bafe_'] = cells['baffle west']['univ']
|
||||
baffle['bafw_'] = cells['baffle east']['univ']
|
||||
baffle['bafnw'] = cells['baffle corner SE']['univ']
|
||||
baffle['bafne'] = cells['baffle corner SW']['univ']
|
||||
baffle['bafsw'] = cells['baffle corner NE']['univ']
|
||||
baffle['bafse'] = cells['baffle corner NW']['univ']
|
||||
baffle['bfcnw'] = cells['baffle edges SE']['univ']
|
||||
baffle['bfcne'] = cells['baffle edges SW']['univ']
|
||||
baffle['bfcsw'] = cells['baffle edges NE']['univ']
|
||||
baffle['bfcse'] = cells['baffle edges NW']['univ']
|
||||
|
||||
|
||||
|
||||
|
||||
################## lattices ##################
|
||||
|
||||
|
|
@ -1072,25 +562,6 @@ J__11 = cells['Fuel 3.1 w/o + instr lattice']['univ'],
|
|||
mats['UO2 3.1']['id']: "0 0 128", # 3.1: dark blue
|
||||
}
|
||||
|
||||
# plots["main cells"] = { 'id': new_id(plotIDs),
|
||||
# 'fname': 'center_cells',
|
||||
# 'type': 'slice',
|
||||
# 'col': 'cell',
|
||||
# 'background': '255 255 255',
|
||||
# 'origin': '0.0 0.0 {0}'.format((highestExtent-lowestExtent)/2),
|
||||
# 'width': '{0} {0}'.format(coreBarrelIR*2+10),
|
||||
# 'basis': 'xy',
|
||||
# 'pixels': '3000 3000',}
|
||||
# plots["main mats"] = { 'id': new_id(plotIDs),
|
||||
# 'fname': 'center_mats',
|
||||
# 'type': 'slice',
|
||||
# 'col': 'mat',
|
||||
# 'background': '255 255 255',
|
||||
# 'origin': '0.0 0.0 {0}'.format((highestExtent-lowestExtent)/2),
|
||||
# 'width': '{0} {0}'.format(rpvOR*2+10),
|
||||
# 'basis': 'xy',
|
||||
# 'pixels': '6000 6000',
|
||||
# 'spec': colSpecMat,}
|
||||
plots["row 8 axial"] ={ 'id': new_id(plotIDs),
|
||||
'fname': 'row_8_mats_axial',
|
||||
'type': 'slice',
|
||||
|
|
@ -1101,36 +572,6 @@ J__11 = cells['Fuel 3.1 w/o + instr lattice']['univ'],
|
|||
'basis': 'xz',
|
||||
'pixels': '6000 6000',
|
||||
'spec': colSpecMat,}
|
||||
# plots["grid5 mats H7"] = { 'id': new_id(plotIDs),
|
||||
# 'fname': 'H7_mats',
|
||||
# 'type': 'slice',
|
||||
# 'col': 'mat',
|
||||
# 'background': '255 255 255',
|
||||
# 'origin': '{x} {y} {z}'.format(x=0.0,y=latticePitch,z=(highestExtent-lowestExtent)/2),
|
||||
# 'width': '{0} {0}'.format(latticePitch),
|
||||
# 'basis': 'xy',
|
||||
# 'pixels': '5000 5000',
|
||||
# 'spec': colSpecMat,}
|
||||
# plots["grid8 mats J14"] = { 'id': new_id(plotIDs),
|
||||
# 'fname': 'grid8_mats_J14',
|
||||
# 'type': 'slice',
|
||||
# 'col': 'mat',
|
||||
# 'background': '255 255 255',
|
||||
# 'origin': '{x} {y} {z}'.format(x=-latticePitch+latticePitch/3,y=-6*latticePitch+latticePitch/3,z=grid8Center),
|
||||
# 'width': '{0} {0}'.format(latticePitch),
|
||||
# 'basis': 'xy',
|
||||
# 'pixels': '5000 5000',
|
||||
# 'spec': colSpecMat,}
|
||||
# plots["grid5 mats J14"] = { 'id': new_id(plotIDs),
|
||||
# 'fname': 'grid5_mats_J14',
|
||||
# 'type': 'slice',
|
||||
# 'col': 'mat',
|
||||
# 'background': '255 255 255',
|
||||
# 'origin': '{x} {y} {z}'.format(x=-latticePitch+latticePitch/3,y=-6*latticePitch+latticePitch/3,z=grid5Center),
|
||||
# 'width': '{0} {0}'.format(latticePitch),
|
||||
# 'basis': 'xy',
|
||||
# 'pixels': '5000 5000',
|
||||
# 'spec': colSpecMat,}
|
||||
plots["mats J8 ax bot"] = { 'id': new_id(plotIDs),
|
||||
'fname': 'J8_mats_ax_bot',
|
||||
'type': 'slice',
|
||||
|
|
@ -1172,78 +613,6 @@ J__11 = cells['Fuel 3.1 w/o + instr lattice']['univ'],
|
|||
'pixels': '{x} {z}'.format(x=4000,z=int(4000*2.1*(topLowerNozzle-bottomSupportPlate)/latticePitch)),
|
||||
'spec': colSpecMat,}
|
||||
|
||||
# BA position plot
|
||||
# mask = []
|
||||
# colors = {}
|
||||
# mask.append(cells['burn abs']['id'])
|
||||
# mask.append(cells['burn abs1']['id'])
|
||||
# mask.append(cells['burn abs2']['id'])
|
||||
# mask.append(cells['burn abs3']['id'])
|
||||
# mask.append(cells['burn abs4']['id'])
|
||||
# mask.append(cells['burn abs5']['id'])
|
||||
# mask.append(cells['burn abs6']['id'])
|
||||
# colors[cells['burn abs']['id']] = "0 0 0"
|
||||
# colors[cells['burn abs1']['id']] = "0 0 0"
|
||||
# colors[cells['burn abs2']['id']] = "0 0 0"
|
||||
# colors[cells['burn abs3']['id']] = "0 0 0"
|
||||
# colors[cells['burn abs4']['id']] = "0 0 0"
|
||||
# colors[cells['burn abs5']['id']] = "0 0 0"
|
||||
# colors[cells['burn abs6']['id']] = "0 0 0"
|
||||
# for assembly,cellList in assemblyCells.items():
|
||||
# mask.append(cells[cellList[-1]]['id'])
|
||||
# mask.append(cells[cellList[-2]]['id'])
|
||||
# mask.append(cells[cellList[-3]]['id'])
|
||||
# mask.append(cells[cellList[-4]]['id'])
|
||||
# colors[cells[cellList[-1]]['id']] = "0 0 0"
|
||||
# colors[cells[cellList[-2]]['id']] = "0 0 0"
|
||||
# colors[cells[cellList[-3]]['id']] = "0 0 0"
|
||||
# colors[cells[cellList[-4]]['id']] = "0 0 0"
|
||||
# for cellName,cell in cells.items():
|
||||
# if 'baf' in cellName and 'mat' in cell:
|
||||
# if cell['mat'] == mats['SS304']['id']:
|
||||
# mask.append(cell['id'])
|
||||
# colors[cell['id']] = "0 0 0"
|
||||
|
||||
# plots["ba pos"] = { 'id': new_id(plotIDs),
|
||||
# 'fname': 'ba_positions',
|
||||
# 'type': 'slice',
|
||||
# 'col': 'cell',
|
||||
# 'background': '255 255 255',
|
||||
# 'origin': '0.0 0.0 {0}'.format((highestExtent-lowestExtent)/2),
|
||||
# 'width': '{0} {0}'.format(rpvOR*2+10),
|
||||
# 'basis': 'xy',
|
||||
# 'pixels': '6000 6000',
|
||||
# 'spec': colors,
|
||||
# 'msk': { 'maskrgb': '255 255 255',
|
||||
# 'comps': '\n '.join([str(m) for m in mask])},}
|
||||
|
||||
# instr tube position plot
|
||||
# mask = []
|
||||
# mask.append(cells['GT instr']['id'])
|
||||
# mask.append(cells['GT instr1']['id'])
|
||||
# mask.append(cells['GT instr2']['id'])
|
||||
# for assembly,cellList in assemblyCells.items():
|
||||
# mask.append(cells[cellList[-1]]['id'])
|
||||
# mask.append(cells[cellList[-2]]['id'])
|
||||
# mask.append(cells[cellList[-3]]['id'])
|
||||
# mask.append(cells[cellList[-4]]['id'])
|
||||
# for cellName,cell in cells.items():
|
||||
# if 'baf' in cellName and 'mat' in cell:
|
||||
# if cell['mat'] == mats['SS304']['id']:
|
||||
# mask.append(cell['id'])
|
||||
|
||||
# plots["instr pos"] = { 'id': new_id(plotIDs),
|
||||
# 'fname': 'instr_positions',
|
||||
# 'type': 'slice',
|
||||
# 'col': 'cell',
|
||||
# 'background': '255 255 255',
|
||||
# 'origin': '0.0 0.0 {0}'.format((highestExtent-lowestExtent)/2),
|
||||
# 'width': '{0} {0}'.format(rpvOR*2+10),
|
||||
# 'basis': 'xy',
|
||||
# 'pixels': '6000 6000',
|
||||
# 'msk': { 'maskrgb': '255 255 255',
|
||||
# 'comps': '\n '.join([str(m) for m in mask])},}
|
||||
|
||||
|
||||
# settings parameters
|
||||
entrX = 15*17
|
||||
|
|
@ -1293,151 +662,6 @@ J__11 = cells['Fuel 3.1 w/o + instr lattice']['univ'],
|
|||
return mats,surfs,cells,latts,sett,plots,tallies
|
||||
|
||||
|
||||
def make_pin(name,section,co,cells,univ,cellIDs,radSurfList,matList,
|
||||
grid=False, surfs=None, gridMat=None, gridType=None):
|
||||
"""Populates the cells dictionary with a radial pincell universe
|
||||
|
||||
name - string, name of the cell as well as outKeys = [name] the comment to be written
|
||||
section - section comment - not written if left as ""
|
||||
co - cells order dictionary
|
||||
cells - cells dictionary
|
||||
univ - new universe id number for this pincell
|
||||
cellIDs - set of already used cell IDs
|
||||
radSurfList- list of surface IDs, from inside to outside
|
||||
matList - list of tuples of material IDs and comments, from inside to outside.
|
||||
length should be one more than radSurfList.
|
||||
first material will be the inside of the first surface,
|
||||
last last will be outside the last surface.
|
||||
if comments are "", no comment will be written
|
||||
|
||||
Since box surfaces aren't fully implemented yet, square grids around the
|
||||
outside of pins need to be added manually here.
|
||||
|
||||
grid - flag for whether or not to make the grid
|
||||
surfs - full surfaces dictionary. This routine uses the 'rod grid box'
|
||||
surfaces
|
||||
gridMat - material for the grid
|
||||
gridType - either 'i' or 'tb' for intermediate or top/bottom
|
||||
|
||||
"""
|
||||
|
||||
cells[name] = { 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': univ,
|
||||
'mat': matList[0][0],
|
||||
'fill': None,
|
||||
'surfs': '-{0}'.format(radSurfList[0])}
|
||||
if section != "":
|
||||
cells[name]['section'] = comm_t.format(section)
|
||||
if matList[0][1] != "":
|
||||
cells[name]['comm'] = comm_t.format(matList[0][1])
|
||||
|
||||
for i,(matIDcomment,outSurf) in enumerate(zip(matList[1:-1],radSurfList[:-1])):
|
||||
cells[name + str(i)] = { 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': univ,
|
||||
'mat': matIDcomment[0],
|
||||
'fill': None,
|
||||
'surfs': '{0} -{1}'.format(outSurf,radSurfList[i+1])}
|
||||
if matIDcomment[1] != "":
|
||||
cells[name + str(i)]['comm'] = comm_t.format(matIDcomment[1])
|
||||
|
||||
cells[name + 'last'] = { 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': univ,
|
||||
'mat': matList[-1][0],
|
||||
'fill': None,
|
||||
'surfs': '{0}'.format(radSurfList[-1])}
|
||||
|
||||
|
||||
if grid:
|
||||
|
||||
# if box-type surfaces were implemented in openmc, this entire thing could be
|
||||
# skipped, and instead the grid material and box surface could be put in
|
||||
# radSurfList and matList
|
||||
|
||||
if not surfs or not gridMat: raise Exception('need surfs and gridMat for grid')
|
||||
|
||||
|
||||
cells[name + 'last']['surfs'] = '{0} {1} -{2} {3} -{4}'.format(radSurfList[-1],
|
||||
surfs['rod grid box ybot {0}'.format(gridType)]['id'],
|
||||
surfs['rod grid box ytop {0}'.format(gridType)]['id'],
|
||||
surfs['rod grid box xbot {0}'.format(gridType)]['id'],
|
||||
surfs['rod grid box xtop {0}'.format(gridType)]['id'])
|
||||
|
||||
cells[name + ' grid 1'] = { 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': univ,
|
||||
'mat': gridMat,
|
||||
'fill': None,
|
||||
'surfs': '-{0}'.format(surfs['rod grid box ybot {0}'.format(gridType)]['id'])}
|
||||
cells[name + ' grid 2'] = { 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': univ,
|
||||
'mat': gridMat,
|
||||
'fill': None,
|
||||
'surfs': '{0}'.format(surfs['rod grid box ytop {0}'.format(gridType)]['id'])}
|
||||
cells[name + ' grid 3'] = { 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': univ,
|
||||
'mat': gridMat,
|
||||
'fill': None,
|
||||
'surfs': '{0} -{1} {2}'.format(surfs['rod grid box xtop {0}'.format(gridType)]['id'],
|
||||
surfs['rod grid box ytop {0}'.format(gridType)]['id'],
|
||||
surfs['rod grid box ybot {0}'.format(gridType)]['id'])}
|
||||
cells[name + ' grid 4'] = { 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': univ,
|
||||
'mat': gridMat,
|
||||
'fill': None,
|
||||
'surfs': '-{0} -{1} {2}'.format(surfs['rod grid box xbot {0}'.format(gridType)]['id'],
|
||||
surfs['rod grid box ytop {0}'.format(gridType)]['id'],
|
||||
surfs['rod grid box ybot {0}'.format(gridType)]['id'])}
|
||||
|
||||
def make_stack(name,co,cells,univ,cellIDs,axSurfList,fillList):
|
||||
"""Populates the cells dictionary with an axial stack universe
|
||||
|
||||
name - string, name of the cell as well as the comment to be written
|
||||
co - cells order dictionary
|
||||
cells - cells dictionary
|
||||
univ - new universe id number for this stack
|
||||
cellIDs - set of already used cell IDs
|
||||
axSurfList - list of surface IDs, from botom to top
|
||||
fillList - list of fill universe IDs, from bottom to top.
|
||||
length should be one more than axSurfList.
|
||||
first fill universe will be below the first surface,
|
||||
last fill universe will be above the last surface
|
||||
"""
|
||||
|
||||
cells[name] = { 'order': inc_order(co),
|
||||
'comm': comm_t.format(name),
|
||||
'id': new_id(cellIDs),
|
||||
'univ': univ,
|
||||
'fill': fillList[0],
|
||||
'surfs': '-{0}'.format(axSurfList[0])}
|
||||
|
||||
for i,(fillU,botSurf) in enumerate(zip(fillList[1:-1],axSurfList[:-1])):
|
||||
cells[name + str(i)] = { 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': univ,
|
||||
'fill': fillU,
|
||||
'surfs': '{0} -{1}'.format(botSurf,axSurfList[i+1])}
|
||||
cells[name + 'last'] = { 'order': inc_order(co),
|
||||
'comm': "",
|
||||
'id': new_id(cellIDs),
|
||||
'univ': univ,
|
||||
'fill': fillList[-1],
|
||||
'surfs': '{0}'.format(axSurfList[-1])}
|
||||
|
||||
|
||||
def make_assembly(latts, cells, surfs, lo, co, univIDs, cellIDs, water, name,
|
||||
comm=None,sect=None, dim=None,lleft=None,width=None,univs=None,
|
||||
gridSurfs=None,sleeveMats=None):
|
||||
|
|
|
|||
|
|
@ -287,4 +287,14 @@ surfs['RPV OR'] = openmc.ZCylinder(
|
|||
surfs['upper bound'] = openmc.ZPlane(
|
||||
z0=highest_extent, name='upper problem boundary')
|
||||
surfs['lower bound'] = openmc.ZPlane(
|
||||
z0=lowest_extent, name='lower problem boundary')
|
||||
z0=lowest_extent, name='lower problem boundary')
|
||||
|
||||
# baffle surfaces
|
||||
surfs['baffle north'] = openmc.YPlane(
|
||||
y0=(lattice_pitch/4. - baffle_width), name='baffle north')
|
||||
surfs['baffle south'] = openmc.YPlane(
|
||||
y0=(baffle_width - lattice_pitch/4.), name='baffle south')
|
||||
surfs['baffle east'] = openmc.XPlane(
|
||||
y0=(lattice_pitch/4. - baffle_width), name='baffle east')
|
||||
surfs['baffle west'] = openmc.YPlane(
|
||||
y0=(baffle_width - lattice_pitch/4), name='baffle west')
|
||||
Loading…
Add table
Add a link
Reference in a new issue