示例#1
0
 def _createNuclide(self, elementname, massnumber):
     nuclidename = ''.join([elementname, str(massnumber)])
     return Nuclide(nuclidename, self._getAtomNumber(elementname),
                    self._getNuclideMass(nuclidename))
示例#2
0
mg26 = Isotope('mg26', 12, 25.982593)
na23 = Isotope('na23', 11, 22.989770)
udict = {u233: 1}
fdict = {f19: 1}
cldict = {cl37: 1}
# Pu from MOX
pudict = {
    pu238: 0.019497,
    pu239: 0.5875682,
    pu240: 0.2371,
    pu241: 0.10133776,
    pu242: 0.05449704
}
mgdict = {mg24: 0.7899, mg25: 0.10, mg26: 0.1101}
nadict = {na23: 1}
cl = Nuclide('Cl', cldict)
u = Nuclide('U', udict)
f = Nuclide("F", fdict)
th = Nuclide("Th", {th232: 1})
be = Nuclide("Be", {be9: 1})
pu = Nuclide("Pu", pudict)
mg = Nuclide("Mg", mgdict)
na = Nuclide("Na", nadict)
nacldict = {na: 1, cl: 1}
thcl4dict = {th: 1, cl: 4}
mgcl2dict = {mg: 1, cl: 2}
pucl3dict = {pu: 1, cl: 3}
ucl3dict = {u: 1, cl: 3}
# lifdict = {li:1, f:1}
nacl = Compound('NaCl', nacldict, 2.1393, 0.543e-3)
thcl4 = Compound('ThCl4', thcl4dict, 4.823, 0.0014)
示例#3
0
        #     0 0  0 0 20\n'
        with open(inp, 'w', encoding="utf-8") as f:
            for line in content:
                lists = line.strip().split()
                if lists and re.match('sdef', lists[0], re.I) is not None:
                    f.write(kcodeSource)
                elif lists and re.match('si|sp|sc|ds[0-9]{1,3}', lists[0], \
                                        re.I) is not None:
                    pass
                elif lists and re.match('nps', lists[0], re.I) is not None:
                    pass
                else:
                    f.write(line)


u235 = Nuclide('U235', 92, 235.043923)
u238 = Nuclide('U238', 92, 238.050783)
th232 = Nuclide('Th232', 90, 232.03805)
pu238 = Nuclide('Pu238', 94, 238.0)
pu239 = Nuclide('Pu239', 94, 239.0)
pu240 = Nuclide('Pu240', 94, 240.0)
pu241 = Nuclide('Pu241', 94, 241.0)
pu242 = Nuclide('Pu242', 94, 242.0)
f19 = Nuclide('F19', 9, 18.998403)
be9 = Nuclide('Be9', 4, 9.012182)
li6 = Nuclide('li6', 3, 9.012182)
li7 = Nuclide('li7', 3, 9.012182)
cl37 = Nuclide('cl37', 17, 36.965903)
mg24 = Nuclide('mg24', 12, 23.985042)
mg25 = Nuclide('mg25', 12, 24.985837)
mg26 = Nuclide('mg26', 12, 25.982593)