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

Commit

Permalink
Fixed example file for RMVS so that it dumps to file less in Swiftest…
Browse files Browse the repository at this point in the history
…. Timing now doesn't work properly
  • Loading branch information
daminton committed Sep 27, 2021
1 parent 968472a commit 3d116e4
Show file tree
Hide file tree
Showing 14 changed files with 251 additions and 222 deletions.
2 changes: 1 addition & 1 deletion examples/rmvs_swifter_comparison/8pl_16tp_encounters/cb.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
0
Sun
0.00029591220819207774
0.004650467260962157
4.7535806948127355e-12
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
0
Sun
0.00029591220819207774
0.004650467260962157
4.7535806948127355e-12
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
swiftest_input = "param.swiftest.in"
swiftest_pl = "pl.swiftest.in"
swiftest_cb = "cb.swiftest.in"
swiftest_bin = "bin.swiftest.dat"
swiftest_bin = "bin.swiftest.nc"
swiftest_enc = "enc.swiftest.dat"
swiftest_disc = "discard.swiftest.out"

Expand All @@ -27,14 +27,13 @@
sim.param['DT'] = 1.0
sim.param['TSTOP'] = 365.25e2
sim.param['ISTEP_OUT'] = 10
sim.param['ISTEP_DUMP'] = 10
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_FORM'] = "XV"
sim.param['IN_FORM'] = "XV"
sim.param['OUT_STAT'] = "UNKNOWN"
sim.param['GR'] = 'NO'
sim.param['CHK_CLOSE'] = 'YES'
Expand Down Expand Up @@ -68,10 +67,11 @@
dims = ['time', 'id', 'vec']
tp = []
t = np.array([0.0])
sim.param['OUT_FORM'] = "XV"
clab, plab, tlab = swio.make_swiftest_labels(sim.param)

# For each planet, we will initialize a pair of test particles. One on its way in, and one on its way out. We will also initialize two additional particles that don't encounter anything
tpnames = np.arange(101, 101 + ntp)
tpnames = np.arange(npl + 1, npl + 1 + ntp)
tpxv1 = np.empty((6))
tpxv2 = np.empty((6))

Expand Down Expand Up @@ -120,6 +120,7 @@
sim.ds = xr.combine_by_coords([sim.ds, tpds])
swio.swiftest_xr2infile(sim.ds, sim.param)

sim.param['ISTEP_DUMP'] = 1000
sim.param['PL_IN'] = swiftest_pl
sim.param['TP_IN'] = tpin
sim.param['CB_IN'] = swiftest_cb
Expand All @@ -128,6 +129,7 @@
sim.param['DISCARD_OUT'] = swiftest_disc
sim.save(swiftest_input)

