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

Added support for molar flow units #1196

Merged
merged 9 commits into from
Feb 15, 2023
18 changes: 15 additions & 3 deletions Common/UnitDefinitions/HeatTransferCoefficient.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,26 @@
]
},
{
"SingularName": "BtuPerSquareFootDegreeFahrenheit",
"PluralName": "BtusPerSquareFootDegreeFahrenheit",
"SingularName": "BtuPerHourSquareFootDegreeFahrenheit",
"PluralName": "BtusPerHourSquareFootDegreeFahrenheit",
"FromUnitToBaseFunc": "{x} * 5.6782633411134878",
"FromBaseToUnitFunc": "{x} / 5.6782633411134878",
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "Btu/ft²·hr·°F" ]
"Abbreviations": [ "Btu/h·ft²·°F", "Btu/ft²·h·°F", "Btu/hr·ft²·°F", "Btu/ft²·hr·°F" ]
angularsen marked this conversation as resolved.
Show resolved Hide resolved
}
]
},
{
"SingularName": "KilocaloriePerHourSquareMeterDegreeCelsius",
angularsen marked this conversation as resolved.
Show resolved Hide resolved
"PluralName": "KilocaloriesPerHourSquareMeterDegreeCelsius",
angularsen marked this conversation as resolved.
Show resolved Hide resolved
"FromUnitToBaseFunc": "({x} * 4184) / 3600",
"FromBaseToUnitFunc": "({x} / 4184) * 3600",
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "kcal/h·m²·°C", "kcal/m²·h·°C", "kcal/hr·m²·°C", "kcal/m²·hr·°C" ]
}
]
}
Expand Down
53 changes: 28 additions & 25 deletions Common/UnitDefinitions/MolarFlow.json
Original file line number Diff line number Diff line change
@@ -1,53 +1,56 @@
{
"Name": "MolarFlow",
"BaseUnit": "KilomolePerSecond",
"BaseUnit": "MolePerSecond",
"XmlDocSummary": "Molar flow is the ratio of the amount of substance change to the time during which the change occurred (value of amount of substance changes per unit time).",
"BaseDimensions": {
"N": 1,
"T": -1
},
"Units": [
{
"SingularName": "KilomolePerSecond",
"PluralName": "KilomolesPerSecond",
"SingularName": "MolePerSecond",
"PluralName": "MolesPerSecond",
"BaseUnits": {
"N": "Kilomole",
"N": "Mole",
"T": "Second"
},
"Prefixes": [ "Kilo" ],
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "kmol/s" ]
"Abbreviations": [ "mol/s" ]
}
]
},
{
"SingularName": "KilomolePerMinute",
"PluralName": "KilomolesPerMinute",
"SingularName": "MolePerMinute",
"PluralName": "MolesPerMinute",
"BaseUnits": {
"N": "Kilomole",
"N": "Mole",
"T": "Minute"
},
"FromUnitToBaseFunc": "{x} / 5.999988e1",
"FromBaseToUnitFunc": "{x} * 5.999988e1",
"Prefixes": [ "Kilo" ],
"FromUnitToBaseFunc": "{x} / 60",
"FromBaseToUnitFunc": "{x} * 60",
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "kmol/min" ]
"Abbreviations": [ "mol/min" ]
}
]
},
{
"SingularName": "KilomolePerHour",
"PluralName": "KilomolesPerHour",
"SingularName": "MolePerHour",
"PluralName": "MolesPerHour",
"BaseUnits": {
"N": "Kilomole",
"N": "Mole",
"T": "Hour"
},
"FromUnitToBaseFunc": "{x} / 3.599997e3",
"FromBaseToUnitFunc": "{x} * 3.599997e3",
"Prefixes": [ "Kilo" ],
"FromUnitToBaseFunc": "{x} / 3600",
"FromBaseToUnitFunc": "{x} * 3600",
"Localization": [
{
"Culture": "en-US",
Expand All @@ -57,13 +60,13 @@
},
{
"SingularName": "PoundMolePerSecond",
angularsen marked this conversation as resolved.
Show resolved Hide resolved
"PluralName": "PoundsMolePerSecond",
"PluralName": "PoundMolesPerSecond",
"BaseUnits": {
"N": "PoundMole",
"T": "Second"
},
"FromUnitToBaseFunc": "{x} / 2.2046244201838",
"FromBaseToUnitFunc": "{x} * 2.2046244201838",
"FromUnitToBaseFunc": "{x} * 453.59237",
"FromBaseToUnitFunc": "{x} / 453.59237",
"Localization": [
{
"Culture": "en-US",
Expand All @@ -73,13 +76,13 @@
},
{
"SingularName": "PoundMolePerMinute",
"PluralName": "PoundsMolePerMinute",
"PluralName": "PoundMolesPerMinute",
"BaseUnits": {
"N": "PoundMole",
"T": "Minute"
},
"FromUnitToBaseFunc": "{x} / 1.32277406886626e2",
"FromBaseToUnitFunc": "{x} * 1.32277406886626e2",
"FromUnitToBaseFunc": "({x} * 453.59237) / 60",
"FromBaseToUnitFunc": "({x} / 453.59237) * 60",
"Localization": [
{
"Culture": "en-US",
Expand All @@ -89,13 +92,13 @@
},
{
"SingularName": "PoundMolePerHour",
"PluralName": "PoundsMolePerHour",
"PluralName": "PoundMolesPerHour",
"BaseUnits": {
"N": "PoundMole",
"T": "Hour"
},
"FromUnitToBaseFunc": "{x} / 7.93663391482404e3",
"FromBaseToUnitFunc": "{x} * 7.93663391482404e3",
"FromUnitToBaseFunc": "({x} * 453.59237) / 3600",
"FromBaseToUnitFunc": "({x} / 453.59237) * 3600",
"Localization": [
{
"Culture": "en-US",
Expand Down
4 changes: 2 additions & 2 deletions Common/UnitDefinitions/Molarity.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
"L": "Foot",
"N": "PoundMole"
},
"FromUnitToBaseFunc": "{x} / 6.242796e-5",
"FromBaseToUnitFunc": "{x} * 6.242796e-5",
"FromUnitToBaseFunc": "{x} * 6.2427960576144611956325455827221e-5",
"FromBaseToUnitFunc": "{x} / 6.2427960576144611956325455827221e-5",
"Localization": [
{
"Culture": "en-US",
Expand Down
9 changes: 7 additions & 2 deletions Common/UnitEnumValues.g.json
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,9 @@
"HeatTransferCoefficient": {
"BtuPerSquareFootDegreeFahrenheit": 1,
"WattPerSquareMeterCelsius": 2,
"WattPerSquareMeterKelvin": 3
"WattPerSquareMeterKelvin": 3,
"BtuPerHourSquareFootDegreeFahrenheit": 11,
"KilocaloriePerHourSquareMeterDegreeCelsius": 8
},
"Illuminance": {
"Kilolux": 1,
Expand Down Expand Up @@ -1705,6 +1707,9 @@
"PoundMolePerSecond": 4,
"KilomolePerHour": 2,
"KilomolePerMinute": 15,
"KilomolePerSecond": 12
"KilomolePerSecond": 12,
"MolePerHour": 8,
"MolePerMinute": 18,
"MolePerSecond": 3
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

77 changes: 58 additions & 19 deletions UnitsNet.NanoFramework/GeneratedCode/Quantities/MolarFlow.g.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading