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

moment or torque unit support #70

Open
sharkweek opened this issue Mar 9, 2019 · 4 comments
Open

moment or torque unit support #70

sharkweek opened this issue Mar 9, 2019 · 4 comments

Comments

@sharkweek
Copy link

I am unsure if this is a feature request or a bug, but I seem to be having trouble in creating moment or torque units that are recognized by different base systems. It seems to be because they share the same base units as energy (i.e. (force)(length) or (length)*2(mass)/(time)**2).

I can create my own units that use these and convert them to different unit systems explicitly, but if I try using an in_base method, it always converts to energy. Is there a straightforward way of dealing with this that I am unaware of?

@ngoldbaum
Copy link
Member

Nope, in_base is based on the dimension and people probably want energies a lot more often than moment of torque. That said we don’t have moment of torque in the unit system machinery at all and I haven’t thought about what would happen if you added two classes of units to a unit system with the same dimensions.

@sharkweek
Copy link
Author

That makes sense. I assumed that was the case. I suppose this is just something that has to be dealt with unless there is a way to differentiate between units in the context of vectors.

@sharkweek
Copy link
Author

sharkweek commented Mar 9, 2019

I have tried addressing this by adding a new dimension type to my UnitSystem, but can't because torque doesn't exist in the dimensions module. Perhaps the issue could be addressed by adding an add_dimension function to the dimensions module for adding custom dimensions?

While torque may not be very common, I could see other uses for custom dimensions, especially for keeping track of different kinds of dimensionless quantities such as material strain or electrical gain that wouldn't necessarily make sense to bake in native functionality for. The other option is to have dimensions be classes on their own that can be user-subclassed and added to UnitSystems and UnitRegistrys.

@vineetrajasekhar
Copy link

This may be philosophical and esoteric, but hear me out: the change needed may not be in the way we talk about torque/energy, but in the way we talk about DISTANCE... work done is a force applied THROUGH a distance, while torque is a force applied AT a distance.. if we were to define adjacent but distinct versions of distance, one of which is a vector and yields energy when multiplied by an applied force, and the other scalar, yielding a torque when multiplied by an applied force, that could give a more consistent way to distinguish between the concepts... I huess the difference is between distance describing a process, like a traverse through space, and distance describing location. This paradigm would also permit more natural interpretation of torque times angular displacement yielding (dimensionally unchanged) units representing work rather than torque...

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

No branches or pull requests

3 participants