Mass and Inertia Cancelled Out

Started by
17 comments, last by Jacob Roman 17 years, 11 months ago
Quote:Original post by Sneftel
Quote:Original post by Jacob Roman
F = M * A

Where did you get that A from?


It was originally my net force, but I changed it to F/M, and now everyones saying not to do that, and now I dunno what I can do. Any pointers?
Advertisement
Quote:
F = M * A
A = F / M

And what am I suppose to make 'A' in F = M * A, since F / M is "fairly tautological?"


You're not supposed to do anything, because you're not supposed to use "F=M*A". You don't need to calculate the force, because you provide the forces to the objects. Along with the masses, they're a given. You need to then calculate the accelerations(A=F/M), the velocities(V=V+A*dt) and so on.
Alright. Here is what you do.


FIRST, decide what the net force F is, based on contact forces, gravity, tension, spring forces, whatever.

SECOND, divide force F by mass M to get acceleration A.

THIRD, integrate based on that acceleration.

That's all there is to it.
It's about physics here and you're using Newton's law.

What does it mean? It means that when you apply force to an object (say, you push it), it'll accelerate. The more mass the object has, the less it will accelerate from a tiny bit of force.

So, in formula this means a = F / m with

a -> acceleration (in meters per second^2, ms^{-2})
F -> force (in Newton, N)
m -> mass (in kilogram, kg)

In your system you apply force and, using that and the known mass of the object, calculate it's acceleration.

After you've calculated the acceleration, you can accelerate (increase the velocity) of the object:

delta v = a * delta t with

delta v -> chance in velocity (in meters per seconds, ms^{-1})
a -> acceleration (in meters per second^2, ms^{-2})
delta t -> time (in seconds, s)


So, I'll give an example.

I apply 10 Newton of force (F = 10N) to an object of known mass, m = 5.0kg. The object will accelerate:

a = F / m = 10 / 5.0 = 2.0ms^{-2}

It's velocity will increase by 2.0 meters per second, per second. Let's say I apply that same force for 3.0 seconds (delta t = 3.0s). The velocity will change (it will increase, because a > 0):

delta v = a * delta t = 2.0 * 3.0 = 6.0ms^{-1}

So, over the course of those 3.0 seconds, my velocity increased with 6.0 meters per second, because I kept applying 10 Newton of force.


PS: If you apply more than one force at the same time, the F used in Newton's law (a = F / m) is the sum of all applied forces. F, a and v are vectors, which means they have both a direction and size.

Here's Eulers method (let's not start bickering about how bad is) in C.

a = F / m;
v += a * dt;
position += v * dt;

with dt being the time passed since the last simulation. In this model, you need to know: F (the net force) and m (the mass of the object)


Edit: Oh lol maybe I went a bit overboard
Finally some real answers! Thanks people.

Now that the position, velocity, and acceleration stuff is out of the way, let's talk about Torque since that's what I'm mainly working with in my current program.

I already calculated my moment of inertia (1/2 * m * r * r) and put it in a constant, and I was treating it like F = MA since I saw a similar formula for torque:

T = I * α // (Moment of Inertia * Angular Acceleration)

But after seeing this post:

Quote:You can divide force by mass to get the acceleration. You cannot do that with the moment of inertia because it is a matrix. Instead, you effectively need to invert it. I say 'effectively' because you shouldn't calculate the inverse directly but solve the linear system, but since you're writing a physics engine I guess you already know that.


I don't know what to do. He's saying it's a matrix, but how can it be?
I think jjd talked about the general case. In your case(a disk), the moment of inertia can be reduced to the scalar I=(m*R^2)/2
That's what I just did though.
When a force applies to an object, most of the times there's also torque. Torque depends on where the force is applied, relative to the center of its mass.

torque = r X F with

r being the arm between the point where the force is applied and the center of the objects mass

In that formula `X' symbolises something called the `2D pseudo cross product' or `perp. dot product':

torque = r_x * F_y minus r_y * F_x with

r_x, r_y being the x- and y-component of vector r
F_x, F_y being the x- and y-component of the vector F

Angular acceleration depends on the mass and shape of the object. This is called
inertia. For a 2D rectangle, this is:

inertia = (1/12) * m * (l^2 plus h^2), which is constant just like mass

Torque, inertia and acceleration relate to each other, just like force, mass and acceleration (remember a = F / m):

alpha = torque / inertia with

alpha -> angular acceleration (in radians per second^2, or rads^{-2}).


An example:

Let's say I apply a force (F = 4.0N) in the bottom left corner of a rectangle shaped object (m = 5.0kg) with width = 1.0m and height = 2.0m. I push the object up.

I know its dimensions and mass, so I can calculate its inertia:

inertia = (1/12) * m * (l^2 plus h^2) = (1/12) * 5.0 * (1.0^2 + 2.0^2) = 25/12 = 2.1

Now we do have to use vectors to describe what force and where it applied to the object: (my written format here is (x, y)-component)

F = ( 0.0, 4.0 ) -> I push upwards with 4.0 Newtons. It's length (Pythagoras) is the amount of force applied.
r = ( -0.50, -1.0 ) -> I push in the bottom left corner, relative to the objects center point of mass

So, we know where and what force applied, and we'll calculate torque. Torque determines how fast my object will increase its angular velocity (called angular acceleration).

torque = r_x * F_y minus r_y * F_x = -0.50 * 4.0 - -1.0 * 0.0 = -2.0

Angular acceleration, just like (a = F / m), can be calculated now:

alpha = torque / inertia = -2.0 / 2.1 = -0.96 rads^{-2}

Its angular velocity will thus increase by -0.96 radians per second, per second.

delta angular velocity = alpha * delta t

Lets say I applied the force for 3 seconds, always pointing towards the top of the object, my angular velocity will have changed

delta angular velocity = alpha * delta = -0.96 * 3.0 = -2.9rads{-1}

by -2.9 radians per second.


Let's put it into C:

void apply_force( c_Vector2f F, c_Vector2f r )
{
this->F += F;
this->torque += r.x * F.y - r.y * F.x;
}
// This was a snippet out of some old code of mine, partially
// NeHe I think. I just put it here to show how torque is
// calculated using vectors.

rotational_speed += ( torque / inertia ) * dt;
theta += rotational_speed * dt;

with theta being the angle the object is rotated at.


Note: I have not been taught this in school or university yet :P, I figured it out through websites. It is thus prone to mistakes and any real physicist may disagree on it.


Edit: This one was even worse than the previous one :P
Whoh, thanks for the info, but the cross product is not needed in my case. Once I hold the left mouse button with my cursor over the "circular" vinyl (used distance formula to test that), if I move up or left, the cursor and the vinyl rotates counter clockwise. If I move down or right, the cursor and vinyl rotate clockwise. Just two directions there. And if I release it during movement, whatever the delta angle is will be the speed it will spin, with friction slowing it down.

This topic is closed to new replies.

Advertisement