Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

from chemreac.util.physchem import electrical_mobility_from_D 

from chemreac.units import metre, second, kelvin, coulomb, kilogram, allclose 

 

 

def test_electrical_mobility_from_D(): 

    D = 3*metre/second**2 

    z = -2 

    T = 100*kelvin 

    mu = electrical_mobility_from_D(D, z, T) 

    e = 1.60217657e-19 * coulomb 

    kB = 1.3806488e-23 * metre**2 * kilogram * second**-2 / kelvin 

    ref = z*e/kB/T*D 

    assert allclose(mu, ref, rtol=1e-5)