3
$\begingroup$

I am trying to get units working in mathematica in the following expression for diffusion:

$D = {K_B T}/{3 \pi \eta L}$

My code is as follows:

KB = Quantity[1.380650*10^-23, ("Meters")^2*"Kilograms"*("Seconds")^-2*("Kelvins")^-1];
T = Quantity[20 + 273.15, "Kelvins"];
eta0 = Quantity[8.9*10^-4, "Pascals"*"Seconds"];
L = Quantity[200*10^-9, "Meters"];

D = (KB*T)/(3*Pi*eta0*L)

This evaluates to:

$2.41258\times10^{-12}\,\text{kg}\, \text{m}\text{/(}\text{s}^3\text{Pa})$

Which under UnitSimplify reduces to:

$2.41258\times10^{-12}\,\text{V}/\text{T}\,\, ... \,\,(volts\,per\,tesla??)$

for diffusion coefficients I am expecting units of $meters^{2}/second$.

Can anyone see whats gone wrong?

Thanks

$\endgroup$
5
$\begingroup$

UnitSimplify simplifies the units it doesn't guarantee it'll give you the units in SI. Just use UnitConvert, it gives you the answer in SI units.

UnitConvert[(KB T)/(3 Pi eta0 L)]

Mathematica graphics

$\endgroup$
  • $\begingroup$ Oh thanks. So what exactly is happening when it gives me V/T? $\endgroup$ – Steve Hatcher Mar 31 '14 at 6:03
  • $\begingroup$ @SteveHatcher Well, 1 Volt is equivalent to 1 kg m^2/(s^3 A) and 1 Tesla is equivalent to 1 kg/(s^2 A) so it is actually correct that 1 m^2/s is equal to 1 V/T $\endgroup$ – RunnyKine Mar 31 '14 at 6:17
  • $\begingroup$ oh great. thanks $\endgroup$ – Steve Hatcher Mar 31 '14 at 6:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.