m.name = key # substitute 40000 with natural composition of Zr: if 'ifba' in m.name: # m.sdict[40000] = Material('Zr') m.sdict[40000] = Material('Zr') print 'substitution rule for', m.name, m.sdict # substitutions for metastable isotopes: m.sdict[61548] = 61198 m.sdict[47510] = 47160 m.sdict[52527] = 52177 m.sdict[52529] = 52179 m.sdict[51000] = Material('Sb') if __name__ == '__main__': dd = {} for key in sorted(mats.keys()): m = mats[key] for t in [580, 600]: m.T = t print m.card(suffixes=True).format('$ ' + key) ah = m.how_much(1, Z=[92, 93, 94, 95]) af = m.how_much(1, ZAID=[92235, 94239, 94241]) if ah.v and af.v: dd[af / ah] = (key, m) print '-' * 30 for f in sorted(dd.keys()): key, m = dd[f] print f, key
from pirs.mcnp import Material # 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/>. m1 = Material(('H', 2, 1), ('O', 1, 1)) m1.sdict[8018] = 8016 m1.thermal = 'lwtr' m1.T = 300 print m1.card() m1.T = 450 print m1.card()
from pirs.mcnp import Material # 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/>. fe = Material('Fe') # Fe chemical element with nat. occuring isotopes for T in [300, 350, 400]: fe.T = T print fe.card()
from pirs.mcnp import Material # 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/>. # zircaloy-2, Table 5, p.7 zr = Material(('Zr', 98.23), ('Sn', 1.50), ('Fe', 0.12), ('Cr', 0.10), ('N', 0.05)) print zr.card()