This repository was archived by the owner on Aug 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'IntelAdvisor' of https://github.itap.purdue.edu/MintonG…
…roup/swiftest into IntelAdvisor
- Loading branch information
Showing
20 changed files
with
692 additions
and
85 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
8 | ||
Mercury 6.5537098095653139645e-06 0.001475131156288637831 | ||
Mercury 6.5537098095653139645e-06 0.0014751260185578720416 | ||
1.6306381826061645943e-05 | ||
0.38709993253896590737 0.20562614632859010921 7.0036272314159866426 | ||
48.303648911363737284 29.187750438580689405 192.22398026813181104 | ||
Venus 9.663313399581537916e-05 0.0067590747715647875607 | ||
0.38709858430953941744 0.20562340108970009189 7.0033025080013837638 | ||
48.296118373786072198 29.20442403952453958 338.33948746828792764 | ||
Venus 9.663313399581537916e-05 0.006759120024335718617 | ||
4.0453784346544178454e-05 | ||
0.7233249152313999675 0.006782779674600277614 3.3945084679511872139 | ||
76.62172192899298295 55.11871576732421829 141.51944714681908977 | ||
Earth 0.000120026935827952453094 0.01004493295891520948 | ||
0.72332975797361009906 0.006717605698865438367 3.3944392733422819042 | ||
76.60235891771118588 54.960379460829607012 200.47893395506480374 | ||
Earth 0.000120026935827952453094 0.0100446292823340959596 | ||
4.25875607065040958e-05 | ||
1.0000207198983319667 0.01667731166077134064 0.0027576432734417160447 | ||
175.55813761562768605 287.40166532678227895 245.00485341438161413 | ||
Mars 1.2739802010675941456e-05 0.007246527815634877893 | ||
0.99999048745432228547 0.016714003765458580048 0.0036378626088630029375 | ||
175.0251726002310022 287.96196288125747742 114.34829340424269617 | ||
Mars 1.2739802010675941456e-05 0.0072466212625671651507 | ||
2.265740805092889601e-05 | ||
1.5236922769560579116 0.093361659829406723476 1.8479133359077690724 | ||
49.490611477105659333 286.70751815915190264 210.36775515565921069 | ||
Jupiter 0.037692251088985676735 0.3552712221482522291 | ||
1.5237119255895350545 0.09344151133508207807 1.8474416735579008986 | ||
49.47285721247470036 286.7379771285890797 209.33967734771380265 | ||
Jupiter 0.037692251088985676735 0.35521688466465032753 | ||
0.00046732617030490929307 | ||
5.203523661489898977 0.04851833897394460665 1.3035686835324369337 | ||
100.51671881401649955 273.38319313278452682 318.65986979714938343 | ||
Saturn 0.011285899820091272997 0.4376655756331854547 | ||
5.202727800851599582 0.048244977116379678117 1.3036311345700750675 | ||
100.51925884330809424 273.58984028825142332 129.5536700659941971 | ||
Saturn 0.011285899820091272997 0.43538665458575465117 | ||
0.00038925687730393611812 | ||
9.581904852310625387 0.052236260603057811658 2.486258128114103183 | ||
113.595257336893098454 335.64742317800698856 225.92836894588160135 | ||
Uranus 0.0017236589478267730203 0.46970222329693796102 | ||
9.532011952667287957 0.054863298704333408884 2.4879063632803011252 | ||
113.63057816762059815 339.54673564023909194 290.89958065689040723 | ||
Uranus 0.0017236589478267730203 0.46987236554736915505 | ||
0.00016953449859497231466 | ||
19.238019712529130345 0.0442880601027018303 0.770350326736000679 | ||
74.09520891350530292 95.7524345508490029 236.07863258800219342 | ||
Neptune 0.0020336100526728302319 0.78148373992374883156 | ||
19.244988382902359803 0.0479617494230129629 0.7730102596086204647 | ||
74.012580980165793676 93.595549122802268016 262.86586372775150267 | ||
Neptune 0.0020336100526728302319 0.7749718408665498732 | ||
0.000164587904124493665 | ||
30.291369954344219195 0.013531244039650480379 1.7689741418447819665 | ||
131.74449502957048708 245.89296040993210113 334.5035290478779757 | ||
30.038959912561129073 0.008955570159296157365 1.7711193542961420899 | ||
131.82211597488270627 284.47484279411258967 308.45137222693909962 |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Sun | ||
39.476926408897626 | ||
0.004650467260962157 | ||
4.7535806948127355e-12 | ||
-2.2473967953572827e-18 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
#!/usr/bin/env python3 | ||
import swiftest | ||
from numpy.random import default_rng | ||
import numpy as np | ||
|
||
sim = swiftest.Simulation() | ||
sim.param['PL_IN'] = "pl.swiftest.in" | ||
sim.param['TP_IN'] = "tp.swiftest.in" | ||
sim.param['CB_IN'] = "cb.swiftest.in" | ||
sim.param['BIN_OUT'] = "bin.swiftest.nc" | ||
|
||
sim.param['MU2KG'] = swiftest.MSun | ||
sim.param['TU2S'] = swiftest.YR2S | ||
sim.param['DU2M'] = swiftest.AU2M | ||
sim.param['T0'] = 0.0 | ||
sim.param['DT'] = 0.125 * swiftest.JD2S / swiftest.YR2S | ||
sim.param['TSTOP'] = 1000.0 | ||
sim.param['ISTEP_OUT'] = 2922 | ||
sim.param['ISTEP_DUMP'] = 2922 | ||
sim.param['CHK_QMIN_COORD'] = "HELIO" | ||
sim.param['CHK_QMIN'] = swiftest.RSun / swiftest.AU2M | ||
sim.param['CHK_QMIN_RANGE'] = f"{swiftest.RSun / swiftest.AU2M} 1000.0" | ||
sim.param['CHK_RMIN'] = swiftest.RSun / swiftest.AU2M | ||
sim.param['CHK_RMAX'] = 1000.0 | ||
sim.param['CHK_EJECT'] = 1000.0 | ||
sim.param['OUT_STAT'] = "UNKNOWN" | ||
sim.param['IN_FORM'] = "EL" | ||
sim.param['OUT_FORM'] = "XVEL" | ||
sim.param['OUT_TYPE'] = "NETCDF_DOUBLE" | ||
sim.param['RHILL_PRESENT'] = "YES" | ||
sim.param['GR'] = 'YES' | ||
sim.param['GMTINY'] = '1e-7' | ||
|
||
bodyid = { | ||
"Sun": 0, | ||
"Mercury": 1, | ||
"Venus": 2, | ||
"Earth": 3, | ||
"Mars": 4, | ||
"Jupiter": 5, | ||
"Saturn": 6, | ||
"Uranus": 7, | ||
"Neptune": 8, | ||
} | ||
|
||
for name, id in bodyid.items(): | ||
sim.add(name, idval=id, date="2027-04-30") | ||
|
||
Me_a = sim.ds.isel(id=1)['a'].values | ||
Me_e = sim.ds.sel(id=1)['e'].values | ||
Me_i = sim.ds.sel(id=1)['inc'].values | ||
|
||
capom_pl = default_rng().uniform(0.0, 360.0, 1) | ||
omega_pl = default_rng().uniform(0.0, 360.0, 1) | ||
capm_pl = default_rng().uniform(0.0, 360.0, 1) | ||
|
||
capom_tp = default_rng().uniform(0.0, 360.0, 1) | ||
omega_tp = default_rng().uniform(0.0, 360.0, 1) | ||
capm_tp = default_rng().uniform(0.0, 360.0, 1) | ||
|
||
GMcb = sim.ds.isel(id=0)['Gmass'].values | ||
GU = swiftest.GC / (sim.param['DU2M']**3 / (sim.param['MU2KG'] * sim.param['TU2S']**2)) | ||
dens = 3000.0 / (sim.param['MU2KG'] / sim.param['DU2M']**3) # Assume a bulk density of 3 g/cm^3 | ||
GM_pl = 2e-7 | ||
M_pl = GM_pl / GU | ||
R_pl = (3 * M_pl / (4 * np.pi * dens))**(1.0 / 3.0) | ||
Rh_pl = Me_a * (GM_pl / (3 * GMcb))**(1.0/3.0) | ||
|
||
sim.addp(np.full(1,9), np.full(1,'Planetesimal'), Me_a, Me_e, Me_i, capom_pl, omega_pl, capm_pl, GMpl=np.full(1, GM_pl), Rpl=np.full(1, R_pl), rhill=Rh_pl) | ||
sim.addp(np.full(1,10), np.full(1,'TestParticle'), Me_a, Me_e, Me_i, capom_tp, omega_tp, capm_tp) | ||
|
||
sim.save("param.swiftest.in") | ||
sim.param['PL_IN'] = "pl.swifter.in" | ||
sim.param['TP_IN'] = "tp.swifter.in" | ||
sim.param['BIN_OUT'] = "bin.swifter.dat" | ||
sim.param['ENC_OUT'] = "enc.swifter.dat" | ||
sim.save("param.swifter.in", codename="Swifter") | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
! VERSION Swifter parameter file converted from Swiftest | ||
T0 0.0 | ||
TSTOP 1000.0 | ||
DT 0.00034223134839151266 | ||
ISTEP_OUT 2922 | ||
ISTEP_DUMP 2922 | ||
OUT_FORM XV | ||
OUT_TYPE REAL8 | ||
OUT_STAT UNKNOWN | ||
IN_TYPE ASCII | ||
PL_IN pl.swifter.in | ||
TP_IN tp.swifter.in | ||
BIN_OUT bin.swifter.dat | ||
CHK_QMIN 0.004650467260962157 | ||
CHK_RMIN 0.004650467260962157 | ||
CHK_RMAX 1000.0 | ||
CHK_EJECT 1000.0 | ||
CHK_QMIN_COORD HELIO | ||
CHK_QMIN_RANGE 0.004650467260962157 1000.0 | ||
ENC_OUT enc.swifter.dat | ||
EXTRA_FORCE NO | ||
BIG_DISCARD NO | ||
CHK_CLOSE YES | ||
RHILL_PRESENT YES | ||
C 63241.07708426628 | ||
J2 4.7535806948127355e-12 | ||
J4 -2.2473967953572827e-18 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
! VERSION Swiftest parameter input | ||
T0 0.0 | ||
TSTOP 1000.0 | ||
DT 0.00034223134839151266 | ||
ISTEP_OUT 2922 | ||
ISTEP_DUMP 2922 | ||
OUT_FORM XVEL | ||
OUT_TYPE NETCDF_DOUBLE | ||
OUT_STAT UNKNOWN | ||
IN_TYPE ASCII | ||
PL_IN pl.swiftest.in | ||
TP_IN tp.swiftest.in | ||
CB_IN cb.swiftest.in | ||
BIN_OUT bin.swiftest.nc | ||
CHK_QMIN 0.004650467260962157 | ||
CHK_RMIN 0.004650467260962157 | ||
CHK_RMAX 1000.0 | ||
CHK_EJECT 1000.0 | ||
CHK_QMIN_COORD HELIO | ||
CHK_QMIN_RANGE 0.004650467260962157 1000.0 | ||
MU2KG 1.988409870698051e+30 | ||
TU2S 31557600.0 | ||
DU2M 149597870700.0 | ||
IN_FORM EL | ||
EXTRA_FORCE NO | ||
BIG_DISCARD NO | ||
CHK_CLOSE YES | ||
RHILL_PRESENT YES | ||
FRAGMENTATION NO | ||
ROTATION NO | ||
TIDES NO | ||
ENERGY NO | ||
GR YES | ||
INTERACTION_LOOPS ADAPTIVE | ||
ENCOUNTER_CHECK ADAPTIVE | ||
GMTINY 1e-7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
9 | ||
0 39.476926408897626 | ||
0.0 0.0 0.0 | ||
0.0 0.0 0.0 | ||
1 6.5537098095653139645e-06 0.0014751260185578720416 | ||
1.6306381826061645943e-05 | ||
0.22527006614756858727 0.22185515636479818946 -0.0025292250509892700606 | ||
-9.2410583833491193135 7.7546860001024244665 1.481285384055779404 | ||
2 9.663313399581537916e-05 0.006759120024335718617 | ||
4.0453784346544178454e-05 | ||
0.6401338616632904488 -0.3439628247287493945 -0.041662537354174501714 | ||
3.4536908505004217623 6.4771489080253446934 -0.110257596056190005656 | ||
3 0.000120026935827952453094 0.0100446292823340959596 | ||
4.25875607065040958e-05 | ||
-0.7819504386201725499 -0.6346854491951327004 4.4451463454996458186e-05 | ||
3.8578491980751480153 -4.9026737310919641898 0.0002888700847309900442 | ||
4 1.2739802010675941456e-05 0.0072466212625671651507 | ||
2.265740805092889601e-05 | ||
-1.6500171831673979828 -0.023341429362091121319 0.039964339661466272147 | ||
0.2624112744618213919 -4.673688782463607376 -0.10439239110136837694 | ||
5 0.037692251088985676735 0.35521688466465032753 | ||
0.00046732617030490929307 | ||
-4.540785007788180394 2.8642873711036669349 0.08969619001756239107 | ||
-1.5037012644183387769 -2.204631616790602934 0.042803317383791750652 | ||
6 0.011285899820091272997 0.43538665458575465117 | ||
0.00038925687730393611812 | ||
8.9010680046292307566 2.902848867584423953 -0.40487415052930197934 | ||
-0.7439396408265333407 1.9316851317225221362 -0.004029214768814220126 | ||
7 0.0017236589478267730203 0.46987236554736915505 | ||
0.00016953449859497231466 | ||
8.1785533453299539275 17.594789418581910923 -0.04069518248189726156 | ||
-1.3149276792509819067 0.53722869521767089375 0.019051745273498437594 | ||
8 0.0020336100526728302319 0.7749718408665498732 | ||
0.000164587904124493665 | ||
29.794198627119580891 2.0446309861539178065 -0.7287194786837880578 | ||
-0.08754730406665780868 1.1492225523523839664 -0.021678684633280679721 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
8 | ||
Mercury 6.5537098095653139645e-06 0.0014751260185578720416 | ||
1.6306381826061645943e-05 | ||
0.38709858430953941744 0.20562340108970009189 7.0033025080013837638 | ||
48.296118373786072198 29.20442403952453958 338.33948746828792764 | ||
Venus 9.663313399581537916e-05 0.006759120024335718617 | ||
4.0453784346544178454e-05 | ||
0.72332975797361009906 0.006717605698865438367 3.3944392733422819042 | ||
76.60235891771118588 54.960379460829607012 200.47893395506480374 | ||
Earth 0.000120026935827952453094 0.0100446292823340959596 | ||
4.25875607065040958e-05 | ||
0.99999048745432228547 0.016714003765458580048 0.0036378626088630029375 | ||
175.0251726002310022 287.96196288125747742 114.34829340424269617 | ||
Mars 1.2739802010675941456e-05 0.0072466212625671651507 | ||
2.265740805092889601e-05 | ||
1.5237119255895350545 0.09344151133508207807 1.8474416735579008986 | ||
49.47285721247470036 286.7379771285890797 209.33967734771380265 | ||
Jupiter 0.037692251088985676735 0.35521688466465032753 | ||
0.00046732617030490929307 | ||
5.202727800851599582 0.048244977116379678117 1.3036311345700750675 | ||
100.51925884330809424 273.58984028825142332 129.5536700659941971 | ||
Saturn 0.011285899820091272997 0.43538665458575465117 | ||
0.00038925687730393611812 | ||
9.532011952667287957 0.054863298704333408884 2.4879063632803011252 | ||
113.63057816762059815 339.54673564023909194 290.89958065689040723 | ||
Uranus 0.0017236589478267730203 0.46987236554736915505 | ||
0.00016953449859497231466 | ||
19.244988382902359803 0.0479617494230129629 0.7730102596086204647 | ||
74.012580980165793676 93.595549122802268016 262.86586372775150267 | ||
Neptune 0.0020336100526728302319 0.7749718408665498732 | ||
0.000164587904124493665 | ||
30.038959912561129073 0.008955570159296157365 1.7711193542961420899 | ||
131.82211597488270627 284.47484279411258967 308.45137222693909962 |
Oops, something went wrong.