Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Merge branch 'OOPSymba' into OOPTides
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Jul 28, 2021
2 parents e300853 + 720f15e commit d7abeb9
Show file tree
Hide file tree
Showing 48 changed files with 2,459 additions and 2,271 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ SWIFTEST_MODULES = swiftest_globals.f90 \
rmvs_classes.f90 \
helio_classes.f90 \
symba_classes.f90 \
module_nrutil.f90 \
lambda_function.f90\
swiftest.f90

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
p_tp = np.array([atp, 0.0, 0.0], dtype=np.double)
v_tp = np.array([0.0, vtp, 0.0], dtype=np.double)

Rhill = apl * 0.0100447248332378922085
Rhill = np.double(apl * 0.0100447248332378922085)

#Make Swifter files
plfile = open(swifter_pl, 'w')
Expand Down Expand Up @@ -126,6 +126,7 @@
plfile.write_record(v_pl[1])
plfile.write_record(v_pl[2])
plfile.write_record(mass)
plfile.write_record(Rhill)
plfile.write_record(radius)
plfile.close()
tpfile = FortranFile(swiftest_tp, 'w')
Expand Down Expand Up @@ -171,7 +172,8 @@
print(f'MU2KG {MU2KG}')
print(f'DU2M {DU2M}')
print(f'TU2S {TU2S}')

print(f'RHILL_PRESENT yes')
print(f'MTINY 1e-12')



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ GR no
MU2KG 1.988409870698051e+30
DU2M 149597870700.0
TU2S 31557600.0
RHILL_PRESENT yes
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
1 39.476926408897625196
0.0 0.0 0.0
0.0 0.0 0.0
2 0.00012002693582795244940133 0.010044724833237891545
2 0.00012002693582795244940133 0.010044724833237892
4.25875607065041e-05
1.0 0.0 0.0
0.0 6.283185307179586 0.0
Binary file modified examples/symba_swifter_comparison/1pl_1tp_encounter/pl.swiftest.in
Binary file not shown.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
sim.param['OUT_STAT'] = "UNKNOWN"
sim.param['GR'] = 'NO'
sim.param['CHK_CLOSE'] = 'YES'
sim.param['RHILL_PRESENT'] = 'YES'
sim.param['MTINY'] = 1.0e-12

