-
Notifications
You must be signed in to change notification settings - Fork 394
Add concentration units (mixtures/solutions) #646
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
60e9a7c
Concentration Units (mixtures/solutions)
lipchev 4bacbff
Merge remote-tracking branch 'upstream/master'
lipchev cb8da0a
updated uppercase 'L' & BaseUnits in json
lipchev bfeaf7b
BaseUnits, Obsolete methods & cosmetics
lipchev 40c1638
Removed Molarity.Molar as redundant (added abbreviation instead)
lipchev 0171b0a
Added a KnownQuantities class
lipchev fc3e7be
Merge remote-tracking branch 'upstream/master'
lipchev 69a0ee1
Testing with Theory + InlineData
lipchev 0f6e251
Tests refactoring (Theory + InlineData)
lipchev a425566
Make single line act-statements in tests
angularsen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,238 @@ | ||
{ | ||
"Name": "MassConcentration", | ||
"BaseUnit": "KilogramPerCubicMeter", | ||
"XmlDoc": "In chemistry, the mass concentration ρi (or γi) is defined as the mass of a constituent mi divided by the volume of the mixture V", | ||
"XmlDocRemarks": "https://en.wikipedia.org/wiki/Mass_concentration_(chemistry)", | ||
"BaseDimensions": { | ||
"M": 1, | ||
"L": -3 | ||
}, | ||
"Units": [ | ||
{ | ||
"SingularName": "GramPerCubicMillimeter", | ||
"PluralName": "GramsPerCubicMillimeter", | ||
"BaseUnits": { | ||
"M": "Gram", | ||
"L": "Millimeter" | ||
}, | ||
"FromUnitToBaseFunc": "x/1e-6", | ||
"FromBaseToUnitFunc": "x*1e-6", | ||
"Prefixes": [ "Kilo" ], | ||
"Localization": [ | ||
{ | ||
"Culture": "en-US", | ||
"Abbreviations": [ "g/mm³" ] | ||
} | ||
] | ||
}, | ||
{ | ||
"SingularName": "GramPerCubicCentimeter", | ||
"PluralName": "GramsPerCubicCentimeter", | ||
"BaseUnits": { | ||
"M": "Gram", | ||
"L": "Centimeter" | ||
}, | ||
"FromUnitToBaseFunc": "x/1e-3", | ||
"FromBaseToUnitFunc": "x*1e-3", | ||
"Prefixes": [ "Kilo" ], | ||
"Localization": [ | ||
{ | ||
"Culture": "en-US", | ||
"Abbreviations": [ "g/cm³" ] | ||
} | ||
] | ||
}, | ||
{ | ||
"SingularName": "GramPerCubicMeter", | ||
"PluralName": "GramsPerCubicMeter", | ||
"BaseUnits": { | ||
"M": "Gram", | ||
"L": "Meter" | ||
}, | ||
"FromUnitToBaseFunc": "x/1e3", | ||
"FromBaseToUnitFunc": "x*1e3", | ||
"Prefixes": [ "Kilo", "Milli", "Micro" ], | ||
"Localization": [ | ||
{ | ||
"Culture": "en-US", | ||
"Abbreviations": [ "g/m³" ] | ||
}, | ||
{ | ||
"Culture": "ru-RU", | ||
"Abbreviations": [ "г/м³" ] | ||
} | ||
] | ||
}, | ||
{ | ||
"SingularName": "GramPerMilliliter", | ||
"PluralName": "GramsPerMilliliter", | ||
"BaseUnits": { | ||
"M": "Gram", | ||
"L": "Centimeter" | ||
}, | ||
"FromUnitToBaseFunc": "x/1e-3", | ||
"FromBaseToUnitFunc": "x*1e-3", | ||
"Prefixes": [ "Pico", "Nano", "Micro", "Milli", "Centi", "Deci" ], | ||
"Localization": [ | ||
{ | ||
"Culture": "en-US", | ||
"Abbreviations": [ "g/mL" ] | ||
} | ||
] | ||
}, | ||
{ | ||
"SingularName": "GramPerDeciliter", | ||
"PluralName": "GramsPerDeciliter", | ||
"FromUnitToBaseFunc": "x/1e-1", | ||
"FromBaseToUnitFunc": "x*1e-1", | ||
"Prefixes": [ "Pico", "Nano", "Micro", "Milli", "Centi", "Deci" ], | ||
"Localization": [ | ||
{ | ||
"Culture": "en-US", | ||
"Abbreviations": [ "g/dL" ] | ||
} | ||
] | ||
}, | ||
{ | ||
"SingularName": "GramPerLiter", | ||
"PluralName": "GramsPerLiter", | ||
"BaseUnits": { | ||
"M": "Gram", | ||
"L": "Decimeter" | ||
}, | ||
"FromUnitToBaseFunc": "x", | ||
"FromBaseToUnitFunc": "x", | ||
"Prefixes": [ "Pico", "Nano", "Micro", "Milli", "Centi", "Deci", "Kilo" ], | ||
"Localization": [ | ||
{ | ||
"Culture": "en-US", | ||
"Abbreviations": [ "g/L"] | ||
} | ||
] | ||
}, | ||
{ | ||
"SingularName": "TonnePerCubicMillimeter", | ||
"PluralName": "TonnesPerCubicMillimeter", | ||
"BaseUnits": { | ||
"M": "Tonne", | ||
"L": "Millimeter" | ||
}, | ||
"FromUnitToBaseFunc": "x/1e-12", | ||
"FromBaseToUnitFunc": "x*1e-12", | ||
"Localization": [ | ||
{ | ||
"Culture": "en-US", | ||
"Abbreviations": [ "t/mm³" ] | ||
} | ||
] | ||
}, | ||
{ | ||
"SingularName": "TonnePerCubicCentimeter", | ||
"PluralName": "TonnesPerCubicCentimeter", | ||
"BaseUnits": { | ||
"M": "Tonne", | ||
"L": "Centimeter" | ||
}, | ||
"FromUnitToBaseFunc": "x/1e-9", | ||
"FromBaseToUnitFunc": "x*1e-9", | ||
"Localization": [ | ||
{ | ||
"Culture": "en-US", | ||
"Abbreviations": [ "t/cm³" ] | ||
} | ||
] | ||
}, | ||
{ | ||
"SingularName": "TonnePerCubicMeter", | ||
"PluralName": "TonnesPerCubicMeter", | ||
"BaseUnits": { | ||
"M": "Tonne", | ||
"L": "Meter" | ||
}, | ||
"FromUnitToBaseFunc": "x/0.001", | ||
"FromBaseToUnitFunc": "x*0.001", | ||
"Localization": [ | ||
{ | ||
"Culture": "en-US", | ||
"Abbreviations": [ "t/m³" ] | ||
} | ||
] | ||
}, | ||
{ | ||
"SingularName": "PoundPerCubicInch", | ||
"PluralName": "PoundsPerCubicInch", | ||
"BaseUnits": { | ||
"M": "Pound", | ||
"L": "Inch" | ||
}, | ||
"FromUnitToBaseFunc": "x/3.6127298147753e-5", | ||
"FromBaseToUnitFunc": "x*3.6127298147753e-5", | ||
"Prefixes": [ "Kilo" ], | ||
"Localization": [ | ||
{ | ||
"Culture": "en-US", | ||
"Abbreviations": [ "lb/in³" ], | ||
"AbbreviationsWithPrefixes": [ "kip/in³" ] | ||
} | ||
] | ||
}, | ||
{ | ||
"SingularName": "PoundPerCubicFoot", | ||
"PluralName": "PoundsPerCubicFoot", | ||
"BaseUnits": { | ||
"M": "Pound", | ||
"L": "Foot" | ||
}, | ||
"FromUnitToBaseFunc": "x/0.062427961", | ||
"FromBaseToUnitFunc": "x*0.062427961", | ||
"Prefixes": [ "Kilo" ], | ||
"Localization": [ | ||
{ | ||
"Culture": "en-US", | ||
"Abbreviations": [ "lb/ft³" ], | ||
"AbbreviationsWithPrefixes": [ "kip/ft³" ] | ||
} | ||
] | ||
}, | ||
{ | ||
"SingularName": "SlugPerCubicFoot", | ||
"PluralName": "SlugsPerCubicFoot", | ||
"BaseUnits": { | ||
"M": "Slug", | ||
"L": "Foot" | ||
}, | ||
"FromUnitToBaseFunc": "x*515.378818", | ||
"FromBaseToUnitFunc": "x*0.00194032033", | ||
"Localization": [ | ||
{ | ||
"Culture": "en-US", | ||
"Abbreviations": [ "slug/ft³" ] | ||
} | ||
] | ||
}, | ||
{ | ||
"SingularName": "PoundPerUSGallon", | ||
"PluralName": "PoundsPerUSGallon", | ||
"FromUnitToBaseFunc": "x*1.19826427e2", | ||
"FromBaseToUnitFunc": "x/1.19826427e2", | ||
"Localization": [ | ||
{ | ||
"Culture": "en-US", | ||
"Abbreviations": [ "ppg (U.S.)" ] | ||
lipchev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
] | ||
}, | ||
{ | ||
"SingularName": "PoundPerImperialGallon", | ||
"PluralName": "PoundsPerImperialGallon", | ||
"FromUnitToBaseFunc": "x*9.9776398e1", | ||
"FromBaseToUnitFunc": "x/9.9776398e1", | ||
"Localization": [ | ||
{ | ||
"Culture": "en-US", | ||
"Abbreviations": [ "ppg (imp.)" ] | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
{ | ||
"Name": "MassFraction", | ||
lipchev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"BaseUnit": "DecimalFraction", | ||
"XmlDoc": "The mass fraction is defined as the mass of a constituent divided by the total mass of the mixture.", | ||
"XmlDocRemarks": "https://en.wikipedia.org/wiki/Mass_fraction_(chemistry)", | ||
"Units": [ | ||
{ | ||
"SingularName": "DecimalFraction", | ||
"PluralName": "DecimalFractions", | ||
"FromUnitToBaseFunc": "x", | ||
"FromBaseToUnitFunc": "x", | ||
"Localization": [ | ||
{ | ||
"Culture": "en-US", | ||
"Abbreviations": [ "" ] | ||
} | ||
] | ||
}, | ||
{ | ||
"SingularName": "GramPerGram", | ||
"PluralName": "GramsPerGram", | ||
"FromUnitToBaseFunc": "x", | ||
"FromBaseToUnitFunc": "x", | ||
"Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci", "Deca", "Hecto", "Kilo" ], | ||
"Localization": [ | ||
{ | ||
"Culture": "en-US", | ||
"Abbreviations": [ "g/g" ] | ||
} | ||
] | ||
}, | ||
{ | ||
"SingularName": "GramPerKilogram", | ||
"PluralName": "GramsPerKilogram", | ||
"FromUnitToBaseFunc": "x/1e3", | ||
"FromBaseToUnitFunc": "x*1e3", | ||
"Prefixes": [ "Nano", "Micro", "Milli", "Centi", "Deci", "Deca", "Hecto", "Kilo" ], | ||
"Localization": [ | ||
{ | ||
"Culture": "en-US", | ||
"Abbreviations": [ "g/kg" ] | ||
} | ||
] | ||
}, | ||
{ | ||
"SingularName": "Percent", | ||
"PluralName": "Percent", | ||
"FromUnitToBaseFunc": "x/1e2", | ||
"FromBaseToUnitFunc": "x*1e2", | ||
"Localization": [ | ||
{ | ||
"Culture": "en-US", | ||
"Abbreviations": [ "%", "% (w/w)" ] | ||
} | ||
] | ||
}, | ||
{ | ||
"SingularName": "PartPerThousand", | ||
"PluralName": "PartsPerThousand", | ||
"FromUnitToBaseFunc": "x/1e3", | ||
"FromBaseToUnitFunc": "x*1e3", | ||
"Localization": [ | ||
{ | ||
"Culture": "en-US", | ||
"Abbreviations": [ "‰" ] | ||
} | ||
] | ||
}, | ||
{ | ||
"SingularName": "PartPerMillion", | ||
"PluralName": "PartsPerMillion", | ||
"FromUnitToBaseFunc": "x/1e6", | ||
"FromBaseToUnitFunc": "x*1e6", | ||
"Localization": [ | ||
{ | ||
"Culture": "en-US", | ||
"Abbreviations": [ "ppm" ] | ||
} | ||
] | ||
}, | ||
{ | ||
"SingularName": "PartPerBillion", | ||
"PluralName": "PartsPerBillion", | ||
"FromUnitToBaseFunc": "x/1e9", | ||
"FromBaseToUnitFunc": "x*1e9", | ||
"Localization": [ | ||
{ | ||
"Culture": "en-US", | ||
"Abbreviations": [ "ppb" ] | ||
} | ||
] | ||
}, | ||
{ | ||
"SingularName": "PartPerTrillion", | ||
"PluralName": "PartsPerTrillion", | ||
"FromUnitToBaseFunc": "x/1e12", | ||
"FromBaseToUnitFunc": "x*1e12", | ||
"Localization": [ | ||
{ | ||
"Culture": "en-US", | ||
"Abbreviations": [ "ppt" ] | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.