Beispiel #1
0
# PIRS-2 is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# PIRS-2 is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from pirs.tools.plots import colormap

c = Cylinder(Z=2)

# heat
c.heat.set_grid([1, 2, 1])
c.heat.set_values([0.1, 0.2, 0.3])

# temperature
c.temp.set_grid([1] * 20)
c.temp.set_values(lambda z: 300 + 100 * z)

# density
c.dens.set_grid([1] * 5)
c.dens.set_values(1.)

colormap(c, var='heat', plane={'x': 0}, filename='sol3h.png')
colormap(c, var='temp', plane={'x': 0}, filename='sol3t.png')
Beispiel #2
0
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# PIRS-2 is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from pirs.tools.plots import colormap

# pin model
pin = Cylinder(R=0.45, Z=100, material='clad')
pin.insert(Cylinder(R=0.4, Z=pin.Z-5, material='fuel'))

# assembly box
a = Box(X=5, Y=7, Z=pin.Z+10, material='water')
a.grid.x = 1
a.grid.y = 1.1
a.grid.z = a.Z

# insert pins
for i in range(5):
    for j in range(6):
        a.grid.insert((i,j,0), pin.copy_tree())

# center grid with respect to solid
a.grid.center()
Beispiel #3
0
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from pin_model import ah 

"""
Guide tube and control rod models.
"""

# data from table 6, p.8:
r1 = 0.5624
r2 = 0.6032

tube = Cylinder(R=r2, Z=ah, material='zirc')
watr = tube.insert(Cylinder(R=r1, Z=ah, material='water'))
watr.name = 'wchan'

watr.temp.set_values(580)
watr.dens.set_values(0.71187)

tube.temp.set_values(580)
tube.dens.set_values(6.504)

# water channels
chan = tube.copy_tree()

# let's model an absorber rod in the tube:
absrod = watr.insert(Cylinder(R=r1*0.9, Z=ah, material='ifba', pos.Z=ah*0.7)
absrod.name = 'absorber rod'
Beispiel #4
0
from qcore_map import core_map, uox_map, mox_map, ref_map, emp_map
from rod_models import ap, ah, pp
from rod_models import uox, mox1, waba, tube, chan, ifba, fuel_key, ifba_fuel_key, ifba_ab_key, waba_ab_key

# for 1/4 model heat tallies not needed:
for pin in [uox, mox1, ifba]:
    for c in pin.values():
        c.heat = None

# steel pin for reflector assembly:
cyl = uox.copy_tree()
for c in cyl.children:  #### .values():
    c.withdraw()

vessel = Cylinder(Z=ah + 2 * ap, R=9 * ap)
awater = Box(X=9 * ap, Y=9 * ap, Z=ah + 2 * ap)
awater.material = 'bwater'
awater.temp.set_values(580.)
awater.dens.set_values(0.8)
awater.name = 'axial_reflector'
awater.pos.x = awater.X / 2.
awater.pos.y = -awater.Y / 2.

qcore = Box(X=9 * ap, Y=9 * ap, Z=ah)

vessel.insert(awater)
vessel.insert(qcore)
qcore.name = 'core_container'
qcore.pos.x = qcore.X / 2.
qcore.pos.y = -qcore.Y / 2.
Beispiel #5
0
#
# PIRS-2 is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# PIRS-2 is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

cnt = Box(X=2.53, Y=2.53, Z=365, material='water')
r = Cylinder(R=0.4583, Z=365, material='steel')
f = Cylinder(R=0.3951, Z=365, material='fuel')

r.insert(f)
cnt.insert(r)

r2 = cnt.insert(r.copy_tree())
r2.pos.x = 0.8
r2.pos.y = 0.8

if __name__ == '__main__':
    from pirs.tools.plots import colormap
    pz = colormap(cnt, plane={'z': 0})
    px = colormap(cnt, plane={'x': 0}, aspect='auto')
    py = colormap(cnt, plane={'y': 0}, aspect='auto')
    pz.get_figure().savefig('geom1_pz.pdf')
Beispiel #6
0
from pirs.solids import Cylinder
# Copyright 2015 Karlsruhe Institute of Technology (KIT)
#
# This file is part of PIRS-2.
#
# PIRS-2 is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# PIRS-2 is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

c = Cylinder()

print c
Beispiel #7
0
#
# PIRS-2 is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# PIRS-2 is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from pin_model import model as cell
"""
IFBA fuel pin.  Copy of standard pin, with layer of ifba added.
"""
# data from table 6, p.8:
r1 = 0.3951
r2 = 0.3991

# geometry: copy of pin
ifba_pin = cell.get_child('clad').copy_tree()
# add layer of ifba to the 'gap' element:
gap = ifba_pin.get_child('gap')
ifba = gap.insert(Cylinder(R=r2, Z=gap.Z, material='ifba'), 0)
ifba.name = 'ifba'

ifba.dens.set_values(1.69)
Beispiel #8
0
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from pirs.tools.plots import colormap

b = Box()
b.X = 3
b.Y = 4
b.Z = 5
b.material = 'm1'

c1 = Cylinder()
c1.R = 1
c1.Z = 4
c1.material = 'm2'

b.insert(c1)

c2 = c1.copy_tree()
c2.material = 'm3'
c2.R = 0.8
c2.pos.x = 0.8
c2.pos.y = 0.6

b.insert(c2)

colormap(b, filename='sol1z.png')
Beispiel #9
0
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# PIRS-2 is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.


b = Box(X=3, Y=3)

c = Cylinder(R=0.4)

b.grid.x = 1
b.grid.y = 1

for i in [0, 1]:
    for j in [0, 1]:
        cc = c.copy_tree()
        b.grid.insert((i, j, 0), cc)
        cc.material = 'm{}{}'.format(i,j)

from pirs.tools.plots import colormap
colormap(b, filename='ex3_1.pdf')

b.grid.center()
colormap(b, filename='ex3_2.pdf')
Beispiel #10
0
tube_r2 = 0.6032

waba_r1 = 0.2858
waba_r2 = 0.3531
waba_r3 = 0.4039
waba_r4 = 0.4839

# 2

from pirs.solids import Cylinder
# from pin_mcnp import moxfrac

# 2a

# pin model -----------------------------------------------------------------------------
clad = Cylinder(R=pin_r3, Z=ah)
gap = Cylinder(R=pin_r2, Z=ah)
fuel = Cylinder(R=pin_r1, Z=ah)
# do not model gap explicitly
# clad.insert('gap', gap)
clad.clad_thickness = (pin_r3 - pin_r2) * 1e-2  # SCF length unit is 1 m.
clad.pu_fraction = 0.
clad_dens_coeff = (pin_r3**2 - pin_r2**2) / (pin_r3**2 - pin_r1**2)

# gap.insert('fuel', fuel)
clad.insert(fuel)
fuel.name = 'fuel'
fuel_key = fuel.get_key()

clad.material = 'zirc'
# gap.material = 'oxygen'
Beispiel #11
0
# PIRS-2 is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

# surrounding water
b = Box(material='water')
b.X = 1.26
b.Y = b.X
b.Z = 400

# clad
c = Cylinder(material='steel')
c.R = 0.4583
c.Z = 360

# fuel
f = Cylinder(material='fuel')
f.R = 0.3951
f.Z = 350

# construct model
b.insert(c)  # put clad into box
c.insert(f)  # put fuel into clad
c.pos.y = 0.1  # shift clad with resp. to container

if __name__ == '__main__':
    from pirs.tools.plots import colormap