sim.param['MU2KG'] = swiftest.MSun
sim.param['TU2S'] = swiftest.JD2S
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ CHK_QMIN_RANGE 0.004650467260962157 1000.0
EXTRA_FORCE NO
BIG_DISCARD NO
CHK_CLOSE YES
RHILL_PRESENT YES
J2 4.7535806948127355e-12
J4 -2.2473967953572827e-18
RHILL_PRESENT YES
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ DU2M 149597870700.0
EXTRA_FORCE NO
BIG_DISCARD NO
CHK_CLOSE YES
RHILL_PRESENT YES
FRAGMENTATION NO
ROTATION NO
TIDES NO
ENERGY NO
GR NO
YARKOVSKY NO
YORP NO
MTINY 0.0
MTINY 1e-12
48 changes: 24 additions & 24 deletions examples/symba_swifter_comparison/9pl_18tp_encounters/pl.in
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
8
1 4.9125474498983623693e-11
1 4.9125474498983623693e-11 0.0014751238438755500459
1.6306381826061645943e-05
0.33206272695596028566 0.07436707001147663254 -0.02438290851908785084
-0.0115920916602103591525 0.028710618792657981169 0.0034094833969203438596
2 7.243452483873646905e-10
-0.065841771551149230746 0.30388831943526661838 0.030872485461978960153
-0.033141166233939436947 -0.0049297226604189817514 0.0026371811668407158825
2 7.243452483873646905e-10 0.006759080797928606587
4.0453784346544178454e-05
-0.7188115337296047125 -0.0118554711069603201795 0.041316403191083782287
0.00021427347881133320621 -0.020313576971905909774 -0.00029114855617710840843
3 8.9970113821660187435e-10
-0.65269716062695148917 -0.3065765656441301057 0.033456491497379246824
0.008459831335658639026 -0.0184014319837384685 -0.0007407193515014080928
3 8.9970113821660187435e-10 0.010044868190633438806
4.25875607065040958e-05
0.35677088372527121507 -0.95189300879814897627 4.4027442504036787155e-05
0.015830039028334789986 0.0059737936889703449964 -3.3484113013969089573e-07
4 9.549535102761465607e-11
0.58046286084934750615 -0.8332000042504307258 3.7646553415201541957e-05
0.013836557832279990782 0.009770187318278569788 -5.1179589633921335467e-07
4 9.549535102761465607e-11 0.0072467082986392815006
2.265740805092889601e-05
-1.5233712071242269115 0.6723825347339112968 0.051459143378398922164
-0.0051275613251079554117 -0.011607719813367209372 -0.000117479966462153095864
5 2.825345908631354893e-07
-1.5891417403740180081 0.4938480736359250889 0.049330990309104823244
-0.0036308073545784510204 -0.012168467501132099878 -0.00016594932370266260858
5 2.825345908631354893e-07 0.3552707649709459117
0.00046732617030490929307
4.049944927347420176 -2.9910878677758190314 -0.078187280837353656526
0.0043972077687938898594 0.006432188574295680597 -0.00012509257442073270106
6 8.459715183006415395e-08
4.1148395833578952363 -2.8938323061728068453 -0.080043092204059404504
0.0042549773877191511204 0.006534697671907701254 -0.00012233719535540690457
6 8.459715183006415395e-08 0.43765596788571493287
0.00038925687730393611812
6.298929503477405767 -7.706413024510769816 -0.11669919842191249504
0.0040140666547768266703 0.0035242303011843410798 -0.00022097170940726839814
7 1.2920249163736673626e-08
6.3589256477393849565 -7.653288021415167286 -0.12000977499446359442
0.003985370599203661747 0.0035590677039893160206 -0.00022043610541731448703
7 1.2920249163736673626e-08 0.46957663585116591335
0.00016953449859497231466
14.856082147529010129 13.007589275314199284 -0.14417795763685259391
-0.0026158276515510360365 0.0027821364817078499815 4.40781085949555924e-05
8 1.5243589003230834323e-08
14.816779495279050138 13.049265812461410263 -0.14351615042000470668
-0.0026245225263081049631 0.002774730265364384104 4.416262654344997005e-05
8 1.5243589003230834323e-08 0.7813355837717117843
0.000164587904124493665
29.55744967800954015 -4.629377558152945049 -0.58590957207831262377
0.00046987400245862169295 0.0031274056019462009859 -7.51415892482447254e-05
29.564459991843019537 -4.5824598513731222837 -0.5870359532621901577
0.0004648344125208179762 0.0031282868879460171488 -7.5042704502708602616e-05
48 changes: 24 additions & 24 deletions examples/symba_swifter_comparison/9pl_18tp_encounters/pl.swifter.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,35 @@
0 0.00029591220819207775568
0.0 0.0 0.0
0.0 0.0 0.0
1 4.9125474498983623693e-11 0.0014751243077781048702
1 4.9125474498983623693e-11 0.0014751238438755500459
1.6306381826061645943e-05
0.33206272695596028566 0.07436707001147663254 -0.02438290851908785084
-0.0115920916602103591525 0.028710618792657981169 0.0034094833969203438596
2 7.243452483873646905e-10 0.006759104275397271956
-0.065841771551149230746 0.30388831943526661838 0.030872485461978960153
-0.033141166233939436947 -0.0049297226604189817514 0.0026371811668407158825
2 7.243452483873646905e-10 0.006759080797928606587
4.0453784346544178454e-05
-0.7188115337296047125 -0.0118554711069603201795 0.041316403191083782287
0.00021427347881133320621 -0.020313576971905909774 -0.00029114855617710840843
3 8.9970113821660187435e-10 0.010044787321379672528
-0.65269716062695148917 -0.3065765656441301057 0.033456491497379246824
0.008459831335658639026 -0.0184014319837384685 -0.0007407193515014080928
3 8.9970113821660187435e-10 0.010044868190633438806
4.25875607065040958e-05
0.35677088372527121507 -0.95189300879814897627 4.4027442504036787155e-05
0.015830039028334789986 0.0059737936889703449964 -3.3484113013969089573e-07
4 9.549535102761465607e-11 0.007246743835971885302
0.58046286084934750615 -0.8332000042504307258 3.7646553415201541957e-05
0.013836557832279990782 0.009770187318278569788 -5.1179589633921335467e-07
4 9.549535102761465607e-11 0.0072467082986392815006
2.265740805092889601e-05
-1.5233712071242269115 0.6723825347339112968 0.051459143378398922164
-0.0051275613251079554117 -0.011607719813367209372 -0.000117479966462153095864
5 2.825345908631354893e-07 0.35527126534549128905
-1.5891417403740180081 0.4938480736359250889 0.049330990309104823244
-0.0036308073545784510204 -0.012168467501132099878 -0.00016594932370266260858
5 2.825345908631354893e-07 0.3552707649709459117
0.00046732617030490929307
4.049944927347420176 -2.9910878677758190314 -0.078187280837353656526
0.0043972077687938898594 0.006432188574295680597 -0.00012509257442073270106
6 8.459715183006415395e-08 0.4376527512949726007
4.1148395833578952363 -2.8938323061728068453 -0.080043092204059404504
0.0042549773877191511204 0.006534697671907701254 -0.00012233719535540690457
6 8.459715183006415395e-08 0.43765596788571493287
0.00038925687730393611812
6.298929503477405767 -7.706413024510769816 -0.11669919842191249504
0.0040140666547768266703 0.0035242303011843410798 -0.00022097170940726839814
7 1.2920249163736673626e-08 0.4695362423191493196
6.3589256477393849565 -7.653288021415167286 -0.12000977499446359442
0.003985370599203661747 0.0035590677039893160206 -0.00022043610541731448703
7 1.2920249163736673626e-08 0.46957663585116591335
0.00016953449859497231466
14.856082147529010129 13.007589275314199284 -0.14417795763685259391
-0.0026158276515510360365 0.0027821364817078499815 4.40781085949555924e-05
8 1.5243589003230834323e-08 0.7812870996943599397
14.816779495279050138 13.049265812461410263 -0.14351615042000470668
-0.0026245225263081049631 0.002774730265364384104 4.416262654344997005e-05
8 1.5243589003230834323e-08 0.7813355837717117843
0.000164587904124493665
29.55744967800954015 -4.629377558152945049 -0.58590957207831262377
0.00046987400245862169295 0.0031274056019462009859 -7.51415892482447254e-05
29.564459991843019537 -4.5824598513731222837 -0.5870359532621901577
0.0004648344125208179762 0.0031282868879460171488 -7.5042704502708602616e-05
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
8
1 4.9125474498983623693e-11
1 4.9125474498983623693e-11 0.0014751238438755500459
1.6306381826061645943e-05
0.33206272695596028566 0.07436707001147663254 -0.02438290851908785084
-0.0115920916602103591525 0.028710618792657981169 0.0034094833969203438596
2 7.243452483873646905e-10
-0.065841771551149230746 0.30388831943526661838 0.030872485461978960153
-0.033141166233939436947 -0.0049297226604189817514 0.0026371811668407158825
2 7.243452483873646905e-10 0.006759080797928606587
4.0453784346544178454e-05
-0.7188115337296047125 -0.0118554711069603201795 0.041316403191083782287
0.00021427347881133320621 -0.020313576971905909774 -0.00029114855617710840843
3 8.9970113821660187435e-10
-0.65269716062695148917 -0.3065765656441301057 0.033456491497379246824
0.008459831335658639026 -0.0184014319837384685 -0.0007407193515014080928
3 8.9970113821660187435e-10 0.010044868190633438806
4.25875607065040958e-05
0.35677088372527121507 -0.95189300879814897627 4.4027442504036787155e-05
0.015830039028334789986 0.0059737936889703449964 -3.3484113013969089573e-07
4 9.549535102761465607e-11
0.58046286084934750615 -0.8332000042504307258 3.7646553415201541957e-05
0.013836557832279990782 0.009770187318278569788 -5.1179589633921335467e-07
4 9.549535102761465607e-11 0.0072467082986392815006
2.265740805092889601e-05
-1.5233712071242269115 0.6723825347339112968 0.051459143378398922164
-0.0051275613251079554117 -0.011607719813367209372 -0.000117479966462153095864
5 2.825345908631354893e-07
-1.5891417403740180081 0.4938480736359250889 0.049330990309104823244
-0.0036308073545784510204 -0.012168467501132099878 -0.00016594932370266260858
5 2.825345908631354893e-07 0.3552707649709459117
0.00046732617030490929307
4.049944927347420176 -2.9910878677758190314 -0.078187280837353656526
0.0043972077687938898594 0.006432188574295680597 -0.00012509257442073270106
6 8.459715183006415395e-08
4.1148395833578952363 -2.8938323061728068453 -0.080043092204059404504
0.0042549773877191511204 0.006534697671907701254 -0.00012233719535540690457
6 8.459715183006415395e-08 0.43765596788571493287
0.00038925687730393611812
6.298929503477405767 -7.706413024510769816 -0.11669919842191249504
0.0040140666547768266703 0.0035242303011843410798 -0.00022097170940726839814
7 1.2920249163736673626e-08
6.3589256477393849565 -7.653288021415167286 -0.12000977499446359442
0.003985370599203661747 0.0035590677039893160206 -0.00022043610541731448703
7 1.2920249163736673626e-08 0.46957663585116591335
0.00016953449859497231466
14.856082147529010129 13.007589275314199284 -0.14417795763685259391
-0.0026158276515510360365 0.0027821364817078499815 4.40781085949555924e-05
8 1.5243589003230834323e-08
14.816779495279050138 13.049265812461410263 -0.14351615042000470668
-0.0026245225263081049631 0.002774730265364384104 4.416262654344997005e-05
8 1.5243589003230834323e-08 0.7813355837717117843
0.000164587904124493665
29.55744967800954015 -4.629377558152945049 -0.58590957207831262377
0.00046987400245862169295 0.0031274056019462009859 -7.51415892482447254e-05
29.564459991843019537 -4.5824598513731222837 -0.5870359532621901577
0.0004648344125208179762 0.0031282868879460171488 -7.5042704502708602616e-05

