diff --git a/examples/symba_gr_test/init_cond.py b/examples/symba_gr_test/init_cond.py index a5dbe9118..fd9ac6f5d 100755 --- a/examples/symba_gr_test/init_cond.py +++ b/examples/symba_gr_test/init_cond.py @@ -46,17 +46,17 @@ 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_a = sim.ds.sel(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_pl = sim.ds.sel(id=1)['capom'].values +omega_pl = sim.ds.sel(id=1)['omega'].values +capm_pl = sim.ds.sel(id=1)['capm'].values + 1.0 -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) +capom_tp = sim.ds.sel(id=1)['capom'].values +omega_tp = sim.ds.sel(id=1)['omega'].values +capm_tp = sim.ds.sel(id=1)['capm'].values - 1.0 GMcb = sim.ds.isel(id=0)['Gmass'].values GU = swiftest.GC / (sim.param['DU2M']**3 / (sim.param['MU2KG'] * sim.param['TU2S']**2)) @@ -66,14 +66,9 @@ 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.addp([9], ['Planetesimal'], Me_a, Me_e, Me_i, capom_pl, omega_pl, capm_pl, GMpl=GM_pl, Rpl=R_pl, rhill=Rh_pl) +sim.addp([10], ['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") diff --git a/examples/symba_gr_test/param.swifter.in b/examples/symba_gr_test/param.swifter.in deleted file mode 100644 index 3f58c079b..000000000 --- a/examples/symba_gr_test/param.swifter.in +++ /dev/null @@ -1,27 +0,0 @@ -! 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 diff --git a/examples/symba_gr_test/pl.swifter.in b/examples/symba_gr_test/pl.swifter.in deleted file mode 100644 index 869b2fc13..000000000 --- a/examples/symba_gr_test/pl.swifter.in +++ /dev/null @@ -1,40 +0,0 @@ -10 -0 39.476926408897626 -0.0 0.0 0.0 -0.0 0.0 0.0 -1 6.553709809565314146e-06 0.0014751260185578724335 -1.6306381826061645943e-05 -0.22527006614756858727 0.22185515636479818946 -0.0025292250509892700606 --9.2410583833491193135 7.7546860001024244665 1.481285384055779404 -2 9.6633133995815381836e-05 0.0067591200243357198168 -4.0453784346544178454e-05 -0.6401338616632904488 -0.3439628247287493945 -0.041662537354174501714 -3.4536908505004217623 6.4771489080253446934 -0.110257596056190005656 -3 0.000120026935827952456416 0.010044629282334098766 -4.25875607065040958e-05 --0.7819504386201725499 -0.6346854491951327004 4.4451463454996458186e-05 -3.8578491980751480153 -4.9026737310919641898 0.0002888700847309900442 -4 1.2739802010675941808e-05 0.0072466212625671666944 -2.265740805092889601e-05 --1.6500171831673979828 -0.023341429362091121319 0.039964339661466272147 -0.2624112744618213919 -4.673688782463607376 -0.10439239110136837694 -5 0.03769225108898567778 0.35521688466465040944 -0.00046732617030490929307 --4.540785007788180394 2.8642873711036669349 0.08969619001756239107 --1.5037012644183387769 -2.204631616790602934 0.042803317383791750652 -6 0.01128589982009127331 0.43538665458575473606 -0.00038925687730393611812 -8.9010680046292307566 2.902848867584423953 -0.40487415052930197934 --0.7439396408265333407 1.9316851317225221362 -0.004029214768814220126 -7 0.001723658947826773068 0.46987236554736924745 -0.00016953449859497231466 -8.1785533453299539275 17.594789418581910923 -0.04069518248189726156 --1.3149276792509819067 0.53722869521767089375 0.019051745273498437594 -8 0.0020336100526728302882 0.7749718408665500834 -0.000164587904124493665 -29.794198627119580891 2.0446309861539178065 -0.7287194786837880578 --0.08754730406665780868 1.1492225523523839664 -0.021678684633280679721 -9 1.9999999999999999095e-07 0.0004609743061784924374 -6.20967433941813041e-06 -nan nan nan -nan nan nan diff --git a/examples/symba_gr_test/pl.swiftest.in b/examples/symba_gr_test/pl.swiftest.in index 1c629790f..9d4ac811d 100644 --- a/examples/symba_gr_test/pl.swiftest.in +++ b/examples/symba_gr_test/pl.swiftest.in @@ -1,5 +1,5 @@ 9 -Mercury 6.553709809565314146e-06 0.0014751260185578724335 +Mercury 6.5537098095653139645e-06 0.0014751260185578720416 1.6306381826061645943e-05 0.38709858430953941744 0.20562340108970009189 7.0033025080013837638 48.296118373786072198 29.20442403952453958 338.33948746828792764 @@ -31,7 +31,7 @@ Neptune 0.0020336100526728302882 0.7749718408665500834 0.000164587904124493665 30.038959912561129073 0.008955570159296157365 1.7711193542961420899 131.82211597488270627 284.47484279411258967 308.45137222693909962 -Planetesimal 1.9999999999999999095e-07 0.0004609743061784924374 -6.20967433941813041e-06 +Planetesimal 1.9999999999999999095e-07 0.0004609743061784924139 +6.2096743394181305454e-06 0.38709858430953941744 0.20562340108970009189 7.0033025080013837638 -96.63690427760462853 41.241157268984508733 305.79195407738086487 +48.296118373786072198 29.20442403952453958 339.33948746828792764 diff --git a/examples/symba_gr_test/tp.swifter.in b/examples/symba_gr_test/tp.swifter.in deleted file mode 100644 index eec5bc877..000000000 --- a/examples/symba_gr_test/tp.swifter.in +++ /dev/null @@ -1,4 +0,0 @@ -1 -10 -nan nan nan -nan nan nan diff --git a/examples/symba_gr_test/tp.swiftest.in b/examples/symba_gr_test/tp.swiftest.in index 427febb15..280c363dc 100644 --- a/examples/symba_gr_test/tp.swiftest.in +++ b/examples/symba_gr_test/tp.swiftest.in @@ -1,4 +1,4 @@ 1 TestParticle 0.38709858430953941744 0.20562340108970009189 7.0033025080013837638 -91.57330105121243946 163.58917166648961938 345.1110833758885974 +48.296118373786072198 29.20442403952453958 337.33948746828792764