We intend to keep pulling in further improvements from PainterQubits/Unitful.jl, and suggest improvements to Unitful.jl as well. Unitful now also has 'fancy exponents' output and can drop spaces between number and unit. Windows can now also easily display Unitful's symbols for length, time, etc. There may be no need of maintaining this fork in the future.
MechanicalUnits.jl contains additional functionality, while this contains alternative. 'MechanicalUnits' has macros for which define e.g. m² = m^2.
Ideas developed with 'Unitfu' could easily switch to depend on 'Unitful' to use functionality from other packages.
MechGluecode contains glue code for plotting, differential equations and non-linear solving, loaded when the relevant packages are.
- Units are printed with color and in a form that can be parsed by Julia.
- We define '∙' = '*'. (on the keyboard: \vysmblkcircle). Quantities look more like an entity in formulas.
julia> 250kg∙m/s + 101kPa * 5.0cm * 20cm * 1s |> kN
1.26kN∙s
- Collections (tuples, arrays, vectors) with identical elements are printed with units outside of brackets, without redundant type information:
julia> [1,2,3]m |> println
[1, 2, 3]m
- In conversions, the quantity is considered immutable. Express quantities how you like, as long as it's the same entity:
julia> 1kg |> cm
100kg∙cm∙m⁻¹
This fork is registered in M8.
(@v1.6) pkg> registry add https://github.com/hustf/M8
Cloning registry from "https://github.com/hustf/M8"
(@v1.6) pkg> add Unitfu
julia> using Unitfu
Unitful is a Julia package for physical units. We want to support not only SI units but also any other unit system. We also want to minimize or in some cases eliminate the run-time penalty of units. There should be facilities for dimensional analysis. All of this should integrate easily with the usual mathematical operations and collections that are found in Julia base.
Stable and latest versions available.
- UnitfulUS.jl: U.S. customary units. Serves as an example for how to implement a units package.
- UnitfulAstro.jl: Astronomical units.
- UnitfulAngles.jl: More angular units, additional trigonometric functionalities, and clock-angle conversion.
- UnitfulAtomic.jl: Easy conversion from and to atomic units.
- PowerSystemsUnits.jl: Common units for dealing with power systems.
- UnitfulMoles.jl for defining mol units of chemical elements and compounds.
- UnitfulRecipes.jl: Adds automatic labels for Plots.jl and supports plot axes with units.
- UnitfulIntegration.jl: Enables use of Unitful quantities with QuadGK.jl. PRs for other integration packages are welcome.
- UnitfulEquivalences.jl: Enables conversion between equivalent quantities of different dimensions, e.g. between energy and wavelength of a photon.
- UnitfulLatexify.jl: Pretty print units and quantities in LaTeX format.
- UnitfulBuckinghamPi.jl: Solves for the adimensional Pi groups in a list of Unitful parameters, according to the Buckingham-Pi Theorem.
- NaturallyUnitful.jl: Convert to and from natural units in physics.
- UnitfulChainRules.jl: Enables use of Unitful quantities with ChainRules.jl-compatible autodifferentiation systems
Unitful was inspired by: