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
Updated test Notebook
  • Loading branch information
daminton committed Nov 11, 2022
1 parent eee8bc6 commit cd0d93f
Showing 1 changed file with 143 additions and 0 deletions.
143 changes: 143 additions & 0 deletions examples/Basic_Simulation/test_io.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "86c845ce-1801-46ca-8a8a-1cabb266e6a6",
"metadata": {},
"outputs": [],
"source": [
"import swiftest\n",
"import xarray as xr\n",
"import numpy as np\n",
"import os"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "d716c371-8eb4-4fc1-82af-8b5c444c831e",
"metadata": {},
"outputs": [],
"source": [
"sim = swiftest.Simulation()"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "83cebbc1-387b-4ef5-b96e-76856b6672e5",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"integrator symba\n",
"codename Swiftest\n",
"driver_executable /Users/daminton/git/swiftest/build/swiftest_driver\n",
"t0 0.0 y\n",
"tstart 0.0 y\n",
"tstop NOT SET\n",
"dt NOT SET\n",
"istep_out NOT SET\n",
"istep_dump NOT SET\n",
"init_cond_file_type NETCDF_DOUBLE\n",
"init_cond_format EL\n",
"init_cond_file_name init_cond.nc\n",
"output_file_type NETCDF_DOUBLE\n",
"output_file_name bin.nc\n",
"output_format XVEL\n",
"rmin 0.004650467260962157 AU\n",
"rmax 10000.0 AU\n",
"qmin_coord HELIO\n",
"MU: MSun 1.988409870698051e+30 kg / MSun\n",
"DU: AU 149597870700.0 m / AU\n",
"TU: y 31557600.0 s / y\n",
"close_encounter_check True\n",
"general_relativity True\n",
"fragmentation True\n",
"rotation True\n",
"compute_conservation_values False\n",
"extra_force False\n",
"big_discard False\n",
"rhill_present False\n",
"restart False\n",
"interaction_loops TRIANGULAR\n",
"encounter_check_loops TRIANGULAR\n",
"ephemeris_date 2027-04-30\n"
]
},
{
"data": {
"text/plain": [
"{'! VERSION': 'Swiftest parameter input',\n",
" 'T0': 0.0,\n",
" 'TSTART': 0.0,\n",
" 'IN_TYPE': 'NETCDF_DOUBLE',\n",
" 'IN_FORM': 'EL',\n",
" 'NC_IN': 'init_cond.nc',\n",
" 'OUT_TYPE': 'NETCDF_DOUBLE',\n",
" 'BIN_OUT': 'bin.nc',\n",
" 'OUT_FORM': 'XVEL',\n",
" 'CHK_RMIN': 0.004650467260962157,\n",
" 'CHK_RMAX': 10000.0,\n",
" 'CHK_QMIN_COORD': 'HELIO',\n",
" 'CHK_QMIN': 0.004650467260962157,\n",
" 'CHK_QMIN_RANGE': '0.004650467260962157 10000.0',\n",
" 'MU2KG': 1.988409870698051e+30,\n",
" 'DU2M': 149597870700.0,\n",
" 'TU2S': 31557600.0,\n",
" 'CHK_CLOSE': True,\n",
" 'GR': True,\n",
" 'FRAGMENTATION': True,\n",
" 'ROTATION': True,\n",
" 'ENERGY': False,\n",
" 'EXTRA_FORCE': False,\n",
" 'BIG_DISCARD': False,\n",
" 'RHILL_PRESENT': False,\n",
" 'RESTART': False,\n",
" 'INTERACTION_LOOPS': 'TRIANGULAR',\n",
" 'ENCOUNTER_CHECK': 'TRIANGULAR'}"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sim.get_parameter()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "ec7452d6-4c9b-4df3-acc0-b11c32264b91",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.13"
}
},
"nbformat": 4,
"nbformat_minor": 5
}

0 comments on commit cd0d93f

Please sign in to comment.