diff --git a/examples/symba_gr_test/init_cond.py b/examples/symba_gr_test/init_cond.py index a5dbe9118..f1d4d9591 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,8 +66,8 @@ 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" diff --git a/examples/symba_gr_test/pl.swifter.in b/examples/symba_gr_test/pl.swifter.in index dffe532c6..79553ce9d 100644 --- a/examples/symba_gr_test/pl.swifter.in +++ b/examples/symba_gr_test/pl.swifter.in @@ -1,4 +1,4 @@ -9 +10 0 39.476926408897626 0.0 0.0 0.0 0.0 0.0 0.0 @@ -34,3 +34,7 @@ 0.000164587904124493665 29.794198627119580891 2.0446309861539178065 -0.7287194786837880578 -0.08754730406665780868 1.1492225523523839664 -0.021678684633280679721 +9 1.9999999999999999095e-07 0.0004609743061784924139 +6.2096743394181305454e-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 37ebc69a0..38c0de823 100644 --- a/examples/symba_gr_test/pl.swiftest.in +++ b/examples/symba_gr_test/pl.swiftest.in @@ -1,4 +1,4 @@ -8 +9 Mercury 6.5537098095653139645e-06 0.0014751260185578720416 1.6306381826061645943e-05 0.38709858430953941744 0.20562340108970009189 7.0033025080013837638 @@ -31,3 +31,7 @@ Neptune 0.0020336100526728302319 0.7749718408665498732 0.000164587904124493665 30.038959912561129073 0.008955570159296157365 1.7711193542961420899 131.82211597488270627 284.47484279411258967 308.45137222693909962 +Planetesimal 1.9999999999999999095e-07 0.0004609743061784924139 +6.2096743394181305454e-06 +0.38709858430953941744 0.20562340108970009189 7.0033025080013837638 +48.296118373786072198 29.20442403952453958 339.33948746828792764 diff --git a/examples/symba_gr_test/tp.swifter.in b/examples/symba_gr_test/tp.swifter.in index 573541ac9..eec5bc877 100644 --- a/examples/symba_gr_test/tp.swifter.in +++ b/examples/symba_gr_test/tp.swifter.in @@ -1 +1,4 @@ -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 573541ac9..280c363dc 100644 --- a/examples/symba_gr_test/tp.swiftest.in +++ b/examples/symba_gr_test/tp.swiftest.in @@ -1 +1,4 @@ -0 +1 +TestParticle +0.38709858430953941744 0.20562340108970009189 7.0033025080013837638 +48.296118373786072198 29.20442403952453958 337.33948746828792764