Weight in physics calcs

Started by
16 comments, last by MGB 19 years, 10 months ago
Are you simulating a rocket in the space?

Then first you should look up the formula, that describes the motion of a rocket. As far asI know it moves because of the conservation of momentum. The fuel goes out with some speed, this means a momentum, that impule will be applied to the rocket (whose mass is decreasing beacuse the fuel is going out) in the opposite direction.
The force is the derivative of the impulse or lin. momentum.
I think the equation of motion of a rocket contaions no force, just lin. momentum. But it (the formula) can be derivated, so you get force.
Google for it.
Advertisement
I'm writing a class to do projectile and 'powered projectile' (which I call a rocket, but isn't a 'classical' rocket) movement through air.
I wasn't going to bother modelling the weight change of expelled fuel.

/me googles some more...

OK found some rocket stuff: jeez, it looks horrible!
I just wanna simulate the effect with a thrust force I'm thinking 8o

[edited by - aph3x on May 28, 2004 9:05:44 AM]
Add your thrust force to all the other forces, then integrate.

NetForce = gravityForce + ThrustForce + dragForce + anyOtherHappyForces; (all vectors)
Acceleration = NetForce / Mass;

Integrate to get position and velocity.
Also you could start looking into more advanced integration methods (Rk2, Rk4, etc), since your model is still fairly simple. You'll thank yourself later when you try to make a car sim or something, hah.

edit: alternately, you could make some kind of 'body' class that has a function like
AddForce(vector position, vector force)
{
netForce += force;
netTorque += (distance from position to the centerofmass of the object) ^ force; (where ^ is the vector cross product);
}

It would take the position the force is applied on the object, and the direction of the force and add that to the netForce of the object.

[edited by - CombatWombat on May 28, 2004 9:55:29 PM]
Cheers Mr Wombat.
Nice idea with the class object.
I''m currently looking into midpoint integration - similar to RK2 I think - don''t quite understand how to apply it yet - it''s the fact that you have to re-evaluate the fn at different times which throws me (used to my simple linear Euler code ).
Hmm think I better recap on my physics/integration/derivation knowledge - know of any good books/sources? Google is good but the info a bit disjointed.
As far as I know RK2 is the so-called midpoint integration. I haven''t heard about ''the midpoint integration'', it''s just a "nickname"
No need for books, just look at a lot of sites about it. You will understand it. I also did.
And the main point is not the "at different time", but "with different initial state". Before evaluating the forces in step 2, you have to set the state accordingly to the formula.
Quote:Original post by CombatWombat
edit: alternately, you could make some kind of 'body' class that has a function like
AddForce(vector position, vector force)
{
netForce += force;
netTorque += (distance from position to the centerofmass of the object) ^ force; (where ^ is the vector cross product);
}


OK, so I've been away reading Calculus and mechanics books for a few weeks...
I have a question about Wombat's stuff above: where does the translational movement come from here?
I can see that a force would make the object rotate when applied in certain places, but if it was applied e.g. near the centre of mass there would be some translational movement as well as rotational.
Wombat's code seems to just add to the net force and then apply the force as torque as well - this seems wrong to me - and that only *some* of the force should go to translation unless applied directly at the centre of mass..?

[Edited by - Aph3x on June 20, 2004 6:08:27 PM]
Aph3X:

CombatWombat's code is good.
A force's translational effect does not depend on the distance from the CG.
Cheers Szin... I've been thinking hard about it since posting and reckon my confusion is down to ignoring gravity 'in my head' ;)

This topic is closed to new replies.

Advertisement