-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Hello !
Disclaimer before I describe the issue - I haven't looked too deeply into seshat/ units api just yet so I might be mistaken about a few things. Please do correct me if I am.
I'm working on a project that does a lot of mechanical engineering calculations and we've been looking into using seshat for unit implementation. I've noticed that the parent unit api library doesn't have the Torque unit - this is fairly easily implemented as a derived unit, but I'm also looking to see if this can be implemented in the simplification process.... which is where things get tricky.
The base units for Torque are the same as the unit for Energy (Newton.metre in SI) , the only difference being that Torque is derived from a vector cross product between a force and a length, while energy is the dot product of the same.
Ideally we would want to overload the multiply method(s) but it might get very hard to do so as there's no easy way (in my mind at least) to automatically provide context for the multiply methods. We also don't want to manually provide context (e.g. by providing a boolean flag as method argument) since we'll be using Torque a LOT, and it just gets tiresome having to constantly add context to a simple math operation.
Is there a good way to achieve what I'm after ? I have a feeling this won't just be an issue with Torque but could pop up with other derived units as well. I'm more than happy to work on this and provide a PR.