JuliaPhysics / JuliaPhysics/Unitful.jl
It will be good if it's possible to throw away dimensions manually by users
- Dominant language
- Julia
- Stars
- 675
- Forks
- 124
- Avg merge
- 3h 38m
- Merged PRs (30d)
- 1
Description
In many situations of physics research, we would like to throw away one or more dimensions totally from the entire project by admitting some scientific constant as dimensionless. This will give many quantities and units the same dimension so that we can easily convert units and compare quantities, otherwise we need to multiply with a combination of constants before doing that. That multiplier can be very complicated when we confront complex quantities, and we may have quite a lot of different complex quantities. So, it would be great if there was a function to manually set a constant dimensionless and choose one related dimension to disappear.
For example, in one of my recent projects, I would like to throw away temperature by setting the Boltzmann constant as 1, throw away time by setting the speed of light in vacuum as 1, throw away mass by setting the reduced Planck constant as 1, and throw away electric current by setting vacuum dielectric constant as 1/(4pi). By doing this, every quantity will have a dimension of length or length to some power (if ignoring the substance amount and luminosity). I only need to specify one length characterizing my system and then everything is comparable, like magnetic field, displacement field(light), susceptibility, wave vector, energy, area, charge density, and many others. This is different from specifying preferred units because many quantities still have different dimensions and I have to figure out what combination of these constants I should multiply each time I need to use them.
Contributor guide
No contributing guide indexed for this repository
Research direction
No file, test, or entry point is identified in the issue. Start by locating Unitful.jl's existing dimension, unit-conversion, and physical-constant machinery, then determine how a user-facing declaration could make selected constants dimensionless and remove related dimensions. Done should include a defined API and working conversions and comparisons for the temperature, time, mass, and electric-current examples.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100