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


Python BriPy类代码示例

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


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

示例1: test_writeText

 def test_writeText(self):
     BriPy.isos2track([922350])
     fcc = FCComp(["Mass"])
     fcc.IsosIn  = MassStream({922350: 1.0})
     fcc.IsosOut = MassStream({922350: 0.5})
     fcc.setParams()
     fcc.writeText()
开发者ID:sylvainvayre,项目名称:bright,代码行数:7,代码来源:test_FCComp.py

示例2: test_doCalc_3

 def test_doCalc_3(self):
     BriPy.isos2track([922350, 922380, 942390])
     s = Storage()
     s.IsosIn = MassStream({942390: 1.0})
     s.doCalc(24110*365.25*24*3600)
     assert(s.IsosOut.mass < 1.0)
     assert_almost_equal(s.IsosOut.comp[942390], 0.5, 3) 
开发者ID:sylvainvayre,项目名称:bright,代码行数:7,代码来源:test_Storage.py

示例3: test_doCalc_1

 def test_doCalc_1(self):
     BriPy.isos2track([922350, 922380, 942390])
     r = Reprocess({"U235": 0.9, "922380": 0.999, "94239": 0.99})
     r.IsosIn = MassStream({942390: 1.0})
     r.doCalc()
     assert_equal(r.IsosOut.mass, 0.99)
     assert_equal(r.IsosOut.comp[942390], 1.0)  # Recall ms.comp is normalized
开发者ID:sylvainvayre,项目名称:bright,代码行数:7,代码来源:test_Reprocess.py

示例4: test_setParams

 def test_setParams(self):
     BriPy.isos2track([922350, 922380, 942390])
     s = Storage()
     s.doCalc(MassStream({942390: 1.0}), 24110*365.25*24*3600)
     s.setParams()
     assert_equal(s.ParamsIn["Mass"],  1.00)
     assert(0.5 < s.ParamsOut["Mass"] < 1.0)
开发者ID:sylvainvayre,项目名称:bright,代码行数:7,代码来源:test_Storage.py

示例5: test_writeout_1

 def test_writeout_1(self):
     """Text only."""
     BriPy.isos2track([922350])
     fcc = FCComp(["Mass"])
     fcc.IsosIn  = MassStream({922350: 1.0})
     fcc.IsosOut = MassStream({922350: 0.5})
     fcc.writeout()
开发者ID:sylvainvayre,项目名称:bright,代码行数:7,代码来源:test_FCComp.py

示例6: test_doCalc_2

 def test_doCalc_2(self):
     BriPy.isos2track([922350, 922380, 942390])
     s = Storage()
     s.decay_time = 0.0
     s.doCalc(MassStream({942390: 1.0}))
     assert_equal(s.IsosOut.mass, 1.0)
     assert_equal(s.IsosOut.comp[942390], 1.0) 
开发者ID:sylvainvayre,项目名称:bright,代码行数:7,代码来源:test_Storage.py

示例7: test_setParams

 def test_setParams(self):
     BriPy.isos2track([922350, 922380, 942390])
     r = Reprocess({"U235": 0.9, "922380": 0.999, "94239": 0.99})
     r.doCalc(MassStream({942390: 1.0}))
     r.setParams()
     assert_equal(r.ParamsIn["Mass"], 1.00)
     assert_equal(r.ParamsOut["Mass"], 0.99)
开发者ID:sylvainvayre,项目名称:bright,代码行数:7,代码来源:test_Reprocess.py

示例8: setup_class

 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,代码行数:7,代码来源:test_Reactor1G.py

示例9: test_initialize_3

 def test_initialize_3(self):
     BriPy.isos2track([922350, 922380, 942390])
     r = Reprocess({"U235": 0.9, "922380": 0.999, "PU2390": 0.99})
     r.initialize({92: 0.99})
     assert_almost_equal(r.sepeff[922350], 0.99)
     assert_almost_equal(r.sepeff[922380], 0.99)
     assert_almost_equal(r.sepeff[942390], 1.0)
开发者ID:sylvainvayre,项目名称:bright,代码行数:7,代码来源:test_Reprocess.py

示例10: test_initialize_1

 def test_initialize_1(self):
     BriPy.isos2track([922350, 922380, 942390])
     r = Reprocess()
     assert_equal(r.sepeff, {})
     r.initialize({92: 0.99, 942390: 0.9})
     assert_almost_equal(r.sepeff[922350], 0.99)
     assert_almost_equal(r.sepeff[922380], 0.99)
     assert_almost_equal(r.sepeff[942390], 0.9)
开发者ID:sylvainvayre,项目名称:bright,代码行数:8,代码来源:test_Reprocess.py

示例11: test_Reprocess_2

 def test_Reprocess_2(self):
     BriPy.isos2track([922350, 922380, 942390])
     r = Reprocess({"U235": 0.9, "922380": 0.999, "94239": 0.99})
     assert_equal(r.name, "")
     assert_almost_equal(r.sepeff[922350], 0.9)
     assert_almost_equal(r.sepeff[922380], 0.999)
     assert_almost_equal(r.sepeff[942390], 0.99)
     assert_equal(r.params2track, ["Mass"])
开发者ID:sylvainvayre,项目名称:bright,代码行数:8,代码来源:test_Reprocess.py

示例12: test_writeHDF5_1

 def test_writeHDF5_1(self):
     BriPy.isos2track([922350])
     BriPy.write_hdf5(True)
     fcc = FCComp([], 'fcc')
     fcc.IsosIn  = MassStream({922350: 1.0})
     fcc.IsosOut = MassStream({922350: 0.5})
     fcc.PassNum = 1
     fcc.writeHDF5()
     os.remove('fcc.h5')
开发者ID:sylvainvayre,项目名称:bright,代码行数:9,代码来源:test_FCComp.py

示例13: test_write_hdf5

 def test_write_hdf5(self):
     old_write = BriPy.write_hdf5()
     BriPy.write_hdf5(False)
     assert_false(BriPy.write_hdf5())
     BriPy.write_hdf5(1)
     assert_true(BriPy.write_hdf5())
     BriPy.write_hdf5(old_write)
开发者ID:sylvainvayre,项目名称:bright,代码行数:7,代码来源:test_bright.py

示例14: test_write_text

 def test_write_text(self):
     old_write = BriPy.write_text()
     BriPy.write_text(False)
     assert_false(BriPy.write_text())
     BriPy.write_text(1)
     assert_true(BriPy.write_text())
     BriPy.write_text(old_write)
开发者ID:sylvainvayre,项目名称:bright,代码行数:7,代码来源:test_bright.py

示例15: test_setParams

 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,代码行数:20,代码来源:test_LightWaterReactor1G.py


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