Skip to content

Commit

Permalink
upgraded to UnitSystems v0.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
chakravala committed Mar 26, 2022
1 parent d909f75 commit 53d3e77
Show file tree
Hide file tree
Showing 8 changed files with 427 additions and 252 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Geophysics"
uuid = "74efdf00-b554-44e1-bd21-abb9281d951c"
authors = ["Michael Reed"]
version = "0.3.4"
version = "0.3.5"

[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand All @@ -11,7 +11,7 @@ UnitSystems = "3a241a3c-2137-41aa-af5e-1388e404ca09"
[compat]
julia = "1"
AbstractTensors = "0.7"
UnitSystems = "0.2,0.3"
UnitSystems = "0.3.2"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand Down
4 changes: 2 additions & 2 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# This file is part of Geophysics.jl. It is licensed under the AGPL license
# Geophysics Copyright (C) 2019 Michael Reed

using Documenter, UnitSystems, AbstractTensors, Geophysics
using Documenter, AbstractTensors, Geophysics, MeasureSystems

makedocs(
modules = [Geophysics,UnitSystems],
modules = [Geophysics,MeasureSystems,UnitSystems],
doctest = false,
format = Documenter.HTML(prettyurls = get(ENV, "CI", nothing) == "true"),
sitename = "Geophysics.jl",
Expand Down
102 changes: 78 additions & 24 deletions docs/src/constants.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,38 +26,35 @@ There exists a deep relationship between the fundamental constants, which also m
```

```@docs
αinv
```

## Fundamental Constants

```math
\Delta\nu_{\text{Cs}} = \Delta\tilde\nu_{\text{Cs}}c = \frac{\Delta\omega_{\text{Cs}}}{2\pi} = \frac{c}{\Delta\lambda_{\text{Cs}}} = \frac{\Delta E_{\text{Cs}}}{h}
Universe
```

```@docs
hyperfine
turn
sphere
```

## Fundamental Constants

```math
c = \frac1{\alpha_L\sqrt{\mu_0\varepsilon_0}} = \frac{1}{\alpha}\sqrt{\frac{E_h}{m_e}} = \frac{\hbar\alpha}{m_e r_e} = \frac{e^2k_e}{\hbar\alpha} = \frac{m_e^2G}{\hbar\alpha_G}
```
```@docs
lightspeed
MeasureSystems.lightspeed
```

```math
h = 2\pi\hbar = \frac{2e\alpha_L}{K_J} = \frac{8\alpha}{\lambda c\mu_0K_J^2} = \frac{4\alpha_L^2}{K_J^2R_K}
```
```@docs
planck
MeasureSystems.planck
```

```math
\hbar = \frac{h}{2\pi} = \frac{e\alpha_L}{\pi K_J} = \frac{4\alpha}{\pi\lambda c\mu_0K_J^2} = \frac{2\alpha_L}{\pi K_J^2R_K}
```
```@docs
planckreduced
MeasureSystems.planckreduced
```

```math
Expand All @@ -81,6 +78,20 @@ newton
einstein
```

```math
\kappa = \frac{8\pi G}{c^2} = \frac{8\pi\hbar}{cm_P^2} = \frac{8\pi\hbar\alpha_G}{cm_e^2} = \frac{c\alpha^4\alpha_G}{R_\infty^2 h}
```
```@docs
einstein2
```

```math
g_0 = [MLT^{-2}F^{-1}]
```
```@docs
MeasureSystems.gravity
```

## Atomic Constants

```math
Expand All @@ -101,7 +112,7 @@ protonmass
m_e = \mu_{eu}m_u = \mu_{eu}\frac{M_u}{N_A} = \frac{m_p}{\mu_{pe}} = \frac{2R_\infty h}{c\alpha^2} = m_P\sqrt{\alpha_G}
```
```@docs
electronmass
MeasureSystems.electronmass
```

```math
Expand Down Expand Up @@ -145,7 +156,7 @@ electronradius
M_u = m_uN_A = N_A\frac{m_e}{\mu_{eu}} = N_A\frac{m_p}{\mu_{pu}} = N_A\frac{2R_\infty h}{\mu_{eu}c\alpha^2}
```
```@docs
molarmass
MeasureSystems.molarmass
```

```math
Expand All @@ -159,14 +170,14 @@ avogadro
k_B = \frac{R_u}{N_A} = m_u\frac{R_u}{M_u} = \frac{m_e R_u}{\mu_{eu}M_u} = \frac{2R_uR_\infty h}{M_u \mu_{eu}c\alpha^2}
```
```@docs
boltzmann
MeasureSystems.boltzmann
```

```math
R_u = k_B N_A = k_B\frac{M_u}{m_u} = k_BM_u\frac{\mu_{eu}}{m_e} = k_BM_u\frac{\mu_{eu}c\alpha^2}{2hR_\infty}
```
```@docs
universal
universalgas
```

```math
Expand All @@ -188,7 +199,7 @@ K_{\text{cd}} = \frac{I_v}{\int_0^\infty \bar{y}(\lambda)\cdot\frac{dI_e}{d\lamb
\bar{y}\left(\frac{c}{540\times 10^{12}}\right)\cdot I_e = 1
```
```@docs
luminousefficacy
MeasureSystems.luminousefficacy
```

## Electromagnetic Constants
Expand All @@ -197,21 +208,21 @@ luminousefficacy
\lambda = \frac{4\pi\alpha_B}{\mu_0\alpha_L} = 4\pi k_e\varepsilon_0 = Z_0\varepsilon_0c
```
```@docs
rationalization
MeasureSystems.rationalization
```

```math
\mu_0 = \frac{1}{\varepsilon_0 (c\alpha_L)^2} = \frac{4\pi k_e}{\lambda (c\alpha_L)^2} = \frac{2h\alpha}{\lambda c(e\alpha_L)^2} = \frac{2R_K\alpha}{\lambda c\alpha_L^2}
```
```@docs
permeability
MeasureSystems.vacuumpermeability
```

```math
\varepsilon_0 = \frac{1}{\mu_0(c\alpha_L)^2} = \frac{\lambda}{4\pi k_e} = \frac{\lambda e^2}{2\alpha hc} = \frac{\lambda}{2R_K\alpha c}
```
```@docs
permittivity
vacuumpermittivity
```

```math
Expand All @@ -232,7 +243,7 @@ ampere
\alpha_L = \frac{1}{c\sqrt{\mu_0\varepsilon_0}} = \frac{\alpha_B}{\mu_0\varepsilon_0k_e} = \frac{4\pi \alpha_B}{\lambda\mu_0} = \frac{k_m}{\alpha_B}
```
```@docs
lorentz
MeasureSystems.lorentz
```

```math
Expand All @@ -246,7 +257,7 @@ biotsavart
e = \sqrt{\frac{2h\alpha}{Z_0}} = \frac{2\alpha_L}{K_JR_K} = \sqrt{\frac{h}{R_K}} = \frac{hK_J}{2\alpha_L} = \frac{F}{N_A}
```
```@docs
charge
elementarycharge
```

```math
Expand All @@ -260,14 +271,14 @@ faraday
Z_0 = \mu_0\lambda c\alpha_L^2 = \frac{\lambda}{\varepsilon_0 c} = \lambda\alpha_L\sqrt{\frac{\mu_0}{\varepsilon_0}} = \frac{2h\alpha}{e^2} = 2R_K\alpha
```
```@docs
impedance
vacuumimpedance
```

```math
G_0 = \frac{2e^2}{h} = \frac{4\alpha}{Z_0} = \frac{2}{R_K} = \frac{hK_J^2}{2\alpha_L^2} = \frac{2F^2}{hN_A^2}
```
```@docs
conductance
conductancequantum
```

```math
Expand All @@ -288,7 +299,7 @@ josephson
\Phi_0 = \frac{h}{2e\alpha_L} = \frac{1}{\alpha_L}\sqrt{\frac{hZ_0}{8\alpha}} = \frac{1}{\alpha_L}\sqrt{\frac{hR_K}{4}} = \frac{1}{K_J} = \frac{hN_A}{2F\alpha_L}
```
```@docs
magneticflux
magneticfluxquantum
```

```math
Expand All @@ -298,6 +309,49 @@ magneticflux
magneton
```

## Derived Quantities

```@docs
second
minute
hour
day
year
gaussianyear
siderealyear
hyperfine
hubble
cosmological
solarmass
earthmass
jupitermass
lunarmass
astronomicalunit
lunardistance
mile
clarkemile
nauticalmile
parsec
lightyear
gallon
litre
standardgravity
standardtemperature
standardpressure
inchmercury
torr
kilocalorie
calorie
meancalorie
thermalunit
tonsrefrigeration
horsepower
horsepowerwatt
horsepowermetric
electricalhorsepower
boilerhorsepower
```

## Constants Index

```@index
Expand Down
48 changes: 29 additions & 19 deletions docs/src/convert.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,51 +9,61 @@ Common conversion factors for physics units between `UnitSystem` specifications.
## Kinematic Units

```@docs
time
length
MeasureSystems.A
solidangle
MeasureSystems.T
MeasureSystems.L
area
UnitSystems.volume(::UnitSystem,::UnitSystem)
wavenumber
MeasureSystems.volume
MeasureSystems.wavenumber
angularwavenumber
fuelefficiency
frequency
MeasureSystems.frequency
angularfrequency
frequencydrift
speed
MeasureSystems.speed
acceleration
jerk
snap
crackle
pop
volumeflow
```

## Mechanical Units

```@docs
mass
inertia
MeasureSystems.mass
massflow
lineardensity
areadensity
density
specificvolume
MeasureSystems.density
MeasureSystems.specificweight
MeasureSystems.specificvolume
force
gforce
stiffness
pressure
MeasureSystems.pressure
compressibility
viscosity
MeasureSystems.viscosity
diffusivity
rotationalinertia
impulse
momentum
angularmomentum
yank
energy
specificenergy
MeasureSystems.specificenergy
action
fluence
power
powerdensity
intensity
MeasureSystems.intensity
spectralflux
soundexposure
impedance(::UnitSystem,::UnitSystem)
specificimpedance
MeasureSystems.specificimpedance
admittance
compliance
inertance
Expand All @@ -80,7 +90,7 @@ inductance
reluctance
permeance
permittivity(::UnitSystem,::UnitSystem)
permeability(::UnitSystem,::UnitSystem)
MeasureSystems.permeability(::UnitSystem,::UnitSystem)
susceptibility
specificsusceptibility
demagnetizingfactor
Expand Down Expand Up @@ -108,11 +118,11 @@ polestrength
## Thermodynamic Units

```@docs
temperature
MeasureSystems.temperature
entropy
specificentropy
volumeheatcapacity
thermalconductivity
MeasureSystems.thermalconductivity
thermalconductance
thermalresistance
thermalexpansion
Expand All @@ -122,7 +132,7 @@ lapserate
## Molar Units

```@docs
molarmass(::UnitSystem,::UnitSystem)
MeasureSystems.molarmass(::UnitSystem,::UnitSystem)
molality
mole
molarity
Expand All @@ -142,7 +152,7 @@ luminousflux
luminance
luminousenergy
luminousexposure
luminousefficacy(::UnitSystem,::UnitSystem)
MeasureSystems.luminousefficacy(::UnitSystem,::UnitSystem)
```

## Conversion Index
Expand Down
Loading

2 comments on commit 53d3e77

@chakravala
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/57352

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.5 -m "<description of version>" 53d3e77907a738ddc14e1127ac536f7dd514a60f
git push origin v0.3.5

Please sign in to comment.