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
# 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/>. u4_c = 0.1771 u5_f = 1.219 u5_c = 0.9519e-1 u8_f = 0.2998 u8_c = 0.7019e-1 print 'u5: ', u5_f / (u5_f + u5_c) print 'u8: ', u8_f / (u8_f + u8_c) from pirs.mcnp import Material u = Material('U') a4 = u.how_much(1, 92234).v a5 = u.how_much(1, 92235).v a8 = u.how_much(1, 92238).v print a5, a8 print u.report() kinf = (a4 * u4_f + a5 * u5_f + a8 * u8_f) / (a4 * (u4_f + u4_c) + a5 * (u5_f + u5_c) + a8 * (u8_f + u8_c)) print kinf
# # 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/>. u = Material((92235, 4, 2), (92238, 96, 2)) p = Material((94239, 90, 2), (94240, 10, 2)) o = Material(8016) uox = u + 2 * o pox = p + 2 * o mox = Material((uox, 1), (pox, 1)) print mox.report() def of(m): a1 = m.how_much(1, ZAID=[92235, 94239]) a2 = m.how_much(1, Z=[92, 94]) return a1 / a2 - 0.10 mox.tune(of, [uox, pox]) print mox.report() print mox.how_much(1, ZAID=[92235, 94239]) print mox.how_much(1, Z=[92, 94])