Basic Idea of Body Dynamics

Started by
5 comments, last by Geometrian 12 years, 11 months ago
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

[size="1"]And a Unix user said rm -rf *.* and all was null and void...|There's no place like 127.0.0.1|The Application "Programmer" has unexpectedly quit. An error of type A.M. has occurred.
[size="2"]

Advertisement
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.

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.

You don't forget how to play when you grow old; you grow old when you forget how to play.

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.
Thanks. This is what I had been doing (I dug up some 2D code I wrote a while ago; self-contained Python source here), 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 and start the object rotating? Perhaps I'm missing something, but that didn't seem to fit conservation of energy.

Thanks again,
-G

[size="1"]And a Unix user said rm -rf *.* and all was null and void...|There's no place like 127.0.0.1|The Application "Programmer" has unexpectedly quit. An error of type A.M. has occurred.
[size="2"]


[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.
Thanks. This is what I had been doing (I dug up some 2D code I wrote a while ago; self-contained Python source here), 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 and 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 and opposite torques!

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.

You don't forget how to play when you grow old; you grow old when you forget how to play.

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 and opposite torques!
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 also 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

[size="1"]And a Unix user said rm -rf *.* and all was null and void...|There's no place like 127.0.0.1|The Application "Programmer" has unexpectedly quit. An error of type A.M. has occurred.
[size="2"]


[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 and opposite torques!
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 also 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 system* (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 cause 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 speed 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.

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.

You don't forget how to play when you grow old; you grow old when you forget how to play.

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 system* (rocket, thruster, particles being expelled, etc.) remains constant. Energy is neither created nor destroyed - it's just converted from one form to another.
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

[size="1"]And a Unix user said rm -rf *.* and all was null and void...|There's no place like 127.0.0.1|The Application "Programmer" has unexpectedly quit. An error of type A.M. has occurred.
[size="2"]

This topic is closed to new replies.

Advertisement