N.B.: I've bolded the questions to make it easy to find them among the background verbiage.
1) Is there a way to generate a list of just the physical constants? [Note that I am not looking for a list of those in the deprecated physical constants package, but rather the current physical constants.] MSE member Mark Adler supplied this code, which gives a list of all units, including the physical constants, and then manually pulled out most (but not all) of the physical constants from it (http : // mathematica.stackexchange.com/questions/130049/physical - and - other - constants)
Quantity;
Sort@Keys@QuantityUnits`Private`$UnitReplacementRules
I tried finding characteristics that would distinguish the physical constants from the other units, and would thus allow me to extract the physical constants alone, but was unsuccessful.
The following code, modified from the documentation for QuantityVariablePhysicalQuantity, gives the number of physical quantities (including physical constants) in each of several categories, but only for those physical quantities present in MMA's built-in formulae. It might serve as a starting point:
formulas = FormulaLookup[All];
variables = Flatten[FormulaData[#, "QuantityVariables"] & /@ formulas];
quantities = Flatten[QuantityVariablePhysicalQuantity /@ variables];
SortBy[Tally[quantities], Last] // Reverse
2) What's supposed to be the difference between "AvogadroConstantFoxHill" and "AvogadroConstantValueFoxHill"? They both evaluate to 602214141070409084099072/mol
. Based on the name, I would have expected "AvogadroConstantValueFoxHill" to be the dimensionless version of "AvogadroConstantFoxHill". But, in the absence of documentation, that's just an educated guess:
UnitConvert@Quantity@"AvogadroConstantFoxHill"
UnitConvert@Quantity@"AvogadroConstantValueFoxHill"
3) Several of the physical constants are available in alternate versions, as ratios of integers, which I assume is to allow exact calculations using physical constants. These are identified by the suffix "NewSI". Thus we have: "AvogadroConstantNewSI", "BoltzmannConstantNewSI", "ElementaryChargeNewSI", and "PlanckConstantNewSI". Thus, for instance:
UnitConvert@Quantity@"BoltzmannConstantNewSI"
Precision[%]
Quantity[300,
"Joules"]/(Quantity@"BoltzmannConstantNewSI"*
Quantity[300, "Kelvins"])
Precision[%]
$\frac{27613}{2000000000000000000000000000}\:\text{kg}\, \text{m}^2 \text{/(}\text{s}^2\text{K})$
$\infty$
$\frac{2000000000000000000000000000}{27613}$
$\infty$
and
UnitConvert@Quantity@"BoltzmannConstant"
Precision[%]
Quantity[300,
"Joules"]/(Quantity@"BoltzmannConstant"*
Quantity[300, "Kelvins"])
Precision[%]
$1.38065 \times 10^{-23}\:\text{kg}\, \text{m}^2 \text{/(}\text{s}^2\text{K})$
$\infty$
$7.24297 \times 10^{22}$
$5.94143$
However, given that "BoltzmannConstant" clearly evaluates to a floating point number, and given that it also clearly behaves like a floating point in the last calculation, why does Precision@Quantity@"BoltzmannConstant"
evaluate to $\infty$?
4) Has Wolfram ever explained why they don't provide documentation for the physical constants? And is there any non-offical documentation available?
[Edit: I am using 11.0.1, and I was just informed that "CoulombConstant" is now available in 11.1. But my point remains: it would be helpful if these were documented and cross-referenced.]
Such documentation would certainly be helpful. For instance, recently I needed Coulomb's constant (http://scienceworld.wolfram.com/physics/CoulombsConstant.html). The Help Documentation doesn't list any of the physical constants, and the auto-complete function isn't comprehensive (e.g., it doesn't recognize "AvogadroConstantFoxHill"*), so I searched the list of units I'd generated with the code above, and got no hits. I then searched Wolfram|Alpha, and it returned "Unable to interpret unit specification Coulomb Constant" ("show all results" now does give Coulomb's constant, perhaps because of the update to 11.1). Continuing, since Coulomb's constant is $1/(4 \pi \epsilon_{0})$, where $\epsilon_{0}$ is the vacuum permittivity, I then searched the units list for the latter. Still no hits. However, since the vacuum permittivity is also called the electric constant, I searched for that, and only then was I finally successful.
[*That's probably because it's a proposed constant. But I'd rather search a comprehensive list; that way, if something doesn't show up, I don't have to wonder if it's because it's considered proposed, or not available in the system at all.]
Plus there's also the semi-cryptic "AUsOfElectricPermittivity"; in the absence of documentation, it's not initially obvious what this is.
It would have been much easier if I could have entered Coulomb's constant into the Help search and been redirected to a page that provided the following information:
"Mathematica doesn't have a built-in value for Coulomb's constant , which is given by $1/(4 \pi \epsilon_{0})$, where $\epsilon_{0}$ is the vacuum permittivity, aka the electrical constant (see http://scienceworld.wolfram.com/physics/CoulombsConstant.html). However, in its place, you can use either 1/(4 Pi Quantity@"ElectricConstant")
, or 1/Quantity@"AUsOfElectricPermittivity"
, where "AUsOf" means "angular units of", and where Quantity@"AUsOfElectricPermittivity" = 4*Pi*Quantity@"ElectricConstant"
. A key difference between the two is that "ElectricConstant" evaluates to a ratio of integers (which means it is treated as an "exact number" in Mathematica's internal calculations), while "AUsOfElectricPermittivity" evaluates to a floating point number, so if you would like only exact numbers in your calculation, you should use the former. For a discussion of the relative utility of performing calculations with exact vs. floating-point numbers, see ....."
N.B.: There is a tag for the deprecated "physicalconstants-package". However this question, and several others over the past few years, specifically concern the current physical constants functionality. As there is no tag for the latter, I created the tag "physical-constants".
UnitConvert["CoulombsConstant"]
evaluates to the same quantity asUnitConvert[1/(4 Pi Quantity@"ElectricConstant")]
$\endgroup$UnitConvert["CoulombsConstant"]
, I getQuantity::unkunit: Unable to interpret unit specification CoulombsConstant.
$\endgroup$