of torque and linear acceleration.... (please help)

Moach

Crazy dude with a rocket
Addon Developer
Joined
Aug 6, 2008
Messages
1,581
Reaction score
62
Points
63
Location
Vancouver, BC
ok, need help.... :facepalm:

i'm most horribly confused on a matter of simple physics... yet, those assumably-simple things are often those that give me most trouble, since no-one bothers write about them, i gather :shrug:


anyways... when calculating the torque generated upon a surface impact, how does one go about conserving total momentum?

i mean... if an object hits a surface at a point out of alignment with it's center-of-mass (they most usually do), it should get torque applied to it proportionally to the cross-product of the acceleration and offset vectors, right?

but then - would that not have an impact on the final acceleration itself?


how is that calculated? can't get my thick, miss-educated head around it....


the purpose here is to assemble a motorbike-trials-type game (job)... i mean to solve collisions from the wheels for the bike as a whole, eliminating the bike-buckles problem that one commonly finds in games of this sort, which typically use a compound structure to simulate the bike....

so what i'm trying to do, is to calculate the impuse generated by the wheels contacting the ground and appliying that as a force on the bikes "root object"


for the impulse, i simply load up the contact surface normal into a rotation matrix and transform the (already calculated) global-velocirty of the wheel into "surface space"

then, things get very one-dimensional, since after the transorm i have X for surface velocity and Y for vertical speed, regardless of the surface orientation....

so that already seems to work... after un-transforming the "bumped" accel vector back into world-coordinates, i get a nice bounce-off from the surface, wherever i hit it....


but i struck solid rock when trying to account for torque as well....
it's rather simple to calculate it... for the wheels, the torque is just defined as the tangent velocity (X) divided by the wheel radius (and a little friction multiplier to allow some slipping)

but after i have it - i don't know how to deal with it...
ok, i apply it as torque, which makes the wheel spin... yet, if it spins, should it not "divert energy" from the resulting linear acceleration?

or is angular momentum always treated separately? (not making sense to me)


anyways, for the bike as a whole, it's the same problem... i can get the correct torque value simply by getting a cross-product from the wheel's resulting linear acceleration (which is then ignored for the wheel itself since it's a part of the rig) and the relative position of the CoG from the contact point...

then at this point, i have two degrees of the same problem... for one, the bike torque is known to be off, since i'm calculating it from what i believe is a "wrong" impulse...

and then, for the same reason the impulse is "wrong", the resulting linear accel on the bike is enough to make Newton turn in his grave...

the bike blasts off into variable-popping speeds upon the softest contact with the ground... quite shameful to see :blush:



i tried subtracting the torque from the X and Y components of the accel...
i also tried "stretching" the accel vector by normalizing and multiplying by the difference between the distance and the torque value...

something is not right... i can't seem to get it figured out...



on the Orbiter API guide, Martin says the torque is applied using the "trapezoid rule"... what is that? - could it be what i'm looking for here?


thanks in advance
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,635
Reaction score
2,352
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Linear forces and torque are happening at the same time.

A force that accelerates you, will also give you torque.

The acceleration is external mechanics (moving your CoG), the torque internal mechanics (rotating around the CoG).
 

Moach

Crazy dude with a rocket
Addon Developer
Joined
Aug 6, 2008
Messages
1,581
Reaction score
62
Points
63
Location
Vancouver, BC
Linear forces and torque are happening at the same time.

A force that accelerates you, will also give you torque.

The acceleration is external mechanics (moving your CoG), the torque internal mechanics (rotating around the CoG).

so that means i should not attempt to compensate that torque as a part of the final acceleration?

it would make things a lot simpler... but is that correct?

if a bike acccelerates into a "wheelie" doesn't its CoG receive "less" linear momentum than if it had accelerated with both wheens grounded?

or am i over-calculating stuff?


imagine this scenario - you drop a pencil flat over the edge of a table... if the tip of pencil hits the edge, the pencil spins, and it's total velocity is altered by only a little amount... as it continues to fall towards the floor

yet, if it falls mostly "inside" the table, it hardly spins at all and mostly bounces off to eventually stop...
as i see it - the impact energy that would otherwise stop the pencil is converted into torque... the more torque it receives, the less it's linear energy is affected

that's what i cannot fathom... what's missing? should i calculate the tangent acceleration at the impact point and subtract that from the linear result?


or is that somehow "implied" in a basic relationship that i fail to see?
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,635
Reaction score
2,352
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
or am i over-calculating stuff?


Yes. ;)

imagine this scenario - you drop a pencil flat over the edge of a table... if the tip of pencil hits the edge, the pencil spins, and it's total velocity is altered by only a little amount... as it continues to fall towards the floor

Yes, but now look at how the forces are related. When your pencil hits the edge, it is slowed down for a short time only, the weight force by the table itself is acting all the time your pencil has contact with the table. Yet, the CoG still experiences gravity.

The closer your pencils CoG is to the edge, the more time you will have contact with the table and the longer it will decelerate - and stop completely if your CoG is on the table.
 

Moach

Crazy dude with a rocket
Addon Developer
Joined
Aug 6, 2008
Messages
1,581
Reaction score
62
Points
63
Location
Vancouver, BC
that does make sense...

so i can safely go with the principle that linear acceleration should never interact with angular momentum and vice-versa...
it does seem logical that the effects of angular momentum would factor themselves into linear motion over a series of iterations (RK4 FTW :thumbup: )

let's try that, then... i'll let ya know how it works out :cheers:


thanks!
 

Grover

Saturn V Misfire
Addon Developer
Donator
Joined
Oct 3, 2010
Messages
1,468
Reaction score
0
Points
0
Location
Ascension Island
leave angular stuff angular, and linear stuff linear. caluclate them seperatley and dont let them cross except in exceptional circumstances

---------- Post added at 08:54 PM ---------- Previous post was at 08:54 PM ----------

:ninja:d by... well yourself actually :p
 

HarvesteR

Member
Joined
Apr 22, 2008
Messages
386
Reaction score
15
Points
18
Hmm, kinda late, but here:

http://en.wikipedia.org/wiki/Moment_(physics)

That might be of help ;)

About the angular case, it depends on the type of integration and how you've set up your physics solver.... If you have a Verlet-style point-and-link solver, the angular case gets automatically solved just by solving the linear case (since you never deal with the center of mass, only with vertex points)...

In a REAL physics integration routine, like RK, you have to account for moments and torque yourself... which is probably a bit of a pain, but hey, at least you don't have to deal with gelatinous Verlet integration ;)

Cheers
 
Top