JuliaPhysics / JuliaPhysics/DynamicQuantities.jl

CGS units type / other type systems

Open
#25 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
155
Forks
32
PR merge metrics
No merged PRs in 30d

Description

Some domains use non-SI unit systems. For example, astronomers like to use [CGS units](https://en.wikipedia.org/wiki/Centimetre%E2%80%93gram%E2%80%93second_system_of_units) (also known as Gaussian units). Although CGS units are falling out of use (and have been dead in most fields for a long time) it could be nice if these other domains could use DynamicQuantities.jl.

One should generally not mix cgs units with SI because:

1. There are only 3 base dimensions: length, mass, and time. All others (even charge) are derived based on these.
2. Some equations need to be rewritten. i.e., you could not write one version of Maxwell's equations and have it work for both SI units and cgs units – there is an extra $4\pi$ factor in the cgs version.

I think all that would be required is a `CGSQuantity <: AbstractQuantity` and `CGSDimensions <: AbstractQuantity` (requiring #24), with one fewer dimension.

However, maybe it's just easier to define `erg` as one of the available units, and be clear that the SI convention is used. We could even throw a warning when someone uses `erg` – letting them know that it is being converted to the SI equivalent.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.