Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NumberConcentration unit #1409

Conversation

ricardoboss
Copy link

@ricardoboss ricardoboss commented Jul 11, 2024

Closes #1260

@angularsen
Copy link
Owner

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 v6 Wishlist #1200

What do you think?

Pinging @bc913 that added ReciprocalLength and ReciprocalArea.

@chucker chucker mentioned this pull request Jul 11, 2024
@bc913
Copy link
Contributor

bc913 commented Jul 12, 2024

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.

@Muximize
Copy link
Contributor

Muximize commented Aug 8, 2024

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

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

Copy link

github-actions bot commented Oct 8, 2024

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.

Copy link

This PR was automatically closed due to inactivity.

@github-actions github-actions bot closed this Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ReciprocalVolume?
4 participants