Example #1
0
#/usr/env python
from pyne.material import Material, MaterialLibrary, MultiMaterial
import os

matlib = MaterialLibrary()


Lead = Material({'Pb': 1.00}) 
Lead = Lead.expand_elements()
Lead.name = "Lead"
Lead.density = 11.36
matlib["Lead"] = Lead
print Lead

Iron = Material({'Fe': 1.00})
Iron = Iron.expand_elements()
Iron.name = "Iron"
Iron.density = 7.87
matlib["Iron"] = Iron
print Iron

#espi metals
ss316 = Material({'Fe': 65.34, 'Cr': 17, 'Ni': 12, 'Mo': 2.5, 'Mn': 2.0, 'Si':1.00, 'C12':0.08, 'P':0.05, 'S': 0.03 })
ss316 = ss316.expand_elements()
#ss316.name = "ss316"
ss316.name = "m1"
ss316.density = 8.03
#matlib["ss316"] = ss316
matlib["m1"] = ss316
print ss316
230000:-2.0000000000E-05,
741820:-8.0100000000E-06,
741830:-4.3020000000E-06,  
741840:-9.2160000000E-06,
741860:-8.5920000000E-06,  
400910:-1.1019972084E-01,
400920:-1.6844253230E-01,  
400940:-1.7070152836E-01,
400960:-2.7500821600E-02})

m1.normalize()
m2.normalize()
m3.normalize()
m5.normalize()

m1.density = -10.44
m2.density = -1.106
m3.density = -2.66
m5.density = -6.56

# from pixels, re-normalize
m1_frac = 0.488
m2_frac = 0.238
m3_frac = 0.056
m5_frac = 0.100
#tot = m1_frac + m2_frac + m3_frac + m5_frac
#m1_frac = m1_frac / tot
#m2_frac = m2_frac / tot
#m3_frac = m3_frac / tot
#m5_frac = m5_frac / tot
Example #3
0
#!/usr/bin/python
#
from pyne.material import Material, MaterialLibrary
print "Welcome!"
mat_lib = MaterialLibrary()
#
# define iron for a shield
ironvec = {260000: 1}  # pure iron
iron = Material()
iron.density = 7.86
iron.from_atom_frac(ironvec)
iron = iron.expand_elements()
# to write out an mcnp material card
iron.metadata['mat_number'] = 101
iron.write_mcnp('twoslab_mcard.txt', 'atom')
#
#
# define a simple water since O-18 not in mcnp xs libs
watervec = {10010000: 2, 80160000: 1}  # simple water
water = Material()
water.density = 1.0
water.from_atom_frac(watervec)
# to write out an mcnp material card
water.metadata['mat_number'] = 102
water.write_mcnp('twoslab_mcard.txt', 'atom')
#
# define a low density simple water since O-18 not in mcnp xs libs
watervec = {10010000: 2, 80160000: 1}  # simple water
lowdensitywater = Material()
lowdensitywater.density = 0.9
lowdensitywater.from_atom_frac(watervec)
    'Si': 0.00026,
    'P': 2e-05,
    'S': 3e-05,
    'Ti': 1e-05,
    'V': 0.002,
    'Cr': 0.09,
    'Mn': 0.0055,
    'Co': 5e-05,
    'Ni': 0.0001,
    'Cu': 3e-05,
    'Nb': 5e-05,
    'Mo': 3e-05,
    'Ta': 0.0012,
    'W': 0.011,
})
eurofer_2016.density = 7.87
eurofer_2016 = eurofer_2016.expand_elements()

#this needs changing to be the 2017 version
eurofer = Material({
    'Fe': 0.88821,
    'B': 1e-05,
    'C': 0.00105,
    'N': 0.0004,
    'O': 1e-05,
    'Al': 4e-05,
    'Si': 0.00026,
    'P': 2e-05,
    'S': 3e-05,
    'Ti': 1e-05,
    'V': 0.002,