This file was deleted.

Large diffs are not rendered by default.

64 changes: 32 additions & 32 deletions examples/symba_swifter_comparison/9pl_18tp_encounters/tp.in
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
16
101
0.33208578766229190915 0.07439013071780828379 -0.02438290851908785084
-0.008988542188201206762 0.028710618792657981169 0.0034094833969203438596
-0.0658187108448175795 0.30391138014159824188 0.030872485461978960153
-0.030537616761930286291 -0.0049297226604189817514 0.0026371811668407158825
102
0.33203966624962866216 0.07434400930514498129 -0.02438290851908785084
-0.014195641132219511543 0.028710618792657981169 0.0034094833969203438596
-0.065864832257480881994 0.3038652587289349949 0.030872485461978960153
-0.035744715705948587603 -0.0049297226604189817514 0.0026371811668407158825
103
-0.7187543234391324809 -0.011798260816488121555 0.041316403191083782287
0.0065615071841567274707 -0.020313576971905909774 -0.00029114855617710840843
-0.6526399503364792576 -0.30651935535365792962 0.033456491497379246824
0.014807065041004032965 -0.0184014319837384685 -0.0007407193515014080928
104
-0.71886874402007694407 -0.011912681397432518804 0.041316403191083782287
-0.006132960226534060408 -0.020313576971905909774 -0.00029114855617710840843
-0.65275437091742372075 -0.30663377593460228177 0.033456491497379246824
0.0021125976303132450868 -0.0184014319837384685 -0.0007407193515014080928
105
0.35683111163121072895 -0.9518327808922094624 4.4027442504036787155e-05
0.022724479262608666269 0.0059737936889703449964 -3.3484113013969089573e-07
0.58052308875528702004 -0.8331397763444912119 3.7646553415201541957e-05
0.020730998066553867065 0.009770187318278569788 -5.1179589633921335467e-07
106
0.3567106558193317012 -0.95195323670408849015 4.4027442504036787155e-05
0.008935598794060913702 0.0059737936889703449964 -3.3484113013969089573e-07
0.58040263294340799227 -0.83326023215637023966 3.7646553415201541957e-05
0.0069421175980061153657 0.009770187318278569788 -5.1179589633921335467e-07
107
-1.5233391647104730371 0.6724145771476651712 0.051459143378398922164
-0.0020480822268840624331 -0.011607719813367209372 -0.000117479966462153095864
-1.5891096979602641337 0.49388011604967890777 0.049330990309104823244
-0.00055132825635455804184 -0.012168467501132099878 -0.00016594932370266260858
108
-1.5234032495379807859 0.6723504923201574224 0.051459143378398922164
-0.008207040423331847523 -0.011607719813367209372 -0.000117479966462153095864
-1.5891737827877718825 0.49381603122217127 0.049330990309104823244
-0.0067102864528023435653 -0.012168467501132099878 -0.00016594932370266260858
109
4.050605826355517358 -2.9904269687677218492 -0.078187280837353656526
0.041279424970441319642 0.006432188574295680597 -0.00012509257442073270106
4.1155004823659924185 -2.893171407164709663 -0.080043092204059404504
0.0411371945893665783 0.006534697671907701254 -0.00012233719535540690457
110
4.049284028339322994 -2.9917487667839162135 -0.078187280837353656526
-0.032485009432853539924 0.006432188574295680597 -0.00012509257442073270106
4.114178684349798054 -2.8944932051809040274 -0.080043092204059404504
-0.032627239813928281265 0.006534697671907701254 -0.00012233719535540690457
111
6.299479995832536261 -7.7058625321556393217 -0.11669919842191249504
0.02612723553831041573 0.0035242303011843410798 -0.00022097170940726839814
6.3594761400945154506 -7.652737529060036792 -0.12000977499446359442
0.02609853948273724994 0.0035590677039893160206 -0.00022043610541731448703
112
6.2983790111222752728 -7.70696351686590031 -0.11669919842191249504
-0.01809910222875676239 0.0035242303011843410798 -0.00022097170940726839814
6.3583751553842544624 -7.65383851377029778 -0.12000977499446359442
-0.01812779828432992818 0.0035590677039893160206 -0.00022043610541731448703
113
14.856321905516212567 13.007829033301401722 -0.14417795763685259391
0.010478935887110856981 0.0027821364817078499815 4.40781085949555924e-05
14.817019253266252576 13.049505570448612701 -0.14351615042000470668
0.010470241012353788054 0.002774730265364384104 4.416262654344997005e-05
114
14.855842389541807691 13.007349517326996846 -0.14417795763685259391
-0.015710591190212928187 0.0027821364817078499815 4.40781085949555924e-05
14.8165397372918477 13.049026054474207825 -0.14351615042000470668
-0.015719286064969997113 0.002774730265364384104 4.416262654344997005e-05
115
29.55768244045575699 -4.6291447957067299868 -0.58590957207831262377
0.014905509815736753265 0.0031274056019462009859 -7.51415892482447254e-05
29.564692754289236376 -4.5822270889269072214 -0.5870359532621901577
0.014900470225798949711 0.0031282868879460171488 -7.5042704502708602616e-05
116
29.557216915563323312 -4.6296103205991601115 -0.58590957207831262377
-0.0139657618108195089035 0.0031274056019462009859 -7.51415892482447254e-05
29.564227229396802699 -4.582692613819337346 -0.5870359532621901577
-0.013970801400757312458 0.0031282868879460171488 -7.5042704502708602616e-05
8 changes: 5 additions & 3 deletions python/swiftest/swiftest/init_cond.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ def solar_system_horizons(plname, idval, param, ephemerides_start_date, ds):
tlab.append('vx')
tlab.append('vy')
tlab.append('vz')
plab.append('Rhill')

