angularsen / UnitsNet

Makes life working with units of measurement just a little bit better.
https://www.nuget.org/packages/UnitsNet/
MIT No Attribution
2.16k stars 373 forks source link

ReciprocalVolume? #1260

Open chucker opened 1 year ago

chucker commented 1 year ago

Is your feature request related to a problem? Please describe. I have a particulate matter sensor that gives measured values in µg/m^3 (so I can use Density), but then also measured counts in #/m^3.

Wikipedia seems to call this https://en.wikipedia.org/wiki/Number_density.

I've also found the ReciprocalArea type, which is pretty close, except I need ReciprocalVolume.

Describe the solution you'd like NumberDensity and/or ReciprocalVolume types would be nice, with factory methods such as FromInverseCubicMeter.

chucker commented 1 year ago

(NumberConcentration might also be the correct name here. I'm not sure.)

ricardoboss commented 1 year ago

See also: https://en.wikipedia.org/wiki/Concentration#Number_concentration

angularsen commented 1 year ago

This feels a tiny bit fringe/exotic, but I'll accept it.

From googling a bit, it seems number density is maybe the more commonly used term. I have no hard preference, but reciprocal volume seems the least common of them.

I'd suggest NumberDensity, alternatively NumberConcentration. If you want to go ahead with a pull request, steps are outlined here: https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit

I'm happy to assist.

github-actions[bot] commented 2 weeks ago

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

chucker commented 2 weeks ago

@ricardoboss made a PR (#1409); reopen