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

Commit

Permalink
Merge branch 'debug'
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Dec 14, 2021
2 parents ef33dd6 + bff9918 commit cb2b75d
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 90 deletions.
23 changes: 9 additions & 14 deletions examples/symba_gr_test/init_cond.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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")


27 changes: 0 additions & 27 deletions examples/symba_gr_test/param.swifter.in

This file was deleted.

40 changes: 0 additions & 40 deletions examples/symba_gr_test/pl.swifter.in

This file was deleted.

8 changes: 4 additions & 4 deletions examples/symba_gr_test/pl.swiftest.in
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
4 changes: 0 additions & 4 deletions examples/symba_gr_test/tp.swifter.in

This file was deleted.

2 changes: 1 addition & 1 deletion examples/symba_gr_test/tp.swiftest.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
1
TestParticle
0.38709858430953941744 0.20562340108970009189 7.0033025080013837638
91.57330105121243946 163.58917166648961938 345.1110833758885974
48.296118373786072198 29.20442403952453958 337.33948746828792764

0 comments on commit cb2b75d

Please sign in to comment.