Gravity in the x, y and z directions

  • Thread starter Thread starter Philosophaie
  • Start date Start date
  • Tags Tags
    Gravity
AI Thread Summary
To determine the gravitational acceleration components (g_x, g_y, g_z) for a planet orbiting a star, it's essential to recognize that gravitational acceleration is not constant, especially in a two-body system. Newton's law of gravity can be applied in vector form to derive these components, and using polar coordinates can simplify the calculations. The discussion highlights that for two bodies, the problem aligns with Kepler's laws, which provide exact solutions for orbital motion. For more complex scenarios involving multiple objects, closed-form solutions are generally unavailable. Understanding these principles is crucial for accurately modeling the planet's trajectory under gravitational influence.
Philosophaie
Messages
456
Reaction score
0
I am working in classical mechanics. A planet is orbiting a star. The planet has a given velocity and a position vector from the star. How do I find the magnitude of the gravity in the x, y and z directions.

positionvector = (x_0, y_0, z_0)
velocityvector = (v_x, v_y, v_z)
x = \frac{1}{2}*g_x*t^2 + v_x*t + x_0
y = \frac{1}{2}*g_y*t^2 + v_y*t + y_0
z = \frac{1}{2}*g_z*t^2 + v_z*t + z_0
r = \sqrt{x^2 + y^2 + z^2}
\theta = atan(\frac{y}{x})
\phi = acos(\frac{z}{r})
g = \sqrt{g_x^2 + g_y^2 + g_z^2} = -\frac{GM}{r^2}

Any hints on how to find (g_x, g_y, g_z)
 
Last edited:
Physics news on Phys.org
Philosophaie said:
x = \frac{1}{2}*g_x*t^2 + v_x*t + x_0
y = \frac{1}{2}*g_y*t^2 + v_y*t + y_0
z = \frac{1}{2}*g_z*t^2 + v_z*t + z_0
That is not true, those formulas would require a constant acceleration. Acceleration in a gravitational field is not constant (even if that can be a good approximation in some cases).

Any hints on how to find (g_x, g_y, g_z)
Newton's law of gravity in its vector form gives that. Alternatively, use your g, and let it point from the planet to the central object.
 
You're playing with the two-body problem, right? Why don't you use polar coordinates, it simplifies things greatly.

I'm not exactly sure what you're trying to do.
 
I am looking for an object that is in freefall and its path towards a star from an initial velocity and position.

How do you formulate the acceleration of non-constant acceleration?
 
Last edited:
How do you formulate the acceleration of non-constant acceleration?
In the general case with more than 2 objects, there is no useful, closed formula to calculate the position for all times.
With just 2 objects, this is known as Kepler problem and has exact solutions.
 
What is generally done is something like multiplying Gma / rab2 by (ra-rb) / rab, where ma is the mass of object a and rab is the distance between objects a and b.
(ra-rb) / rab forms "direction cosines" when you resolve the vectors with appropriate x, y, z coordinates.
 

Similar threads

Back
Top