Skip to content

Commit

Permalink
Add Btu/ft² in irradiation (angularsen#1364)
Browse files Browse the repository at this point in the history
Added a new unit Btu/ft² in irradiation. This is commonly used in
building industry.

---------

Co-authored-by: Andreas Gullberg Larsen <andreas.larsen84@gmail.com>
  • Loading branch information
MingboPeng and angularsen authored Feb 17, 2024
1 parent 545c8b9 commit b1f88bf
Show file tree
Hide file tree
Showing 11 changed files with 213 additions and 24 deletions.
13 changes: 13 additions & 0 deletions Common/UnitDefinitions/Irradiation.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,19 @@
"Abbreviations": [ "Wh/m²" ]
}
]
},
{
"SingularName": "BtuPerSquareFoot",
"PluralName": "BtusPerSquareFoot",
"FromUnitToBaseFunc": "{x} * (52752792631d / 4645152d)",
"FromBaseToUnitFunc": "{x} / (52752792631d / 4645152d)",
"Prefixes": [ "Kilo" ],
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "Btu/ft²" ]
}
]
}
]
}
4 changes: 3 additions & 1 deletion Common/UnitEnumValues.g.json
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,9 @@
"KilojoulePerSquareMeter": 4,
"KilowattHourPerSquareMeter": 5,
"MillijoulePerSquareCentimeter": 6,
"WattHourPerSquareMeter": 7
"WattHourPerSquareMeter": 7,
"BtuPerSquareFoot": 15,
"KilobtuPerSquareFoot": 9
},
"Jerk": {
"CentimeterPerSecondCubed": 1,
Expand Down
26 changes: 26 additions & 0 deletions UnitsNet.NanoFramework/GeneratedCode/Quantities/Irradiation.g.cs

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

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

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

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

4 changes: 4 additions & 0 deletions UnitsNet.Tests/CustomCode/IrradiationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,9 @@ public class IrradiationTests : IrradiationTestsBase
protected override double WattHoursPerSquareMeterInOneJoulePerSquareMeter => 2.777777777777778e-4;

protected override double KilowattHoursPerSquareMeterInOneJoulePerSquareMeter => 2.777777777777778e-7;

protected override double BtuPerSquareFootInOneJoulePerSquareMeter => 8.805509170334624e-5;

protected override double KilobtuPerSquareFootInOneJoulePerSquareMeter => 8.805509170334624e-8;
}
}
Loading

0 comments on commit b1f88bf

Please sign in to comment.