Recent content by jbay

  1. J

    Lagrangian of three bodies, using an exponential potential

    But how would you do the d/dt portion if there is no t.
  2. J

    Lagrangian of three bodies, using an exponential potential

    So I do not need to account for the interaction of 1 and 3 in V. Also great now my only problem is what is x'? Can I integrate V to get it since the e"s are basically acceleration?
  3. J

    Lagrangian of three bodies, using an exponential potential

    What I know: L = T - V V = e^(x1-x2) + e^(x2-x3) for n = 3 and a mass = 1 What I believe: T = .5Ʃ (x'_i)^2 from 1 to n So let's say you have three bodys that can just be considered pints masses of 1 and on the same line: x1 x2 x3 They have an...
  4. J

    Python Two Body problem in python using RK4

    "What jbay is doing is getting close to being correct. The problem is that the algorithm he/she is using also isn't RK4 (yet). jbay needs to do just what I said, which is to save the state at RK4 step #1 and use that as the basis for propagating the state for steps 2 to 4. " I am confused to...
  5. J

    Python Two Body problem in python using RK4

    Oh! I believe I have corrected it! But I have a program for Euler that seems to work at extremely high time steps where this RK4 seems to displays the sat. shot straight away form the Earth at the same time steps. Also thank you for all your help, I had previously had no experience with RK4...
  6. J

    Python Two Body problem in python using RK4

    First this is just the loop from my first post, my initial states are calculated above the loop. Code posted below. Why do I need them over and over again? Second, the accelerations, Earths g = - 9.8, so each acceleration with respect to the other should be negative and allows orbit. how are...
  7. J

    Python Two Body problem in python using RK4

    Thank you! I thought I was updating incorrectly. I had a little trouble understanding you description at first but here is the steps coded out instead of a loop, it displays not how i want yet but I assume that is due to scaling and etc. Tell me what you think? while 1: (100000) k1v1 =...
  8. J

    Python Two Body problem in python using RK4

    So I am writing a program in python to do RK4 for the two body problem. I want it to display a sphere moving around another. It currently displays one sphere for a split second and then it goes blank. Any suggestions? from __future__ import division from visual import * from visual.graph import...
Back
Top