我试图找到一种方法来检测共振中的轨道参数(周期,偏心率,半长轴...)行星。如何在共振中找到行星
我知道如果两颗行星之间的比例是相称的,这意味着它们处于共振状态,但假设我想知道它们在哪个共振中,我该怎么做呢?例如,我有我的N行星和周期的矩阵。我怎样才能创建一个循环来检查星球是否以及共振?
喜欢的东西:
for i=1, N
P(i)/P(i-1)=m
if m (check the resonance condition) then
write (planets parameters)
end if
end for
非常感谢。
我做这个节目,我有一个2×N个矩阵,其中列有行星的ID和他们的时期,行是行星的数目,例如类似的东西:
1 0.44
1 0.8
1 0.9
2 0.9
2 1.2
3 2.0
3 3.0
诀窍从一个星球系统改变为另一个系统的方法是,将一个系统的所有行星与另一个系统的星球重新命名为同一个号码,然后将另一个系统的行星改为另一个号码,这样我就可以将共振条件从一个系统改变为另一个系统。
程序很简单:
- 读取文件并保存列和行号,
- 创建和保存山坳*行对象的矩阵,
- 另存为载体的`名字`和`行星period`,
- 开始循环:
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
这是IDL代码我写道:
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
问题:
- 我无法理解如何消除共振的乘法(2:4,3:6等);
- 第二个for循环(与行星之一)行星的数量必须每次都改变,但我不明白如何改变这一点。
只是好奇,你是什么意思,两个行星之间的比例是相称的,想知道更多关于这个和它背后的数学。 –
哪部分你有困难?你可以写一个简单的嵌套循环来检查每个星球与所有其他星球。或者你在检查共振条件时有困难?如果是后者,我建议你从[轨道共振](http://en.wikipedia.org/wiki/Orbital_resonance)Wikipedia页面开始,然后探索其数学参考。有许多不同种类的共振,其中一些相当涉及数学。对于AD.Net和Jim Mischel, –
的条件是平均运动共振,这意味着两个行星的轨道周期之间的比率等于两个整数之间的比率。例如:1:2,3:2,5:1等等。如果我只用x:1共振开始,条件是x必须是一个'小'整数。问题是,在if循环中,我必须声明后一个条件? –