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

Commit

Permalink
Merge branch 'debug' into CMAKE
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Oct 21, 2022
2 parents 97b015d + 40232d2 commit c10edab
Show file tree
Hide file tree
Showing 7 changed files with 252 additions and 201 deletions.
43 changes: 43 additions & 0 deletions examples/helio_neptune_pluto/init_cond.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/usr/bin/env python3
import swiftest

sim = swiftest.Simulation(readbin=False)
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'] = 20
sim.param['ISTEP_DUMP'] = 20
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['ENERGY'] = "YES"
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 c10edab

Please sign in to comment.