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
Added a new example that adds Neptune and Pluto to a Helio run. I had to do a lot of maintenence on the initial conditions generators in the Python side of things in order to get it to generate properly
  • Loading branch information
daminton committed Oct 18, 2022
1 parent 4738e4b commit 8a00b7a
Show file tree
Hide file tree
Showing 5 changed files with 266 additions and 188 deletions.
42 changes: 42 additions & 0 deletions examples/helio_neptune_pluto/init_cond.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/usr/bin/env python3
import swiftest

sim = swiftest.Simulation()
sim.param['IN_TYPE'] = "NETCDF_DOUBLE"
sim.param['NC_IN'] = "init_cond.nc"
sim.param['IN_FORM'] = "XV"
sim.param['BIN_OUT'] = "bin.nc"
sim.param['OUT_FORM'] = "XVEL"
sim.param['OUT_TYPE'] = "NETCDF_DOUBLE"

sim.param['MU2KG'] = swiftest.MSun
sim.param['TU2S'] = swiftest.YR2S
sim.param['DU2M'] = swiftest.AU2M
sim.param['T0'] = 0.0
sim.param['DT'] = 5.0
sim.param['TSTOP'] = 1.e5
sim.param['ISTEP_OUT'] = 100
sim.param['ISTEP_DUMP'] = 100
sim.param['CHK_QMIN_COORD'] = "HELIO"
sim.param['CHK_QMIN'] = swiftest.RSun / swiftest.AU2M
sim.param['CHK_QMIN_RANGE'] = f"{swiftest.RSun / swiftest.AU2M} 1000.0"
sim.param['CHK_RMIN'] = swiftest.RSun / swiftest.AU2M
sim.param['CHK_RMAX'] = 1000.0
sim.param['CHK_EJECT'] = 1000.0
sim.param['OUT_STAT'] = "REPLACE"
sim.param['RHILL_PRESENT'] = "NO"
sim.param['GR'] = 'NO'
sim.param['CHK_CLOSE'] = "NO"

bodyid = {
"Sun": 0,
"Neptune": 8,
"Pluto" : 9
}

for name, id in bodyid.items():
sim.add(name, idval=id, date="2027-04-30")

sim.save("param.in")


Loading

0 comments on commit 8a00b7a

Please sign in to comment.