From 5995943df47d7912e4896a9ce9a0a71e92b1c6a5 Mon Sep 17 00:00:00 2001 From: David A Minton Date: Tue, 6 Dec 2022 10:10:00 -0500 Subject: [PATCH] Removed notebook --- .../Basic_Simulation/initial_conditions.ipynb | 190 ------------------ 1 file changed, 190 deletions(-) delete mode 100644 examples/Basic_Simulation/initial_conditions.ipynb diff --git a/examples/Basic_Simulation/initial_conditions.ipynb b/examples/Basic_Simulation/initial_conditions.ipynb deleted file mode 100644 index 60581d22a..000000000 --- a/examples/Basic_Simulation/initial_conditions.ipynb +++ /dev/null @@ -1,190 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "id": "2c4f59ea-1251-49f6-af1e-5695d7e25500", - "metadata": {}, - "outputs": [], - "source": [ - "import swiftest\n", - "import numpy as np\n", - "from numpy.random import default_rng\n", - "%env OMP_NUM_THREADS=4" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "6054c7ab-c748-4b39-9fee-d8b27326f497", - "metadata": {}, - "outputs": [], - "source": [ - "# Initialize the simulation object as a variable\n", - "sim = swiftest.Simulation(fragmentation=True, minimum_fragment_mass = 2.5e-11, mtiny=2.5e-8)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "1c122676-bacb-447c-bc37-5ef8019be0d0", - "metadata": {}, - "outputs": [], - "source": [ - "# Add the modern planets and the Sun using the JPL Horizons Database\n", - "sim.add_solar_system_body([\"Sun\",\"Mercury\",\"Venus\",\"Earth\",\"Mars\",\"Jupiter\",\"Saturn\",\"Uranus\",\"Neptune\",\"Pluto\"])" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "97fe9f16-bc2e-443c-856b-7dacb1267f2d", - "metadata": {}, - "outputs": [], - "source": [ - "# Add 5 user-defined massive bodies\n", - "npl = 5\n", - "density_pl = 3000.0 / (sim.param['MU2KG'] / sim.param['DU2M'] ** 3)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "566a742e-3935-484d-9c7a-87310b6aaa3a", - "metadata": {}, - "outputs": [], - "source": [ - "name_pl = [\"MassiveBody_01\", \"MassiveBody_02\", \"MassiveBody_03\", \"MassiveBody_04\", \"MassiveBody_05\"]\n", - "a_pl = default_rng().uniform(0.3, 1.5, npl)\n", - "e_pl = default_rng().uniform(0.0, 0.3, npl)\n", - "inc_pl = default_rng().uniform(0.0, 90, npl)\n", - "capom_pl = default_rng().uniform(0.0, 360.0, npl)\n", - "omega_pl = default_rng().uniform(0.0, 360.0, npl)\n", - "capm_pl = default_rng().uniform(0.0, 360.0, npl)\n", - "GM_pl = (np.array([6e23, 8e23, 1e24, 3e24, 5e24]) / sim.param['MU2KG']) * sim.GU\n", - "R_pl = np.full(npl, (3 * (GM_pl / sim.GU) / (4 * np.pi * density_pl)) ** (1.0 / 3.0))\n", - "Rh_pl = a_pl * ((GM_pl) / (3 * sim.GU)) ** (1.0 / 3.0)\n", - "Ip_pl = np.full((npl,3),0.4,)\n", - "rot_pl = np.zeros((npl,3))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "d2c14121-e5b4-45bd-99a7-acde0ee77955", - "metadata": {}, - "outputs": [], - "source": [ - "sim.add_body(name=name_pl, a=a_pl, e=e_pl, inc=inc_pl, capom=capom_pl, omega=omega_pl, capm=capm_pl, Gmass=GM_pl, radius=R_pl, rhill=Rh_pl, Ip=Ip_pl, rot=rot_pl)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "b3f979b3-5238-492f-8589-0cf5d9a3c2bc", - "metadata": {}, - "outputs": [], - "source": [ - "# Add 10 user-defined test particles\n", - "ntp = 10" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "5777c1bb-8c91-452a-8869-ce6f951b33a3", - "metadata": {}, - "outputs": [], - "source": [ - "name_tp = [\"TestParticle_01\", \"TestParticle_02\", \"TestParticle_03\", \"TestParticle_04\", \"TestParticle_05\", \"TestParticle_06\", \"TestParticle_07\", \"TestParticle_08\", \"TestParticle_09\", \"TestParticle_10\"]\n", - "a_tp = default_rng().uniform(0.3, 1.5, ntp)\n", - "e_tp = default_rng().uniform(0.0, 0.3, ntp)\n", - "inc_tp = default_rng().uniform(0.0, 90, ntp)\n", - "capom_tp = default_rng().uniform(0.0, 360.0, ntp)\n", - "omega_tp = default_rng().uniform(0.0, 360.0, ntp)\n", - "capm_tp = default_rng().uniform(0.0, 360.0, ntp)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "8df4bcb7-46a6-402a-b10f-f37c55a0fdee", - "metadata": {}, - "outputs": [], - "source": [ - "sim.add_body(name=name_tp, a=a_tp, e=e_tp, inc=inc_tp, capom=capom_tp, omega=omega_tp, capm=capm_tp)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "135bd3f8-0a56-4d62-b728-f150debc1a76", - "metadata": {}, - "outputs": [], - "source": [ - "# Display the run configuration parameters\n", - "p = sim.get_parameter()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "fd30638b-6868-4162-bc05-1011bb255968", - "metadata": {}, - "outputs": [], - "source": [ - "# Run the simulation\n", - "sim.run(tstart=0.0, tstop=1.0e3, dt=0.01, tstep_out=1.0e0, dump_cadence=0)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "02a8911d-3b2c-415c-9290-bf1519a3f5c6", - "metadata": {}, - "outputs": [], - "source": [ - "sim.ic" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "5f8d1ac3-5ad0-4b8a-ad9d-1b63486920aa", - "metadata": {}, - "outputs": [], - "source": [ - "sim.data" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "fb93805d-377b-47d6-a565-c26acd2a7cbc", - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python (My debug_env Kernel)", - "language": "python", - "name": "debug_env" - }, - "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.8.5" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -}