Transmutation

Download the full notebook.

06-transmutation

Transmutation

As of v0.3, PyNE has a nascent support for native transmutation. The only implementation right now is a recursive chain solver, though we envision a suite of tools. To enable this future vision each solver will have a Transmute class which has a transmute() method. Though this may seem like extra work from the users perspective, it enables rapid speedups by pre-loading cross section data and/or pre-computing decay chains.

The transmute() method accepts a material, as well as other parameters.

In [1]:
import time
import sys
import numpy as np
In [3]:
from pyne import nucname
from pyne.material import Material
from pyne.transmute.chainsolve import Transmuter

First make a transmuter instance

In [4]:
transmuter = Transmuter(t=365.25 * 24 * 3600, phi=4e14)

Then make a dictionary to represent a material

In [5]:
imat = {'H1': 1.0}

Transmuting the material returns another material:

In [6]:
print(transmuter.transmute(imat))
Material:
mass = 1.0000808768320506
density = -1.0
atoms per molecule = 0.9999999999995399
---------------------------------------
H1     0.9998381349936512
H2     0.00016186498541368035
H3     2.0935132250934375e-11

You can also specify a flux using the EAF group structure:

In [7]:
phi = np.array([  # fluxin1 from ALARA
    0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00, 0.00000E+00,
    0.00000E+00, 8.98755E+13, 9.77446E+12, 8.06925E+12, 1.70726E+12, 1.28302E+12,
    1.89143E+12, 2.04175E+12, 2.07250E+12, 1.80384E+12, 1.54256E+12, 1.42579E+12,
    1.24872E+12, 1.17419E+12, 1.14707E+12, 1.19572E+12, 1.22437E+12, 1.26141E+12,
    4.38938E+11, 9.07635E+11, 1.39910E+12, 1.45818E+12, 1.48523E+12, 1.43566E+12,
    1.41561E+12, 1.40784E+12, 1.35321E+12, 2.71459E+12, 2.62508E+12, 2.66233E+12,
    1.40292E+12, 1.42487E+12, 1.37130E+12, 1.37665E+12, 1.52025E+12, 1.59680E+12,
    1.07723E+12, 2.77969E+11, 2.78790E+11, 5.53898E+11, 1.09314E+12, 1.64561E+12,
    1.68331E+12, 1.74677E+12, 1.80254E+12, 1.93480E+12, 1.96231E+12, 1.93938E+12,
    1.92934E+12, 1.93774E+12, 1.90789E+12, 1.82967E+12, 1.88061E+12, 1.89368E+12,
    1.81907E+12, 3.42703E+12, 1.43106E+12, 2.05052E+12, 1.78729E+12, 1.86431E+12,
    1.83209E+12, 1.87158E+12, 1.80219E+12, 1.73173E+12, 1.60686E+12, 1.29878E+12,
    1.48781E+12, 1.61671E+12, 1.60349E+12, 1.59722E+12, 3.03722E+12, 2.90241E+12,
    1.42928E+12, 1.35835E+12, 2.69252E+12, 2.55807E+12, 2.86956E+11, 1.05539E+11,
    2.25492E+11, 5.88210E+11, 1.19440E+12, 2.20287E+12, 1.08398E+12, 1.03200E+12,
    9.75760E+11, 9.46015E+11, 9.12835E+11, 9.29522E+11, 8.90411E+11, 8.30228E+11,
    8.45313E+11, 8.07049E+11, 7.71896E+11, 7.07755E+11, 8.21782E+11, 7.22692E+11,
    7.33346E+11, 6.91441E+11, 1.63354E+12, 1.56807E+12, 5.29641E+11, 4.48653E+11,
    1.07702E+12, 8.07461E+11, 1.82087E+12, 7.58110E+11, 1.26259E+12, 1.12779E+12,
    1.54243E+12, 6.74366E+11, 8.42541E+11, 4.34202E+11, 2.89471E+11, 3.71251E+11,
    2.64038E+11, 2.30016E+11, 5.82748E+11, 9.47843E+11, 1.71492E+12, 1.80379E+12,
    5.48701E+11, 8.73235E+11, 1.82674E+12, 1.52497E+12, 1.48336E+12, 9.67624E+11,
    6.31697E+11, 6.03210E+11, 5.84716E+11, 1.49733E+11, 1.84075E+11, 7.72799E+11,
    1.82977E+11, 1.80083E+12, 1.48029E+12, 1.45254E+12, 1.44214E+12, 1.34832E+12,
    1.10171E+12, 1.27549E+12, 1.33060E+12, 1.27163E+12, 1.32883E+12, 1.32596E+12,
    1.35429E+12, 1.34940E+12, 1.34862E+12, 1.34699E+12, 1.32883E+12, 1.33697E+12,
    1.33352E+12, 1.32882E+12, 1.32283E+12, 1.31655E+12, 1.30955E+12, 1.30178E+12,
    1.29327E+12, 1.28377E+12, 1.27355E+12, 1.26193E+12, 1.24944E+12, 1.23535E+12,
    1.21970E+12, 1.20272E+12, 1.18312E+12, 1.16152E+12, 1.13736E+12, 2.82140E+12,
    5.36871E+13])

Having the log set will produce fancy output.

In [8]:
tm = Transmuter(phi=phi, tol=1e-10, log=sys.stdout)
In [9]:
inp = Material({'FE56': 1.0}, mass=1.0)
t1 = time.time()
out = tm.transmute(inp, t=31536000.0, tol=1e-7)
dt = time.time() - t1
print('Transmutation time: {0}'.format(dt))
--> Fe56 1.0
   |--> Fe57 [0.00438046]
   |--> Fe57 1.0
   |   |--> Fe58 [9.18336666e-06]
   |   |--> Fe58 1.0
   |   |   |--> Fe59 [2.42666743e-09]
   |   |   |--> Cr56 [8.48355844e-23]
   |   |   |--> Cr55 [5.18805e-15]
   |   |   |--> Mn57 [3.32510519e-17]
   |   |   |--> Mn58 [5.50579059e-17]
   |   |   |--> Mn56 [8.01386265e-19]
   |   |   |--> Fe57 [9.32443551e-09]
   |   |   |--> Mn58M [5.39244677e-16]
   |   |   |--> Cr54 [5.1899113e-12]
   |   |--> Cr55 [1.19819151e-17]
   |   |--> Cr54 [2.35240098e-07]
   |   |--> Cr54 1.0
   |   |   |--> Cr55 [1.40945438e-15]
   |   |   |--> Ti51 [1.79352912e-16]
   |   |   |--> V53 [5.32034599e-18]
   |   |   |--> V54 [2.55387164e-17]
   |   |   |--> V52 [6.44852455e-20]
   |   |   |--> Cr53 [2.81950119e-10]
   |   |   |--> Ti50 [2.69566822e-13]
   |   |--> Mn56 [6.72436461e-11]
   |   |--> Cr56 [1.66874942e-20]
   |   |--> Mn57 [5.29448233e-12]
   |   |--> Mn55 [7.74655993e-10]
   |   |--> Fe56 [8.55972423e-06]
   |   |--> Fe56 1.0
   |   |   |--> Fe57 [1.25875636e-08]
   |   |   |--> Cr53 [3.71225677e-10]
   |   |   |--> Mn55 [4.94094467e-10]
   |   |   |--> Mn56 [1.59905049e-12]
   |   |   |--> Mn54 [3.38062974e-14]
   |   |   |--> Fe55 [3.24252005e-09]
   |   |   |--> Cr52 [3.8749132e-12]
   |   |--> Cr53 [1.21595729e-08]
   |--> Cr53 [0.00012834]
   |--> Cr53 1.0
   |   |--> Cr54 [1.97194095e-06]
   |   |--> Cr54 1.0
   |   |   |--> Cr55 [1.18149969e-14]
   |   |   |--> Ti51 [1.50345712e-15]
   |   |   |--> V53 [4.45987252e-17]
   |   |   |--> V54 [2.14082727e-16]
   |   |   |--> V52 [5.4055881e-19]
   |   |   |--> Cr53 [2.36865302e-09]
   |   |   |--> Ti50 [2.26464551e-12]
   |   |--> Ti51 [6.02570968e-19]
   |   |--> Ti50 [5.78481821e-09]
   |   |--> V52 [4.26296948e-14]
   |   |--> Ti52 [1.28370431e-23]
   |   |--> V53 [8.76560312e-14]
   |   |--> V51 [1.50342873e-09]
   |   |--> Cr52 [2.61458516e-07]
   |   |--> Cr52 1.0
   |   |   |--> Cr53 [1.15404141e-10]
   |   |   |--> Ti50 [2.67941074e-17]
   |   |   |--> Ti49 [1.02577389e-11]
   |   |   |--> V51 [1.96007372e-11]
   |   |   |--> Ti51 [5.52374408e-24]
   |   |   |--> V52 [8.27277081e-16]
   |   |   |--> Cr51 [1.9107767e-11]
   |   |   |--> Ti48 [3.45464382e-15]
   |   |--> Ti49 [1.9506614e-11]
   |--> Mn55 [0.00017116]
   |--> Mn55 1.0
   |   |--> Mn56 [1.74489151e-09]
   |   |--> V53 [1.75536085e-17]
   |   |--> V52 [1.79426349e-13]
   |   |--> Cr54 [1.20633097e-08]
   |   |--> Cr55 [2.39406026e-13]
   |   |--> Cr53 [2.41876795e-10]
   |   |--> Mn54 [1.68402998e-07]
   |   |--> Mn54 1.0
   |   |   |--> Cr54 [4.8578912e-08]
   |   |   |--> Fe54 [4.51124237e-14]
   |   |   |--> Mn55 [1.08034011e-09]
   |   |   |--> V52 [1.47783986e-21]
   |   |   |--> V51 [6.93624479e-12]
   |   |   |--> Cr53 [1.28699437e-11]
   |   |   |--> V53 [3.45352593e-25]
   |   |   |--> Cr52 [4.39811579e-15]
   |   |   |--> Mn53 [1.61121451e-10]
   |   |   |--> V50 [4.80653963e-13]
   |   |--> V51 [3.06438194e-10]
   |--> Mn56 [1.85782312e-07]
   |--> Mn56 1.0
   |   |--> Fe56 [0.00043724]
   |   |--> Fe56 1.0
   |   |   |--> Fe57 [9.63708652e-07]
   |   |   |--> Fe57 1.0
   |   |   |   |--> Fe58 [1.34596443e-09]
   |   |   |   |--> Cr55 [2.63601348e-21]
   |   |   |   |--> Cr54 [3.44753726e-11]
   |   |   |   |--> Mn56 [1.47874121e-14]
   |   |   |   |--> Cr56 [3.67121315e-24]
   |   |   |   |--> Mn57 [1.16478929e-15]
   |   |   |   |--> Mn55 [1.13742807e-13]
   |   |   |   |--> Fe56 [1.2546733e-09]
   |   |   |   |--> Cr53 [1.78657394e-12]
   |   |   |--> Cr53 [2.83591353e-08]
   |   |   |--> Mn55 [3.77703949e-08]
   |   |   |--> Mn56 [8.17149537e-11]
   |   |   |--> Mn54 [2.4314454e-12]
   |   |   |--> Fe55 [2.43136515e-07]
   |   |   |--> Fe55 1.0
   |   |   |   |--> Mn55 [2.08496906e-08]
   |   |   |   |--> Fe56 [9.31024176e-10]
   |   |   |   |--> Cr53 [2.26986158e-16]
   |   |   |   |--> Cr52 [1.94843187e-11]
   |   |   |   |--> Mn54 [1.71099481e-12]
   |   |   |   |--> Cr54 [2.55199144e-12]
   |   |   |   |--> Mn53 [2.95532308e-13]
   |   |   |   |--> Fe54 [9.30827174e-11]
   |   |   |   |--> Cr51 [2.08480107e-14]
   |   |   |--> Cr52 [2.9680663e-10]
   |--> Mn54 [9.7308571e-09]
   |--> Fe55 [0.00105972]
   |--> Fe55 1.0
   |   |--> Mn55 [0.00013905]
   |   |--> Mn55 1.0
   |   |   |--> Mn56 [1.41705352e-09]
   |   |   |--> V53 [1.42610748e-17]
   |   |   |--> V52 [1.45770504e-13]
   |   |   |--> Cr54 [6.660657e-09]
   |   |   |--> Cr55 [1.94499632e-13]
   |   |   |--> Cr53 [1.33878231e-10]
   |   |   |--> Mn54 [9.88058199e-08]
   |   |   |--> V51 [1.69294963e-10]
   |   |--> Fe56 [6.22048126e-06]
   |   |--> Fe56 1.0
   |   |   |--> Fe57 [9.34023045e-09]
   |   |   |--> Cr53 [2.75434266e-10]
   |   |   |--> Mn55 [3.66607049e-10]
   |   |   |--> Mn56 [1.16209472e-12]
   |   |   |--> Mn54 [2.5024454e-14]
   |   |   |--> Fe55 [2.40410966e-09]
   |   |   |--> Cr52 [2.87531711e-12]
   |   |--> Cr53 [1.51280374e-12]
   |   |--> Cr52 [1.30221707e-07]
   |   |--> Cr52 1.0
   |   |   |--> Cr53 [5.85551932e-11]
   |   |   |--> Ti50 [1.35963708e-17]
   |   |   |--> Ti49 [5.20510264e-12]
   |   |   |--> V51 [9.94592049e-12]
   |   |   |--> Ti51 [2.75115238e-24]
   |   |   |--> V52 [4.12032917e-16]
   |   |   |--> Cr51 [9.57762086e-12]
   |   |   |--> Ti48 [1.75295891e-15]
   |   |--> Mn54 [1.07022387e-08]
   |   |--> Cr54 [1.70537115e-08]
   |   |--> Mn53 [1.95492583e-09]
   |   |--> Fe54 [6.2181064e-07]
   |   |--> Fe54 1.0
   |   |   |--> Fe55 [7.66412987e-10]
   |   |   |--> Cr52 [1.96993819e-15]
   |   |   |--> Mn52M [7.15530513e-18]
   |   |   |--> Cr51 [1.75120966e-11]
   |   |   |--> Mn53 [4.64570346e-10]
   |   |   |--> Cr53 [1.97548348e-12]
   |   |   |--> Mn54 [3.23542868e-10]
   |   |   |--> Mn52 [3.11634445e-16]
   |   |   |--> Fe53 [1.68786921e-16]
   |   |   |--> Cr50 [1.79244516e-13]
   |   |--> Cr51 [1.01013449e-10]
   |--> Cr52 [1.35040579e-06]
   |--> Cr52 1.0
   |   |--> Cr53 [8.89591993e-10]
   |   |--> Ti50 [2.07097938e-16]
   |   |--> Ti49 [7.92519715e-11]
   |   |--> V51 [1.5138451e-10]
   |   |--> Ti51 [2.8530005e-23]
   |   |--> V52 [4.27284275e-15]
   |   |--> Cr51 [1.09072537e-10]
   |   |--> Ti48 [2.66741826e-14]
Transmutation time: 4.682008743286133