4

I'm trying to find a method to detect from orbital parameters (period, eccentricity, semi-major axis...) planets that are in resonance.

I know that if the ratio between two planets is commensurable, this means that they are in resonance, but suppose I want to know IN WHICH resonance they are, how can I do it?

For instance, I have my matrix of N planets and periods. How can I create a loop to check if and in which resonance the planets are?

Something like:

for i=1, N
  P(i)/P(i-1)=m
   if m (check the resonance condition) then
      write (planets parameters)
   end if
end for

Thanks a lot.

I make this program, I have a 2xN matrix in which the columns are the ID of planets and their period, the rows are the number of planets, for instance something like that:

1 0.44
1 0.8
1 0.9
2 0.9
2 1.2
3 2.0
3 3.0

The trick to change from one system of planet to the other is to rename all the planets of a system with the same number and the planets of other system with another number so, I can be able to change the resonance condition from one system to another one.

The program is simple:

  1. read the file and save the columns and rows numbers,
  2. create and save a matrix of col*row objects,
  3. save as a vector the `name` and `period` of planets,
  4. start the cycle:
for r=1,row  <--- THIS MUST READ all the file   
    if (difference in name = 0.) then start the resonance find criterion
        for l = 0,4 (number of planet in each system: THIS MUST BE MODIFIED !!) 
        for i = 1,5
        for j = 1,5
            if (i*period(l)-j*period(l+1) eq 0) <- RESONANCE CONDITION !!!  
                then write on file
        end for
        end for
        end for
    else write a separation between the first set and second set of planets !
end for

This is the IDL code I wrote:

pro resfind

file = "data.dat"
rows =File_Lines(file) ; per le righe
openr,lun,file,/Get_lun ; per le colonne
line=""
readf,lun,line
cols = n_elements(StrSplit(line, /RegEx, /extract))

openr,1,"data.dat" 
 data = dblarr(cols,rows)
 readf,1,data
close,1


name = data(0,*)
period = data(1,*)

openw,2,"find.dat"
 for r = 0, rows-2 DO BEGIN ;
        if (name(r)-name(r+1) EQ 0) then begin 
                for l = 0,rows-2 do begin 
                         for j = 1,4 do begin
                                 for i = 1,4 do begin

                                           if (abs(i*period(l)-j*period(l+1)) EQ 0.) then begin 
                                           printf,2, 'i resonance:', i , ' j resonance:',j,' planet ID:',l,' planet ID:',l+1
                                           endif
                                 endfor 
                         endfor
                endfor
        endif else begin
        printf,2, '                                                    ' 
endfor


close,2

end

PROBLEMS:

  1. I can't understand how to eliminate the multiply of resonance (2:4, 3:6 and so on);
  2. in the second for loop (the one with the planet) the number of planets must be change every time but I don't understand how to change this.
Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
  • just curious, what do you mean by ratio between two planets is commensurable, would like to know more about this and the math behind it. – AD.Net Mar 28 '14 at 23:26
  • Which part are you having difficulty with? You can write a simple nested loop to check each planet against all the others. Or are you having trouble checking the resonance condition? If the latter, I would suggest that you start at the [Orbital resonance](http://en.wikipedia.org/wiki/Orbital_resonance) Wikipedia page, then explore their references for the math. There are many different kinds of resonances, the mathematics for some of which being rather involved. – Jim Mischel Mar 28 '14 at 23:29
  • for AD.Net and Jim Mischel the condition is on mean motion resonance, this means that the ratio between the orbital period of two planet is equal to a ratio between two integer number. for instance: 1:2 , 3:2, 5:1 and so on. If i start with only x:1 resonance the condition for this is that x must be a 'small' integer. The question is, how, in the if cycle, i must declare the latter condition? – Panichi Pattumeros PapaCastoro Mar 28 '14 at 23:40
  • To verify resonance you should check more than simply that the periods are near the appropriate ratio; you should check that the resonant argument is behaving. – DSM Mar 29 '14 at 00:32
  • I think you want to look for LCM (least common multiply) Sieve of Eratosthenes will speed things up considerably (can check single planet against all others in one sieve at once) – Spektre Mar 29 '14 at 08:37
  • 1
    @PanichiPattumerosPapaCastoro Looks like you better ask at [astronomy.stackexchange.com](http://astronomy.stackexchange.com/) or [physics.stackexchange.com](http://physics.stackexchange.com/) – Ivan Aksamentov - Drop Mar 29 '14 at 08:39

1 Answers1

1

First, every real number can be represented as a ratio of integers with any finite precision. That's in particular what we do when we express numbers with more and more digits in decimal system. So you need not only check whether orbital periods are in some integer-to-integer ratio, but also if the two integers are relatively small. And it's arbitrary decision, which are 'small'.

Second, remember that two floating point values are, in general, different if one is not a copy of the other. For example 3*(1/3) may be not equal to 1. That's a result of finite precision: 1/3 is infinitely repeating when represented in binary, so it gets truncated somewhere when stored in memory. So you should not check if the periods ratio is equal to some ratio but rather if it is close enough to some ratio. And its arbitrary to say what is 'close enough'.

So the fastest way would be to build an array of ratios of some relatively small integers, then sort it and remove duplicates (3:3 = 2:2, and you don't need multiple ones in your array). (Remember that duplicates are not those equal to each oher, but those close enough to each other.) Then, for each two planets calculate orbital periods ratio and binary search your table for the closest value. If it is close enough, you found a resonance.

CiaPan
  • 9,381
  • 2
  • 21
  • 35