Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How to add eccentricity to Kepler's Laws in cartesian

  1. Apr 20, 2016 #1
    Hi,

    I'm currently making a three-body simulator and I'm trying to add the eccentricity to Kepler's Law to turn the circular orbits to more of a elliptical orbit? I'm using Newton's Law of Gravitational to plot the new positions. How would I add in the eccentricity to this equation?


    I'm currently coding it in Fortran95
     
  2. jcsd
  3. Apr 20, 2016 #2

    mfb

    User Avatar
    2016 Award

    Staff: Mentor

    Kepler's laws do not apply to problems with more than two bodies. They can be some reasonable approximation in some cases but in general they do not work.
    Newton's laws do not have any notion of eccentricity, so where is the problem?
    Do you have to use Fortran? If not, try to avoid it.
     
  4. Apr 29, 2016 #3
    Do you have to use Fortran? If not, try to avoid it.[/QUOTE]

    Thanks for the reply! I'm currently doing a Computational Project at the moment for my degree. We are allowed to use any computational language, but I've only been taught in Fortran95. I'm considering learning another language at some point down the line, any recommendations? I'm trying to live plot the results so it can be seen as more of an animation.

    The program writes out the points to a .dat file, could I then call this file to say a program in Python or Java and then live plot it?

    (Sorry for kinda sidetracking from the initially stated question)

    Thank you for your time! :D
     
  5. Apr 29, 2016 #4

    mfb

    User Avatar
    2016 Award

    Staff: Mentor

    Python is nice, Java is interesting, C++ has some advantages as well.
    Fortran is just messy.
    There should be libraries or even whole programs to do that.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: How to add eccentricity to Kepler's Laws in cartesian
  1. Add file (Replies: 1)

  2. Add library to fortran (Replies: 7)

Loading...