Fortran - equation of motion, astronomical units

Click For Summary

Discussion Overview

The discussion revolves around implementing the Euler method to plot the trajectory of a body influenced by the Sun's gravity, starting from specific initial conditions. Participants explore the formulation of the equations of motion, particularly in the context of Cartesian and polar coordinates.

Discussion Character

  • Homework-related
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant presents an attempt to break down the equations of motion into x and y components, questioning the correctness of their formulation of forces.
  • Another participant challenges the initial approach, suggesting that polar coordinates might be more appropriate and questioning the definitions of forces in Cartesian coordinates.
  • A participant seeks clarification on the meaning of a specific statement regarding the calculation of velocity components.
  • There is a discussion about the position of the Sun and the notation for the magnitude of the position vector.
  • One participant mentions that they have resolved their confusion by revisiting the problem from the beginning and concludes that polar coordinates are unnecessary.

Areas of Agreement / Disagreement

Participants express differing views on the use of polar coordinates versus Cartesian coordinates, and there is no consensus on the initial formulation of the equations of motion. The discussion remains unresolved regarding the best approach to take.

Contextual Notes

Participants have not fully agreed on the definitions of forces in the context of the equations of motion, and there are unresolved questions about the implications of using different coordinate systems.

SalfordPhysics
Messages
68
Reaction score
1

Homework Statement


Euler method : Plot the trajectory of a body moving under the influence of the suns gravity from initial conditions x=1, y=0, vx=0, vy=1.
My trouble is figuring out my function.

Homework Equations


d2r / dt2 = -r/r3

The Attempt at a Solution


What I have been doing previously is breaking the function into x and y components, so for finding vx(i+1) I use Fx, as for vy and Fy.
So for this case;
Fx = -(x+0)/(SQRT(x2 + 0)3
Fy = -(0+y)/(SQRT(0 + y2)3

Is this right?
 
Physics news on Phys.org
What you wrote doesn't seem right.

Are you familiar with polar coordinates?
 
SalfordPhysics said:

Homework Statement


Euler method : Plot the trajectory of a body moving under the influence of the suns gravity from initial conditions x=1, y=0, vx=0, vy=1.
My trouble is figuring out my function.

Homework Equations


d2r / dt2 = -r/r3

The Attempt at a Solution


What I have been doing previously is breaking the function into x and y components, so for finding vx(i+1) I use Fx, as for vy and Fy.
So for this case;
Fx = -(x+0)/(SQRT(x2 + 0)3
Fy = -(0+y)/(SQRT(0 + y2)3

Is this right?
I wouldn't think so. Generally, for polar coordinates, r2 = x2 + y2, thus your definitions of Fx and Fy don't make sense.
 
Im not here no, there is no mention on my handout but could you go on anyway? regarding polar that is
 
SalfordPhysics said:

Homework Statement


Euler method : Plot the trajectory of a body moving under the influence of the suns gravity from initial conditions x=1, y=0, vx=0, vy=1.
My trouble is figuring out my function.
Where is the sun, at (0, 0)?
SalfordPhysics said:

Homework Equations


d2r / dt2 = -r/r3
Does the plain 'r' denote the magnitude of ##\vec{r}##? To be clearer, you can write it as |r|.
SalfordPhysics said:

The Attempt at a Solution


What I have been doing previously is breaking the function into x and y components, so for finding vx(i+1) I use Fx, as for vy and Fy.
What does this part -- "so for finding vx(i+1) I use Fx, as for vy and Fy." -- mean?
SalfordPhysics said:
So for this case;
Fx = -(x+0)/(SQRT(x2 + 0)3
Fy = -(0+y)/(SQRT(0 + y2)3

Is this right?
 
Last edited:
I assume the Sun must be at (0,0) yes. And yes r = |r|.
Also, how do you do the vector notation?
Regarding your edit to the code;
I proceed as follows;
x(i+1) = x(i) + vx(i).dt
vx(i+1) = vx(i) + ax(i).dt where ax(i)=Fx i.e.; -r/|r|3
It follows as with my trajectory problem you helped with previously.
 
Last edited:
I had another question that I didn't get the quotes right, so you might have missed it.
Mark44 said:
What does this part -- "so for finding vx(i+1) I use Fx, as for vy and Fy." -- mean?

Since I don't know what the above means, I can't comment on what you have for vx below.

SalfordPhysics said:
I assume the Sun must be at (0,0) yes. And yes r = |r|.
Also, how do you do the vector notation?
# # \vec{r} # # - take out the spaces between the first and second pair of # characters.
SalfordPhysics said:
Regarding your edit to the code;
I proceed as follows;
x(i+1) = x(i) + vx(i).dt
vx(i+1) = vx(i) + ax(i).dt where ax(i)=Fx i.e.; -r/|r|3
It follows as with my trajectory problem you helped with previously.
 
I've solved it now I just had to go from the beginning to understand things, no need for polar.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
18
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
11
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 11 ·
Replies
11
Views
6K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
10K