Beispiel #1
0
 def test_hall_calc(self):
     """if no hall parameters are input, they should be calculated"""
     with pytest.warns(RelativityWarning):
         ct2 = ClassicalTransport(T_e=self.T_e,
                                  n_e=self.n_e,
                                  T_i=self.T_i,
                                  n_i=self.n_i,
                                  ion=self.ion)
         hall_i = Hall_parameter(ct2.n_i, ct2.T_i, ct2.B, ct2.ion, ct2.ion,
                                 ct2.coulomb_log_ii, ct2.V_ii)
         hall_e = Hall_parameter(
             ct2.n_e,
             ct2.T_e,
             ct2.B,
             ct2.ion,
             ct2.e_particle,
             ct2.coulomb_log_ei,
             ct2.V_ei,
         )
         testTrue = hall_i == ct2.hall_i
         errStr = f"Ion hall parameter should be {hall_i} " f"and not {ct2.hall_i}."
     assert testTrue, errStr
     testTrue = hall_e == ct2.hall_e
     errStr = f"Electron hall parameter should be {hall_e} " f"and not {ct2.hall_e}."
     assert testTrue, errStr
Beispiel #2
0
 def time_Hall_parameter(self):
     Hall_parameter(1e6 / u.m**3, 5e6 * u.K, 0.1 * u.T, 'He-4 +1')