Oribit integrator for a logarithmic potential

AI Thread Summary
The discussion focuses on developing an orbit integrator for a logarithmic potential defined by a specific equation. The user is attempting to solve the equations of motion derived from the potential using methods like Runge-Kutta or leapfrog but is uncertain about decoupling the system of equations. It is noted that while separating variables may not be feasible, the Runge-Kutta method can still be applied directly to the equations. A Hamiltonian approach is also mentioned, but the user struggles with adapting Runge-Kutta for the dependent variables x and y. The response clarifies that applying the method to all four equations at each step is straightforward and feasible.
Serna
Messages
2
Reaction score
0
Hello! Right know I'm trying to make an orbit integrator for solving a logarithmic potential with the form:
\begin{equation}
\Phi= \frac{v_0^2}{2} ln(x^2+ \frac{y^2}{u^2} + r_0^2)
\end{equation}
where v0, u, and r0 are constants
My approach is to use,
\begin{equation}
\ddot{q} = -\bigtriangledown \Phi
\end{equation}
Then the system equations,
\begin{equation}
\ddot{x} = -v_o^2 \frac{x}{x^2+ \frac{y^2}{u^2} + r_0^2}
\end{equation}
\begin{equation}
\ddot{y} = -\frac{v_o^2}{u^2} \frac{y}{x^2+ \frac{y^2}{u^2} + r_0^2}
\end{equation}
My guess is that in order to solve for x and y using Runge Kutta or leapfrog, I need to decouple the system, but I don't know how to do so.
 
Astronomy news on Phys.org
If by decouple the system, you mean separate the variables, it probably is not possible. But Runge-Kutta can be used to integrate the equations of motion as is. The Hamiltonian formulation (four equations with first derivatives) is usually easier.
 
Hello, thanks for your response!

By doing the Hamiltonian approach I still get equations (3) and (4) above, and the other two are are apparently of no use.
The problem is that I don't know how (if possible) to adapt the Runge-Kutta using two dependent variables (x,y) and the independent one (t).
 
Serna said:
The problem is that I don't know how (if possible) to adapt the Runge-Kutta using two dependent variables (x,y) and the independent one (t).

Sure it is possible. It is very straightforward. Just apply the method to all four equations at every step of the code.
 
This thread is dedicated to the beauty and awesomeness of our Universe. If you feel like it, please share video clips and photos (or nice animations) of space and objects in space in this thread. Your posts, clips and photos may by all means include scientific information; that does not make it less beautiful to me (n.b. the posts must of course comply with the PF guidelines, i.e. regarding science, only mainstream science is allowed, fringe/pseudoscience is not allowed). n.b. I start this...
Today at about 4:30 am I saw the conjunction of Venus and Jupiter, where they were about the width of the full moon, or one half degree apart. Did anyone else see it? Edit: The moon is 2,200 miles in diameter and at a distance of 240,000 miles. Thereby it subtends an angle in radians of 2,200/240,000=.01 (approximately). With pi radians being 180 degrees, one radian is 57.3 degrees, so that .01 radians is about .50 degrees (angle subtended by the moon). (.57 to be more exact, but with...

Similar threads

Back
Top