sim.param['ISTEP_DUMP'] = 10
sim.param['PL_IN'] = swifter_pl
sim.param['TP_IN'] = tpin
sim.param['BIN_OUT'] = swifter_bin
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
! VERSION Swifter parameter file converted from Swiftest
T0 0.0
TSTOP 9500.0
TSTOP 36525.0
DT 1.0
ISTEP_OUT 100
ISTEP_DUMP 100
ISTEP_OUT 10
ISTEP_DUMP 10
OUT_FORM XV
OUT_TYPE REAL8
OUT_STAT UNKNOWN
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
! VERSION Swiftest parameter input
T0 0.0
TSTOP 9500.0
TSTOP 36525.0
DT 1.0
ISTEP_OUT 100
ISTEP_DUMP 100
ISTEP_OUT 10
ISTEP_DUMP 1000
OUT_FORM XV
OUT_TYPE REAL8
OUT_TYPE NETCDF_DOUBLE
OUT_STAT UNKNOWN
IN_TYPE ASCII
PL_IN pl.swiftest.in
TP_IN tp.in
CB_IN cb.swiftest.in
BIN_OUT bin.swiftest.dat
BIN_OUT bin.swiftest.nc
CHK_QMIN 0.004650467260962157
CHK_RMIN 0.004650467260962157
CHK_RMAX 1000.0
Expand All @@ -21,6 +21,7 @@ CHK_QMIN_RANGE 0.004650467260962157 1000.0
MU2KG 1.988409870698051e+30
TU2S 86400
DU2M 149597870700.0
IN_FORM XV
ENC_OUT enc.swiftest.dat
EXTRA_FORCE NO
DISCARD_OUT discard.swiftest.out
Expand Down
48 changes: 24 additions & 24 deletions examples/rmvs_swifter_comparison/8pl_16tp_encounters/pl.in
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
8
1 4.9125474498983623693e-11 0.0014751244935834097723
Mercury 4.9125474498983623693e-11 0.0014751310862809727629
1.6306381826061645943e-05
-0.37723213134178928962 0.033583006382262102496 0.037347605390151236704
-0.008342765357522348782 -0.026815373891535949219 -0.0014259978126226569104
2 7.243452483873646905e-10 0.006759064884572926305
0.3145650549772632254 -0.2555573396958932264 -0.04973776595957409008
0.012185837286798669593 0.023148338651330341298 0.0007738432831418731988
Venus 7.243452483873646905e-10 0.006759109593536554028
4.0453784346544178454e-05
-0.48772324783973242113 -0.53438159383885197595 0.020810210727290629623
0.014797158412775200664 -0.013730742274988789325 -0.0010423161661001279551
3 8.9970113821660187435e-10 0.01004492566381686821
0.387431535393453097 -0.615766685385218282 -0.030807691817795201245
0.016984136843969918629 0.010701026081884959518 -0.00083320727407271925197
Earth 8.9970113821660187435e-10 0.010044870735102664462
4.25875607065040958e-05
0.75635861236241797023 -0.674672320414933413 2.9482164814591560215e-05
0.0111724732704936106226 0.0127745538308708106445 -6.4922715710692383536e-07
4 9.549535102761465607e-11 0.007246661019460395855
1.0001792791661539006 0.06668748161964906107 -6.9475367832576531254e-06
-0.0014241429939451050266 0.01710181935138167103 -8.172724609833309663e-07
Mars 9.549535102761465607e-11 0.0072464333631564068194
2.265740805092889601e-05
-1.6298746849997449715 0.3207423054955682029 0.04670239471945906301
-0.0021807443711779391643 -0.012535287802970449672 -0.00020920945169970240392
5 2.825345908631354893e-07 0.3552709189640263194
-1.6139182001611360739 -0.2770999554367851725 0.033781809741611629194
0.0028882147021094439938 -0.01259648691593238945 -0.00033483851552870507427
Jupiter 2.825345908631354893e-07 0.3552700143333522151
0.00046732617030490929307
4.173466317007961557 -2.8016935252076420326 -0.081737437087388009616
0.0041198995131368296857 0.0066275220486694394126 -0.000119701756809504006665
6 8.459715183006415395e-08 0.43765971211410006393
4.3561675102222698897 -2.483239946173660062 -0.0871477099729481286
0.0036506744364301680662 0.006918211883976329267 -0.00011041076017508120262
Saturn 8.459715183006415395e-08 0.4376659280804963441
0.00038925687730393611812
6.414531809550852337 -7.603234575912382276 -0.12309230194363039723
0.0039583234912346160553 0.003591394820962775982 -0.00021992254044702681153
7 1.2920249163736673626e-08 0.4696151691794380732
6.598405456116825718 -7.431912424938192707 -0.13338632598447389133
0.0038655905358352319993 0.0036985431667748399145 -0.00021809450985937309415
Uranus 1.2920249163736673626e-08 0.4697589307107089155
0.00016953449859497231466
14.779979482167510341 13.088063528768900667 -0.14289732557134240953
-0.0026326202792006140295 0.002767798188238951903 4.424098699891899271e-05
8 1.5243589003230834323e-08 0.7813830605782720197
14.6556082971347603205 13.217600500105490369 -0.14081174740381419141
-0.0026597608840880260402 0.0027443623966001309648 4.4507838529215151932e-05
Neptune 1.5243589003230834323e-08 0.78153946280858775143
0.000164587904124493665
29.57093474400743105 -4.53865809805519671 -0.5880859062837571205
0.00046012900387533010914 0.0031291067120909890273 -7.4950441013985698475e-05
29.592188021966471467 -4.391525979010755698 -0.5916011673528802639
0.0004442402958062029259 0.0031318140342659721298 -7.463341927949002162e-05
50 changes: 25 additions & 25 deletions examples/rmvs_swifter_comparison/8pl_16tp_encounters/pl.swifter.in
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
9
0 0.00029591220819207775568
0 0.00029591220819207774
0.0 0.0 0.0
0.0 0.0 0.0
1 4.9125474498983623693e-11 0.0014751244935834097723
1 4.9125474498983623693e-11 0.0014751310862809727629
1.6306381826061645943e-05
-0.37723213134178928962 0.033583006382262102496 0.037347605390151236704
-0.008342765357522348782 -0.026815373891535949219 -0.0014259978126226569104
2 7.243452483873646905e-10 0.006759064884572926305
0.3145650549772632254 -0.2555573396958932264 -0.04973776595957409008
0.012185837286798669593 0.023148338651330341298 0.0007738432831418731988
2 7.243452483873646905e-10 0.006759109593536554028
4.0453784346544178454e-05
-0.48772324783973242113 -0.53438159383885197595 0.020810210727290629623
0.014797158412775200664 -0.013730742274988789325 -0.0010423161661001279551
3 8.9970113821660187435e-10 0.01004492566381686821
0.387431535393453097 -0.615766685385218282 -0.030807691817795201245
0.016984136843969918629 0.010701026081884959518 -0.00083320727407271925197
3 8.9970113821660187435e-10 0.010044870735102664462
4.25875607065040958e-05
0.75635861236241797023 -0.674672320414933413 2.9482164814591560215e-05
0.0111724732704936106226 0.0127745538308708106445 -6.4922715710692383536e-07
4 9.549535102761465607e-11 0.007246661019460395855
1.0001792791661539006 0.06668748161964906107 -6.9475367832576531254e-06
-0.0014241429939451050266 0.01710181935138167103 -8.172724609833309663e-07
4 9.549535102761465607e-11 0.0072464333631564068194
2.265740805092889601e-05
-1.6298746849997449715 0.3207423054955682029 0.04670239471945906301
-0.0021807443711779391643 -0.012535287802970449672 -0.00020920945169970240392
5 2.825345908631354893e-07 0.3552709189640263194
-1.6139182001611360739 -0.2770999554367851725 0.033781809741611629194
0.0028882147021094439938 -0.01259648691593238945 -0.00033483851552870507427
5 2.825345908631354893e-07 0.3552700143333522151
0.00046732617030490929307
4.173466317007961557 -2.8016935252076420326 -0.081737437087388009616
0.0041198995131368296857 0.0066275220486694394126 -0.000119701756809504006665
6 8.459715183006415395e-08 0.43765971211410006393
4.3561675102222698897 -2.483239946173660062 -0.0871477099729481286
0.0036506744364301680662 0.006918211883976329267 -0.00011041076017508120262
6 8.459715183006415395e-08 0.4376659280804963441
0.00038925687730393611812
6.414531809550852337 -7.603234575912382276 -0.12309230194363039723
0.0039583234912346160553 0.003591394820962775982 -0.00021992254044702681153
7 1.2920249163736673626e-08 0.4696151691794380732
6.598405456116825718 -7.431912424938192707 -0.13338632598447389133
0.0038655905358352319993 0.0036985431667748399145 -0.00021809450985937309415
7 1.2920249163736673626e-08 0.4697589307107089155
0.00016953449859497231466
14.779979482167510341 13.088063528768900667 -0.14289732557134240953
-0.0026326202792006140295 0.002767798188238951903 4.424098699891899271e-05
8 1.5243589003230834323e-08 0.7813830605782720197
14.6556082971347603205 13.217600500105490369 -0.14081174740381419141
-0.0026597608840880260402 0.0027443623966001309648 4.4507838529215151932e-05
8 1.5243589003230834323e-08 0.78153946280858775143
0.000164587904124493665
29.57093474400743105 -4.53865809805519671 -0.5880859062837571205
0.00046012900387533010914 0.0031291067120909890273 -7.4950441013985698475e-05
29.592188021966471467 -4.391525979010755698 -0.5916011673528802639
0.0004442402958062029259 0.0031318140342659721298 -7.463341927949002162e-05
48 changes: 24 additions & 24 deletions examples/rmvs_swifter_comparison/8pl_16tp_encounters/pl.swiftest.in
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
8
1 4.9125474498983623693e-11 0.0014751244935834097723
Mercury 4.9125474498983623693e-11 0.0014751310862809727629
1.6306381826061645943e-05
-0.37723213134178928962 0.033583006382262102496 0.037347605390151236704
-0.008342765357522348782 -0.026815373891535949219 -0.0014259978126226569104
2 7.243452483873646905e-10 0.006759064884572926305
0.3145650549772632254 -0.2555573396958932264 -0.04973776595957409008
0.012185837286798669593 0.023148338651330341298 0.0007738432831418731988
Venus 7.243452483873646905e-10 0.006759109593536554028
4.0453784346544178454e-05
-0.48772324783973242113 -0.53438159383885197595 0.020810210727290629623
0.014797158412775200664 -0.013730742274988789325 -0.0010423161661001279551
3 8.9970113821660187435e-10 0.01004492566381686821
0.387431535393453097 -0.615766685385218282 -0.030807691817795201245
0.016984136843969918629 0.010701026081884959518 -0.00083320727407271925197
Earth 8.9970113821660187435e-10 0.010044870735102664462
4.25875607065040958e-05
0.75635861236241797023 -0.674672320414933413 2.9482164814591560215e-05
0.0111724732704936106226 0.0127745538308708106445 -6.4922715710692383536e-07
4 9.549535102761465607e-11 0.007246661019460395855
1.0001792791661539006 0.06668748161964906107 -6.9475367832576531254e-06
-0.0014241429939451050266 0.01710181935138167103 -8.172724609833309663e-07
Mars 9.549535102761465607e-11 0.0072464333631564068194
2.265740805092889601e-05
-1.6298746849997449715 0.3207423054955682029 0.04670239471945906301
-0.0021807443711779391643 -0.012535287802970449672 -0.00020920945169970240392
5 2.825345908631354893e-07 0.3552709189640263194
-1.6139182001611360739 -0.2770999554367851725 0.033781809741611629194
0.0028882147021094439938 -0.01259648691593238945 -0.00033483851552870507427
Jupiter 2.825345908631354893e-07 0.3552700143333522151
0.00046732617030490929307
4.173466317007961557 -2.8016935252076420326 -0.081737437087388009616
0.0041198995131368296857 0.0066275220486694394126 -0.000119701756809504006665
6 8.459715183006415395e-08 0.43765971211410006393
4.3561675102222698897 -2.483239946173660062 -0.0871477099729481286
0.0036506744364301680662 0.006918211883976329267 -0.00011041076017508120262
Saturn 8.459715183006415395e-08 0.4376659280804963441
0.00038925687730393611812
6.414531809550852337 -7.603234575912382276 -0.12309230194363039723
0.0039583234912346160553 0.003591394820962775982 -0.00021992254044702681153
7 1.2920249163736673626e-08 0.4696151691794380732
6.598405456116825718 -7.431912424938192707 -0.13338632598447389133
0.0038655905358352319993 0.0036985431667748399145 -0.00021809450985937309415
Uranus 1.2920249163736673626e-08 0.4697589307107089155
0.00016953449859497231466
14.779979482167510341 13.088063528768900667 -0.14289732557134240953
-0.0026326202792006140295 0.002767798188238951903 4.424098699891899271e-05
8 1.5243589003230834323e-08 0.7813830605782720197
14.6556082971347603205 13.217600500105490369 -0.14081174740381419141
-0.0026597608840880260402 0.0027443623966001309648 4.4507838529215151932e-05
Neptune 1.5243589003230834323e-08 0.78153946280858775143
0.000164587904124493665
29.57093474400743105 -4.53865809805519671 -0.5880859062837571205
0.00046012900387533010914 0.0031291067120909890273 -7.4950441013985698475e-05
29.592188021966471467 -4.391525979010755698 -0.5916011673528802639
0.0004442402958062029259 0.0031318140342659721298 -7.463341927949002162e-05
Loading

0 comments on commit 3d116e4

Please sign in to comment.