dims = ['time', 'id', 'vec']
t = np.array([0.0])
Expand Down Expand Up @@ -193,11 +192,14 @@ def solar_system_horizons(plname, idval, param, ephemerides_start_date, ds):
p11.append(pldata[key].vectors()['vy'][0] * VCONV)
p12.append(pldata[key].vectors()['vz'][0] * VCONV)
if ispl:
Rhill.append(pldata[key].elements()['a'][0] * (3 * MSun_over_Mpl[key]) ** (-THIRDLONG))
Rpl.append(planetradius[key] * DCONV)
GMpl.append(GMcb[0] / MSun_over_Mpl[key])
# Generate planet value vectors
pvec = np.vstack([p1, p2, p3, p4, p5, p6, GMpl, Rpl, p7, p8, p9, p10, p11, p12, Rhill])
if (param['RHILL_PRESENT'] == 'YES'):
Rhill.append(pldata[key].elements()['a'][0] * DCONV * (3 * MSun_over_Mpl[key]) ** (-THIRDLONG))
pvec = np.vstack([p1, p2, p3, p4, p5, p6, GMpl, Rpl, Rhill, p7, p8, p9, p10, p11, p12])
else:
pvec = np.vstack([p1, p2, p3, p4, p5, p6, GMpl, Rpl, p7, p8, p9, p10, p11, p12])
else:
pvec = np.vstack([p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12])
plab = tlab.copy()
Expand Down
Loading

0 comments on commit d7abeb9

Please sign in to comment.