-
Notifications
You must be signed in to change notification settings - Fork 25
Create physical constants submodule #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Benchmark Results
Benchmark PlotsA plot of the benchmark results have been uploaded as an artifact to the workflow run for this PR. |
From JuMP's point of view, I think most people would just be using the distance, mass, and time units. No fancy physics stuff. |
Co-authored-by: Oscar Dowson <odow@users.noreply.github.com>
[Diff since v0.4.0](v0.4.0...v0.5.0) **Closed issues:** - Use `Int64 / C` as default (#20) **Merged pull requests:** - Make `AbstractQuantity` and `AbstractDimensions` (#24) (@MilesCranmer)
Combining with verbatim units branch, so closing. |
Continued on #32. This PR also introduces the symbolic dimensions to help with trulsf/UnitJuMP.jl#18 |
PR for #26.
Constants
submodule.Units
andConstants
are now both exported by DynamicQuantities (unsure about this, but feels right)Constants
is made available within the@u_str
macro for ease of access. (Some constants are treated like units)For example:
The following constants are included.
c
: Speed of light in a vacuum. Standard.h
: Planck constant. Standard.hbar
: Reduced Planck constant (h/2π). Standard.e
: Elementary charge. Standard.k_B
: Boltzmann constant. Standard.N_A
: Avogadro constant. Standard.eV
: Electron volt. Standard.R
: Molar gas constant. Standard.F
: Faraday constant. Standard.sigma_sb
: Stefan-Boltzmann constant. Standard.alpha
: Fine-structure constant. Measured.u
: Atomic mass unit (1/12th the mass of Carbon-12). Measured.G
: Newtonian constant of gravitation. Measured.mu_0
: Vacuum magnetic permeability. Measured.eps_0
: Vacuum electric permittivity. Measured.m_e
: Electron mass. Measured.m_p
: Proton mass. Measured.m_n
: Neutron mass. Measured.a_0
: Bohr radius. Measured.k_e
: Coulomb constant (Note: SI units only!). Measured.Ryd
: Rydberg frequency. Measured.I included the most common astro ones too (It might be nice if someone added similar sets of very common constants from other fields.)
M_earth
: Earth mass. Measured.M_sun
: Solar mass. Measured.M_jup
: Jupiter mass. Measured.R_earth
: Nominal Earth equatorial radius. Standard.R_jup
: Nominal Jupiter equatorial radius. Standard.R_sun
: Nominal solar radius. Standard.L_sun
: Nominal solar luminosity. Standard.L_bol0
: Standard luminosity at absolute bolometric magnitude 0. Standard.sigma_T
: Thomson scattering cross-section. Measured.au
: Astronomical unit. Standard.pc
: Parsec. Standard.ly
: Light year. Standard.atm
: Standard atmosphere. Standard."Standard" means it is an exact standard, while "Measured" means there is some uncertainty associated with it.
cc @odow @ChrisRackauckas. I am eager to hear your take on this interface given your interest in using the package downstream.