Ejemplo n.º 1
0
def getThoriumPowerFraction(path, filename, cell, matnum, volume):
    mtr = McnpTallyReader()
    fission_energy_dic = defaultdict(lambda: 0)
    nuclidelist = [
        '90232', '91233', '94239', '94240', '94241', '92233', '92234', '92235',
        '92238'
    ]
    tallydic = {
        '1003': '94239',
        '1005': '94241',
        '1018': '92233',
        '1020': '92235'
    }
    atomdensitydic = {}
    for nuclide in nuclidelist:
        atomdensitydic[nuclide] = mtr.getNuclideDensity(
            PurePath.joinpath(path, filename), cell, matnum, nuclide)
    for tallynum, nuclide in tallydic.items():
        Z = float(nuclide[0:2])
        A = float(nuclide[2:])
        Q = 0.00129927 * Z**2 * A**0.5 + 33.12
        fisstally = readFmtally(PurePath.joinpath(path, filename), tallynum,
                                '-6')
        fission_energy_dic[
            nuclide] = volume * atomdensitydic[nuclide] * fisstally * Q
    tot_energy = 0
    for nuclide, fission_energy in fission_energy_dic.items():
        tot_energy += fission_energy
    print(tot_energy)
    return fission_energy_dic
Ejemplo n.º 2
0
from tool.mcnp_reader import McnpTallyReader
from pathlib import Path, PurePath
from collections import defaultdict
import matplotlib.pyplot as plt
import numpy as np

mtr = McnpTallyReader()
loopdic = {1: 4, 2: 5, 3: 20}
path = Path('D:\work\mcnpxwork\博士课题\msasd\氯盐堆\\r150\8501gOUT')
basefilename = '8501go'

keffofnuclide = defaultdict(lambda: 0)
nuclidelist = [
    '94238', '94239', '94240', '94241', '94242', '90232', '92235', '91233',
    '92233'
]
for nuclide in nuclidelist:
    keffofnuclide[nuclide] = []
for key in loopdic.keys():
    for ii in range(loopdic[key]):
        filename = '-'.join([basefilename, str(key), str(ii + 1)])
        print('read file {:}\n'.format(filename))
        for nuclide in nuclidelist:
            keffofnuclide[nuclide].append(
                mtr.getNuclideKeff(PurePath.joinpath(path, filename), '4', '1',
                                   nuclide))

timelist = np.array([
    0.00000e+00, 2.00000e+01, 4.00000e+01, 6.00000e+01, 8.00000e+01,
    2.80000e+02, 4.80000e+02, 6.80000e+02, 8.80000e+02, 1.08000e+03,
    1.68000e+03, 2.28000e+03, 2.88000e+03, 3.48000e+03, 4.08000e+03,
Ejemplo n.º 3
0
            for key, v in self.powTallyData.items():
                result.powTallyData[
                    key] = self.powTallyData[key] + other.powTallyData[key]
            for key, v in self.volData.items():
                result.volData[key] = self.volData[key] + other.volData[key]
            result.createPowerDesity()
            return result
        else:
            print("Error: the mode of two object are inconsistent!")
            return None

if __name__ == '__main__':
    sideLen = 10.0279372  #正六边形对边距
    r = 2.0055874  #熔盐流道半径
    cell_num = '4'  # Used to calulate volume.
    mtr = McnpTallyReader()
    basedir = Path('D:\\work\\mcnpwork\\lf1\\工程设计\\功率分布\\二维\\功率密度分布')
    file_dic = {
        '0天': {
            'filename': '0000.log',
            'vfilename': '00v.log'
        },
        '2天': {
            'filename': '0002.log',
            'vfilename': '02v.log'
        },
        '60天': {
            'filename': '0060.log',
            'vfilename': '060v.log'
        },
        '120天': {