Skip to content

Commit

Permalink
revised and improved UnitSystems syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
chakravala committed May 27, 2022
1 parent c3341cc commit 1730bef
Show file tree
Hide file tree
Showing 18 changed files with 609 additions and 283 deletions.
7 changes: 4 additions & 3 deletions Kernel/systems.wl
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,11 @@ DimensionRules["ISQEM", x_] := DimensionRules["MetricEngineering", x] /. {"F" ->
DimensionRules["EMU", x_] := x /. "Q" -> Sqrt["L" "M"]
DimensionRules["ESU", x_] := x /. "Q" -> Sqrt["L"^3 "M"]/"T"
DimensionRules["Gauss", x_] := x /. "Q" -> Sqrt["L"^3 "M"]/"T"
DimensionRules["Stoney",x_] := x //. {"\[CapitalTheta]" -> "M" "L"^2/"T"^2, "T" -> "L"}
DimensionRules["Stoney",x_] := x //. {"\[CapitalTheta]" -> "M", "N" -> "M", "T" -> "L"}
DimensionRules["Electronic",x_] := DimensionRules["Stoney", x] /. "M" -> 1
DimensionRules["PlanckGauss",x_] := DimensionRules["Stoney", x] /. "L" -> 1/"M"
DimensionRules["Planck",x_] := DimensionRules["PlanckGauss", x] /. "Q" -> "M"
DimensionRules["QCDoriginal",x_] := DimensionRules["PlanckGauss", x] /. "Q" -> 1
(*DimensionRules["QCDoriginal",x_] := DimensionRules["PlanckGauss", x] /. "Q" -> 1*)
DimensionRules["NaturalGauss",x_] := DimensionRules["PlanckGauss", x] /. "M" -> 1
DimensionRules["Rydberg",x_] := x //. {"\[CapitalTheta]" -> "M" "L"^2/"T"^2, "T" -> "L"^2 "M"}
DimensionRules["Hartree",x_] := DimensionRules["Rydberg", x] /. "M" -> 1
Expand All @@ -214,7 +214,8 @@ DimensionSystem["Stoney"] := DimensionRules["Stoney","ISQEM"]
DimensionSystem["Electronic"] := DimensionRules["Electronic","Stoney"]
DimensionSystem["PlanckGauss"] := DimensionRules["PlanckGauss","Stoney"]
DimensionSystem["Planck"] := DimensionRules["Planck","PlanckGauss"]
DimensionSystem["QCDoriginal"] := DimensionRules["QCDoriginal","PlanckGauss"]
(*DimensionSystem["QCDoriginal"] := DimensionRules["QCDoriginal","PlanckGauss"]*)
DimensionSystem["QCDoriginal"] := DimensionSystem["PlanckGauss"]
DimensionSystem["Natural"] := AbstractUnitSystem["Natural"]
DimensionSystem["NaturalGauss"] := DimensionRules["NaturalGauss","PlanckGauss"]
DimensionSystem["Rydberg"] := DimensionRules["Rydberg","ISQEM"]
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "UnitSystems"
uuid = "3a241a3c-2137-41aa-af5e-1388e404ca09"
authors = ["Michael Reed"]
version = "0.3.6"
version = "0.3.7"

[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ Unit conversion documentation is at https://geophysics.crucialflow.com/dev/conve

**Derived Unit conversions:**

Mechanics: `angle`, `solidangle`, `time`, `length`, `area`, `volume`, `wavenumber`, `angularwavenumber`, `fuelefficiency`, `numberdensity`, `frequency`, `angularfrequency`, `frequencydrift`, `speed`, `acceleration`, `jerk`, `snap`, `crackle`, `pop`, `volumeflow`,
Mechanics: `angle`, `solidangle`, `time`, `angulartime`, `length`, `angularlength`, `area`, `angulararea`, `volume`, `wavenumber`, `angularwavenumber`, `fuelefficiency`, `numberdensity`, `frequency`, `angularfrequency`, `frequencydrift`, `stagnance`, `speed`, `acceleration`, `jerk`, `snap`, `crackle`, `pop`, `volumeflow`, `etendue`, `photonintensity`, `photonirradiance`, `photonradiance`,
`inertia`, `mass`, `massflow`, `lineardensity`, `areadensity`, `density`, `specificweight`, `specificvolume`, `force`, `specificforce`, `gravityforce`, `pressure`, `compressibility`, `viscosity`, `diffusivity`, `rotationalinertia`, `impulse`, `momentum`, `angularmomentum`, `yank`, `energy`, `specificenergy`, `action`, `fluence`, `power`, `powerdensity`, `irradiance`, `radiance`, `radiantintensity`, `spectralflux`, `spectralexposure`, `soundexposure`, `impedance`, `specificimpedance`, `admittance`, `compliance`, `inertance`;
Electromagnetics: `charge`, `chargedensity`, `linearchargedensity`, `exposure`, `mobility`, `current`, `currentdensity`, `resistance`, `conductance`, `resistivity`, `conductivity`, `capacitance`, `inductance`, `reluctance`, `permeance`, `permittivity`, `permeability`, `susceptibility`, `specificsusceptibility`, `demagnetizingfactor`, `vectorpotential`, `electricpotential`, `magneticpotential`, `electricfield`, `magneticfield`, `electricflux`, `magneticflux`, `electricfluxdensity`, `magneticfluxdensity`, `electricdipolemoment`, `magneticdipolemoment`, `electricpolarizability`, `magneticpolarizability`, `magneticmoment`, `specificmagnetization`, `polestrength`;
Electromagnetics: `charge`, `chargedensity`, `linearchargedensity`, `exposure`, `mobility`, `current`, `currentdensity`, `resistance`, `conductance`, `resistivity`, `conductivity`, `capacitance`, `inductance`, `reluctance`, `permeance`, `permittivity`, `permeability`, `susceptibility`, `specificsusceptibility`, `demagnetizingfactor`, `vectorpotential`, `electricpotential`, `magneticpotential`, `electricfield`, `magneticfield`, `electricflux`, `magneticflux`, `electricdisplacement`, `magneticfluxdensity`, `electricdipolemoment`, `magneticdipolemoment`, `electricpolarizability`, `magneticpolarizability`, `magneticmoment`, `specificmagnetization`, `polestrength`;
Thermodynamics: `temperature`, `entropy`, `specificentropy`, `volumeheatcapacity`, `thermalconductivity`, `thermalconductance`, `thermalresistivity`, `thermalresistance`, `thermalexpansion`, `lapserate`,
`molarmass`, `molality`, `mole`, `molarity`, `molarvolume`, `molarentropy`, `molarenergy`, `molarconductivity`, `molarsusceptibility`, `catalysis`, `specificity`,
`molarmass`, `molality`, `mole`, `molarity`, `molarvolume`, `molarentropy`, `molarenergy`, `molarconductivity`, `molarsusceptibility`, `catalysis`, `specificity`, `diffusionflux`,
`luminousflux`, `luminousintensity`, `luminance`, `illuminance`, `luminousenergy`, `luminousexposure`, `luminousefficacy`.

**Generalized dimensionless `Coupling`:**
Expand Down
Loading

2 comments on commit 1730bef

@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 updated: JuliaRegistries/General/61190

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.7 -m "<description of version>" 1730bef8d940d9e4fff9dbe4be620154caa9a4ec
git push origin v0.3.7

Please sign in to comment.