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

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed bad central body id in initial conditions generator. Also made XVEL the default out put type and EL the default input type
  • Loading branch information
daminton committed Aug 27, 2021
1 parent 997c791 commit 2ff7ebe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions python/swiftest/swiftest/init_cond.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def solar_system_horizons(plname, idval, param, ephemerides_start_date, ds):
rotcb = solarpole.cartesian * solarrot
Ipsun = np.array([0.0, 0.0, planetIpz['Sun']])

cbid = np.array([0])
cbid = np.array([1])
cvec = np.vstack([GMcb, Rcb, J2RP2, J4RP4, Ipsun[0], Ipsun[1], Ipsun[2], rotcb.x, rotcb.y, rotcb.z ])

# Horizons date time internal variables
Expand Down Expand Up @@ -167,7 +167,6 @@ def solar_system_horizons(plname, idval, param, ephemerides_start_date, ds):
val = -1
if key == "Sun" : # Create central body
print("Creating the Sun as a central body")
cb = []
cbframe = np.expand_dims(cvec.T, axis=0)
cbxr = xr.DataArray(cbframe, dims=dims, coords={'time': t, 'id': cbid, 'vec': clab})
cbds = cbxr.to_dataset(dim='vec')
Expand Down
4 changes: 2 additions & 2 deletions python/swiftest/swiftest/simulation_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ def __init__(self, codename="Swiftest", param_file=""):
'TP_IN': "tp.in",
'CB_IN': "cb.in",
'IN_TYPE': "ASCII",
'IN_FORM': "XV",
'IN_FORM': "EL",
'ISTEP_OUT': "1",
'ISTEP_DUMP': "1",
'BIN_OUT': "bin.dat",
'OUT_TYPE': 'REAL8',
'OUT_FORM': "EL",
'OUT_FORM': "XVEL",
'OUT_STAT': "REPLACE",
'CHK_RMAX': "-1.0",
'CHK_EJECT': "-1.0",
Expand Down

0 comments on commit 2ff7ebe

Please sign in to comment.