def check_vision(solver): orig_casc = enr.default_uranium_cascade() orig_casc.x_prod_j = 0.055 feed = Material( { 922340000: 0.000183963025893197, 922350000: 0.00818576605617839, 922360000: 0.00610641667100979, 922380000: 0.985523854246919, } ) orig_casc.mat_feed = feed casc = enr.multicomponent(orig_casc, solver=solver, tolerance=1e-11) assert_almost_equal(casc.mat_prod.comp[922350000], 0.055, 5) assert_almost_equal(casc.mat_tail.comp[922350000], 0.0025, 5) assert_almost_equal(casc.mat_feed.mass / 1.0, 1.0) assert_almost_equal(casc.mat_prod.mass / 0.10830030583196934, 1.0) assert_almost_equal(casc.mat_tail.mass / 0.89169969416803063, 1.0) assert_almost_equal(casc.N / 27.38162850698868, 1.0, 2) assert_almost_equal(casc.M / 15.09646512546496, 1.0, 2) assert_almost_equal(casc.Mstar / 236.58177606549995, 1.0, 4) assert_almost_equal(casc.l_t_per_feed / 326.8956175003255, 1.0, 4) assert_almost_equal(casc.swu_per_feed / 0.85102089049, 1.0, 4) assert_almost_equal(casc.swu_per_prod / 7.85797310499, 1.0, 4)
def check_sample_feed(solver): orig_casc = enr.default_uranium_cascade() orig_casc.x_prod_j = 0.06 feed = Material( { 922320000: 1.1 * (10.0**-9), 922340000: 0.00021, 922350000: 0.0092, 922360000: 0.0042, 922380000: 0.9863899989, } ) orig_casc.mat_feed = feed casc = enr.multicomponent(orig_casc, solver=solver, tolerance=1e-11, max_iter=100) # print "casc.mat_prod = " + repr(casc.mat_prod) # print "casc.mat_prod = " + repr(casc.mat_tail) assert_almost_equal(casc.mat_prod.comp[922350000], 0.06, 5) assert_almost_equal(casc.mat_tail.comp[922350000], 0.0025, 5) assert_almost_equal(casc.mat_feed.mass / 1.0, 1.0) assert_almost_equal(casc.mat_prod.mass / 0.11652173913043479, 1.0) assert_almost_equal(casc.mat_tail.mass / 0.88347826086956527, 1.0) assert_almost_equal(casc.N / 26.864660071132583, 1.0, 5) assert_almost_equal(casc.M / 16.637884564470365, 1.0, 5) assert_almost_equal(casc.Mstar / 236.57708506549994, 1.0, 5) assert_almost_equal(casc.l_t_per_feed / 357.3888391866117, 1.0, 5) assert_almost_equal(casc.swu_per_feed / 0.9322804173594426, 1.0, 5) assert_almost_equal(casc.swu_per_prod / 8.000914029577306, 1.0, 5)
def check_NU(solver): orig_casc = enr.default_uranium_cascade() orig_casc.x_prod_j = 0.05 feed = Material( { 922340000: 0.000055, 922350000: 0.00720, 922380000: 0.992745, } ) orig_casc.mat_feed = feed casc = enr.multicomponent(orig_casc, solver=solver, tolerance=1e-11) # print "casc.mat_prod = " + repr(casc.mat_prod) assert_almost_equal(casc.mat_prod.comp[922350000], 0.05, 5) assert_almost_equal(casc.mat_tail.comp[922350000], 0.0025, 5) assert_almost_equal(casc.mat_feed.mass / 1.0, 1.0) assert_almost_equal(casc.mat_prod.mass / 0.0989473684211, 1.0) assert_almost_equal(casc.mat_tail.mass / 0.901052631579, 1.0) assert_almost_equal(casc.N / 27.183583424704818, 1.0, 4) assert_almost_equal(casc.M / 13.387464890476533, 1.0, 4) assert_almost_equal(casc.Mstar / 236.5621860655, 1.0, 5) assert_almost_equal(casc.l_t_per_feed / 288.62731727645644, 1.0, 5) assert_almost_equal(casc.swu_per_feed / 0.761263453429, 1.0, 5) assert_almost_equal(casc.swu_per_prod / 7.69362000806, 1.0, 5)
def check_vision(solver): orig_casc = enr.default_uranium_cascade() orig_casc.x_prod_j = 0.055 feed = Material({ 922340000: 0.000183963025893197, 922350000: 0.00818576605617839, 922360000: 0.00610641667100979, 922380000: 0.985523854246919, }) orig_casc.mat_feed = feed casc = enr.multicomponent(orig_casc, solver=solver, tolerance=1E-11) assert_almost_equal(casc.mat_prod.comp[922350000], 0.055, 5) assert_almost_equal(casc.mat_tail.comp[922350000], 0.0025, 5) assert_almost_equal(casc.mat_feed.mass / 1.0, 1.0) assert_almost_equal(casc.mat_prod.mass / 0.10830030583196934, 1.0) assert_almost_equal(casc.mat_tail.mass / 0.89169969416803063, 1.0) assert_almost_equal(casc.N / 27.38162850698868, 1.0, 2) assert_almost_equal(casc.M / 15.09646512546496, 1.0, 2) assert_almost_equal(casc.Mstar / 236.58177606549995, 1.0, 4) assert_almost_equal(casc.l_t_per_feed / 326.8956175003255, 1.0, 4) assert_almost_equal(casc.swu_per_feed / 0.85102089049, 1.0, 4) assert_almost_equal(casc.swu_per_prod / 7.85797310499, 1.0, 4)
def check_NU(solver): orig_casc = enr.default_uranium_cascade() orig_casc.x_prod_j = 0.05 feed = Material({ 922340000: 0.000055, 922350000: 0.00720, 922380000: 0.992745, }) orig_casc.mat_feed = feed casc = enr.multicomponent(orig_casc, solver=solver, tolerance=1E-11) #print "casc.mat_prod = " + repr(casc.mat_prod) assert_almost_equal(casc.mat_prod.comp[922350000], 0.05, 5) assert_almost_equal(casc.mat_tail.comp[922350000], 0.0025, 5) assert_almost_equal(casc.mat_feed.mass / 1.0, 1.0) assert_almost_equal(casc.mat_prod.mass / 0.0989473684211, 1.0) assert_almost_equal(casc.mat_tail.mass / 0.901052631579, 1.0) assert_almost_equal(casc.N / 27.183583424704818, 1.0, 4) assert_almost_equal(casc.M / 13.387464890476533, 1.0, 4) assert_almost_equal(casc.Mstar / 236.5621860655, 1.0, 5) assert_almost_equal(casc.l_t_per_feed / 288.62731727645644, 1.0, 5) assert_almost_equal(casc.swu_per_feed / 0.761263453429, 1.0, 5) assert_almost_equal(casc.swu_per_prod / 7.69362000806, 1.0, 5)
def check_sample_feed(solver): orig_casc = enr.default_uranium_cascade() orig_casc.x_prod_j = 0.06 feed = Material({ 922320000: 1.1 * (10.0**-9), 922340000: 0.00021, 922350000: 0.0092, 922360000: 0.0042, 922380000: 0.9863899989, }) orig_casc.mat_feed = feed casc = enr.multicomponent(orig_casc, solver=solver, tolerance=1E-11, max_iter=100) #print "casc.mat_prod = " + repr(casc.mat_prod) #print "casc.mat_prod = " + repr(casc.mat_tail) assert_almost_equal(casc.mat_prod.comp[922350000], 0.06, 5) assert_almost_equal(casc.mat_tail.comp[922350000], 0.0025, 5) assert_almost_equal(casc.mat_feed.mass / 1.0, 1.0) assert_almost_equal(casc.mat_prod.mass / 0.11652173913043479, 1.0) assert_almost_equal(casc.mat_tail.mass / 0.88347826086956527, 1.0) assert_almost_equal(casc.N / 26.864660071132583, 1.0, 5) assert_almost_equal(casc.M / 16.637884564470365, 1.0, 5) assert_almost_equal(casc.Mstar / 236.57708506549994, 1.0, 5) assert_almost_equal(casc.l_t_per_feed / 357.3888391866117, 1.0, 5) assert_almost_equal(casc.swu_per_feed / 0.9322804173594426, 1.0, 5) assert_almost_equal(casc.swu_per_prod / 8.000914029577306, 1.0, 5)
def check_NU(solver): orig_casc = enr.default_uranium_cascade() orig_casc.x_prod_j = 0.05 feed = Material({ 922340: 0.000055, 922350: 0.00720, 922380: 0.992745, }) orig_casc.mat_feed = feed casc = enr.multicomponent(orig_casc, solver=solver, tolerance=1E-11) assert_almost_equal(casc.mat_prod.comp[922350], 0.05, 5) assert_almost_equal(casc.mat_tail.comp[922350], 0.0025, 5) assert_almost_equal(casc.mat_feed.mass / 1.0, 1.0) assert_almost_equal(casc.mat_prod.mass / 0.0989473684211, 1.0) assert_almost_equal(casc.mat_tail.mass / 0.901052631579, 1.0) assert_almost_equal(casc.N / 27.1835088212, 1.0, 4) assert_almost_equal(casc.M / 13.3875092512, 1.0, 4) assert_almost_equal(casc.Mstar / 236.562179, 1.0, 5) assert_almost_equal(casc.l_t_per_feed / 288.627270162, 1.0, 5) assert_almost_equal(casc.swu_per_feed / 0.761263453429, 1.0, 5) assert_almost_equal(casc.swu_per_prod / 7.69362000806, 1.0, 5)
def check_sample_feed(solver): orig_casc = enr.default_uranium_cascade() orig_casc.x_prod_j = 0.06 feed = Material({ 922320: 1.1 * (10.0**-9), 922340: 0.00021, 922350: 0.0092, 922360: 0.0042, 922380: 0.9863899989, }) orig_casc.mat_feed = feed casc = enr.multicomponent(orig_casc, solver=solver, tolerance=1E-11, max_iter=100) assert_almost_equal(casc.mat_prod.comp[922350], 0.06, 5) assert_almost_equal(casc.mat_tail.comp[922350], 0.0025, 5) assert_almost_equal(casc.mat_feed.mass / 1.0, 1.0) assert_almost_equal(casc.mat_prod.mass / 0.11652173913043479, 1.0) assert_almost_equal(casc.mat_tail.mass / 0.88347826086956527, 1.0) assert_almost_equal(casc.N / 26.8646352802, 1.0, 5) assert_almost_equal(casc.M / 16.6379009423, 1.0, 5) assert_almost_equal(casc.Mstar / 236.577085, 1.0, 5) assert_almost_equal(casc.l_t_per_feed / 357.388791749, 1.0, 5) assert_almost_equal(casc.swu_per_feed / 0.932280175218, 1.0, 5) assert_almost_equal(casc.swu_per_prod / 8.0009119515, 1.0, 5)
def test_default_uranium_cascade(): casc = enr.default_uranium_cascade() assert_equal(casc.alpha, 1.05) assert_equal(casc.Mstar, 236.5) assert_equal(casc.j, 922350000) assert_equal(casc.k, 922380000) assert_equal(casc.N, 30.0) assert_equal(casc.M, 10.0) assert_equal(casc.x_feed_j, 0.0072) assert_equal(casc.x_prod_j, 0.05) assert_equal(casc.x_tail_j, 0.0025) assert_equal(casc.mat_feed, Material({922340000: 5.5e-05, 922350000: 0.0072, 922380000: 0.992745}, 1.0, 1.0))
def test_default_uranium_cascade(): casc = enr.default_uranium_cascade() assert_equal(casc.alpha, 1.05) assert_equal(casc.Mstar, 236.5) assert_equal(casc.j, 922350) assert_equal(casc.k, 922380) assert_equal(casc.N, 30.0) assert_equal(casc.M, 10.0) assert_equal(casc.x_feed_j, 0.0072) assert_equal(casc.x_prod_j, 0.05) assert_equal(casc.x_tail_j, 0.0025) assert_equal(casc.mat_feed, Material({922340: 5.5e-05, 922350: 0.0072, 922380: 0.992745}, 1.0, 1.0))