UnitsNet icon indicating copy to clipboard operation
UnitsNet copied to clipboard

Add `NumberConcentration` unit

Open ricardoboss opened this issue 1 year ago • 3 comments

Closes #1260

ricardoboss avatar Jul 11 '24 00:07 ricardoboss

Hi, sure I think we can add this.

However we have a naming consistency issue. From before we have: https://github.com/angularsen/UnitsNet/blob/master/Common/UnitDefinitions/ReciprocalLength.json https://github.com/angularsen/UnitsNet/blob/master/Common/UnitDefinitions/ReciprocalArea.json

For consistency, we should maybe name this ReciprocalVolume.

However, https://en.wikipedia.org/?title=Number_concentration&redirect=no redirects to https://en.wikipedia.org/wiki/Number_density, which defines names for all 3:

  • Volumetric number density
  • Areal number density
  • Linear number density

I think these names are better, because google does not really find much on reciprocal area or reciprocal volume.

Proposal

  1. Rename in this PR to VolumetricNumberDensity
  2. Mark ReciprocalLength and ReciprocalArea as obsolete, to be replaced with ArealNumberDensity and LinearNumberDensity in #1200

What do you think?

Pinging @bc913 that added ReciprocalLength and ReciprocalArea.

angularsen avatar Jul 11 '24 12:07 angularsen

Imho, it'd be better to keep existing ReciprocalLength and ReciprocalArea and implementing the new one as ReciprocalVolume to keep consistency. Some quantities might be named and frequently used in various forms within different fields of physics. In order to reduce confusion and achieve consistency, I think we should stick to mathematical definitions with easy to infer synonyms if there are multiple names for the same quantity and/or unit.

For instance, when you write code and make use of ReciprocalLength is more convenient and self explanatory for the developer/maintainer etc. Using LinearNumberDensity most likely would force the reader/developer to search for the meaning and so on.

bc913 avatar Jul 12 '24 20:07 bc913

Users who prefer different names in their project could use aliases:

global using LinearNumberDensity = UnitsNet.ReciprocalLength;
global using Voltage = UnitsNet.ElectricPotential;

Muximize avatar Aug 08 '24 08:08 Muximize

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Oct 08 '24 02:10 github-actions[bot]

This PR was automatically closed due to inactivity.

github-actions[bot] avatar Oct 16 '24 02:10 github-actions[bot]