Even with the Wolfram Alpha lookup using [CTRL]=
entering the unit of a Quantity can be tedious, especially for complex units, such as this for a heat transfer coefficient:
Quantity[1,(("Watts")/("Kelvins" ("Meters")^2))]
The following unit-alias naming convention works well:
For a unit that has a clear unit symbol use the name unit$[unitSymbol]
, where [unitSymbol]
is usually the official SI (ISQ) symbol. You can then type 'unit$' and prompt on it to choose the desired unit. For example:
unit$W = Quantity[1, "Watts"];
unit$kW = Quantity[1, "Kilowatts"];
unit$m = Quantity[1,"Meters"];
unit$mm = Quantity[1,"Millimeters"];
You can also use just the prefix 'unit' together with a descriptive name to enforce uniformity across a project:
unitHeatLoad = Quantity[1, "Kilowatts"]; (* Industry-typical non-SI choice *)
unitHeatTransferCoefficient = Quantity[1,(("Watts")/("Kelvins" ("Meters")^2))];
Frequently used ones can be further aliased thus:
unitHTC = unitHeatTransferCoefficient; (* Short-cut alias *)
This makes for far more readable code, and your typing hands will be happier. You can also search easily for unit usages. And you can change unit conventions across a project more easily.
However, be aware that multiplication, addition, and division of Mathematica Quantities involving units for temperature have special treatment!