Jump to content

Recommended Posts

Posted

Hello all,

 

I have a question. Further information on why I'm asking can be found at this yet unanswered post.My question is; If I have a stationary object one of mass x, and a stationary object two of mass y, do I calculate their displacement using [math]F_g = G \frac{m_1m_2}{r^2}[/math] or using [math]a_1 = G \frac{m_2}{r^2}[/math] and [math]a_2 = G \frac{m_1}{r^2}[/math] ?? I thank anyone willing to shed some light on this confusing matter.

 

Shadow

 

Posted

What is the other force on the objects keeping them stationary? Also, you don't have enough information to calculate the distance; you'll need the force or one of the accelerations.

Posted

I forgot to say I knew the distance, sorry. And there is no other force. The objects are stationary relative to one another. The mass of every object and the distance between them is known. Which of the two above equations should I use?

Posted

I'm going to assume that you mean that they start out as stationary and then gravity is "turned on". (A situation that cannot exist in the real world.) Otherwise the questions yourdad is asking need answers.

 

But, you seem to be confusing the concept of force and acceleration. Both objects experience the exact same force. The same force pulls both objects to the center of gravity of the two objects. That force is given by [math] F = G\frac{m_1 m_2}{r^2} [/math].

 

But, if the two object have different masses, then the acceleration on the two objects is different. [math]F = ma[/math] The force, F, is the same, but since the m is different, [math]F = m_1 a_1[/math] & [math]F = m_2 a_2[/math]

 

So, there is no difference between the situations as you present them, they are the same (after a little algebra).

Posted

I admit I am interchanging velocity, acceleration and force a lot....so I guess I'll ask directly; as I explained more thoroughly in the post I link to, I'm writing, or trying to write to be exact, a program that would simulate the movement of "stars", or objects with a given location and mass. These objects start out with zero velocity. They only gain velocity through gravitational acceleration. How would I go about calculating the displacement of one object due to the gravitational force of another object acting upon it in one time unit?

 

PS.: Yes, you interpreted my post correctly

Posted

You'd use their single acceleration equations:

 

[math]

a_1 = G \frac{m_2}{r^2}

[/math]

 

With some midpoint stationary to both stars at the start. Of course don't you need to use GR to do gravity at these scales?

 

Just to clarify, that's the acceleration of star1, and the mass of star2.

Posted

Erm...what's GR? and what do you mean by "some midpoint stationary to both stars..."? Forgive the confusion

Posted

Some reference frame where at the start the two stars are both stationary as well as the frame is what I mean by some mid point. Just as your coordinate set origin.

 

GR = general relativity.

Posted

oh...well, I was thinking about GR, but unfortunately I have absolutely no Idea on how to implement it...I'm in my first year in High School, and I only understand the most basic concept of GR....but if you could tell me how, or at least point me in the right direction with a couple of examples, I'd be more than grateful :)

Posted

It's pretty much beyond me.... Sorry... There are some great books on it though, the maths is rather complicated.

Posted

I don't know...when I changed the program to use this equation, it...well, see for yourself. Attached is a video I made of the output of my program. The velocities of the objects (represented by the pixels obviously) at time 0 equal zero (or, as Bignose put it, "they start out as stationary and then gravity is turned on") and their masses are the same.

star.zip

Posted

Yeah unless you create some situation where they have some method of losing energy that's pretty much what I'd expect to happen...

Posted

Okay, then that's what I need :o) Any ideas? I know about the law (to my great embarrassment I must admit that I don't know it's name) that says the faster you go, the more energy you need...unfortunately, I don't know enough about it to know how to implement it....could anyone suggest something ? :o)

 

Oh and also, shouldn't they collide?

Posted

Have you writen any code for them to collide? If they are only effecting each other with gravity there's no reason for them to collide in reality they'd just oscillate for ever with no friction and no collisions, just gravity.

 

The faster you go the more energy you need for a unit increase in speed is part of special relativity, have a read about it on wikipedia it only really comes into account when you're going faster than about 0.75 * the speed of light.

Posted

They're never going that fast....and yes, I do have a code for the event if they collide...if you, or anyone else, is interested and can program in C, I can post the source...

 

If it only applies to speeds above three quarters c, I guess it won't help me much in my situation...any alternatives? But thanks anyway :o)

Posted

I suspect you've got an error for the collision then, are you using some cross section or just checking if they're in the same location? I don't really have time to look atm, finals in a few weeks...

 

You are calcuating the accelerations as vectors in 2D right?

Posted

I got collision as looking at the X and Y coordinates, and if they match I set a collide flag, which means that all the functions ignore the given objects...

 

as for the vectors, yes, but I use X and Y vectors, since I have no other means of expressing direction...

 

 

good luck with the finals :)

Posted

I suspect what might be happening is that the two are passing very close but not actually colliding... Or they're inelastically bouncing off of each other...

Posted

I can't imagine how that last part could be possible in C...after all, as far as the computer is concerned, zeros and ones don't bounce unless there's a function there that makes them.

 

as for the passing close by, that also occurred to me, and I've been wanting to check for say 2 pixels around each star and count that as collision, but haven't gotten around to actually doing it....and it's still strange, since if they start out with 0 velocity, and only gravity is affecting them, and their mass is the same, they should collide, not miss, even by a tiny bit...? :D

Posted

It's probably because you're not in real space but the stars are quantised to 1 pixel, and space is also quantised, so there's quite a high chance they'll just pass next to each other....

 

You could try changing their starting coords to have the same x or y value.

Posted

True...but I only use pixels as a means to display it...in the actual source, I deal with coordinates that are represented by real numbers, ie. x=5.3523, y=6.32262....even if they don't intersect on the screen, they should, theoretically, intersect in the "number" part of the program....

 

I'll try changing their coordinates to the same value and see if the program registers that as a collision...if not, then the problem is obvious. If it does, we're back where we started, but a little further along the road. Thanks again for all the help, I'll let you know as soon as I try this out :)

Posted

get your program to drop out all it's coords to text file then... shouldn't be too hard to work out by hand where they should interesect and see what the values really are...

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
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.