Units of bending moment are conventionally defined as kilonewton meters, using the notation kNm. In Wolfram Language, such units can be expressed as follows.
In[]:=
Quantity[None,"Kilonewtons""Meters"]
Out[]=
mkN
In the output cell, the order of the units has been reversed such that it does not honour the order supplied to the Quantity function in the input cell – i.e.
m
kN
is returned instead of the desired
kN
m
.
Whilst this reordering of the unit components doesn’t affect calculation results, it can (as in this case) lead to inconsistencies with conventional unit notations. Which is far from ideal.
My question, therefore, is – can the ordering of units in the output cell be forced to honour the order prescribed in the input cell?
I note that the documentation states that “Quantity has the attribute HoldRest and preserves the structure of unit”. Given that the structure [which I take to mean the order] of unit is not always preserved, I wonder whether the behaviour described above may be a bug? This example isn’t unique – I’ve come across other units that exhibit the same behaviour.
Any suggestions for resolving this issue would be much appreciated.