Sign in to follow this  
Geometrian

Basic Idea of Body Dynamics

Recommended Posts

Geometrian    1810
Hi,

I'm writing a basic Physics engine, and am stuck on body dynamics.

Suppose I have a body (mass, shape, etc.), and I apply a force to one side of it. Intuitively, the object accelerates with the direction of the force, but also accelerates rotationally. What governs this? I'm assuming that somehow the force is broken down, and eventually results in addition of torque and addition of a linear force. How is that determined?

Thanks,
-G

Share this post


Link to post
Share on other sites
Buckeye    10747
Given a force vector (off-center) on a body, you normally resolve it as the same force through the center of mass plus a torque proportional to the force multiplied by the moment arm. The moment arm is the perpendicular distance between the center of mass and the direction of the force. You can google for torque or look it up on wikipedia to get the equations.

Then the resultant force through the center of mass causes acceleration, and the torque causes rotation about the center of mass proportional to the scalar value of the torque and the moment of inertia about the axis perpendicular to the torque vector and the moment arm.

EDIT: For my physics engine, I maintain a force vector and torque vector for each dynamic body, with those 2 vectors being the sum of the forces and torques of the body at any particular moment. If your simulation uses time steps, zero out the forces and torques at the beginning of each time step, resolve collisions and other forces (e.g., gravity), then apply the forces and torques to get new position, velocity, rotation, etc. Edited by Buckeye

Share this post


Link to post
Share on other sites
Geometrian    1810
[quote name='Buckeye' timestamp='1305752060' post='4812721']Given a force vector (off-center) on a body, you normally resolve it as the same force through the center of mass plus a torque proportional to the force multiplied by the moment arm.[/quote]Thanks. This is what I had been doing (I dug up some 2D code I wrote a while ago; self-contained Python source [url="http://pastebin.com/2L6rw4xR"]here[/url]), but it didn't seem right to me. After all, The same force applied to the COM would accelerate the object, but one off to the side would accelerate it at the same rate [i]and[/i] start the object rotating? Perhaps I'm missing something, but that didn't seem to fit conservation of energy.

Thanks again,
-G

Share this post


Link to post
Share on other sites
Buckeye    10747
[quote name='Geometrian' timestamp='1305752508' post='4812727']
[quote name='Buckeye' timestamp='1305752060' post='4812721']Given a force vector (off-center) on a body, you normally resolve it as the same force through the center of mass plus a torque proportional to the force multiplied by the moment arm.[/quote]Thanks. This is what I had been doing (I dug up some 2D code I wrote a while ago; self-contained Python source [url="http://pastebin.com/2L6rw4xR"]here[/url]), but it didn't seem right to me. After all, The same force applied to the COM would accelerate the object, but one off to the side would accelerate it at the same rate [i]and[/i] start the object rotating? Perhaps I'm missing something, but that didn't seem to fit conservation of energy.

Thanks again,
-G
[/quote]
You've got it exactly right. An off-center force causes the same acceleration as the same magnitude force in the same direction through the COM - plus a rotation. You have to remember that conservation of energy would apply to two bodies in collision, not just the one. In an off center collision, the result would be equal and opposite forces through the COMs [b]and[/b] opposite torques!

Share this post


Link to post
Share on other sites
Geometrian    1810
[quote name='Buckeye' timestamp='1305752776' post='4812731']You've got it exactly right. An off-center force causes the same acceleration as the same magnitude force in the same direction through the COM - plus a rotation. You have to remember that conservation of energy would apply to two bodies in collision, not just the one. In an off center collision, the result would be equal and opposite forces through the COMs [b]and[/b] opposite torques![/quote]I was thinking along the lines of like a rocket thruster. Example: a thruster gives a certain linear acceleration to the COM regardless of its position. However if it's placed on the side, then after a time, the object [i]also[/i] has rotational kinetic energy--where did it come from?

[EDIT: possibly, as the side of the object with the rocket accelerates faster than the other, then the rocket exhaust's mass travels more slowly than it otherwise would?]

Thanks,
G

Share this post


Link to post
Share on other sites
Buckeye    10747
[quote name='Geometrian' timestamp='1305753128' post='4812733']
[quote name='Buckeye' timestamp='1305752776' post='4812731']You've got it exactly right. An off-center force causes the same acceleration as the same magnitude force in the same direction through the COM - plus a rotation. You have to remember that conservation of energy would apply to two bodies in collision, not just the one. In an off center collision, the result would be equal and opposite forces through the COMs [b]and[/b] opposite torques![/quote]I was thinking along the lines of like a rocket thruster. Example: a thruster gives a certain linear acceleration to the COM regardless of its position. However if it's placed on the side, then after a time, the object [i]also[/i] has rotational kinetic energy--where did it come from?

[EDIT: possibly, as the side of the object with the rocket accelerates faster than the other, then the rocket exhaust's mass travels more slowly than it otherwise would?]

Thanks,
G
[/quote]
Because** of the conservation of angular momentum, whatever rotational energy one object has, another object has the opposite (or negative). Similarly, the total linear energy of the [b]system[/b]* (rocket, thruster, particles being expelled, etc.) remains constant. Energy is neither created nor destroyed - it's just converted from one form to another.

*You have to consider (as your edit implies you are considering) all the parts of the system - including what is expelled/exhausted by the thruster.

**Of course, conservation of angular momentum doesn't [i]cause[/i] anything to happen. It is an observation of how things apparently behave.

With regard to what mass ends up with the "opposite" rotation - I'm not sure. I majored in physics but I'm not familiar with the actual physics involved with rocket propulsion. I do believe in conservation of energy and momentum, so something ends up with angular momentum of the opposite sign! I don't think it's the [i]speed[/i] of the particles that changes. I would guess (haven't done that kind of math in years) it's the direction of the particles as the thruster rotates. Exhaust particles end up traveling in various directions, the sum of which represents angular momentum in the total system. Remember, if the thruster is fixed (off-center) then it will rotate and the thrust will vary sinusoidally in direction.

Share this post


Link to post
Share on other sites
Geometrian    1810
[quote name='Buckeye' timestamp='1305759500' post='4812777']Because** of the conservation of angular momentum, whatever rotational energy one object has, another object has the opposite (or negative). Similarly, the total linear energy of the [b]system[/b]* (rocket, thruster, particles being expelled, etc.) remains constant. Energy is neither created nor destroyed - it's just converted from one form to another.[/quote]Right. That's why it threw up red flags when it didn't seem to. In the case of the side-mounted rocket, consider a propellant that is expelled at a given rate from the nozzle. That side of the rocket will accelerate more quickly than the larger whole, so the rocket nozzle itself will be moving more quickly. When the rocket continues expelling propellant, the propellant's velocity is subtracted from the tangential component of the rotational velocity, (i.e., the fuel comes out slower, (in world coordinates) than it otherwise would being on the center of the craft). I'm hoping all the energies add up for that case.

Thanks,
-G

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this