当前位置: 首页>>代码示例>>Python>>正文


Python BriPy.load_isos2track_hdf5方法代码示例

本文整理汇总了Python中BriPy.load_isos2track_hdf5方法的典型用法代码示例。如果您正苦于以下问题:Python BriPy.load_isos2track_hdf5方法的具体用法?Python BriPy.load_isos2track_hdf5怎么用?Python BriPy.load_isos2track_hdf5使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BriPy的用法示例。


在下文中一共展示了BriPy.load_isos2track_hdf5方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: setup_class

# 需要导入模块: import BriPy [as 别名]
# 或者: from BriPy import load_isos2track_hdf5 [as 别名]
 def setup_class(cls):
     libfile = os.getenv("BRIGHT_DATA") + '/LWR.h5'
     BriPy.load_isos2track_hdf5(libfile)
     cls.r1g = Reactor1G(default_rp, 'r1g')
     cls.r1g.loadLib(libfile)
     cls.r1g.IsosIn = MassStream({922350: 0.5, 922380: 0.5})
     cls.r1g.doCalc()
开发者ID:sylvainvayre,项目名称:bright,代码行数:9,代码来源:test_Reactor1G.py

示例2: test_setParams

# 需要导入模块: import BriPy [as 别名]
# 或者: from BriPy import load_isos2track_hdf5 [as 别名]
 def test_setParams(self):
     lf = os.getenv("BRIGHT_DATA") + "/LWR.h5"
     BriPy.load_isos2track_hdf5(lf)
     rp = BriPy.LWRDefaults()
     rp.BUt = 50.0
     lwr = LightWaterReactor1G(lf, rp, 'lwr')
     lwr.doCalc(MassStream({922350: 0.05, 922380:0.95}))
     lwr.setParams()
     assert_equal(lwr.ParamsIn["BUd"],  0.0)
     assert_equal(lwr.ParamsOut["BUd"], lwr.BUd)
     assert_equal(lwr.ParamsIn["U"],  lwr.InU.mass)
     assert_equal(lwr.ParamsOut["U"], lwr.OutU.mass)
     assert_equal(lwr.ParamsIn["TRU"],  lwr.InTRU.mass)
     assert_equal(lwr.ParamsOut["TRU"], lwr.OutTRU.mass)
     assert_equal(lwr.ParamsIn["ACT"],  lwr.InACT.mass)
     assert_equal(lwr.ParamsOut["ACT"], lwr.OutACT.mass)
     assert_equal(lwr.ParamsIn["LAN"],  lwr.InLAN.mass)
     assert_equal(lwr.ParamsOut["LAN"], lwr.OutLAN.mass)
     assert_equal(lwr.ParamsIn["FP"],  1.0 - lwr.InACT.mass - lwr.InLAN.mass)
     assert_equal(lwr.ParamsOut["FP"], 1.0 - lwr.OutACT.mass - lwr.OutLAN.mass)
开发者ID:sylvainvayre,项目名称:bright,代码行数:22,代码来源:test_LightWaterReactor1G.py

示例3: test_setParams

# 需要导入模块: import BriPy [as 别名]
# 或者: from BriPy import load_isos2track_hdf5 [as 别名]
 def test_setParams(self):
     lf = os.getenv("BRIGHT_DATA") + "/FR.h5"
     BriPy.load_isos2track_hdf5(lf)
     rp = BriPy.FRDefaults()
     rp.BUt = 140.0
     fr = FastReactor1G(lf, rp, 'fr')
     fr.doCalc(MassStream({922350: 0.30, 922380: 0.70}))
     fr.setParams()
     assert_equal(fr.ParamsIn["BUd"],  0.0)
     assert_equal(fr.ParamsOut["BUd"], fr.BUd)
     assert_equal(fr.ParamsIn["TRUCR"],  0.0)
     assert_equal(fr.ParamsOut["TRUCR"], fr.TruCR)
     assert_equal(fr.ParamsIn["P_NL"],  0.0)
     assert_equal(fr.ParamsOut["P_NL"], fr.P_NL)
     assert_equal(fr.ParamsIn["U"],  fr.InU.mass)
     assert_equal(fr.ParamsOut["U"], fr.OutU.mass)
     assert_equal(fr.ParamsIn["TRU"],  fr.InTRU.mass)
     assert_equal(fr.ParamsOut["TRU"], fr.OutTRU.mass)
     assert_equal(fr.ParamsIn["ACT"],  fr.InACT.mass)
     assert_equal(fr.ParamsOut["ACT"], fr.OutACT.mass)
     assert_equal(fr.ParamsIn["LAN"],  fr.InLAN.mass)
     assert_equal(fr.ParamsOut["LAN"], fr.OutLAN.mass)
     assert_equal(fr.ParamsIn["FP"],  1.0 - fr.InACT.mass - fr.InLAN.mass)
     assert_equal(fr.ParamsOut["FP"], 1.0 - fr.OutACT.mass - fr.OutLAN.mass)
开发者ID:sylvainvayre,项目名称:bright,代码行数:26,代码来源:test_FastReactor1G.py

示例4: test_load_isos2track_hdf5_4

# 需要导入模块: import BriPy [as 别名]
# 或者: from BriPy import load_isos2track_hdf5 [as 别名]
 def test_load_isos2track_hdf5_4(self):
     old_isos = BriPy.isos2track()
     BriPy.isos2track([80160])
     BriPy.load_isos2track_hdf5('isos.h5', '/NotIsos', True)
     assert_equal(BriPy.isos2track(), [10010, 922350, 922380])
     BriPy.isos2track(old_isos)
开发者ID:sylvainvayre,项目名称:bright,代码行数:8,代码来源:test_bright.py

示例5: test_load_isos2track_hdf5_1

# 需要导入模块: import BriPy [as 别名]
# 或者: from BriPy import load_isos2track_hdf5 [as 别名]
 def test_load_isos2track_hdf5_1(self):
     old_isos = BriPy.isos2track()
     BriPy.isos2track([80160])
     BriPy.load_isos2track_hdf5('isos.h5')
     assert_equal(BriPy.isos2track(), [10010, 80160, 922350, 922380])
     BriPy.isos2track(old_isos)
开发者ID:sylvainvayre,项目名称:bright,代码行数:8,代码来源:test_bright.py

示例6: len

# 需要导入模块: import BriPy [as 别名]
# 或者: from BriPy import load_isos2track_hdf5 [as 别名]
import os
import sys
import time
import tables as tb

import BriPy as bp

from facility_info import get_reactor_id_map

# Load isos2track
data_dir = os.getenv("BRIGHT_DATA")
lwr_data = data_dir + "/LWR.h5"
bp.load_isos2track_hdf5(lwr_data)

# We are going to capture the output, so don't write it out automatically.
bp.write_text(False)
bp.write_hdf5(False)

# Generate a used fuel table description
UsedFuel = {
    'assembly_id': tb.StringCol(itemsize=15, pos=0), 
    'discharge_k': tb.Float64Col(pos=1),
    'mass':        tb.Float64Col(pos=2),
    }

nbuf = len(UsedFuel)
i2t = bp.isos2track()

for i in xrange(len(i2t)):
    UsedFuel[bp.isoname.zzaaam_2_LLAAAM(i2t[i])] = tb.Float64Col(pos=nbuf + i)
开发者ID:scopatz,项目名称:FuelLearning,代码行数:32,代码来源:used_fuel.py


注:本文中的BriPy.load_isos2track_hdf5方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。