Пример #1
0
 def test_vs_ji_held_K2(self):
     """confirm agreement with ji-held model when K=2"""
     eta_i_hat_brag = _nondim_visc_i_braginskii(self.big_hall)
     eta_i_hat_jh = _nondim_visc_i_ji_held(self.big_hall, 1, 0, 100, K=2)
     for idx in [0, 1, 2, 3, 4]:
         assert np.isclose(eta_i_hat_brag[idx],
                           eta_i_hat_jh[idx],
                           rtol=2e-2)
Пример #2
0
 def test_known_values(self, expected, power):
     """check some known values"""
     eta_i_hat = _nondim_visc_i_braginskii(self.big_hall)
     eta_i_hat_with_powers = eta_i_hat * self.big_hall**power
     assert np.allclose(eta_i_hat_with_powers, expected, atol=1e-2)