Fundamental_constants project updated with the latest 2022 CODATA adjustment

I have released fundamental_constants v1.3 with the just released 2022 CODATA adjustment.

Don’t expect great features, I will keep it simple (my only plan is to update it every four years). It just offers Fortran modules with parameter values. There are three ways to use this project:

  • as a fpm dependency,
  • or by copying the module .f90 files you need into your project,
  • or just the few lines you need (the project is under MIT license).

See the References section at the end of the README.md for more elaborate projects. You may especially be interested by the project of @mskocic Codata Library: All physical constants which will soon be integrated in the Fortran stdlib: Codata constants. by MilanSkocic · Pull Request #800 · fortran-lang/stdlib · GitHub

8 Likes

Thank you @vmagnin. I will integrate the 2022 release in the PR.

1 Like

Note that I have not yet found the article. For the moment, we have just that page Codata Internationally Reconmmended 2022 Values of the Fundamental Physical Constants
(sic, with the typo)

The 2018 CODATA paper is here: https://physics.nist.gov/cuu/pdf/RevModPhys.93.025010.pdf

With a diff, I have detected only one new constant:

alpha particle rms charge radius  1.6785 e-15     0.0021 e-15   m

and no changed name.

The kg definition was changed in November 2018 and is now defined on the basis of the Planck constant. The molar mass of carbon-12 is now 12.000 000 0126 e-3 kg mol^-1 instead of 11.999 999 9958 e-3.

Sadly, the Newtonian constant of gravitation G is still 6.674 30 e-11 with an uncertainty of 0.000 15 e-11. One of the oldest and less precise value among physical constants.

In one career we had a long list of constants and units that were assigned “immutable” numbers and a string description. The string description was useful when listing or searching the constants (the long names now available help making the values easier to identify but a label is still useful). It was also used to create default labels for values in plotting and output. The immutable number was very useful with units, as it helped make it easy to do automated unit conversions; as you could set up rules to convert from unit 100 to 202, for example. Using the unique numbers for each value meant we had to keep a central corporate list of constants and units and labels But also let us generate data with unit codes assigned to the values; and even do automatic unit and language conversion so one person could plot information from a file in English units and the default labels could be in the preferred language; and another could look at the same file and display information in Metric units, etc.

But remembering that made me wonder if there is a similar project for converting units of measure. I would like to see the fpm registry contain these constants but also something for units of measure someday as well.

So there was this file that looked something like

129     370     "Vapor_Density" "kg/m^3"
227     369     "Vapor_Density" "lbm/ft^3"
100     1076    "Vapor_Phase_Velocity"  "ft/s"
171     1034    "Vapor_Specific_Heat"   "J/kg*K"
170     372     "Vapor_Specific_Heat"   "btu/lbm*F"
182     379     "Vapor_Velocity"        "ft/s"
183     380     "Vapor_Velocity"        "m/s"
163     381     "Vapor_Viscosity"       "cp"
162     382     "Vapor_Viscosity"       "lbm/ft*hr"

that was centrally maintained and that was read in and written out as code in several languages. Just food for thought; but wondering if there is something out there that is similiar at least for basic unit conversions like the old “units” command.

1 Like

I am glad to announce that the codata constants (2022) have been merged into stdlib.

7 Likes