Ejemplo n.º 1
0
 def test_90Sr_2(self):
     s = System.load('90Sr', model='induced-decay', lb=-1000)
     reactions = [r for c in s.combinations for r in c.reactions()]
     self.assertEqual(2, len(reactions))
     reaction = reactions[0]
     self.assertEqual(('90Y', '0'), reaction.rvalues[0][1].signature)
     self.assertEqual(545.9997699999949, reaction.q_value.kev)
Ejemplo n.º 2
0
 def setUpClass(cls):
     cls.scenario = System.load('106Pd',
         model='induced-fission',
         daughters=[(1, ('90Sr', '0')), (1, ('16O', '0'))],
     ).hp(
         seconds=1,
         moles=1,
         active_fraction=1,
         isotopic_fraction=1,
     )
Ejemplo n.º 3
0
 def test_241Am_power(self):
     # Sanity check against a number found in Wikipedia
     # https://en.wikipedia.org/wiki/Isotopes_of_americium
     # (1 kg * 1000 g/kg) / (243 g/mole)
     moles = 1e3 / 243
     scenario = System.load('241Am', model='induced-decay') \
         .hp(seconds=1, isotopic_fraction=1, moles=moles)
     # Should be 114 watts/kg
     np.testing.assert_approx_equal(131.62889506674873, scenario.power().watts)
     np.testing.assert_approx_equal(0.0, scenario.power(seconds=1e20).watts)
Ejemplo n.º 4
0
 def setUpClass(cls):
     screening = 32.046
     moles = 0.02193926719
     active_fraction = 1e-6
     cls.scenario = System.load('Pt', model='induced-decay') \
         .hp(
             seconds=1,
             moles=moles,
             active_fraction=active_fraction,
             screening=screening,
         )
Ejemplo n.º 5
0
 def test_output(self):
     s = System.load("p+d", lower_bound=-3000)
     v = TerminalView(s)
     self.assertEqual(
         [
             "p + d => gamma + 3He + 5493 keV                         gamma, in nature",
             "p + d => p + d + 0 keV                                  in nature, n-transfer",
             "p + d => n + 2*p + -2225 keV                            ->B-, n",
         ],
         v.lines(Options(ascii=True)),
     )
Ejemplo n.º 6
0
 def test_screened_190Pt(self):
     pt190 = System.load('190Pt', model='induced-decay') \
         .hp(seconds=1, screening=11, moles=1, isotopic_fraction=1)
     # Remaining
     np.testing.assert_approx_equal(6.02214129e+23, pt190.remaining_active_atoms())
     np.testing.assert_approx_equal(6.02214129e+23, pt190.remaining_active_atoms(seconds=100))
     np.testing.assert_approx_equal(6.021836528709286e+23, pt190.remaining_active_atoms(seconds=3.154e7))
     np.testing.assert_approx_equal(0.0, pt190.remaining_active_atoms(seconds=1e20))
     # Activity
     np.testing.assert_approx_equal(967090273179.6211, pt190.activity(seconds=1))
     np.testing.assert_approx_equal(0.0, pt190.activity(seconds=1e20))
     # Power
     np.testing.assert_approx_equal(0.5039560107199808, pt190.power().watts)
     np.testing.assert_approx_equal(0.0, pt190.power(seconds=1e20).watts)
Ejemplo n.º 7
0
 def test_241Am(self):
     scenario = System.load('241Am', model='induced-decay') \
         .hp(isotopic_fraction=1, moles=1, seconds=1)
     # Remaining
     np.testing.assert_approx_equal(6.022141289646228e+23, scenario.remaining_active_atoms())
     np.testing.assert_approx_equal(6.02214125462277e+23, scenario.remaining_active_atoms(seconds=100))
     np.testing.assert_approx_equal(6.0109829989678545e+23, scenario.remaining_active_atoms(seconds=3.154e7))
     np.testing.assert_approx_equal(0.0, scenario.remaining_active_atoms(seconds=1e20))
     # Activity
     np.testing.assert_approx_equal(35411037706734.586, scenario.activity(seconds=1))
     np.testing.assert_approx_equal(0.0, scenario.activity(seconds=1e20))
     # Power
     np.testing.assert_approx_equal(31.985821501219938, scenario.power(seconds=1).watts)
     np.testing.assert_approx_equal(0.0, scenario.power(seconds=1e20).watts)
Ejemplo n.º 8
0
 def test_light_nucleus(self):
     s = System.load('8Be', model='induced-fission', daughter_count='2')
     reactions = [r for c in s.combinations for r in c.reactions()]
     self.assertEqual(1, len(reactions))
Ejemplo n.º 9
0
 def setUpClass(cls):
     cls.scenario = System.load('212Po', model='induced-decay') \
         .hp(seconds=1, moles=1, active_fraction=1, isotopic_fraction=1)
Ejemplo n.º 10
0
 def test_screened_Pt(self):
     scenario = System.load('Pt', model='induced-decay').hp(screening=11, seconds=1, moles=1, active_fraction=1)
     np.testing.assert_approx_equal(116050834.10601069, scenario.activity())
     np.testing.assert_approx_equal(6.0474721800430736e-05, scenario.power().watts)
Ejemplo n.º 11
0
 def test_elemental_Pt(self):
     scenario = System.load('Pt', model='induced-decay').hp(seconds=1, moles=1, active_fraction=1)
     np.testing.assert_approx_equal(1.0668148541893832, scenario.activity())
Ejemplo n.º 12
0
 def setUpClass(cls):
     cls.pt190 = System.load('190Pt', model='induced-decay') \
         .hp(moles=1, seconds=1, isotopic_fraction=1)
Ejemplo n.º 13
0
 def test_element_shorthand(self):
     s = System.load("H+Li")
     self.assertEqual(6, len(s.combinations))
Ejemplo n.º 14
0
 def test_reactions_2(self):
     s = System.load("6Li+6Li")
     t = TerminalView(s)
     options = Options()
     self.assertTrue(any("2·6Li → 3·4He + 20899 keV" in l for l in t.lines(options)))