Skip to content

Add ounce-force torque units#1685

Open
MH-ZShearer wants to merge 1 commit into
angularsen:masterfrom
MH-ZShearer:add-ounce-force-torque-units
Open

Add ounce-force torque units#1685
MH-ZShearer wants to merge 1 commit into
angularsen:masterfrom
MH-ZShearer:add-ounce-force-torque-units

Conversation

@MH-ZShearer

Copy link
Copy Markdown
Contributor

Includes the units:

  • ounce-force inches (ozf·in)
  • ounce-force feet (ozf-ft)

I wasn't sure if I should have included the abbreviated unit abbreviations. More specifically, lbf·ft is the technical abbreviation for pound-force foot, but lb·ft is a common shorthand, along with most non-Newton based torque units.

On the other hand, oz·in and g·mm are the conventional units of static unbalance in rotor/propeller balancing. From a brief search, static unbalance seems to be a rather niche industry and may not qualify for Units.NET's requirements. It would prevent possible conflicts for someone making a custom quantity.

@angularsen angularsen left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I think these units are reasonable for Torque.

Let's keep the primary abbreviations as ozf·in and ozf·ft, since those are the technically precise force-unit forms. Add the common shorthand aliases as secondary abbreviations. I found oz·in, oz-in, and in-oz used for small torque, and oz·ft/oz-ft used in torque converters. I did not find enough support for ft-oz, so I would leave that out for now.

I suggest this shape:

OunceForceFoot:

"Abbreviations": [ "ozf·ft", "oz·ft", "ozf-ft", "oz-ft" ]

OunceForceInch:

"Abbreviations": [ "ozf·in", "oz·in", "ozf-in", "oz-in", "in-oz" ]

Since this PR already touches Torque, let's also add the same common aliases for the existing pound-force torque units:

PoundForceFoot:

"Abbreviations": [ "lbf·ft", "lb·ft", "lbf-ft", "lb-ft", "ft-lb" ]

PoundForceInch:

"Abbreviations": [ "lbf·in", "lb·in", "lbf-in", "lb-in", "in-lb" ]

ft-lb could also be added to EnergyUnit.FootPound later, but I think that is out of scope for this PR.

One request before merging: please update the custom test constants to use values checked against a verifiable source, so the tests don't just mirror the conversion formula. The adding-unit docs call this out here: https://github.com/angularsen/UnitsNet/blob/master/Docs/adding-a-new-unit.md#4-fix-generated-test-stubs-to-resolve-compile-errors

NIST SP 811 Appendix B.9 lists 1 ozf·in = 7.061552e-3 N·m, so for example:

// NIST SP 811 Appendix B.9: 1 ozf·in = 7.061552e-3 N·m.
protected override double OunceForceInchesInOneNewtonMeter => 141.611928935735;

// Derived from the same NIST factor and 12 in/ft.
protected override double OunceForceFeetInOneNewtonMeter => 11.800994077978;

@MH-ZShearer
MH-ZShearer force-pushed the add-ounce-force-torque-units branch from d10bdb3 to b7c3b86 Compare July 20, 2026 20:46
@MH-ZShearer

Copy link
Copy Markdown
Contributor Author

Not sure how the commits got all messed up, but I updated my branch to correctly match master now. I'm also not sure how I calculated those incorrect conversion factors, but I admittedly didn't spend enough time searching.

I'll get the conversion factor and additional unit abbreviations added tomorrow. I double checked our internal data, and it looks like we've only ever performed 4 ozf-in calibrations, 0 ozf-ft calibrations, and only about 500-600 torque calibrations in total across the last decade. Granted, we're first and foremost a force calibration laboratory, but apparently some of our customers have a need for those small loads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants