0

How can we list all available physical quantities in Mathematica?

m_goldberg
  • 107,779
  • 16
  • 103
  • 257
materia-nigra
  • 800
  • 6
  • 6
  • I believe this is a different issue, since I don't want to list the units associated with the quantities, but the names of the quantities instead. – materia-nigra Dec 27 '16 at 03:41
  • What do you believe the difference is? The list are the names. Or have I missed something? – Edmund Dec 27 '16 at 03:45
  • The code provided on the linked question yields a list of units, not the quantities they are related to. It's different because the physical quantities names describe the nature of what's being measured in opposition to the units, which are the standards of measure. – materia-nigra Dec 27 '16 at 03:55
  • Sounds like you are looking for UnitDimensions, correct? – Edmund Dec 27 '16 at 04:07
  • Not essentially, because those are only base dimensions. I'd like to have derived physical quantities also. – materia-nigra Dec 27 '16 at 04:10
  • May you add an example of what you are expecting the output to be for a particular input. I'm not following what it is you are seeking. The unit name is what is passed to Quantity to create Quantity objects; Quantity[1, "Feet"], and UnitDimensions["Feet"] tells you that "Feet" is a unit of length. So ... – Edmund Dec 27 '16 at 04:14
  • Retracted close vote as OP is looking to get a list of all QuantityVariable's in Mathematica. For example, those supported by but not limited to "QuantityVariablePhysicalQuantities" property of FormulaData. – Edmund Dec 27 '16 at 04:42

1 Answers1

3

Evaluate the following:

Quantity; (*only needed to establish symbol Quantity in symbol table*)
canonicalUnits = Keys @ QuantityUnits`Private`$UnitReplacementRules;

canonicalUnits is a big list. In V11.0.1

Length @ canonicalUnits

gives 4959. It contains more than just physical quantities. Here is a sample.

SeedRandom[42]; 
RandomSample[canonicalUnits, 20]

{"PlotterUnits", "AmagatDensityUnit", "Semimonthly", "Orguias", "Kiloleagues", "BrakeHorsepower", "Millioersteds", "Gigahenries", "BarrelsOfOil", "LinearInches", "RomanLibras", "LaoAtt", "Virgates", "Ris", "MegatonsOfOilEquivalentIT", "BritishMaunds", "LoschmidtConstant", "Coulombs", "Nanowatts", "Marks"}

m_goldberg
  • 107,779
  • 16
  • 103
  • 257
  • Actually, I was looking for the names of the quantities, not the units, e.g., "Time", "Lenght", etc.. – materia-nigra Dec 27 '16 at 03:37
  • @Fred. "Time", "Length", etc. are just strings. They have no supported special meaning in Mathematica. – m_goldberg Dec 27 '16 at 04:02
  • But aren't they recongnized by QuantityVariable ? On documentation: "Supported physical quantities include both physical and chemical quantities such as "Length", "ElectricCurrent", and "ChemicalPotential", as well as mathematical and financial quantities such as "Angle" and "Money"." – materia-nigra Dec 27 '16 at 04:04
  • When I type in free form input: magnetic flux, the output is a QuantityVariable – materia-nigra Dec 27 '16 at 04:14