{ "metadata": { "name": "", "signature": "sha256:2176e7d2f87c392e2941daf45b3cb07a6546352d6c3a3f0ef8bea5a926b21611" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Visualizing the Grand Tack Scenerio in Uniview" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The Grand Tack Scenerio is a model for planetary migration in the early solar system that was published by Walsh et. al in 2011 in Nature. In this model Jupiter migrates all the way inward to 1.5 AU (Mars' current orbit), Saturn migrates in later, gets caught in a 3:2 resonance with Jupiter and then both planets migrate back out.\n", "\n", "This model explains a numbers of longstanding questions such as the low mass of Mars, and why the Asteroid belt contains both rocky and icy objects." ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Acquire Data" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The data was captured from figure 1. of the Nature paper:\n", "\n", "Data for each of the four lines was captured using WebPlotDigitizer and saved as a csv file." ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Process Data" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The following python code converts the four csv files into a single USES style data file. Each line contains the beginning and ending values for semimajor radius as well as the time. A fifth value indicates the planet and the last four values are unused." ] }, { "cell_type": "heading", "level": 6, "metadata": {}, "source": [ "Initalize parameters and open file for writing" ] }, { "cell_type": "code", "collapsed": false, "input": [ "tvals=[0]\n", "avals=[0]\n", "platform=0.1#define length of tme to hold visualization before first and after last frame\n", "writeFile=open(\"GrandTack\\GrandTack.raw\",'w')" ], "language": "python", "metadata": {}, "outputs": [] }, { "cell_type": "heading", "level": 6, "metadata": {}, "source": [ "Subroutine to read capture data file for a planet and append to a USES style output file" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Read data file\n", "def processDataCapture(fileName,planetNo):\n", " file = open(fileName,'r')\n", " for line in file:\n", " elements=line.split(',')\n", " tvals.append(float(elements[0])/1000000.)\n", " avals.append(float(elements[1]))\n", " tvals[0]=tvals[1]-platform\n", " avals[0]=avals[1]\n", " tvals.append(tvals[len(tvals)-1]+platform)\n", " avals.append(avals[len(avals)-1])\n", " for i in range(len(tvals)-1):\n", " deltaT = (tvals[i]-tvals[i+1])\n", " outstr = \"{0:8.6f} {1:8.6f} {2:9.7f} {3:9.7f} {4} 1 2 3 4\\n\".format(avals[i],avals[i+1],tvals[i],deltaT,planetNo)\n", " writeFile.write(outstr) " ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 1 }, { "cell_type": "heading", "level": 6, "metadata": {}, "source": [ "Process data files for Jupiter, Saturn, Uranus and Neptune" ] }, { "cell_type": "code", "collapsed": false, "input": [ "processDataCapture(\"GrandTackData\\Jupiter.csv\",5)\n", "processDataCapture(\"GrandTackData\\Saturn.csv\",6)\n", "processDataCapture(\"GrandTackData\\Uranus.csv\",7)\n", "processDataCapture(\"GrandTackData\\Neptune.csv\",8)\n", "writeFile.close()" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 73 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Graphics Shaders" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The geometry shader does the work here. Each geometry element contains the starting and ending point for the planet's semimajor radius. If the time falls within the timestep a circular orbit line is drawn at the interpolated radius (with color given by the planet)." ] }, { "cell_type": "heading", "level": 6, "metadata": {}, "source": [ "evolvingOrbit_geometry.glsl" ] } ], "metadata": {} } ] }