Orbit in space (extrasolar planets)

AI Thread Summary
The discussion revolves around a project involving the orbital dynamics of a planet around a solar mass star, where the user encounters issues with phase discrepancies in their radial velocity plots. The user has successfully plotted the radial velocity but finds that the phase is consistently off by varying degrees, despite having the amplitude correct. Suggestions from other users highlight the importance of ensuring the data file starts at the correct point and the potential pitfalls of using trigonometric functions, which may yield results in the wrong quadrant. Adjustments to the mean anomaly and re-evaluating the trigonometric calculations, particularly switching sine to cosine, have shown some improvement in the phase alignment. The conversation emphasizes the complexity of orbital mechanics and the need for careful mathematical handling in simulations.
Silly Lung
Messages
3
Reaction score
0
I'm working on this project and I've kind of come to a roadblock.

Here's a little background: we have a 1 solar mass star and a planet orbiting it. The planet is defined by 5 orbital elements (period, mass, eccentricity, longitude of periastron, and mean anomaly). I wrote a code that will plot the radial velocity of the planet vs. time. I'm using the systemic console (www.oklo.org). I don't know how familiar you guys are with it; this is my first post here.

Now the radial velocity of the planet tells us the radial velocity of the star. The only difference is the semi-major axis is reduced by 1/(1 + Ms/Mp) and the path is flipped by 180°.

Here's the problem: I plot the radial velocity vs. time and I get an ok looking graph. Then I go to do a fitting test. The amplitude is dead on. So that's correct. But every time, the phase is off! Sometimes by ~30°, sometimes by ~180°. What's going on?

Here's my math (skip to the bottom to see the phase): I'm using the book Solar System Dynamics by Murray and Dermott. There's a neat matrix and I'm taking the radial velocity to be along the X axis. The equation for that is...

X = r(cosΩ*cos(ω + f) - sinΩ*sin(ω + f)*cosI)

where r is the radius, Ω is the longitude of ascending node, ω is the longitude of periastron, I is the inclination angle, and f is the true anomaly. Ω = I = 0, so our equation is reduced to...

X = r*cos(ω + f)

Take a derivative to get radial velocity. r and f change with time so you have to product rule.

There's useful formulas in the book for r dot and r*(f dot), but my final solution for the phase of the planet is...

-[e*sinω + sin(ω +f)]

e is eccentricity.

Just switch the sign for the radial velocity of the star. Now f can't be explained simply in terms of the mean anomaly, but it can with the eccentric anomaly, E.

tan(f/2) = sqrt[(1+e)/(1-e)]*tan(M/2)

It's messy but my new phase for the star looks like...

e*sinω + sin(ω + [2 * arctan(sqrt[(1+e)/(1-e)]*tan(E/2))])

If we consider a perfectly circular orbit (e = 0), then arctan-tan eliminate, 2s cancel and we have ω + M on the inside, as I'd expect.

I related E to M using Newton-Raphson iterations, and checked for convergence using Kepler's Equation. And it works. I think I'm overlooking something really obvious. I've been staring at this for a few days.

Anyone brave enough to conquer my wall of text and lend me some insight? It would be greatly appreciated! :smile: Thank you!
 
Last edited:
Astronomy news on Phys.org
On the systemic console, I think you have to tinker with the mean anomoly to get it in phase. But it sounds like you're trying to compute it, so no tinkering is required.

Your data file should be a long list of radial velocities. Is it possible that it begins at the wrong spot?

Also, be careful of the trig functions. They often provide answers in the wrong quadrant. For example, according to my calculator, tan(135) does not equal arctan(tan(135)). Rather than returning me to the 2nd quadrant, it gives me a 4th quadrant answer, so a little piecewise logic is required to get the desired quadrant.
 
You are right. I'm generating my own mean anomalies so the value I get should match the value on the mean anomaly slider.

Interesting you mentioned the wrong spot thing. I hadn't thought about that until yesterday so I quickly fixed it. The phase is still off but not as bad...

Thanks for bringing the trig functions to my attention. That could very well be the problem. I'll take a look at them.
 
It was the arctan-tan! Also making sin(ω +f) into a cosine made it work. I don't know why, but that's what happened.
 
TL;DR Summary: In 3 years, the Square Kilometre Array (SKA) telescope (or rather, a system of telescopes) should be put into operation. In case of failure to detect alien signals, it will further expand the radius of the so-called silence (or rather, radio silence) of the Universe. Is there any sense in this or is blissful ignorance better? In 3 years, the Square Kilometre Array (SKA) telescope (or rather, a system of telescopes) should be put into operation. In case of failure to detect...
Thread 'Could gamma-ray bursts have an intragalactic origin?'
This is indirectly evidenced by a map of the distribution of gamma-ray bursts in the night sky, made in the form of an elongated globe. And also the weakening of gamma radiation by the disk and the center of the Milky Way, which leads to anisotropy in the possibilities of observing gamma-ray bursts. My line of reasoning is as follows: 1. Gamma radiation should be absorbed to some extent by dust and other components of the interstellar medium. As a result, with an extragalactic origin, fewer...
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...
Back
Top