I’m using Mathematica to teach a Physics course (Theoretical Mechanics) this fall, and am having lots of trouble with units (Quantity…). My most recent issue is this: Mathematica doesn’t seem to recognize that Radians are a dimensionless unit. So if I type:
QuantityMagnitude[5, "Radians"]
I get the error message: Quantity::compat: DimensionlessUnit and Radians are incompatible units
You might wonder why I would like to do something like this anyway. The issue is that NDSolve doesn’t seem to work with Quantities, so I need to strip units off of everything before running it through there. But if I have an angle, I don’t know if it is in Degrees, Radians or without any specific angular unit which means the dimensionless angular unit of Radians if coming out of some calculation like
\[Phi] = \[Sqrt](k/m) t
Is there some way for me to tell Mathematica that Radians are compatible with DimensionlessUnit? Or do I need to write some wrapper that checks if compatible and if not then don’t try to convert?
Thanks,
Eric