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

Commit

Permalink
Updated initial conditions file for symba_gr_test to place the test p…
Browse files Browse the repository at this point in the history
…article and planetesimal on encounters initially
  • Loading branch information
daminton committed Dec 14, 2021
1 parent f6e1a9e commit ada0fef
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 13 deletions.
18 changes: 9 additions & 9 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,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"
Expand Down
6 changes: 5 additions & 1 deletion examples/symba_gr_test/pl.swifter.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
9
10
0 39.476926408897626
0.0 0.0 0.0
0.0 0.0 0.0
Expand Down Expand Up @@ -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
6 changes: 5 additions & 1 deletion examples/symba_gr_test/pl.swiftest.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
8
9
Mercury 6.5537098095653139645e-06 0.0014751260185578720416
1.6306381826061645943e-05
0.38709858430953941744 0.20562340108970009189 7.0033025080013837638
Expand Down Expand Up @@ -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
5 changes: 4 additions & 1 deletion examples/symba_gr_test/tp.swifter.in
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
0
1
10
nan nan nan
nan nan nan
5 changes: 4 additions & 1 deletion examples/symba_gr_test/tp.swiftest.in
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
0
1
TestParticle
0.38709858430953941744 0.20562340108970009189 7.0033025080013837638
48.296118373786072198 29.20442403952453958 337.33948746828792764

0 comments on commit ada0fef

Please sign in to comment.