I have solid object that is spinning with a torque W, and I want to calculate the force F applied on a certain point that's D units away from the center of the object. All these values are represented in Vector3 format (x, y, z)
I know until now that W = D x F, where x is the cross product, so by expanding this I get:
Wx = Dy*Fz - Dz*Fy
Wy = Dz*Fx - Dx*Fz
Wz = Dx*Fy - Dy*Fx
So I have this equation, and I need to find (Fx, Fy, Fz), and I'm thinking of using the Simplex method to solve it. Since the F vector can also have negative values, I split each F variable into 2 (F = G-H), so the new equation looks like this:
Wx = Dy*Gz - Dy*Hz - Dz*Gy + Dz*Hy
Wy = Dz*Gx - Dz*Hx - Dx*Gz + Dx*Hz
Wz = Dx*Gy - Dx*Hy - Dy*Gx + Dy*Hx
Next, I define the simplex table (we need <= inequalities, so I duplicate each equation and multiply it by -1. Also, I define the objective function as: minimize (Gx - Hx + Gy - Hy + Gz - Hz).
The table looks like this:
Gx Hx Gy Hy Gz Hz <= RHS
============================================================
0 0 -Dz Dz Dy -Dy <= Wx = Gx
0 0 Dz -Dz -Dy Dy <= -Wx = Hx
Dz -Dz 0 0 Dx -Dx <= Wy = Gy
-Dz Dz 0 0 -Dx Dx <= -Wy = Hy
-Dy Dy Dx -Dx 0 0 <= Wz = Gz
Dy -Dy -Dx Dx 0 0 <= -Wz = Hz
============================================================
1 -1 1 -1 1 -1 0 = Z
The problem is that when I run it through an online solver I get Unbounded solution. Can anyone please point me to what I'm doing wrong ?
Thanks in advance.
edit: I'm sure I messed up some signs somewhere (for example the Z should be defined as a max), but I'm sure I'm wrong when defining something more important.
-
How did you get the idea that the Simplex method would be the right tool to tackle the problem?Henry– Henry2014年10月05日 07:01:22 +00:00Commented Oct 5, 2014 at 7:01
-
Well, this was the only thing I could think of, the only result I got when searching for Force from Torque and Distance was F = W/D, but that's only when I have one dimension, then I started decomposing the formulas and got to this system. This, and the fact that I need to run this in a game I'm working on, so the Simplex method was the first algorithm that came to my mind when thinking about multiple variable equation systems.warwolf– warwolf2014年10月05日 07:13:53 +00:00Commented Oct 5, 2014 at 7:13
-
1. specify object and rotation axises (free rotation in space or bound to some joint?, axis goes through center of gravity or not?) 2. specify where is force applied. from this info you can decide if it is a dynamic or kinematic problem and from that you can go further to use classical or D'Lambert equations ... Also add rpm,force,mass,object material details so it is clear that no shape changes are occurring due to finite material strength ...Spektre– Spektre2014年10月05日 08:19:05 +00:00Commented Oct 5, 2014 at 8:19
-
Rotation is free in 3D space, I only have torque on center of object, which is spinning by itself (specified in angular velocity), and need to calculate the force it generates on the furthest point from the center. For example, my object is a spaceship which already has an angular velocty (it doesn't matter where it came from), and the point I want to calculate the forces on is the spaceship's nose. Also, there is no friction, so mass is irrelevant. Gravity is also 0.warwolf– warwolf2014年10月05日 08:26:10 +00:00Commented Oct 5, 2014 at 8:26
-
added answer ... tried to put it together as simple as I could ...Spektre– Spektre2014年10月05日 09:03:15 +00:00Commented Oct 5, 2014 at 9:03
3 Answers 3
There exists no unique solution to the problem as posed. You can only solve for the tangential projection of the force. This comes from the properties of the vector (cross) product - it is zero for collinear vectors and in particular for the vector product of a vector by itself. Therefore, if F is a solution of W = r x F, then F' = F + kr is also a solution for any k:
r x F' = r x (F + kr) = r x F + k (r x r) = r x F
since the r x r term is zero by the definition of vector product. Therefore, there is not a single solution but rather a whole linear space of vectors that are solutions.
If you restrict the solution to forces that have zero projection in the direction of r, then you could simply take the vector product of W and r:
W x r = (r x F) x r = -[r x (r x F)] = -[(r . F)r - (r . r)F] = |r|2F
with the first term of the expansion being zero because the projection of F onto r is zero (the dot denotes scalar (inner) product). Therefore:
F = (W x r) / |r|2
If you are also given the magnitude of F, i.e. |F|, then you can compute the radial component (if any) but there are still two possible solutions with radial components in opposing directions.
1 Comment
Quick dirty derivation...
Given D and F, you get W perpendicular to them. That's what a cross product does.
But you have W and D and need to find F. This is a bad assumption, but let's assume F was perpendicular to D. Call it Fp, since it's not necessarily the same as F. Ignoring magnitudes, WxD should give you the direction of Fp.
This ignoring magnitudes, so fix that with a little arithmetic. Starting with W=DxF applied to Fp:
mag(W) = mag(D)*mag(Fp) (ignoring geometry; using Fp perp to D)
mag(Fp) = mag(W)/mag(D)
Combining the cross product bit for direction with this stuff for magnitude,
Fp = WxD / mag(WxD) * mag(Fp)
Fp = WxD /mag(W) /mag(D) *mag(W) /mag(D) = WxD / mag(D)^2.
Note that given any solution Fp to W=DxF, you can add any vector proportional to D to Fp to obtain another solution F. That is a totally free parameter to choose as you like.
Note also that if the torque applies to some sort of axle or object constrained to rotate about some axis, and F is applied to some oddball lever sticking out at a funny angle, then vector D points in some funny direction. You want to replace D with just the part perpendicular to the axle/axis, otherwise the "/mag(D)" part will be wrong.
1 Comment
So from your comment is clear that all rotations are spinning around center of gravity
- in that case
F=M/rFforce [N]Mtorque [N/m]rscalar distance between center of rotation [m]- this way you know the scalar size of your Force
- now you need the direction
- it is perpendicular to rotation axis
- and it is the tangent of the rotation in that point
- dir=r x axis
- F = F * dir / |dir|
- bolds are vectors rest is scalar
- x is cross product
- dir is force direction
- axis is rotation axis direction
- now just change the direction according to rotation direction (signum of actual omega)
- also depending on your coordinate system setup
so ether negate F or not
but this is in 3D free rotation very unprobable scenario
- the object had to by symmetrical from mass point of view
- or initial driving forces was applied in manner to achieve this
- also beware that after first hit with any interaction Force this will not be true !!!
- so if you want just to compute Force it generate on certain point if collision occurs is this fine
- but immediately after this your spinning will change
- and for non symmetric objects the spinning will be most likely off the center of gravity !!!
- if your object will be disintegrated then you do not need to worry
- if not then you have to apply rotation and movement dynamics
Rotation Dynamics
M=alpha*IMtorque [N/m]alphaangular accelerationIquadratic mass inertia for actual rotation axis [kg.m^2]epislon''=omega'=alpha'means derivation by timeomegaangular speedepsilonangle
3 Comments
scalar_M = |M| = sqrt(M.x*M.x+M.y*M.y+M.z*M.z);