So, right now, I am working on setting various quantities up as functions of R. R will be varying later on, so right now I just have it set to the variable radius. It's breaking my dimensional analysis later on in the notebook though, because Mathematica assumes radius
has units, when it should just be a scalar. Is there a better way to say the following so that I can have dimensional analysis work in the meanwhile?
R = Quantity[radius, "Meters"];
This is the output:
UnitSimplify[
Sqrt[1 - (1.408969*10^6 radius^2)/(
1.380123*10^7 + 1.408969*10^6 radius^2)] (Quantity[
7.67349*10^-12 radius^2, (("Amperes")^2 ("Meters")^2 (
"Seconds")^2 ("Teslas")^2)/("Kilograms")])]
It should just be in Joules! But, when I set R to a quantity, like so:
R = Quantity[1, "Meters"];
I get such a pretty result:
{7.30945*10^-12 J}
I think I need to strip the units off radius. I tried Quantity Magnitude, but Mathematica wasn't a fan.
MapAt[UnitSimplify, expr, -1]
instead ofUnitSimplify[expr]
. $\endgroup$R
is never used, so its value cannot matter to the final result. What expression are you actually evaluating when you obtain the numerical result you show? $\endgroup$a = Solve[lorentz*m0*tempv/(q*B) == R, lorentz][[2]] T = ((lorentz /. a) - 1)*m0*c^2 // N
$\endgroup$Quantity[radius, "DimensionlessUnit"]
? $\endgroup$