diff --git a/MATHTYPE b/MATHTYPE deleted file mode 100644 index 691afc3..0000000 --- a/MATHTYPE +++ /dev/null @@ -1 +0,0 @@ -mp \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index 8aad172..0000000 --- a/README.md +++ /dev/null @@ -1,171 +0,0 @@ - -

nBody Scientific Modelling Project alpha-v2.0

- - By Will Roscoe -- 9th Dec 2023 - -> TODO -> - [ ] Tests for body and Engine including -> - [ ] internal testing for collisions -> - [ ] internal testing for gravity -> - [ ] body update -> - [ ] Update functions in line with new mpmath usages in -> - [ ] body.py -> - [ ] engine.py -> - [ ] visual.py -> - [ ] Importing csvs per body (opt) ----- - -The goal of this project is to efficiently simulate the gravitational and kinetic interactions between physical objects and display them in a user friendly interface. The usage of this project is Object Oriented and mean't to be flexible and easy to use. - ->### Required Packages: -> ->`math`, `re`, `datetime`, `decimal`, `multiprocessing` (Built in) -> ->`tqdm`, `numpy`, `matplotlib`, `cycler`, `astroquery`, `astropy` -> -> --- -> `scipy` is recommended but optional. - - -# Usage Guide -There are 3 main objects which a user would interact with while creating a simulation, these are: -* ### [**`Body`**](#body) : Representation of a physical object -* ### [**`PhysEngine`**](#physeng) : Representation of a system of `Body` objects and comuputes the physics. -* ### [**`Simulation`**](#simul) : Controls the output and the runtime of a `PhysEngine` object. ----- -### About Objects and Types -* There are also several other classes, `Variable`, `HistoricVariable`, `Vector` and `Hisoric Vector` which are classed as having types `VarType` and `VectorType` respectively. - -* `NoneType` is defined as the type of `None` - -

Creating Body Instances

- -The `Body` class is the representation of a physical body, like a planet or star or particle. To create a `Body`, you must pass it some parameters: -```python -new_body = Body(mass: Numeric, - init_pos: list | tuple, - init_vel: list | tuple=(0,0,0), - radius: Numeric = 0, - bounce: Numeric = 0.999, - color: str= None, - identity:str = None): -``` - - - `init_pos` and `init_vel` must be passed a **list or tuple or Vector Object** with 3 values representing the cartesian components x,y,z in **m** and **ms^-1**. - - - `mass` is required and should be passed as a **numeric**, representing the total mass of the body in **kg**. - -> - `radius` is an optional parameter, and if left as `None`, the object will not have collision dectection with other bodies or physical bounds. The units for `radius` is **m**. -> - `identity` is also optional, and defines what the label is for the body in the output. It must be passed a **string**. If left as `None`, a placeholder name will be created. -> - - -

The PhysEngine Instance

- -A `PhysEngine` instance computes and evaluates the attibutes of a set of bodies, and computes the next attributes taking into account the rest of the bodies in the instance. - -To create a `PhysEngine` you can pass it a time interval, `dt`, or leave it as default. -```python -phys = PhysEngine(dt: int | float = 1, - checking_range = int = 3): -``` -You must then load the bodies using the function: -```python -phys.attach_bodies(new_bodies:list | tuple) - #you must pass the bodies in a list or tuple. -``` ->Optionally, you can create some infinite planes parallel to a plane by passing: ->```python ->phys.create_plane(self, const_axis='z', const_val = 0) ->``` ->or induce a global accelerations by passing: ->```python ->phys.create_acceleration(accel_vector: tuple | list | VectorType) ->``` ->or make bodies relative to a body by passing: ->```python ->phys.make_relative_to(target_body: Body) ->``` -At this point, the `PhysEngine` instance is fully prepared to compute the trajectories of the bodies it was passed, which can be done using `phys.evaluate()` for as many steps as neccesary, however it works best to use the `Simulation` class to output the product to a graphical interface. - -

Creating and Using a Simulation Instance

- -A `Simulation` instance enables a user to run a `PhysEngine` easier and output an interactive GUI of the bodies' trajectories through `matplotlib`. There is only one required argument to pass to a `Simulation` instance, which is the `PhysEngine` containing the `Body` instances. -```python -sim = Simulation(name: str = 'Nbody Simulation', - engine: PhysEngine|NoneType = None,#REQUIRED - focus_body: Body|NoneType = None, - focus_range: int|float = 0.5, - autoscale: bool = True, - show_grid: bool = True, - show_shadows: bool = False, - show_acceleration: bool = False, - show_velocity: bool = False, - vector_size: int|float = 1, - labelling_type: str = 'legend', - body_model: str = 'dots', - guistyle: str = 'default', - ) -> None: -``` -> The optional arguments are as follows: -> | Argument | Type | Default | Description | -> | ----------- | ---- |----------- | ----------- | -> | `name`| `str` | `'Nbody Simulation'`|Name of the Simulation or set of Bodies.| -> | `focus_body`| `Body` or `NoneType` | `None`|Body to keep in centre of view.| -> | `focus_range`| `int` or `float` | `0.5`| Distance to render to from location of `focus_body`.| -> | `autoscale`| `bool` |`True`|whether or not to just autoscale axes, overrides most view options.| -> | `show_grid`| `bool` |` True`|toggles grid visibility.| -> | `show_shadows`|`bool` | `False`|toggles whether to plot a 2d projection on the xy plane.| -> | `show_acceleration`| `bool` | `False`|toggles whether to draw acceleration vectors.| -> | `show_velocity`| `bool` | `False`|toggles whether to draw velocity vectors.| -> | `vector_size`| `int` or `float` | `1`|scalar multiplier of above vectors.| -> | `labelling_type`| `str` | `'legend'`|either `'legend'` or `'label'`or `None`, defines whether to label the points, create a legend, or none.| -> | `body_model`| `str` | `'dots'`|either `'dots'`, `'wireframe'` or `'surface'`, defines how to draw bodies with nonzero radii as a dot, or spherical surface.| -> | `guistyle`| `str` | `'default'`|either `'default'` or `'dark'`, controls gui theming.| - -After creating an instance, we can run the simulation and output the result using: -```python -sim.start(self, - frames: int = None, - interval: int|float = None, - duration: int|float =None, - fps: int|float=None): -``` -you must pass two or more of the functions arguments, where `interval` is in seconds. - -# The `horizons_query()` Function - -I have implemented part of the `astroquery` module to easily make simulations of objects on the JPL Horizons System, using `GET`/`POST` URL encoded requests. I have restricted the inputs to standardise the output for use in this project, but you should be able to get any body listed on the JPL Horizons System fairly easily. - -> ### Parameters -> * `searchquery` (`str`) - object ID or identifiable name of object, ie, `'Sun'`. -> * `observer` (`str`) - observer position ID. see JPL Horizons Manual for more info, default is `'0'` (Sun/Solar System Barycentric Centre). It is best to make this the reference object of your system. -> * `time` (`str`) - time to get data from. **Note: You should keep this the same for all objects in a system.** format is in MJY (YYYY-MM-DD). -> * `num_type` (`type`) - type of numerical to output information in, if needing high accuracy. Default is `float`. -> * `return_type` (`str`) how to output the result, either as a `dict` (`'dict'`), `Body` (`'body'`) or printing the result (`'print'`). - -In the case that the `searchquery` returns multiple unique objects, a list of objects should be outputted where you should enter the ID of your chosen object into the function instead. - - ### Returns - * This function will return a `Body` instance with the attributes of the queried object by default. - -> ### `horizons_batch()` -> `horizons_batch` is a function that makes it easy to iterate over multiple objects using the same constants and return an iterable containing the result. Has the exact same arguments as `horizons_query()` except the input queries should be an iterable of `str` objects. - -## Premade Examples -### `SolarSystemMB`: a Simulation of the Solar System's Major Bodies -You can initialise this simulation using its defaults by running the code below: - -```python -solarsystem = SolarSystemMB() -solarsystem.start() -``` -The options are the same as the `Simulation` Class, however autoscaling and focusing is locked to keep the Sun as the central body. - -### `BouncingBalls`: Bouncing Balls in a Box, Colliding with each other and the walls. -Similarly, we initialise and run the simulation as below: -```python -bouncingballs = BouncingBalls() -bouncingballs.start() -``` -This simulation is great at showcasing the ability for `Body` instances with non zero radius to collide with each other or physical planes. Note that the collisions may not always be accurate as the bodies collisions are modelled to be head on, and estimate collision points by evaluating positional information before and after the actual time of collision. diff --git a/data/control_data/Earth_(399).csv b/data/control_data/Earth_(399).csv new file mode 100644 index 0000000..f7a5f42 --- /dev/null +++ b/data/control_data/Earth_(399).csv @@ -0,0 +1,2 @@ +dt,posX,posY,posZ,velX,velY,velZ,accX,accY,accZ +0.0,-2951393.9933220115,-4435360.843456367,-3483113.0225114697,195.69729357532538,-196.87173142236912,84.87159332931788,0.0,0.0,0.0 diff --git a/data/control_data/Jupiter_(599).csv b/data/control_data/Jupiter_(599).csv new file mode 100644 index 0000000..d1fe613 --- /dev/null +++ b/data/control_data/Jupiter_(599).csv @@ -0,0 +1,2 @@ +dt,posX,posY,posZ,velX,velY,velZ,accX,accY,accZ +0.0,455863775604.1915,383423915654.51086,-14699693596.877295,11601.099826439779,-11982.689168930096,234.37180034364332,0.0,0.0,0.0 diff --git a/data/control_data/Mars_(499).csv b/data/control_data/Mars_(499).csv new file mode 100644 index 0000000..6c0d888 --- /dev/null +++ b/data/control_data/Mars_(499).csv @@ -0,0 +1,2 @@ +dt,posX,posY,posZ,velX,velY,velZ,accX,accY,accZ +0.0,-267481289670.40634,-270459324445.62497,187101915.94579822,39142.98412553396,-36693.49702748592,-674.3600483873778,0.0,0.0,0.0 diff --git a/data/control_data/Mercury_(199).csv b/data/control_data/Mercury_(199).csv new file mode 100644 index 0000000..a594746 --- /dev/null +++ b/data/control_data/Mercury_(199).csv @@ -0,0 +1,2 @@ +dt,posX,posY,posZ,velX,velY,velZ,accX,accY,accZ +0.0,-136081249300.89362,-162614080776.93448,-3128872415.923351,56128.09988581739,-36999.60324867996,-4387.556208406235,0.0,0.0,0.0 diff --git a/data/control_data/Neptune_(899).csv b/data/control_data/Neptune_(899).csv new file mode 100644 index 0000000..d31a7ae --- /dev/null +++ b/data/control_data/Neptune_(899).csv @@ -0,0 +1,2 @@ +dt,posX,posY,posZ,velX,velY,velZ,accX,accY,accZ +0.0,4350906860276.158,-392631134944.8321,-96764324539.04045,20519.16390902963,-17111.31324347381,-33.70830970991891,0.0,0.0,0.0 diff --git a/data/control_data/Saturn_(699).csv b/data/control_data/Saturn_(699).csv new file mode 100644 index 0000000..3e5118e --- /dev/null +++ b/data/control_data/Saturn_(699).csv @@ -0,0 +1,2 @@ +dt,posX,posY,posZ,velX,velY,velZ,accX,accY,accZ +0.0,1217264886265.7166,-697625868857.8896,-42461241442.06266,23637.313212244553,-13783.405571429108,-204.25548193561747,0.0,0.0,0.0 diff --git a/data/control_data/Sun_(10).csv b/data/control_data/Sun_(10).csv new file mode 100644 index 0000000..71c452d --- /dev/null +++ b/data/control_data/Sun_(10).csv @@ -0,0 +1,2 @@ +dt,posX,posY,posZ,velX,velY,velZ,accX,accY,accZ +0.0,-112042327677.43997,-97307648629.29941,3082213.784448803,20203.389955049013,-22579.966512096857,85.99790703758005,0.0,0.0,0.0 diff --git a/data/control_data/Uranus_(799).csv b/data/control_data/Uranus_(799).csv new file mode 100644 index 0000000..a7885a0 --- /dev/null +++ b/data/control_data/Uranus_(799).csv @@ -0,0 +1,2 @@ +dt,posX,posY,posZ,velX,velY,velZ,accX,accY,accZ +0.0,1750467803483.7131,2171614471589.0608,-15716458513.582941,14881.227894281079,-18564.63082954205,169.68319999327534,0.0,0.0,0.0 diff --git a/data/control_data/Venus_(299).csv b/data/control_data/Venus_(299).csv new file mode 100644 index 0000000..627a7db --- /dev/null +++ b/data/control_data/Venus_(299).csv @@ -0,0 +1,2 @@ +dt,posX,posY,posZ,velX,velY,velZ,accX,accY,accZ +0.0,-115819232640.34435,10257749441.75971,1698249938.0434601,-14914.32427389609,-23995.717534598847,2092.874036070772,0.0,0.0,0.0 diff --git a/data/control_data/eng_info.txt b/data/control_data/eng_info.txt new file mode 100644 index 0000000..7279e9a --- /dev/null +++ b/data/control_data/eng_info.txt @@ -0,0 +1,88 @@ +dt = 1800 +checking_range = 3 +# number of intervals: 1 +# bodies:(9) +~ do_collisions = True +~ do_bodygravity = True +~ do_fieldgravity = True +*Sun_(10) [ +name = Sun (10) +mass = 1.9885e+30 +radius = 695700000.0 +color = None +bounce = 0.999 +position = (-112042327677.43997, -97307648629.29941, 3082213.784448803) +velocity = (20203.389955049013, -22579.966512096857, 85.99790703758005) +] +*Mercury_(199) [ +name = Mercury (199) +mass = 3.3020999999999996e+23 +radius = 2440000.0 +color = None +bounce = 0.999 +position = (-136081249300.89362, -162614080776.93448, -3128872415.923351) +velocity = (56128.09988581739, -36999.60324867996, -4387.556208406235) +] +*Venus_(299) [ +name = Venus (299) +mass = 4.86851e+24 +radius = 6051840.0 +color = None +bounce = 0.999 +position = (-115819232640.34435, 10257749441.75971, 1698249938.0434601) +velocity = (-14914.32427389609, -23995.717534598847, 2092.874036070772) +] +*Earth_(399) [ +name = Earth (399) +mass = 5.97219e+24 +radius = 6371010.0 +color = None +bounce = 0.999 +position = (-2951393.9933220115, -4435360.843456367, -3483113.0225114697) +velocity = (195.69729357532538, -196.87173142236912, 84.87159332931788) +] +*Mars_(499) [ +name = Mars (499) +mass = 6.417099999999999e+23 +radius = 3389920.0 +color = None +bounce = 0.999 +position = (-267481289670.40634, -270459324445.62497, 187101915.94579822) +velocity = (39142.98412553396, -36693.49702748592, -674.3600483873778) +] +*Jupiter_(599) [ +name = Jupiter (599) +mass = 1.89818722e+27 +radius = 69911000.0 +color = None +bounce = 0.999 +position = (455863775604.1915, 383423915654.51086, -14699693596.877295) +velocity = (11601.099826439779, -11982.689168930096, 234.37180034364332) +] +*Saturn_(699) [ +name = Saturn (699) +mass = 5.6834e+26 +radius = 58232000.0 +color = None +bounce = 0.999 +position = (1217264886265.7166, -697625868857.8896, -42461241442.06266) +velocity = (23637.313212244553, -13783.405571429108, -204.25548193561747) +] +*Uranus_(799) [ +name = Uranus (799) +mass = 8.6813e+25 +radius = 25362000.0 +color = None +bounce = 0.999 +position = (1750467803483.7131, 2171614471589.0608, -15716458513.582941) +velocity = (14881.227894281079, -18564.63082954205, 169.68319999327534) +] +*Neptune_(899) [ +name = Neptune (899) +mass = 1.02409e+26 +radius = 24624000.0 +color = None +bounce = 0.999 +position = (4350906860276.158, -392631134944.8321, -96764324539.04045) +velocity = (20519.16390902963, -17111.31324347381, -33.70830970991891) +] diff --git a/data/eng_info.txt b/data/eng_info.txt deleted file mode 100644 index c807c76..0000000 --- a/data/eng_info.txt +++ /dev/null @@ -1,27 +0,0 @@ -dt = 1.0 -checking_range = 3 -# number of intervals: 100 -# bodies:(2) -~ do_collisions = True -~ do_bodygravity = True -~ do_fieldgravity = True -*object_name [ -name = object_name -mass = 1.4213 -radius = 23.124 -color = None -bounce = 0.999 -position = (-4449.79781598363, 14686.265938655, 5116.73406133581) -velocity = (-45.008058748417, 148.336019582741, 51.663980417163) -] -*object_name2 [ -name = object_name2 -mass = 20000.0 -radius = 2.0 -color = None -bounce = 0.999 -position = (895.020194771791, -97.3400649239305, 595.340064923932) -velocity = (9.01030499769496, -1.00343499923165, 6.00343499923165) -] --* plane = z = 0.0 --* plane = x = 0.0 diff --git a/data/final_data/Earth_(399).csv b/data/final_data/Earth_(399).csv new file mode 100644 index 0000000..6c98837 --- /dev/null +++ b/data/final_data/Earth_(399).csv @@ -0,0 +1,50 @@ +dt,posX,posY,posZ,velX,velY,velZ,accX,accY,accZ +0.0,-2997119.8657687576,-4388557.225749306,-3503293.6830374366,191.9806108721381,-199.92763937015386,86.20601383202848,0.0,0.0,0.0 +1800.0,-2651554.766198909,-4748426.9766155835,-3348122.8581397855,183.67142156685773,-206.8930385810469,86.20646912389327,0.0,0.0,0.0 +3600.0,-2320946.207378565,-5120834.446061468,-3192951.2137167775,175.3646814309856,-213.86153381376994,86.20692460785557,0.0,0.0,0.0 +5400.0,-2005289.7808027908,-5505785.206926254,-3037778.7494226373,167.06039165837018,-220.83312422808527,86.20738028385891,0.0,0.0,0.0 +7200.0,-1704581.0758177245,-5903284.830536807,-2882605.4649116914,158.7585534425892,-227.80780898326634,86.2078361518468,0.0,0.0,0.0 +9000.0,-1418815.6796210639,-6313338.886706687,-2727431.359838367,150.45916797694954,-234.78558723809772,86.20829221176274,0.0,0.0,0.0 +10800.0,-1147989.1772625546,-6735952.943735262,-2572256.433857194,142.1622364544869,-241.76645815087528,86.20874846355017,0.0,0.0,0.0 +12600.0,-892097.1516444782,-7171132.568406838,-2417080.686622804,133.8677600679656,-248.75042087940616,86.20920490715251,0.0,0.0,0.0 +14400.0,-651135.1835221401,-7618883.325989769,-2261904.1177899297,125.57574000987844,-255.7374745810089,86.20966154251319,0.0,0.0,0.0 +16200.0,-425098.8515043589,-8079210.780235585,-2106726.727013406,117.2861774724464,-262.7276184125135,86.21011836957555,0.0,0.0,0.0 +18000.0,-213983.7320539554,-8552120.493378108,-1951548.51394817,108.99907364761845,-269.7208515302615,86.21057538828295,0.0,0.0,0.0 +19800.0,-17785.399488242198,-9037618.02613258,-1796369.4782492607,100.71442972707132,-276.717173090106,86.21103259857868,0.0,0.0,0.0 +21600.0,163500.57402048618,-9535708.937694771,-1641189.619571819,92.4322469022093,-283.71658224741185,86.21149000040604,0.0,0.0,0.0 +23400.0,329878.6184444629,-10046398.785740113,-1486008.937571088,84.152526364164,-290.7190781570556,86.21194759370829,0.0,0.0,0.0 +25200.0,481353.1658999581,-10569693.126422813,-1330827.4319024133,75.87526930379416,-297.7246599734256,86.21240537842863,0.0,0.0,0.0 +27000.0,617928.6506467876,-11105597.514374979,-1175645.1022212417,67.60047691168538,-304.7333268504222,86.21286335451026,0.0,0.0,0.0 +28800.0,739609.5090878212,-11654117.502705738,-1020461.9481831233,59.32815037814996,-311.74507794145757,86.21332152189636,0.0,0.0,0.0 +30600.0,846400.1797684912,-12215258.64300036,-865277.9694437098,51.05829089322664,-318.759912399456,86.21377988053007,0.0,0.0,0.0 +32400.0,938305.1033762991,-12789026.485319382,-710093.1656587557,42.79089964668039,-325.77782937685396,86.21423843035448,0.0,0.0,0.0 +34200.0,1015328.7227403239,-13375426.57819772,-554907.5364841176,34.525977828002205,-332.79882802559996,86.2146971713127,0.0,0.0,0.0 +36000.0,1077475.482830728,-13974464.4686438,-399721.0815757548,26.263526626408876,-339.82290749715486,86.21515610334775,0.0,0.0,0.0 +37800.0,1124749.8307582638,-14586145.702138677,-244533.80058972884,18.003547230842756,-346.8500669424919,86.21561522640268,0.0,0.0,0.0 +39600.0,1157156.2157737808,-15210475.822635163,-89345.69318220404,9.74604082997157,-353.8803055120965,86.21607454042046,0.0,0.0,0.0 +41400.0,1174699.0892677295,-15847460.372556936,65843.24099055279,1.4910086121881658,-360.91362235596694,86.21653404534408,0.0,0.0,0.0 +43200.0,1177382.9047696684,-16497104.892797677,221033.00227217213,-6.761548234389673,-367.9500166236137,86.21699374111644,0.0,0.0,0.0 +45000.0,1165212.117947767,-17159414.922720183,376223.5910061817,-15.011628521919475,-374.98948746406006,86.21745362768048,0.0,0.0,0.0 +46800.0,1138191.186608312,-17834396.00015549,531415.0075360066,-23.25923106283429,-382.032034025842,86.21791370497907,0.0,0.0,0.0 +48600.0,1096324.5706952102,-18522053.661402006,686607.252204969,-31.50435466984289,-389.0776554570082,86.21837397295505,0.0,0.0,0.0 +50400.0,1039616.7322894931,-19222393.44122462,841800.325356288,-39.74699815593002,-396.1263509051202,86.21883443155124,0.0,0.0,0.0 +52200.0,968072.1356088191,-19935420.872853838,996994.2273330803,-47.98716033435661,-403.1781195172526,86.21929508071045,0.0,0.0,0.0 +54000.0,881695.2470069772,-20661141.487984892,1152188.958478359,-56.224840018659954,-410.23296043999284,86.21975592037543,0.0,0.0,0.0 +55800.0,780490.5349733892,-21399560.81677688,1307384.5191350349,-64.460036022654,-417.2908728194415,86.22021695048892,0.0,0.0,0.0 +57600.0,664462.470132612,-22150684.387851875,1462580.909645915,-72.69274716042949,-424.35185580121237,86.22067817099361,0.0,0.0,0.0 +59400.0,533615.525243839,-22914517.728294056,1617778.1303537036,-80.92297224635426,-431.4159085304324,86.22113958183219,0.0,0.0,0.0 +61200.0,387954.17520040134,-23691066.363648836,1772976.1816010016,-89.15071009507338,-438.48303015174173,86.22160118294731,0.0,0.0,0.0 +63000.0,227482.89702926925,-24480335.81792197,1928175.063730307,-97.37595952150944,-445.5532198092941,86.22206297428158,0.0,0.0,0.0 +64800.0,52206.169890552264,-25282331.6135787,2083374.7770840137,-105.59871934086273,-452.6264766467565,86.2225249557776,0.0,0.0,0.0 +66600.0,-137871.52492300066,-26097059.271542862,2238575.322004413,-113.81898836861147,-459.7027998073096,86.22298712737792,0.0,0.0,0.0 +68400.0,-342745.7039865013,-26924524.311196018,2393776.6988336933,-122.03676542051203,-466.7821884336475,86.22344948902507,0.0,0.0,0.0 +70200.0,-562411.881743423,-27764732.250376582,2548978.9079139386,-130.25204931259913,-473.86464166797816,86.22391204066156,0.0,0.0,0.0 +72000.0,-796865.5705061014,-28617688.605378944,2704181.9495871295,-138.4648388611861,-480.95015865202316,86.22437478222987,0.0,0.0,0.0 +73800.0,-1046102.2804562363,-29483398.890952587,2859385.8241951433,-146.67513288286509,-488.038738527018,86.22483771367244,0.0,0.0,0.0 +75600.0,-1310117.5196453934,-30361868.62030122,3014590.5320797535,-154.88293019450722,-495.13038043371193,86.22530083493169,0.0,0.0,0.0 +77400.0,-1588906.7939955064,-31253103.305081904,3169796.0735826306,-163.0882296132629,-502.22508351236837,86.22576414595,0.0,0.0,0.0 +79200.0,-1882465.6072993795,-32157108.455404166,3325002.4490453405,-171.291029956562,-509.32284690276464,86.22622764666973,0.0,0.0,0.0 +81000.0,-2190789.461221191,-33073889.57982914,3480209.658809346,-179.49133004211404,-516.4236697441922,86.22669133703322,0.0,0.0,0.0 +82800.0,-2513873.8552969964,-34003452.18536869,3635417.703216006,-187.68912868790846,-523.527551175457,86.22715521698277,0.0,0.0,0.0 +84600.0,-2851714.2869352316,-34945801.77748451,3790626.582606575,-195.88442471221487,-530.6344903348788,86.22761928646064,0.0,0.0,0.0 +86400.0,-3204306.2514172182,-35900943.86008729,3945836.2973222043,-204.0772169335831,-537.7444863602921,86.22808354540909,0.0,0.0,0.0 diff --git a/data/final_data/Jupiter_(599).csv b/data/final_data/Jupiter_(599).csv new file mode 100644 index 0000000..e3df490 --- /dev/null +++ b/data/final_data/Jupiter_(599).csv @@ -0,0 +1,50 @@ +dt,posX,posY,posZ,velX,velY,velZ,accX,accY,accZ +0.0,454894694737.0841,384456109898.2066,-14712629064.838978,11218.12291185019,-12306.100648555494,235.65357275048893,0.0,0.0,0.0 +1800.0,454914887358.32544,384433958917.0392,-14712204888.408028,11217.793310419574,-12306.378811044902,235.66210203973688,0.0,0.0,0.0 +3600.0,454935079386.2842,384411807435.1793,-14711780696.624355,11217.463718615485,-12306.656984040992,235.67063115718582,0.0,0.0,0.0 +5400.0,454955270820.97766,384389655452.60803,-14711356489.488272,11217.134136438275,-12306.93516754339,235.6791601028264,0.0,0.0,0.0 +7200.0,454975461662.4233,384367502969.30646,-14710932267.000086,11216.804563888294,-12307.213361551725,235.68768887664916,0.0,0.0,0.0 +9000.0,454995651910.6383,384345349985.2557,-14710508029.160109,11216.475000965893,-12307.491566065624,235.69621747864474,0.0,0.0,0.0 +10800.0,455015841565.64,384323196500.43677,-14710083775.968647,11216.145447671423,-12307.769781084717,235.70474590880374,0.0,0.0,0.0 +12600.0,455036030627.4458,384301042514.8308,-14709659507.426012,11215.815904005234,-12308.048006608631,235.71327416711677,0.0,0.0,0.0 +14400.0,455056219096.073,384278888028.41895,-14709235223.53251,11215.486369967679,-12308.326242636995,235.72180225357442,0.0,0.0,0.0 +16200.0,455076406971.53894,384256733041.1822,-14708810924.288454,11215.156845559108,-12308.604489169436,235.7303301681673,0.0,0.0,0.0 +18000.0,455096594253.86096,384234577553.1017,-14708386609.69415,11214.827330779872,-12308.882746205585,235.73885791088603,0.0,0.0,0.0 +19800.0,455116780943.05634,384212421564.1585,-14707962279.749912,11214.49782563032,-12309.161013745068,235.74738548172118,0.0,0.0,0.0 +21600.0,455136967039.14246,384190265074.33374,-14707537934.456045,11214.168330110804,-12309.439291787514,235.75591288066337,0.0,0.0,0.0 +23400.0,455157152542.13666,384168108083.6085,-14707113573.81286,11213.838844221675,-12309.717580332552,235.7644401077032,0.0,0.0,0.0 +25200.0,455177337452.0563,384145950591.9639,-14706689197.820667,11213.509367963283,-12309.995879379809,235.77296716283126,0.0,0.0,0.0 +27000.0,455197521768.9186,384123792599.38104,-14706264806.479774,11213.17990133598,-12310.274188928912,235.7814940460382,0.0,0.0,0.0 +28800.0,455217705492.74097,384101634105.84094,-14705840399.790491,11212.850444340114,-12310.55250897949,235.7900207573146,0.0,0.0,0.0 +30600.0,455237888623.5408,384079475111.32477,-14705415977.753128,11212.520996976038,-12310.830839531172,235.79854729665107,0.0,0.0,0.0 +32400.0,455258071161.3353,384057315615.8136,-14704991540.367994,11212.191559244102,-12311.109180583586,235.8070736640382,0.0,0.0,0.0 +34200.0,455278253106.14197,384035155619.2886,-14704567087.635399,11211.862131144657,-12311.38753213636,235.8155998594666,0.0,0.0,0.0 +36000.0,455298434457.978,384012995121.7307,-14704142619.555653,11211.532712678054,-12311.66589418912,235.8241258829269,0.0,0.0,0.0 +37800.0,455318615216.86084,383990834123.12115,-14703718136.129063,11211.203303844643,-12311.944266741497,235.8326517344097,0.0,0.0,0.0 +39600.0,455338795382.80774,383968672623.44104,-14703293637.35594,11210.873904644774,-12312.222649793119,235.8411774139056,0.0,0.0,0.0 +41400.0,455358974955.8361,383946510622.6714,-14702869123.236595,11210.544515078796,-12312.501043343613,235.8497029214052,0.0,0.0,0.0 +43200.0,455379153935.96326,383924348120.7934,-14702444593.771338,11210.215135147064,-12312.779447392606,235.85822825689914,0.0,0.0,0.0 +45000.0,455399332323.20654,383902185117.7881,-14702020048.960476,11209.885764849925,-12313.057861939727,235.866753420378,0.0,0.0,0.0 +46800.0,455419510117.58325,383880021613.6366,-14701595488.80432,11209.556404187731,-12313.336286984606,235.8752784118324,0.0,0.0,0.0 +48600.0,455439687319.1108,383857857608.32,-14701170913.303179,11209.227053160832,-12313.614722526869,235.88380323125295,0.0,0.0,0.0 +50400.0,455459863927.80646,383835693101.81946,-14700746322.457363,11208.897711769578,-12313.893168566143,235.89232787863025,0.0,0.0,0.0 +52200.0,455480039943.6876,383813528094.116,-14700321716.267181,11208.56838001432,-12314.171625102057,235.90085235395492,0.0,0.0,0.0 +54000.0,455500215366.77167,383791362585.19086,-14699897094.732944,11208.239057895407,-12314.450092134239,235.90937665721756,0.0,0.0,0.0 +55800.0,455520390197.07587,383769196575.025,-14699472457.854961,11207.909745413192,-12314.728569662317,235.9179007884088,0.0,0.0,0.0 +57600.0,455540564434.6176,383747030063.5996,-14699047805.633543,11207.580442568023,-12315.00705768592,235.9264247475192,0.0,0.0,0.0 +59400.0,455560738079.41425,383724863050.89575,-14698623138.068998,11207.251149360252,-12315.285556204673,235.93494853453944,0.0,0.0,0.0 +61200.0,455580911131.4831,383702695536.8946,-14698198455.161636,11206.92186579023,-12315.564065218208,235.94347214946012,0.0,0.0,0.0 +63000.0,455601083590.8415,383680527521.5772,-14697773756.911768,11206.592591858305,-12315.84258472615,235.95199559227183,0.0,0.0,0.0 +64800.0,455621255457.50684,383658359004.9247,-14697349043.319702,11206.26332756483,-12316.121114728126,235.96051886296516,0.0,0.0,0.0 +66600.0,455641426731.49646,383636189986.91815,-14696924314.385748,11205.934072910153,-12316.399655223768,235.96904196153076,0.0,0.0,0.0 +68400.0,455661597412.8277,383614020467.53876,-14696499570.110218,11205.604827894625,-12316.6782062127,235.97756488795923,0.0,0.0,0.0 +70200.0,455681767501.5179,383591850446.7676,-14696074810.49342,11205.275592518597,-12316.956767694552,235.9860876422412,0.0,0.0,0.0 +72000.0,455701936997.5844,383569679924.58575,-14695650035.535664,11204.94636678242,-12317.23533966895,235.99461022436725,0.0,0.0,0.0 +73800.0,455722105901.0446,383547508900.97437,-14695225245.237259,11204.617150686443,-12317.513922135524,236.003132634328,0.0,0.0,0.0 +75600.0,455742274211.91583,383525337375.91455,-14694800439.598516,11204.287944231015,-12317.7925150939,236.01165487211412,0.0,0.0,0.0 +77400.0,455762441930.21545,383503165349.3874,-14694375618.619747,11203.95874741649,-12318.071118543709,236.02017693771617,0.0,0.0,0.0 +79200.0,455782609055.9608,383480992821.374,-14693950782.30126,11203.629560243213,-12318.349732484574,236.02869883112479,0.0,0.0,0.0 +81000.0,455802775589.16925,383458819791.8555,-14693525930.643364,11203.300382711537,-12318.628356916126,236.03722055233055,0.0,0.0,0.0 +82800.0,455822941529.85815,383436646260.8131,-14693101063.64637,11202.971214821813,-12318.906991837992,236.04574210132412,0.0,0.0,0.0 +84600.0,455843106878.04486,383414472228.2278,-14692676181.310587,11202.64205657439,-12319.185637249799,236.0542634780961,0.0,0.0,0.0 +86400.0,455863271633.7467,383392297694.08075,-14692251283.636326,11202.31290796962,-12319.464293151175,236.06278468263707,0.0,0.0,0.0 diff --git a/data/final_data/Mars_(499).csv b/data/final_data/Mars_(499).csv new file mode 100644 index 0000000..466124a --- /dev/null +++ b/data/final_data/Mars_(499).csv @@ -0,0 +1,50 @@ +dt,posX,posY,posZ,velX,velY,velZ,accX,accY,accZ +0.0,-270823144298.29593,-267284641643.61453,252659719.3060816,38600.32701332715,-37188.77571637019,-672.5612779234887,0.0,0.0,0.0 +1800.0,-270753663709.67194,-267351581439.904,251449109.00581932,38603.29852034324,-37185.52322397211,-672.5660061305539,0.0,0.0,0.0 +3600.0,-270684177772.33533,-267418515381.70715,250238490.1947843,38606.26953482485,-37182.27008408015,-672.5707086865377,0.0,0.0,0.0 +5400.0,-270614686487.17264,-267485443467.8585,249027862.91914853,38609.24005662598,-37179.016296736234,-672.5753855887376,0.0,0.0,0.0 +7200.0,-270545189855.0707,-267552365697.19263,247817227.2250888,38612.210085600615,-37175.761861982326,-672.5800368344514,0.0,0.0,0.0 +9000.0,-270475687876.91663,-267619282068.5442,246606583.1587868,38615.17962160273,-37172.506779860414,-672.5846624209773,0.0,0.0,0.0 +10800.0,-270406180553.59775,-267686192580.74792,245395930.76642904,38618.14866448629,-37169.25105041252,-672.589262345614,0.0,0.0,0.0 +12600.0,-270336667886.00168,-267753097232.63867,244185270.09420693,38621.117214105245,-37165.994673680696,-672.5938366056602,0.0,0.0,0.0 +14400.0,-270267149875.0163,-267819996023.0513,242974601.18831673,38624.08527031353,-37162.73764970703,-672.5983851984153,0.0,0.0,0.0 +16200.0,-270197626521.52972,-267886888950.82077,241763924.0949596,38627.052832965084,-37159.479978533636,-672.6029081211788,0.0,0.0,0.0 +18000.0,-270128097826.4304,-267953776014.78214,240553238.86034146,38630.01990191381,-37156.22166020267,-672.6074053712508,0.0,0.0,0.0 +19800.0,-270058563790.60693,-268020657213.7705,239342545.5306732,38632.986477013605,-37152.9626947563,-672.6118769459316,0.0,0.0,0.0 +21600.0,-269989024414.9483,-268087532546.62106,238131844.15217054,38635.95255811836,-37149.70308223675,-672.616322842522,0.0,0.0,0.0 +23400.0,-269919479700.3437,-268154402012.1691,236921134.771054,38638.91814508196,-37146.442822686266,-672.6207430583229,0.0,0.0,0.0 +25200.0,-269849929647.68256,-268221265609.24994,235710417.43354902,38641.883237758266,-37143.181916147114,-672.6251375906359,0.0,0.0,0.0 +27000.0,-269780374257.85458,-268288123336.699,234499692.18588588,38644.84783600112,-37139.9203626616,-672.6295064367625,0.0,0.0,0.0 +28800.0,-269710813531.7498,-268354975193.3518,233288959.0742997,38647.811939664374,-37136.65816227207,-672.6338495940051,0.0,0.0,0.0 +30600.0,-269641247470.2584,-268421821178.04388,232078218.1450305,38650.77554860184,-37133.39531502088,-672.6381670596662,0.0,0.0,0.0 +32400.0,-269571676074.2709,-268488661289.61093,230867469.4443231,38653.73866266735,-37130.13182095045,-672.6424588310485,0.0,0.0,0.0 +34200.0,-269502099344.6781,-268555495526.88864,229656713.0184272,38656.70128171469,-37126.867680103205,-672.6467249054554,0.0,0.0,0.0 +36000.0,-269432517282.371,-268622323888.71283,228445948.91359738,38659.66340559766,-37123.60289252161,-672.6509652801902,0.0,0.0,0.0 +37800.0,-269362929888.24094,-268689146373.91937,227235177.17609304,38662.625034170036,-37120.33745824816,-672.6551799525572,0.0,0.0,0.0 +39600.0,-269293337163.17944,-268755962981.3442,226024397.85217842,38665.586167285575,-37117.071377325396,-672.6593689198604,0.0,0.0,0.0 +41400.0,-269223739108.07834,-268822773709.8234,224813610.98812267,38668.54680479804,-37113.804649795864,-672.6635321794047,0.0,0.0,0.0 +43200.0,-269154135723.8297,-268889578558.19302,223602816.63019973,38671.50694656117,-37110.53727570216,-672.667669728495,0.0,0.0,0.0 +45000.0,-269084527011.3259,-268956377525.28928,222392014.82468843,38674.46659242868,-37107.26925508691,-672.6717815644366,0.0,0.0,0.0 +46800.0,-269014912971.45953,-269023170609.94843,221181205.61787245,38677.4257422543,-37104.00058799276,-672.6758676845354,0.0,0.0,0.0 +48600.0,-268945293605.12347,-269089957811.0068,219970389.0560403,38680.38439589173,-37100.731274462414,-672.6799280860976,0.0,0.0,0.0 +50400.0,-268875668913.21088,-269156739127.30084,218759565.1854853,38683.342553194656,-37097.46131453858,-672.6839627664294,0.0,0.0,0.0 +52200.0,-268806038896.6151,-269223514557.66702,217548734.05250573,38686.30021401677,-37094.19070826401,-672.6879717228379,0.0,0.0,0.0 +54000.0,-268736403556.2299,-269290284100.9419,216337895.70340464,38689.25737821172,-37090.91945568149,-672.6919549526302,0.0,0.0,0.0 +55800.0,-268666762892.9491,-269357047755.96213,215127050.1844899,38692.21404563317,-37087.647556833836,-672.6959124531139,0.0,0.0,0.0 +57600.0,-268597116907.66696,-269423805521.56442,213916197.5420743,38695.17021613476,-37084.375011763885,-672.699844221597,0.0,0.0,0.0 +59400.0,-268527465601.27792,-269490557396.5856,212705337.8224754,38698.12588957012,-37081.10182051452,-672.7037502553877,0.0,0.0,0.0 +61200.0,-268457808974.6767,-269557303379.86252,211494471.0720157,38701.08106579287,-37077.827983128656,-672.7076305517948,0.0,0.0,0.0 +63000.0,-268388147028.75827,-269624043470.23215,210283597.33702248,38704.035744656605,-37074.55349964923,-672.7114851081271,0.0,0.0,0.0 +64800.0,-268318479764.41788,-269690777666.53152,209072716.66382787,38706.989926014925,-37071.27837011922,-672.7153139216942,0.0,0.0,0.0 +66600.0,-268248807182.55106,-269757505967.59775,207861829.09876883,38709.94360972141,-37068.00259458162,-672.7191169898058,0.0,0.0,0.0 +68400.0,-268179129284.05356,-269824228372.268,206650934.68818718,38712.89679562963,-37064.726173079485,-672.7228943097721,0.0,0.0,0.0 +70200.0,-268109446069.8214,-269890944879.37955,205440033.4784296,38715.84948359314,-37061.449105655876,-672.7266458789035,0.0,0.0,0.0 +72000.0,-268039757540.75095,-269957655487.7697,204229125.51584756,38718.80167346548,-37058.17139235389,-672.7303716945108,0.0,0.0,0.0 +73800.0,-267970063697.7387,-270024360196.27594,203018210.84679744,38721.75336510019,-37054.893033216664,-672.7340717539055,0.0,0.0,0.0 +75600.0,-267900364541.68152,-270091059003.73572,201807289.5176404,38724.70455835077,-37051.61402828736,-672.7377460543989,0.0,0.0,0.0 +77400.0,-267830660073.4765,-270157751908.98663,200596361.5747425,38727.65525307074,-37048.33437760918,-672.7413945933033,0.0,0.0,0.0 +79200.0,-267760950294.02097,-270224438910.86633,199385427.06447455,38730.605449113595,-37045.05408122535,-672.7450173679308,0.0,0.0,0.0 +81000.0,-267691235204.21255,-270291120008.21252,198174486.03321227,38733.555146332816,-37041.77313917914,-672.7486143755942,0.0,0.0,0.0 +82800.0,-267621514804.94916,-270357795199.86304,196963538.5273362,38736.504344581874,-37038.49155151383,-672.7521856136066,0.0,0.0,0.0 +84600.0,-267551789097.1289,-270424464484.65576,195752584.5932317,38739.453043714224,-37035.20931827275,-672.7557310792814,0.0,0.0,0.0 +86400.0,-267482058081.6502,-270491127861.42865,194541624.277289,38742.401243583314,-37031.92643949925,-672.7592507699325,0.0,0.0,0.0 diff --git a/data/final_data/Mercury_(199).csv b/data/final_data/Mercury_(199).csv new file mode 100644 index 0000000..b474473 --- /dev/null +++ b/data/final_data/Mercury_(199).csv @@ -0,0 +1,50 @@ +dt,posX,posY,posZ,velX,velY,velZ,accX,accY,accZ +0.0,-140859945532.0178,-159324501055.22537,-2738079099.35765,54857.390437183116,-39537.09865529015,-4485.855370256207,0.0,0.0,0.0 +1800.0,-140761202229.23087,-159395667832.8049,-2746153639.024111,54876.6586483383,-39491.6295871608,-4483.906953468819,0.0,0.0,0.0 +3600.0,-140662424243.66385,-159466752766.0618,-2754224671.5403547,54895.87928561422,-39446.14569519909,-4481.952961585941,0.0,0.0,0.0 +5400.0,-140563611660.94974,-159537755828.31317,-2762292186.8712096,54915.05235247386,-39400.64700701741,-4479.993397181729,0.0,0.0,0.0 +7200.0,-140464764566.71527,-159608676992.9258,-2770356174.986137,54934.17785233596,-39355.133550188846,-4478.028262823069,0.0,0.0,0.0 +9000.0,-140365883046.58105,-159679516233.31616,-2778416625.8592186,54953.25578857498,-39309.60535224737,-4476.057561069585,0.0,0.0,0.0 +10800.0,-140266967186.16162,-159750273522.9502,-2786473529.469144,54972.286164521014,-39264.06244068799,-4474.0812944736535,0.0,0.0,0.0 +12600.0,-140168017071.0655,-159820948835.34344,-2794526875.7991962,54991.268983459784,-39218.50484296693,-4472.099465580408,0.0,0.0,0.0 +14400.0,-140069032786.89526,-159891542144.0608,-2802576654.837241,55010.204248632566,-39172.9325865018,-4470.1120769277495,0.0,0.0,0.0 +16200.0,-139970014419.2477,-159962053422.7165,-2810622856.5757113,55029.09196323617,-39127.34569867175,-4468.119131046358,0.0,0.0,0.0 +18000.0,-139870962053.7139,-160032482644.9741,-2818665471.011595,55047.93213042286,-39081.74420681764,-4466.1206304597,0.0,0.0,0.0 +19800.0,-139771875775.87915,-160102829784.54636,-2826704488.1464224,55066.72475330033,-39036.128138242224,-4464.116577684037,0.0,0.0,0.0 +21600.0,-139672755671.3232,-160173094815.1952,-2834739897.9862537,55085.46983493166,-38990.49752021031,-4462.106975228439,0.0,0.0,0.0 +23400.0,-139573601825.62033,-160243277710.73157,-2842771690.541665,55104.16737833526,-38944.852379948905,-4460.09182559479,0.0,0.0,0.0 +25200.0,-139474414324.33932,-160313378445.01547,-2850799855.827736,55122.817386484814,-38899.19274464742,-4458.071131277798,0.0,0.0,0.0 +27000.0,-139375193253.04364,-160383396991.95584,-2858824383.864036,55141.41986230927,-38853.51864145781,-4456.044894765006,0.0,0.0,0.0 +28800.0,-139275938697.29147,-160453333325.51047,-2866845264.674613,55159.97480869274,-38807.830097494756,-4454.013118536801,0.0,0.0,0.0 +30600.0,-139176650742.63583,-160523187419.68594,-2874862488.287979,55178.482228474524,-38762.127139835815,-4451.975805066422,0.0,0.0,0.0 +32400.0,-139077329474.62457,-160592959248.53766,-2882876044.7370987,55196.94212444899,-38716.409795521606,-4449.932956819973,0.0,0.0,0.0 +34200.0,-138977974978.80057,-160662648786.1696,-2890885924.059375,55215.35449936559,-38670.67809155596,-4447.884576256427,0.0,0.0,0.0 +36000.0,-138878587340.70172,-160732256006.73438,-2898892116.2966366,55233.71935592876,-38624.93205490609,-4445.830665827641,0.0,0.0,0.0 +37800.0,-138779166645.86105,-160801780884.4332,-2906894611.4951262,55252.03669679794,-38579.17171250277,-4443.77122797836,0.0,0.0,0.0 +39600.0,-138679712979.80682,-160871223393.51572,-2914893399.7054873,55270.30652458747,-38533.39709124049,-4441.706265146232,0.0,0.0,0.0 +41400.0,-138580226428.06256,-160940583508.27994,-2922888470.9827504,55288.528841866566,-38487.60821797762,-4439.635779761814,0.0,0.0,0.0 +43200.0,-138480707076.1472,-161009861203.0723,-2930879815.3863215,55306.703651159296,-38441.80511953658,-4437.559774248581,0.0,0.0,0.0 +45000.0,-138381155009.5751,-161079056452.28748,-2938867422.979969,55324.8309549445,-38395.987822703995,-4435.478251022937,0.0,0.0,0.0 +46800.0,-138281570313.8562,-161148169230.36835,-2946851283.8318105,55342.91075565576,-38350.15635423089,-4433.391212494224,0.0,0.0,0.0 +48600.0,-138181953074.49603,-161217199511.80597,-2954831388.0143,55360.94305568137,-38304.310740832814,-4431.298661064734,0.0,0.0,0.0 +50400.0,-138082303376.99582,-161286147271.13947,-2962807725.6042166,55378.927857364266,-38258.451009190045,-4429.200599129711,0.0,0.0,0.0 +52200.0,-137982621306.85257,-161355012482.956,-2970780286.68265,55396.86516300201,-38212.57718594772,-4427.097029077369,0.0,0.0,0.0 +54000.0,-137882906949.55917,-161423795121.8907,-2978749061.3349895,55414.75497484672,-38166.689297716024,-4424.987953288897,0.0,0.0,0.0 +55800.0,-137783160390.60446,-161492495162.6266,-2986714039.6509094,55432.597295105035,-38120.78737107036,-4422.8733741384685,0.0,0.0,0.0 +57600.0,-137683381715.47327,-161561112579.8945,-2994675211.7243586,55450.39212593808,-38074.87143255147,-4420.753293993252,0.0,0.0,0.0 +59400.0,-137583571009.64658,-161629647348.47308,-3002632567.6535463,55468.139469461414,-38028.94150866566,-4418.62771521342,0.0,0.0,0.0 +61200.0,-137483728358.60153,-161698099443.1887,-3010586097.5409303,55485.83932774498,-37982.99762588492,-4416.496640152158,0.0,0.0,0.0 +63000.0,-137383853847.81158,-161766468838.91528,-3018535791.493204,55503.49170281307,-37937.039810647104,-4414.360071155675,0.0,0.0,0.0 +64800.0,-137283947562.74652,-161834755510.57446,-3026481639.6212845,55521.0965966443,-37891.06808935609,-4412.218010563211,0.0,0.0,0.0 +66600.0,-137184009588.87256,-161902959433.1353,-3034423632.0402985,55538.65401117151,-37845.08248838196,-4410.070460707049,0.0,0.0,0.0 +68400.0,-137084040011.65245,-161971080581.6144,-3042361758.869571,55556.163948281785,-37799.083034061136,-4407.917423912524,0.0,0.0,0.0 +70200.0,-136984038916.54555,-162039118931.0757,-3050296010.2326136,55573.62640981638,-37753.06975269656,-4405.758902498029,0.0,0.0,0.0 +72000.0,-136884006389.00787,-162107074456.63055,-3058226376.25711,55591.041397570676,-37707.042670557865,-4403.594898775028,0.0,0.0,0.0 +73800.0,-136783942514.49225,-162174947133.43756,-3066152847.0749054,55608.408913294144,-37661.00181388152,-4401.425415048066,0.0,0.0,0.0 +75600.0,-136683847378.44832,-162242736936.70255,-3074075412.821992,55625.728958690306,-37614.94720887102,-4399.2504536147735,0.0,0.0,0.0 +77400.0,-136583721066.32268,-162310443841.67853,-3081994063.6384983,55643.00153541668,-37568.878881697,-4397.070016765882,0.0,0.0,0.0 +79200.0,-136483563663.55893,-162378067823.6656,-3089908789.668677,55660.22664508475,-37522.79685849745,-4394.88410678523,0.0,0.0,0.0 +81000.0,-136383375255.59778,-162445608858.0109,-3097819581.06089,55677.40428925992,-37476.701165377875,-4392.6927259497725,0.0,0.0,0.0 +82800.0,-136283155927.8771,-162513066920.10858,-3105726427.9676,55694.53446946145,-37430.59182841141,-4390.495876529591,0.0,0.0,0.0 +84600.0,-136182905765.83208,-162580441985.39972,-3113629320.545353,55711.617187162454,-37384.46887363902,-4388.2935607879035,0.0,0.0,0.0 +86400.0,-136082624854.89519,-162647734029.37228,-3121528248.954771,55728.65244378983,-37338.33232706968,-4386.085780981073,0.0,0.0,0.0 diff --git a/data/final_data/Neptune_(899).csv b/data/final_data/Neptune_(899).csv new file mode 100644 index 0000000..a9f050e --- /dev/null +++ b/data/final_data/Neptune_(899).csv @@ -0,0 +1,50 @@ +dt,posX,posY,posZ,velX,velY,velZ,accX,accY,accZ +0.0,4349167947359.8755,-391155140426.7016,-96754109979.39952,20119.20565438934,-17449.720402113522,-32.130022966168966,0.0,0.0,0.0 +1800.0,4349204161930.053,-391186549923.4254,-96754167813.44086,20119.193725660087,-17449.71961021905,-32.12976438204131,0.0,0.0,0.0 +3600.0,4349240376478.7593,-391217959418.7238,-96754225647.01674,20119.18179692879,-17449.718818350797,-32.129505797327354,0.0,0.0,0.0 +5400.0,4349276591005.9937,-391249368912.59686,-96754283480.12717,20119.16986819546,-17449.718026508763,-32.12924721202711,0.0,0.0,0.0 +7200.0,4349312805511.7563,-391280778405.04456,-96754341312.77216,20119.157939460085,-17449.717234692947,-32.128988626140575,0.0,0.0,0.0 +9000.0,4349349019996.0474,-391312187896.067,-96754399144.95168,20119.146010722674,-17449.71644290335,-32.12873003966775,0.0,0.0,0.0 +10800.0,4349385234458.8667,-391343597385.66425,-96754456976.66574,20119.134081983222,-17449.715651139973,-32.128471452608636,0.0,0.0,0.0 +12600.0,4349421448900.2144,-391375006873.8363,-96754514807.91435,20119.122153241733,-17449.714859402815,-32.12821286496323,0.0,0.0,0.0 +14400.0,4349457663320.0903,-391406416360.58325,-96754572638.69751,20119.110224498203,-17449.714067691875,-32.12795427673154,0.0,0.0,0.0 +16200.0,4349493877718.4946,-391437825845.9051,-96754630469.01521,20119.098295752636,-17449.713276007154,-32.127695687913565,0.0,0.0,0.0 +18000.0,4349530092095.427,-391469235329.8019,-96754688298.86745,20119.08636700503,-17449.712484348656,-32.127437098509304,0.0,0.0,0.0 +19800.0,4349566306450.887,-391500644812.2737,-96754746128.25423,20119.074438255386,-17449.711692716377,-32.12717850851876,0.0,0.0,0.0 +21600.0,4349602520784.876,-391532054293.32056,-96754803957.17554,20119.062509503703,-17449.710901110317,-32.12691991794193,0.0,0.0,0.0 +23400.0,4349638735097.393,-391563463772.94257,-96754861785.6314,20119.050580749983,-17449.710109530475,-32.12666132677883,0.0,0.0,0.0 +25200.0,4349674949388.4385,-391594873251.1397,-96754919613.62178,20119.038651994222,-17449.709317976853,-32.126402735029444,0.0,0.0,0.0 +27000.0,4349711163658.012,-391626282727.91205,-96754977441.1467,20119.026723236424,-17449.70852644945,-32.12614414269378,0.0,0.0,0.0 +28800.0,4349747377906.1143,-391657692203.25964,-96755035268.20616,20119.01479447659,-17449.707734948264,-32.125885549771844,0.0,0.0,0.0 +30600.0,4349783592132.744,-391689101677.18256,-96755093094.80016,20119.002865714712,-17449.7069434733,-32.12562695626363,0.0,0.0,0.0 +32400.0,4349819806337.9023,-391720511149.6808,-96755150920.92868,20118.9909369508,-17449.70615202455,-32.12536836216914,0.0,0.0,0.0 +34200.0,4349856020521.589,-391751920620.75446,-96755208746.59174,20118.979008184848,-17449.705360602024,-32.125109767488375,0.0,0.0,0.0 +36000.0,4349892234683.8037,-391783330090.40356,-96755266571.78932,20118.967079416856,-17449.704569205715,-32.12485117222134,0.0,0.0,0.0 +37800.0,4349928448824.547,-391814739558.6281,-96755324396.52144,20118.955150646827,-17449.703777835624,-32.12459257636804,0.0,0.0,0.0 +39600.0,4349964662943.818,-391846149025.4282,-96755382220.78807,20118.94322187476,-17449.702986491753,-32.12433397992846,0.0,0.0,0.0 +41400.0,4350000877041.617,-391877558490.8039,-96755440044.58923,20118.931293100657,-17449.702195174104,-32.12407538290261,0.0,0.0,0.0 +43200.0,4350037091117.945,-391908967954.7552,-96755497867.92493,20118.919364324516,-17449.701403882675,-32.1238167852905,0.0,0.0,0.0 +45000.0,4350073305172.801,-391940377417.28217,-96755555690.79514,20118.907435546334,-17449.700612617464,-32.12355818709212,0.0,0.0,0.0 +46800.0,4350109519206.1846,-391971786878.3849,-96755613513.19987,20118.895506766115,-17449.699821378472,-32.12329958830748,0.0,0.0,0.0 +48600.0,4350145733218.0967,-392003196338.06335,-96755671335.13913,20118.88357798386,-17449.6990301657,-32.12304098893657,0.0,0.0,0.0 +50400.0,4350181947208.537,-392034605796.3176,-96755729156.61292,20118.871649199566,-17449.698238979145,-32.1227823889794,0.0,0.0,0.0 +52200.0,4350218161177.506,-392066015253.14777,-96755786977.62122,20118.859720413235,-17449.69744781881,-32.12252378843597,0.0,0.0,0.0 +54000.0,4350254375125.0024,-392097424708.55383,-96755844798.16403,20118.847791624867,-17449.696656684693,-32.122265187306276,0.0,0.0,0.0 +55800.0,4350290589051.0273,-392128834162.5359,-96755902618.24136,20118.83586283446,-17449.695865576796,-32.12200658559033,0.0,0.0,0.0 +57600.0,4350326802955.5806,-392160243615.09393,-96755960437.85321,20118.82393404202,-17449.695074495117,-32.12174798328812,0.0,0.0,0.0 +59400.0,4350363016838.6616,-392191653066.228,-96756018256.99957,20118.81200524754,-17449.69428343966,-32.12148938039965,0.0,0.0,0.0 +61200.0,4350399230700.271,-392223062515.93823,-96756076075.68045,20118.80007645102,-17449.693492410424,-32.12123077692493,0.0,0.0,0.0 +63000.0,4350435444540.4087,-392254471964.22455,-96756133893.89584,20118.788147652467,-17449.692701407406,-32.12097217286396,0.0,0.0,0.0 +64800.0,4350471658359.0747,-392285881411.0871,-96756191711.64575,20118.776218851875,-17449.691910430607,-32.12071356821673,0.0,0.0,0.0 +66600.0,4350507872156.2686,-392317290856.5259,-96756249528.93018,20118.764290049246,-17449.691119480027,-32.120454962983246,0.0,0.0,0.0 +68400.0,4350544085931.9907,-392348700300.54095,-96756307345.74911,20118.75236124458,-17449.690328555665,-32.120196357163515,0.0,0.0,0.0 +70200.0,4350580299686.2407,-392380109743.1324,-96756365162.10255,20118.740432437877,-17449.689537657523,-32.119937750757536,0.0,0.0,0.0 +72000.0,4350616513419.019,-392411519184.3002,-96756422977.99051,20118.728503629136,-17449.6887467856,-32.11967914376531,0.0,0.0,0.0 +73800.0,4350652727130.3257,-392442928624.0444,-96756480793.41296,20118.716574818358,-17449.6879559399,-32.11942053618684,0.0,0.0,0.0 +75600.0,4350688940820.16,-392474338062.36505,-96756538608.36993,20118.704646005543,-17449.687165120416,-32.119161928022116,0.0,0.0,0.0 +77400.0,4350725154488.523,-392505747499.26227,-96756596422.8614,20118.69271719069,-17449.686374327153,-32.11890331927115,0.0,0.0,0.0 +79200.0,4350761368135.414,-392537156934.7361,-96756654236.88737,20118.6807883738,-17449.68558356011,-32.11864470993394,0.0,0.0,0.0 +81000.0,4350797581760.833,-392568566368.7865,-96756712050.44785,20118.668859554873,-17449.684792819284,-32.11838610001049,0.0,0.0,0.0 +82800.0,4350833795364.7803,-392599975801.4136,-96756769863.54283,20118.656930733912,-17449.684002104677,-32.1181274895008,0.0,0.0,0.0 +84600.0,4350870008947.2554,-392631385232.6174,-96756827676.17232,20118.645001910914,-17449.68321141629,-32.11786887840487,0.0,0.0,0.0 +86400.0,4350906222508.259,-392662794662.39795,-96756885488.3363,20118.63307308588,-17449.682420754125,-32.1176102667227,0.0,0.0,0.0 diff --git a/data/final_data/Saturn_(699).csv b/data/final_data/Saturn_(699).csv new file mode 100644 index 0000000..e2e1290 --- /dev/null +++ b/data/final_data/Saturn_(699).csv @@ -0,0 +1,50 @@ +dt,posX,posY,posZ,velX,velY,velZ,accX,accY,accZ +0.0,1215256363034.1042,-696437299918.3436,-42436288682.30302,23242.00145522106,-14124.260670225345,-202.73938513919018,0.0,0.0,0.0 +1800.0,1215298198636.7236,-696462723587.55,-42436653613.196266,23241.89920305889,-14124.214349324171,-202.73611954687368,0.0,0.0,0.0 +3600.0,1215340034055.289,-696488147173.3788,-42437018538.21145,23241.796950239135,-14124.168029561011,-202.732853908579,0.0,0.0,0.0 +5400.0,1215381869289.7996,-696513570675.832,-42437383457.34849,23241.694696761806,-14124.121710935877,-202.72958822430635,0.0,0.0,0.0 +7200.0,1215423704340.2537,-696538994094.9117,-42437748370.60729,23241.592442626916,-14124.075393448777,-202.72632249405606,0.0,0.0,0.0 +9000.0,1215465539206.6504,-696564417430.62,-42438113277.98778,23241.49018783447,-14124.029077099722,-202.72305671782834,0.0,0.0,0.0 +10800.0,1215507373888.9885,-696589840682.9587,-42438478179.48987,23241.38793238449,-14123.982761888721,-202.71979089562348,0.0,0.0,0.0 +12600.0,1215549208387.2668,-696615263851.9302,-42438843075.11348,23241.285676276973,-14123.936447815786,-202.71652502744172,0.0,0.0,0.0 +14400.0,1215591042701.4841,-696640686937.5363,-42439207964.85853,23241.18341951194,-14123.890134880925,-202.71325911328333,0.0,0.0,0.0 +16200.0,1215632876831.6392,-696666109939.779,-42439572848.72493,23241.081162089402,-14123.84382308415,-202.7099931531486,0.0,0.0,0.0 +18000.0,1215674710777.731,-696691532858.6606,-42439937726.71261,23240.978904009364,-14123.797512425468,-202.70672714703775,0.0,0.0,0.0 +19800.0,1215716544539.758,-696716955694.183,-42440302598.82147,23240.87664527184,-14123.75120290489,-202.70346109495108,0.0,0.0,0.0 +21600.0,1215758378117.7195,-696742378446.3483,-42440667465.051445,23240.774385876844,-14123.704894522427,-202.70019499688883,0.0,0.0,0.0 +23400.0,1215800211511.614,-696767801115.1584,-42441032325.40244,23240.67212582438,-14123.658587278089,-202.69692885285127,0.0,0.0,0.0 +25200.0,1215842044721.4404,-696793223700.6156,-42441397179.874374,23240.569865114467,-14123.612281171885,-202.69366266283868,0.0,0.0,0.0 +27000.0,1215883877747.1978,-696818646202.7217,-42441762028.46717,23240.46760374711,-14123.565976203825,-202.6903964268513,0.0,0.0,0.0 +28800.0,1215925710588.8845,-696844068621.4789,-42442126871.18074,23240.365341722325,-14123.51967237392,-202.68713014488938,0.0,0.0,0.0 +30600.0,1215967543246.4995,-696869490956.8892,-42442491708.015,23240.26307904012,-14123.473369682179,-202.68386381695322,0.0,0.0,0.0 +32400.0,1216009375720.0417,-696894913208.9546,-42442856538.96987,23240.160815700507,-14123.427068128613,-202.68059744304307,0.0,0.0,0.0 +34200.0,1216051208009.51,-696920335377.6772,-42443221364.045265,23240.058551703496,-14123.38076771323,-202.67733102315918,0.0,0.0,0.0 +36000.0,1216093040114.903,-696945757463.0591,-42443586183.241104,23239.9562870491,-14123.334468436042,-202.67406455730182,0.0,0.0,0.0 +37800.0,1216134872036.2197,-696971179465.1023,-42443950996.557304,23239.854021737327,-14123.288170297057,-202.67079804547126,0.0,0.0,0.0 +39600.0,1216176703773.4587,-696996601383.8088,-42444315803.99379,23239.75175576819,-14123.241873296287,-202.66753148766776,0.0,0.0,0.0 +41400.0,1216218535326.6191,-697022023219.1808,-42444680605.55047,23239.6494891417,-14123.19557743374,-202.66426488389158,0.0,0.0,0.0 +43200.0,1216260366695.6997,-697047444971.2202,-42445045401.22726,23239.547221857865,-14123.149282709428,-202.660998234143,0.0,0.0,0.0 +45000.0,1216302197880.699,-697072866639.9291,-42445410191.02408,23239.4449539167,-14123.10298912336,-202.65773153842227,0.0,0.0,0.0 +46800.0,1216344028881.616,-697098288225.3094,-42445774974.94085,23239.342685318214,-14123.056696675543,-202.65446479672966,0.0,0.0,0.0 +48600.0,1216385859698.4495,-697123709727.3634,-42446139752.977486,23239.24041606242,-14123.01040536599,-202.6511980090654,0.0,0.0,0.0 +50400.0,1216427690331.1985,-697149131146.093,-42446504525.1339,23239.13814614933,-14122.964115194713,-202.6479311754298,0.0,0.0,0.0 +52200.0,1216469520779.8616,-697174552481.5004,-42446869291.41002,23239.03587557895,-14122.917826161718,-202.64466429582308,0.0,0.0,0.0 +54000.0,1216511351044.4375,-697199973733.5874,-42447234051.80575,23238.933604351292,-14122.871538267016,-202.64139737024553,0.0,0.0,0.0 +55800.0,1216553181124.9253,-697225394902.3563,-42447598806.321014,23238.831332466372,-14122.825251510618,-202.63813039869743,0.0,0.0,0.0 +57600.0,1216595011021.3237,-697250815987.8091,-42447963554.955734,23238.729059924197,-14122.778965892534,-202.634863381179,0.0,0.0,0.0 +59400.0,1216636840733.6316,-697276236989.9476,-42448328297.70982,23238.626786724777,-14122.732681412774,-202.63159631769054,0.0,0.0,0.0 +61200.0,1216678670261.8477,-697301657908.7742,-42448693034.5832,23238.524512868127,-14122.686398071346,-202.6283292082323,0.0,0.0,0.0 +63000.0,1216720499605.9707,-697327078744.2906,-42449057765.575775,23238.422238354255,-14122.640115868262,-202.62506205280454,0.0,0.0,0.0 +64800.0,1216762328765.9998,-697352499496.4993,-42449422490.68747,23238.319963183174,-14122.59383480353,-202.62179485140754,0.0,0.0,0.0 +66600.0,1216804157741.9336,-697377920165.4019,-42449787209.918205,23238.217687354892,-14122.547554877163,-202.61852760404153,0.0,0.0,0.0 +68400.0,1216845986533.7708,-697403340751.0006,-42450151923.26789,23238.115410869425,-14122.501276089168,-202.61526031070682,0.0,0.0,0.0 +70200.0,1216887815141.5103,-697428761253.2976,-42450516630.73645,23238.013133726778,-14122.454998439556,-202.61199297140362,0.0,0.0,0.0 +72000.0,1216929643565.151,-697454181672.2948,-42450881332.3238,23237.910855926966,-14122.408721928337,-202.60872558613224,0.0,0.0,0.0 +73800.0,1216971471804.6917,-697479602007.9943,-42451246028.029854,23237.80857747,-14122.362446555522,-202.60545815489291,0.0,0.0,0.0 +75600.0,1217013299860.131,-697505022260.3981,-42451610717.85453,23237.70629835589,-14122.31617232112,-202.6021906776859,0.0,0.0,0.0 +77400.0,1217055127731.4683,-697530442429.5083,-42451975401.79775,23237.604018584647,-14122.26989922514,-202.5989231545115,0.0,0.0,0.0 +79200.0,1217096955418.7017,-697555862515.3269,-42452340079.85943,23237.501738156283,-14122.223627267595,-202.59565558536997,0.0,0.0,0.0 +81000.0,1217138782921.8303,-697581282517.856,-42452704752.03948,23237.399457070806,-14122.17735644849,-202.59238797026154,0.0,0.0,0.0 +82800.0,1217180610240.853,-697606702437.0975,-42453069418.33783,23237.29717532823,-14122.131086767838,-202.58912030918648,0.0,0.0,0.0 +84600.0,1217222437375.7686,-697632122273.0537,-42453434078.75439,23237.194892928565,-14122.08481822565,-202.58585260214508,0.0,0.0,0.0 +86400.0,1217264264326.576,-697657542025.7266,-42453798733.28907,23237.092609871823,-14122.038550821933,-202.5825848491376,0.0,0.0,0.0 diff --git a/data/final_data/Sun_(10).csv b/data/final_data/Sun_(10).csv new file mode 100644 index 0000000..71a542a --- /dev/null +++ b/data/final_data/Sun_(10).csv @@ -0,0 +1,50 @@ +dt,posX,posY,posZ,velX,velY,velZ,accX,accY,accZ +0.0,-113753929204.56596,-95359161192.02925,2953169.5507243276,19802.77129869398,-22918.402606237498,87.59975766282224,0.0,0.0,0.0 +1800.0,-113718284216.22832,-95400414316.72047,3110849.1145174075,19802.771664382493,-22918.402290274727,87.59974895741261,0.0,0.0,0.0 +3600.0,-113682639227.23242,-95441667440.84297,3268528.6626407504,19802.772030033055,-22918.40197429496,87.59974025293018,0.0,0.0,0.0 +5400.0,-113646994237.57837,-95482920564.3967,3426208.195096025,19802.772395645658,-22918.40165829821,87.59973154937514,0.0,0.0,0.0 +7200.0,-113611349247.2662,-95524173687.38164,3583887.7118849,19802.7727612203,-22918.4013422845,87.59972284674771,0.0,0.0,0.0 +9000.0,-113575704256.296,-95565426809.79774,3741567.213009046,19802.77312675698,-22918.401026253836,87.59971414504811,0.0,0.0,0.0 +10800.0,-113540059264.66785,-95606679931.645,3899246.6984701324,19802.77349225569,-22918.400710206242,87.59970544427652,0.0,0.0,0.0 +12600.0,-113504414272.38179,-95647933052.92337,4056926.1682698303,19802.77385771642,-22918.400394141732,87.59969674443317,0.0,0.0,0.0 +14400.0,-113468769279.4379,-95689186173.63283,4214605.62240981,19802.77422313917,-22918.400078060324,87.59968804551825,0.0,0.0,0.0 +16200.0,-113433124285.83624,-95730439293.77333,4372285.060891743,19802.77458852394,-22918.39976196203,87.59967934753196,0.0,0.0,0.0 +18000.0,-113397479291.5769,-95771692413.34486,4529964.4837173,19802.774953870718,-22918.39944584687,87.5996706504745,0.0,0.0,0.0 +19800.0,-113361834296.65994,-95812945532.34738,4687643.8908881545,19802.775319179502,-22918.399129714853,87.59966195434606,0.0,0.0,0.0 +21600.0,-113326189301.08542,-95854198650.78087,4845323.282405977,19802.775684450287,-22918.398813566,87.59965325914685,0.0,0.0,0.0 +23400.0,-113290544304.85341,-95895451768.6453,5003002.6582724415,19802.77604968307,-22918.39849740033,87.59964456487705,0.0,0.0,0.0 +25200.0,-113254899307.96397,-95936704885.94061,5160682.01848922,19802.776414877848,-22918.398181217854,87.59963587153686,0.0,0.0,0.0 +27000.0,-113219254310.41719,-95977958002.66681,5318361.363057987,19802.776780034612,-22918.39786501859,87.59962717912646,0.0,0.0,0.0 +28800.0,-113183609312.21313,-96019211118.82384,5476040.691980414,19802.77714515336,-22918.397548802554,87.59961848764604,0.0,0.0,0.0 +30600.0,-113147964313.35185,-96060464234.41168,5633720.005258177,19802.777510234086,-22918.39723256976,87.5996097970958,0.0,0.0,0.0 +32400.0,-113112319313.83344,-96101717349.43031,5791399.302892949,19802.777875276788,-22918.396916320227,87.5996011074759,0.0,0.0,0.0 +34200.0,-113076674313.65794,-96142970463.87968,5949078.584886406,19802.77824028146,-22918.39660005397,87.59959241878654,0.0,0.0,0.0 +36000.0,-113041029312.82544,-96184223577.75978,6106757.851240221,19802.778605248095,-22918.396283771002,87.5995837310279,0.0,0.0,0.0 +37800.0,-113005384311.336,-96225476691.07057,6264437.101956071,19802.778970176692,-22918.395967471344,87.59957504420015,0.0,0.0,0.0 +39600.0,-112969739309.18968,-96266729803.81203,6422116.337035632,19802.779335067247,-22918.39565115501,87.59956635830348,0.0,0.0,0.0 +41400.0,-112934094306.38657,-96307982915.9841,6579795.556480578,19802.779699919756,-22918.395334822017,87.59955767333804,0.0,0.0,0.0 +43200.0,-112898449302.92671,-96349236027.58678,6737474.760292587,19802.780064734212,-22918.39501847238,87.59954898930403,0.0,0.0,0.0 +45000.0,-112862804298.8102,-96390489138.62003,6895153.948473334,19802.78042951061,-22918.394702106114,87.5995403062016,0.0,0.0,0.0 +46800.0,-112827159294.03708,-96431742249.08382,7052833.121024497,19802.78079424895,-22918.394385723237,87.59953162403094,0.0,0.0,0.0 +48600.0,-112791514288.60744,-96472995358.97812,7210512.277947753,19802.781158949223,-22918.394069323764,87.5995229427922,0.0,0.0,0.0 +50400.0,-112755869282.52133,-96514248468.3029,7368191.419244778,19802.78152361143,-22918.393752907712,87.59951426248557,0.0,0.0,0.0 +52200.0,-112720224275.77882,-96555501577.05814,7525870.544917252,19802.78188823556,-22918.393436475097,87.59950558311118,0.0,0.0,0.0 +54000.0,-112684579268.38,-96596754685.24379,7683549.654966852,19802.782252821613,-22918.393120025936,87.59949690466922,0.0,0.0,0.0 +55800.0,-112648934260.32492,-96638007792.85983,7841228.749395256,19802.782617369583,-22918.392803560244,87.59948822715984,0.0,0.0,0.0 +57600.0,-112613289251.61366,-96679260899.90623,7998907.828204144,19802.782981879467,-22918.392487078036,87.5994795505832,0.0,0.0,0.0 +59400.0,-112577644242.24628,-96720514006.38298,8156586.8913951935,19802.78334635126,-22918.39217057933,87.59947087493946,0.0,0.0,0.0 +61200.0,-112541999232.22284,-96761767112.29002,8314265.938970084,19802.783710784963,-22918.391854064143,87.59946220022877,0.0,0.0,0.0 +63000.0,-112506354221.54343,-96803020217.62733,8471944.970930496,19802.784075180563,-22918.39153753249,87.59945352645128,0.0,0.0,0.0 +64800.0,-112470709210.2081,-96844273322.3949,8629623.98727811,19802.784439538063,-22918.391220984387,87.59944485360715,0.0,0.0,0.0 +66600.0,-112435064198.21693,-96885526426.59267,8787302.988014603,19802.784803857456,-22918.39090441985,87.59943618169653,0.0,0.0,0.0 +68400.0,-112399419185.56999,-96926779530.22063,8944981.973141657,19802.785168138736,-22918.390587838898,87.59942751071956,0.0,0.0,0.0 +70200.0,-112363774172.26735,-96968032633.27873,9102660.942660952,19802.785532381902,-22918.39027124154,87.5994188406764,0.0,0.0,0.0 +72000.0,-112328129158.30907,-97009285735.76697,9260339.89657417,19802.78589658695,-22918.3899546278,87.5994101715672,0.0,0.0,0.0 +73800.0,-112292484143.6952,-97050538837.6853,9418018.83488299,19802.786260753874,-22918.38963799769,87.59940150339207,0.0,0.0,0.0 +75600.0,-112256839128.42584,-97091791939.03369,9575697.757589094,19802.78662488267,-22918.389321351227,87.59939283615118,0.0,0.0,0.0 +77400.0,-112221194112.50105,-97133045039.81212,9733376.664694166,19802.786988973334,-22918.38900468843,87.59938416984467,0.0,0.0,0.0 +79200.0,-112185549095.9209,-97174298140.02055,9891055.556199886,19802.787353025862,-22918.388688009312,87.59937550447266,0.0,0.0,0.0 +81000.0,-112149904078.68546,-97215551239.65897,10048734.432107937,19802.787717040253,-22918.38837131389,87.5993668400353,0.0,0.0,0.0 +82800.0,-112114259060.79478,-97256804338.72733,10206413.29242,19802.7880810165,-22918.38805460218,87.59935817653272,0.0,0.0,0.0 +84600.0,-112078614042.24896,-97298057437.22562,10364092.13713776,19802.7884449546,-22918.387737874196,87.59934951396504,0.0,0.0,0.0 +86400.0,-112042969023.04805,-97339310535.1538,10521770.966262896,19802.788808854548,-22918.38742112996,87.5993408523324,0.0,0.0,0.0 diff --git a/data/final_data/Uranus_(799).csv b/data/final_data/Uranus_(799).csv new file mode 100644 index 0000000..842ece8 --- /dev/null +++ b/data/final_data/Uranus_(799).csv @@ -0,0 +1,50 @@ +dt,posX,posY,posZ,velX,velY,velZ,accX,accY,accZ +0.0,1749215996359.7183,2173215989356.584,-15723818934.27992,14481.56861490514,-18902.032915392374,171.34103924261714,0.0,0.0,0.0 +1800.0,1749242063183.225,2173181965697.3362,-15723510520.409285,14481.55099315116,-18902.054385792286,171.34118769086385,0.0,0.0,0.0 +3600.0,1749268129975.0127,2173147941999.4417,-15723202106.27144,14481.533371478452,-18902.07585627138,171.3413361377618,0.0,0.0,0.0 +5400.0,1749294196735.0813,2173113918262.9004,-15722893691.866392,14481.515749887014,-18902.09732682966,171.34148458331097,0.0,0.0,0.0 +7200.0,1749320263463.4312,2173079894487.7122,-15722585277.194141,14481.498128376847,-18902.11879746712,171.34163302751136,0.0,0.0,0.0 +9000.0,1749346330160.0623,2173045870673.8767,-15722276862.254692,14481.480506947952,-18902.140268183764,171.34178147036297,0.0,0.0,0.0 +10800.0,1749372396824.9749,2173011846821.394,-15721968447.048046,14481.46288560033,-18902.16173897959,171.3419299118658,0.0,0.0,0.0 +12600.0,1749398463458.169,2172977822930.264,-15721660031.574205,14481.44526433398,-18902.1832098546,171.34207835201983,0.0,0.0,0.0 +14400.0,1749424530059.6448,2172943799000.486,-15721351615.833172,14481.427643148902,-18902.20468080879,171.34222679082507,0.0,0.0,0.0 +16200.0,1749450596629.4023,2172909775032.0605,-15721043199.82495,14481.410022045098,-18902.226151842162,171.3423752282815,0.0,0.0,0.0 +18000.0,1749476663167.4421,2172875751024.9873,-15720734783.549538,14481.392401022567,-18902.247622954714,171.34252366438912,0.0,0.0,0.0 +19800.0,1749502729673.764,2172841726979.2659,-15720426367.00694,14481.37478008131,-18902.269094146446,171.34267209914796,0.0,0.0,0.0 +21600.0,1749528796148.3682,2172807702894.8965,-15720117950.197163,14481.357159221328,-18902.29056541736,171.342820532558,0.0,0.0,0.0 +23400.0,1749554862591.255,2172773678771.8787,-15719809533.120205,14481.33953844262,-18902.312036767453,171.34296896461922,0.0,0.0,0.0 +25200.0,1749580929002.424,2172739654610.2124,-15719501115.776068,14481.321917745188,-18902.333508196727,171.3431173953316,0.0,0.0,0.0 +27000.0,1749606995381.876,2172705630409.8977,-15719192698.164757,14481.304297129032,-18902.354979705182,171.34326582469518,0.0,0.0,0.0 +28800.0,1749633061729.6108,2172671606170.9343,-15718884280.286272,14481.28667659415,-18902.376451292817,171.34341425270995,0.0,0.0,0.0 +30600.0,1749659128045.6287,2172637581893.322,-15718575862.140617,14481.269056140545,-18902.39792295963,171.34356267937588,0.0,0.0,0.0 +32400.0,1749685194329.9297,2172603557577.0608,-15718267443.727795,14481.251435768218,-18902.419394705623,171.34371110469297,0.0,0.0,0.0 +34200.0,1749711260582.5142,2172569533222.1504,-15717959025.047806,14481.233815477166,-18902.440866530793,171.34385952866123,0.0,0.0,0.0 +36000.0,1749737326803.382,2172535508828.5906,-15717650606.100655,14481.216195267392,-18902.462338435143,171.34400795128064,0.0,0.0,0.0 +37800.0,1749763392992.5334,2172501484396.3813,-15717342186.886343,14481.198575138897,-18902.48381041867,171.34415637255123,0.0,0.0,0.0 +39600.0,1749789459149.9688,2172467459925.5227,-15717033767.404873,14481.180955091679,-18902.505282481376,171.34430479247297,0.0,0.0,0.0 +41400.0,1749815525275.688,2172433435416.0142,-15716725347.656246,14481.163335125739,-18902.526754623257,171.34445321104587,0.0,0.0,0.0 +43200.0,1749841591369.6912,2172399410867.856,-15716416927.640467,14481.145715241079,-18902.548226844316,171.3446016282699,0.0,0.0,0.0 +45000.0,1749867657431.9785,2172365386281.0476,-15716108507.357536,14481.128095437696,-18902.56969914455,171.34475004414512,0.0,0.0,0.0 +46800.0,1749893723462.5503,2172331361655.589,-15715800086.807457,14481.110475715594,-18902.591171523964,171.34489845867145,0.0,0.0,0.0 +48600.0,1749919789461.4065,2172297336991.4805,-15715491665.99023,14481.09285607477,-18902.612643982553,171.34504687184892,0.0,0.0,0.0 +50400.0,1749945855428.5474,2172263312288.7212,-15715183244.90586,14481.07523651523,-18902.63411652032,171.34519528367753,0.0,0.0,0.0 +52200.0,1749971921363.9731,2172229287547.3115,-15714874823.55435,14481.057617036968,-18902.655589137263,171.34534369415726,0.0,0.0,0.0 +54000.0,1749997987267.6838,2172195262767.251,-15714566401.9357,14481.039997639988,-18902.67706183338,171.34549210328814,0.0,0.0,0.0 +55800.0,1750024053139.6797,2172161237948.5398,-15714257980.049913,14481.02237832429,-18902.698534608673,171.34564051107014,0.0,0.0,0.0 +57600.0,1750050118979.9607,2172127213091.1775,-15713949557.896994,14481.004759089872,-18902.72000746314,171.34578891750326,0.0,0.0,0.0 +59400.0,1750076184788.527,2172093188195.164,-15713641135.476942,14480.987139936737,-18902.74148039678,171.3459373225875,0.0,0.0,0.0 +61200.0,1750102250565.379,2172059163260.4993,-15713332712.78976,14480.969520864885,-18902.762953409598,171.34608572632285,0.0,0.0,0.0 +63000.0,1750128316310.5164,2172025138287.183,-15713024289.835453,14480.951901874316,-18902.78442650159,171.3462341287093,0.0,0.0,0.0 +64800.0,1750154382023.9397,2171991113275.2153,-15712715866.614021,14480.93428296503,-18902.805899672752,171.3463825297469,0.0,0.0,0.0 +66600.0,1750180447705.649,2171957088224.596,-15712407443.125467,14480.916664137028,-18902.82737292309,171.34653092943557,0.0,0.0,0.0 +68400.0,1750206513355.6443,2171923063135.3247,-15712099019.369795,14480.89904539031,-18902.8488462526,171.34667932777535,0.0,0.0,0.0 +70200.0,1750232578973.926,2171889038007.4014,-15711790595.347004,14480.881426724876,-18902.870319661284,171.34682772476623,0.0,0.0,0.0 +72000.0,1750258644560.4941,2171855012840.826,-15711482171.0571,14480.863808140726,-18902.89179314914,171.34697612040821,0.0,0.0,0.0 +73800.0,1750284710115.3489,2171820987635.5981,-15711173746.500084,14480.846189637861,-18902.913266716172,171.34712451470128,0.0,0.0,0.0 +75600.0,1750310775638.4902,2171786962391.718,-15710865321.675957,14480.828571216283,-18902.934740362372,171.34727290764542,0.0,0.0,0.0 +77400.0,1750336841129.9185,2171752937109.1853,-15710556896.584723,14480.81095287599,-18902.956214087746,171.34742129924066,0.0,0.0,0.0 +79200.0,1750362906589.6335,2171718911788.0,-15710248471.226383,14480.793334616985,-18902.97768789229,171.347569689487,0.0,0.0,0.0 +81000.0,1750388972017.6357,2171684886428.1619,-15709940045.600943,14480.775716439264,-18902.999161776006,171.3477180783844,0.0,0.0,0.0 +82800.0,1750415037413.9253,2171650861029.6707,-15709631619.7084,14480.75809834283,-18903.020635738892,171.34786646593284,0.0,0.0,0.0 +84600.0,1750441102778.5022,2171616835592.5264,-15709323193.548761,14480.740480327686,-18903.04210978095,171.34801485213237,0.0,0.0,0.0 +86400.0,1750467168111.3667,2171582810116.7288,-15709014767.122028,14480.722862393828,-18903.063583902178,171.34816323698297,0.0,0.0,0.0 diff --git a/data/final_data/Venus_(299).csv b/data/final_data/Venus_(299).csv new file mode 100644 index 0000000..90a268f --- /dev/null +++ b/data/final_data/Venus_(299).csv @@ -0,0 +1,50 @@ +dt,posX,posY,posZ,velX,velY,velZ,accX,accY,accZ +0.0,-114495565333.35136,12285832583.975246,1524076667.7684717,-15335.716256488677,-23345.083756273158,2109.257635537643,0.0,0.0,0.0 +1800.0,-114523169622.61304,12243811433.213955,1527873331.5124395,-15335.573774955208,-23365.692424602476,2108.9663990446043,0.0,0.0,0.0 +3600.0,-114550773655.40796,12201753186.84967,1531669471.0307198,-15335.419183133637,-23386.30109646764,2108.6744637247384,0.0,0.0,0.0 +5400.0,-114578377409.9376,12159657844.876028,1535465085.0654242,-15335.252480896886,-23406.909764658736,2108.381829669731,0.0,0.0,0.0 +7200.0,-114605980864.40323,12117525407.299643,1539260172.3588297,-15335.073668122235,-23427.518421965637,2108.0884969715216,0.0,0.0,0.0 +9000.0,-114633583997.00584,12075355874.140104,1543054731.6533785,-15334.882744691326,-23448.127061177984,2107.7944657223056,0.0,0.0,0.0 +10800.0,-114661186785.94629,12033149245.429983,1546848761.6916785,-15334.679710490163,-23468.7356750852,2107.499736014532,0.0,0.0,0.0 +12600.0,-114688789209.42517,11990905521.21483,1550642261.2165046,-15334.464565409115,-23489.3442564765,2107.204307940905,0.0,0.0,0.0 +14400.0,-114716391245.64291,11948624701.553173,1554435228.9707983,-15334.237309342907,-23509.952798140876,2106.9081815943828,0.0,0.0,0.0 +16200.0,-114743992872.79973,11906306786.51652,1558227663.697668,-15333.997942190634,-23530.56129286711,2106.611357068179,0.0,0.0,0.0 +18000.0,-114771594069.09567,11863951776.18936,1562019564.1403909,-15333.746463855749,-23551.169733443785,2106.313834455762,0.0,0.0,0.0 +19800.0,-114799194812.7306,11821559670.66916,1565810929.0424113,-15333.482874246069,-23571.778112659267,2106.0156138508532,0.0,0.0,0.0 +21600.0,-114826795081.90425,11779130470.066374,1569601757.147343,-15333.207173273777,-23592.386423301727,2105.7166953474307,0.0,0.0,0.0 +23400.0,-114854394854.81615,11736664174.50443,1573392047.1989684,-15332.91936085542,-23612.994658159132,2105.4170790397256,0.0,0.0,0.0 +25200.0,-114881994109.66568,11694160784.119745,1577181797.9412398,-15332.619436911906,-23633.602810019256,2105.116765022224,0.0,0.0,0.0 +27000.0,-114909592824.65211,11651620299.06171,1580971008.11828,-15332.307401368509,-23654.210871669675,2104.815753389667,0.0,0.0,0.0 +28800.0,-114937190977.97458,11609042719.492704,1584759676.4743814,-15331.98325415487,-23674.818835897775,2104.5140442370493,0.0,0.0,0.0 +30600.0,-114964788547.83206,11566428045.588089,1588547801.754008,-15331.646995204992,-23695.42669549075,2104.211637659621,0.0,0.0,0.0 +32400.0,-114992385512.42343,11523776277.536205,1592335382.7017953,-15331.298624457246,-23716.034443235614,2103.908533752886,0.0,0.0,0.0 +34200.0,-115019981849.94745,11481087415.538382,1596122418.0625505,-15330.938141854369,-23736.642071919192,2103.6047326126027,0.0,0.0,0.0 +36000.0,-115047577538.60278,11438361459.808928,1599908906.5812533,-15330.565547343462,-23757.24957432813,2103.300234334784,0.0,0.0,0.0 +37800.0,-115075172556.588,11395598410.575136,1603694847.0030558,-15330.180840875993,-23777.856943248895,2102.9950390156973,0.0,0.0,0.0 +39600.0,-115102766882.10158,11352798268.077288,1607480238.0732841,-15329.784022407799,-23798.464171467782,2102.6891467518644,0.0,0.0,0.0 +41400.0,-115130360493.34192,11309961032.568645,1611265078.5374374,-15329.37509189908,-23819.07125177091,2102.382557640061,0.0,0.0,0.0 +43200.0,-115157953368.50734,11267086704.315458,1615049367.1411896,-15328.954049314409,-23839.678176944235,2102.0752717773175,0.0,0.0,0.0 +45000.0,-115185545485.79611,11224175283.596958,1618833102.6303887,-15328.52089462272,-23860.284939773537,2101.767289260919,0.0,0.0,0.0 +46800.0,-115213136823.40643,11181226770.705366,1622616283.7510583,-15328.07562779732,-23880.891533044436,2101.458610188404,0.0,0.0,0.0 +48600.0,-115240727359.53647,11138241165.945887,1626398909.2493975,-15327.618248815881,-23901.497949542394,2101.1492346575656,0.0,0.0,0.0 +50400.0,-115268317072.38434,11095218469.636711,1630180977.871781,-15327.148757660447,-23922.104182052706,2100.839162766452,0.0,0.0,0.0 +52200.0,-115295905940.14813,11052158682.109016,1633962488.3647606,-15326.667154317425,-23942.710223360522,2100.528394613364,0.0,0.0,0.0 +54000.0,-115323493941.02591,11009061803.706968,1637743439.4750648,-15326.173438777598,-23963.316066250827,2100.216930296858,0.0,0.0,0.0 +55800.0,-115351081053.21571,10965927834.787716,1641523829.949599,-15325.667611036113,-23983.921703508462,2099.9047699157445,0.0,0.0,0.0 +57600.0,-115378667254.91557,10922756775.721401,1645303658.5354474,-15325.14967109249,-24004.52712791812,2099.591913569087,0.0,0.0,0.0 +59400.0,-115406252524.32353,10879548626.89115,1649082923.9798717,-15324.619618950615,-24025.132332264355,2099.2783613562037,0.0,0.0,0.0 +61200.0,-115433836839.63765,10836303388.693073,1652861625.030313,-15324.07745461875,-24045.737309331565,2098.9641133766677,0.0,0.0,0.0 +63000.0,-115461420179.05597,10793021061.536276,1656639760.434391,-15323.52317810952,-24066.34205190402,2098.649169730305,0.0,0.0,0.0 +64800.0,-115489002520.77657,10749701645.842848,1660417328.9399056,-15322.95678943993,-24086.946552765847,2098.3335305171963,0.0,0.0,0.0 +66600.0,-115516583842.99756,10706345142.047869,1664194329.2948365,-15322.378288631346,-24107.550804701044,2098.017195837677,0.0,0.0,0.0 +68400.0,-115544164123.9171,10662951550.599407,1667970760.2473443,-15321.787675709511,-24128.154800493474,2097.7001657923347,0.0,0.0,0.0 +70200.0,-115571743341.73338,10619520871.958519,1671746620.5457704,-15321.184950704539,-24148.758532926873,2097.382440482013,0.0,0.0,0.0 +72000.0,-115599321474.64465,10576053106.59925,1675521908.938638,-15320.570113650916,-24169.361994784853,2097.0640200078083,0.0,0.0,0.0 +73800.0,-115626898500.84923,10532548255.008638,1679296624.174652,-15319.943164587497,-24189.9651788509,2096.744904471071,0.0,0.0,0.0 +75600.0,-115654474398.54549,10489006317.686707,1683070765.0027,-15319.304103557513,-24210.568077908385,2096.425093973406,0.0,0.0,0.0 +77400.0,-115682049145.93188,10445427295.146471,1686844330.171852,-15318.652930608567,-24231.170684740555,2096.1045886166717,0.0,0.0,0.0 +79200.0,-115709622721.20699,10401811187.913939,1690617318.4313622,-15317.989645792632,-24251.772992130544,2095.7833885029804,0.0,0.0,0.0 +81000.0,-115737195102.56941,10358157996.528103,1694389728.5306675,-15317.314249166056,-24272.37499286138,2095.4614937346987,0.0,0.0,0.0 +82800.0,-115764766268.21791,10314467721.540953,1698161559.21939,-15316.626740789561,-24292.976679715975,2095.138904414446,0.0,0.0,0.0 +84600.0,-115792336196.35133,10270740363.517464,1701932809.247336,-15315.927120728242,-24313.578045477137,2094.8156206450967,0.0,0.0,0.0 +86400.0,-115819904865.16864,10226975923.035604,1705703477.3644972,-15315.215389051567,-24334.17908292757,2094.4916425297783,0.0,0.0,0.0 diff --git a/data/final_data/eng_info.txt b/data/final_data/eng_info.txt new file mode 100644 index 0000000..6bc1aba --- /dev/null +++ b/data/final_data/eng_info.txt @@ -0,0 +1,88 @@ +dt = 1800 +checking_range = 3 +# number of intervals: 49 +# bodies:(9) +~ do_collisions = False +~ do_bodygravity = True +~ do_fieldgravity = False +*Sun_(10) [ +name = Sun (10) +mass = 1.9885e+30 +radius = 695700000.0 +color = #F28322 +bounce = 0.999 +position = (-112042969023.04805, -97339310535.1538, 10521770.966262896) +velocity = (19802.788808854548, -22918.38742112996, 87.5993408523324) +] +*Mercury_(199) [ +name = Mercury (199) +mass = 3.3020999999999996e+23 +radius = 2440000.0 +color = #BFBEBD +bounce = 0.999 +position = (-136082624854.89519, -162647734029.37228, -3121528248.954771) +velocity = (55728.65244378983, -37338.33232706968, -4386.085780981073) +] +*Venus_(299) [ +name = Venus (299) +mass = 4.86851e+24 +radius = 6051840.0 +color = #D9B391 +bounce = 0.999 +position = (-115819904865.16864, 10226975923.035604, 1705703477.3644972) +velocity = (-15315.215389051567, -24334.17908292757, 2094.4916425297783) +] +*Earth_(399) [ +name = Earth (399) +mass = 5.97219e+24 +radius = 6371010.0 +color = #63BAA6 +bounce = 0.999 +position = (-3204306.2514172182, -35900943.86008729, 3945836.2973222043) +velocity = (-204.0772169335831, -537.7444863602921, 86.22808354540909) +] +*Mars_(499) [ +name = Mars (499) +mass = 6.417099999999999e+23 +radius = 3389920.0 +color = #F27A5E +bounce = 0.999 +position = (-267482058081.6502, -270491127861.42865, 194541624.277289) +velocity = (38742.401243583314, -37031.92643949925, -672.7592507699325) +] +*Jupiter_(599) [ +name = Jupiter (599) +mass = 1.89818722e+27 +radius = 69911000.0 +color = #BFAE99 +bounce = 0.999 +position = (455863271633.7467, 383392297694.08075, -14692251283.636326) +velocity = (11202.31290796962, -12319.464293151175, 236.06278468263707) +] +*Saturn_(699) [ +name = Saturn (699) +mass = 5.6834e+26 +radius = 58232000.0 +color = #D9B779 +bounce = 0.999 +position = (1217264264326.576, -697657542025.7266, -42453798733.28907) +velocity = (23237.092609871823, -14122.038550821933, -202.5825848491376) +] +*Uranus_(799) [ +name = Uranus (799) +mass = 8.6813e+25 +radius = 25362000.0 +color = #95BBBF +bounce = 0.999 +position = (1750467168111.3667, 2171582810116.7288, -15709014767.122028) +velocity = (14480.722862393828, -18903.063583902178, 171.34816323698297) +] +*Neptune_(899) [ +name = Neptune (899) +mass = 1.02409e+26 +radius = 24624000.0 +color = #789EBF +bounce = 0.999 +position = (4350906222508.259, -392662794662.39795, -96756885488.3363) +velocity = (20118.63307308588, -17449.682420754125, -32.1176102667227) +] diff --git a/data/initial_data/Earth_(399).csv b/data/initial_data/Earth_(399).csv new file mode 100644 index 0000000..fed9c5b --- /dev/null +++ b/data/initial_data/Earth_(399).csv @@ -0,0 +1,2 @@ +dt,posX,posY,posZ,velX,velY,velZ,accX,accY,accZ +0.0,-2997119.8657687576,-4388557.225749306,-3503293.6830374366,191.9806108721381,-199.92763937015386,86.20601383202848,0.0,0.0,0.0 diff --git a/data/initial_data/Jupiter_(599).csv b/data/initial_data/Jupiter_(599).csv new file mode 100644 index 0000000..b72ff23 --- /dev/null +++ b/data/initial_data/Jupiter_(599).csv @@ -0,0 +1,2 @@ +dt,posX,posY,posZ,velX,velY,velZ,accX,accY,accZ +0.0,454894694737.0841,384456109898.2066,-14712629064.838978,11218.12291185019,-12306.100648555494,235.65357275048893,0.0,0.0,0.0 diff --git a/data/initial_data/Mars_(499).csv b/data/initial_data/Mars_(499).csv new file mode 100644 index 0000000..f944a99 --- /dev/null +++ b/data/initial_data/Mars_(499).csv @@ -0,0 +1,2 @@ +dt,posX,posY,posZ,velX,velY,velZ,accX,accY,accZ +0.0,-270823144298.29593,-267284641643.61453,252659719.3060816,38600.32701332715,-37188.77571637019,-672.5612779234887,0.0,0.0,0.0 diff --git a/data/initial_data/Mercury_(199).csv b/data/initial_data/Mercury_(199).csv new file mode 100644 index 0000000..601a7ab --- /dev/null +++ b/data/initial_data/Mercury_(199).csv @@ -0,0 +1,2 @@ +dt,posX,posY,posZ,velX,velY,velZ,accX,accY,accZ +0.0,-140859945532.0178,-159324501055.22537,-2738079099.35765,54857.390437183116,-39537.09865529015,-4485.855370256207,0.0,0.0,0.0 diff --git a/data/initial_data/Neptune_(899).csv b/data/initial_data/Neptune_(899).csv new file mode 100644 index 0000000..5563d78 --- /dev/null +++ b/data/initial_data/Neptune_(899).csv @@ -0,0 +1,2 @@ +dt,posX,posY,posZ,velX,velY,velZ,accX,accY,accZ +0.0,4349167947359.8755,-391155140426.7016,-96754109979.39952,20119.20565438934,-17449.720402113522,-32.130022966168966,0.0,0.0,0.0 diff --git a/data/initial_data/Saturn_(699).csv b/data/initial_data/Saturn_(699).csv new file mode 100644 index 0000000..4b6e182 --- /dev/null +++ b/data/initial_data/Saturn_(699).csv @@ -0,0 +1,2 @@ +dt,posX,posY,posZ,velX,velY,velZ,accX,accY,accZ +0.0,1215256363034.1042,-696437299918.3436,-42436288682.30302,23242.00145522106,-14124.260670225345,-202.73938513919018,0.0,0.0,0.0 diff --git a/data/initial_data/Sun_(10).csv b/data/initial_data/Sun_(10).csv new file mode 100644 index 0000000..bf8b780 --- /dev/null +++ b/data/initial_data/Sun_(10).csv @@ -0,0 +1,2 @@ +dt,posX,posY,posZ,velX,velY,velZ,accX,accY,accZ +0.0,-113753929204.56596,-95359161192.02925,2953169.5507243276,19802.77129869398,-22918.402606237498,87.59975766282224,0.0,0.0,0.0 diff --git a/data/initial_data/Uranus_(799).csv b/data/initial_data/Uranus_(799).csv new file mode 100644 index 0000000..cc5a1d8 --- /dev/null +++ b/data/initial_data/Uranus_(799).csv @@ -0,0 +1,2 @@ +dt,posX,posY,posZ,velX,velY,velZ,accX,accY,accZ +0.0,1749215996359.7183,2173215989356.584,-15723818934.27992,14481.56861490514,-18902.032915392374,171.34103924261714,0.0,0.0,0.0 diff --git a/data/initial_data/Venus_(299).csv b/data/initial_data/Venus_(299).csv new file mode 100644 index 0000000..a960af9 --- /dev/null +++ b/data/initial_data/Venus_(299).csv @@ -0,0 +1,2 @@ +dt,posX,posY,posZ,velX,velY,velZ,accX,accY,accZ +0.0,-114495565333.35136,12285832583.975246,1524076667.7684717,-15335.716256488677,-23345.083756273158,2109.257635537643,0.0,0.0,0.0 diff --git a/data/initial_data/eng_info.txt b/data/initial_data/eng_info.txt new file mode 100644 index 0000000..9b0678c --- /dev/null +++ b/data/initial_data/eng_info.txt @@ -0,0 +1,88 @@ +dt = 1800 +checking_range = 3 +# number of intervals: 1 +# bodies:(9) +~ do_collisions = False +~ do_bodygravity = True +~ do_fieldgravity = False +*Sun_(10) [ +name = Sun (10) +mass = 1.9885e+30 +radius = 695700000.0 +color = #F28322 +bounce = 0.999 +position = (-113753929204.56596, -95359161192.02925, 2953169.5507243276) +velocity = (19802.77129869398, -22918.402606237498, 87.59975766282224) +] +*Mercury_(199) [ +name = Mercury (199) +mass = 3.3020999999999996e+23 +radius = 2440000.0 +color = #BFBEBD +bounce = 0.999 +position = (-140859945532.0178, -159324501055.22537, -2738079099.35765) +velocity = (54857.390437183116, -39537.09865529015, -4485.855370256207) +] +*Venus_(299) [ +name = Venus (299) +mass = 4.86851e+24 +radius = 6051840.0 +color = #D9B391 +bounce = 0.999 +position = (-114495565333.35136, 12285832583.975246, 1524076667.7684717) +velocity = (-15335.716256488677, -23345.083756273158, 2109.257635537643) +] +*Earth_(399) [ +name = Earth (399) +mass = 5.97219e+24 +radius = 6371010.0 +color = #63BAA6 +bounce = 0.999 +position = (-2997119.8657687576, -4388557.225749306, -3503293.6830374366) +velocity = (191.9806108721381, -199.92763937015386, 86.20601383202848) +] +*Mars_(499) [ +name = Mars (499) +mass = 6.417099999999999e+23 +radius = 3389920.0 +color = #F27A5E +bounce = 0.999 +position = (-270823144298.29593, -267284641643.61453, 252659719.3060816) +velocity = (38600.32701332715, -37188.77571637019, -672.5612779234887) +] +*Jupiter_(599) [ +name = Jupiter (599) +mass = 1.89818722e+27 +radius = 69911000.0 +color = #BFAE99 +bounce = 0.999 +position = (454894694737.0841, 384456109898.2066, -14712629064.838978) +velocity = (11218.12291185019, -12306.100648555494, 235.65357275048893) +] +*Saturn_(699) [ +name = Saturn (699) +mass = 5.6834e+26 +radius = 58232000.0 +color = #D9B779 +bounce = 0.999 +position = (1215256363034.1042, -696437299918.3436, -42436288682.30302) +velocity = (23242.00145522106, -14124.260670225345, -202.73938513919018) +] +*Uranus_(799) [ +name = Uranus (799) +mass = 8.6813e+25 +radius = 25362000.0 +color = #95BBBF +bounce = 0.999 +position = (1749215996359.7183, 2173215989356.584, -15723818934.27992) +velocity = (14481.56861490514, -18902.032915392374, 171.34103924261714) +] +*Neptune_(899) [ +name = Neptune (899) +mass = 1.02409e+26 +radius = 24624000.0 +color = #789EBF +bounce = 0.999 +position = (4349167947359.8755, -391155140426.7016, -96754109979.39952) +velocity = (20119.20565438934, -17449.720402113522, -32.130022966168966) +] diff --git a/data/object_name.csv b/data/object_name.csv deleted file mode 100644 index 8a6c049..0000000 --- a/data/object_name.csv +++ /dev/null @@ -1,101 +0,0 @@ -dt,posX,posY,posZ,velX,velY,velZ,accX,accY,accZ -0.0,6.0,1.0,2.0,100.0,100.0,100.0,0,0,0 -1.0,-39.0080586386765,149.336019546225,53.6639804537745,-45.0080587484425,148.336019582814,51.6639804171858,0,0,0 -2.0,-84.016117387119,297.67203912904,105.32796087096,-45.008058748427,148.336019582769,51.6639804171716,0,0,0 -3.0,-129.024176135546,446.008058711809,156.991941288132,-45.008058748423,148.336019582758,51.6639804171682,0,0,0 -4.0,-174.032234883969,594.344078294567,208.6559217053,-45.0080587484213,148.336019582753,51.6639804171666,0,0,0 -5.0,-219.04029363239,742.680097877319,260.319902122467,-45.0080587484203,148.33601958275,51.6639804171658,0,0,0 -6.0,-264.048352380811,891.01611746007,311.983882539632,-45.0080587484196,148.336019582748,51.6639804171652,0,0,0 -7.0,-309.05641112923,1039.35213704282,363.647862956798,-45.0080587484192,148.336019582747,51.6639804171649,0,0,0 -8.0,-354.064469877649,1187.68815662557,415.311843373963,-45.0080587484189,148.336019582746,51.6639804171646,0,0,0 -9.0,-399.072528626068,1336.02417620831,466.975823791127,-45.0080587484186,148.336019582746,51.6639804171644,0,0,0 -10.0,-444.080587374487,1484.36019579106,518.639804208291,-45.0080587484184,148.336019582745,51.6639804171642,0,0,0 -11.0,-489.088646122905,1632.6962153738,570.303784625456,-45.0080587484183,148.336019582745,51.6639804171641,0,0,0 -12.0,-534.096704871324,1781.03223495655,621.96776504262,-45.0080587484181,148.336019582744,51.6639804171639,0,0,0 -13.0,-579.104763619742,1929.36825453929,673.631745459784,-45.008058748418,148.336019582744,51.6639804171638,0,0,0 -14.0,-624.11282236816,2077.70427412203,725.295725876947,-45.0080587484179,148.336019582744,51.6639804171638,0,0,0 -15.0,-669.120881116578,2226.04029370478,776.959706294111,-45.0080587484179,148.336019582743,51.6639804171637,0,0,0 -16.0,-714.128939864996,2374.37631328752,828.623686711275,-45.0080587484178,148.336019582743,51.6639804171636,0,0,0 -17.0,-759.136998613414,2522.71233287027,880.287667128439,-45.0080587484177,148.336019582743,51.6639804171636,0,0,0 -18.0,-804.145057361831,2671.04835245301,931.951647545602,-45.0080587484177,148.336019582743,51.6639804171635,0,0,0 -19.0,-849.153116110249,2819.38437203575,983.615627962766,-45.0080587484176,148.336019582743,51.6639804171635,0,0,0 -20.0,-894.161174858667,2967.72039161849,1035.27960837993,-45.0080587484176,148.336019582743,51.6639804171635,0,0,0 -21.0,-939.169233607084,3116.05641120124,1086.94358879709,-45.0080587484175,148.336019582742,51.6639804171634,0,0,0 -22.0,-984.177292355502,3264.39243078398,1138.60756921426,-45.0080587484175,148.336019582742,51.6639804171634,0,0,0 -23.0,-1029.18535110392,3412.72845036672,1190.27154963142,-45.0080587484175,148.336019582742,51.6639804171634,0,0,0 -24.0,-1074.19340985234,3561.06446994946,1241.93553004858,-45.0080587484174,148.336019582742,51.6639804171633,0,0,0 -25.0,-1119.20146860075,3709.40048953221,1293.59951046575,-45.0080587484174,148.336019582742,51.6639804171633,0,0,0 -26.0,-1164.20952734917,3857.73650911495,1345.26349088291,-45.0080587484174,148.336019582742,51.6639804171633,0,0,0 -27.0,-1209.21758609759,4006.07252869769,1396.92747130007,-45.0080587484174,148.336019582742,51.6639804171633,0,0,0 -28.0,-1254.22564484601,4154.40854828043,1448.59145171724,-45.0080587484173,148.336019582742,51.6639804171633,0,0,0 -29.0,-1299.23370359442,4302.74456786317,1500.2554321344,-45.0080587484173,148.336019582742,51.6639804171632,0,0,0 -30.0,-1344.24176234284,4451.08058744592,1551.91941255156,-45.0080587484173,148.336019582742,51.6639804171632,0,0,0 -31.0,-1389.24982109126,4599.41660702866,1603.58339296873,-45.0080587484173,148.336019582742,51.6639804171632,0,0,0 -32.0,-1434.25787983968,4747.7526266114,1655.24737338589,-45.0080587484173,148.336019582742,51.6639804171632,0,0,0 -33.0,-1479.26593858809,4896.08864619414,1706.91135380305,-45.0080587484172,148.336019582742,51.6639804171632,0,0,0 -34.0,-1524.27399733651,5044.42466577688,1758.57533422022,-45.0080587484172,148.336019582742,51.6639804171632,0,0,0 -35.0,-1569.28205608493,5192.76068535962,1810.23931463738,-45.0080587484172,148.336019582742,51.6639804171632,0,0,0 -36.0,-1614.29011483334,5341.09670494237,1861.90329505454,-45.0080587484172,148.336019582742,51.6639804171631,0,0,0 -37.0,-1659.29817358176,5489.43272452511,1913.5672754717,-45.0080587484172,148.336019582742,51.6639804171631,0,0,0 -38.0,-1704.30623233018,5637.76874410785,1965.23125588887,-45.0080587484172,148.336019582742,51.6639804171631,0,0,0 -39.0,-1749.3142910786,5786.10476369059,2016.89523630603,-45.0080587484172,148.336019582741,51.6639804171631,0,0,0 -40.0,-1794.32234982701,5934.44078327333,2068.55921672319,-45.0080587484172,148.336019582741,51.6639804171631,0,0,0 -41.0,-1839.33040857543,6082.77680285607,2120.22319714036,-45.0080587484171,148.336019582741,51.6639804171631,0,0,0 -42.0,-1884.33846732385,6231.11282243882,2171.88717755752,-45.0080587484171,148.336019582741,51.6639804171631,0,0,0 -43.0,-1929.34652607226,6379.44884202156,2223.55115797468,-45.0080587484171,148.336019582741,51.6639804171631,0,0,0 -44.0,-1974.35458482068,6527.7848616043,2275.21513839185,-45.0080587484171,148.336019582741,51.6639804171631,0,0,0 -45.0,-2019.3626435691,6676.12088118704,2326.87911880901,-45.0080587484171,148.336019582741,51.6639804171631,0,0,0 -46.0,-2064.37070231752,6824.45690076978,2378.54309922617,-45.0080587484171,148.336019582741,51.6639804171631,0,0,0 -47.0,-2109.37876106593,6972.79292035253,2430.20707964334,-45.0080587484171,148.336019582741,51.6639804171631,0,0,0 -48.0,-2154.38681981435,7121.12893993527,2481.8710600605,-45.0080587484171,148.336019582741,51.6639804171631,0,0,0 -49.0,-2199.39487856277,7269.46495951801,2533.53504047766,-45.0080587484171,148.336019582741,51.6639804171631,0,0,0 -50.0,-2244.40293731118,7417.80097910075,2585.19902089483,-45.0080587484171,148.336019582741,51.663980417163,0,0,0 -51.0,-2289.4109960596,7566.13699868349,2636.86300131199,-45.0080587484171,148.336019582741,51.663980417163,0,0,0 -52.0,-2334.41905480802,7714.47301826623,2688.52698172915,-45.0080587484171,148.336019582741,51.663980417163,0,0,0 -53.0,-2379.42711355644,7862.80903784897,2740.19096214632,-45.0080587484171,148.336019582741,51.663980417163,0,0,0 -54.0,-2424.43517230485,8011.14505743171,2791.85494256348,-45.0080587484171,148.336019582741,51.663980417163,0,0,0 -55.0,-2469.44323105327,8159.48107701445,2843.51892298064,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -56.0,-2514.45128980169,8307.81709659719,2895.18290339781,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -57.0,-2559.4593485501,8456.15311617993,2946.84688381497,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -58.0,-2604.46740729852,8604.48913576267,2998.51086423213,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -59.0,-2649.47546604694,8752.82515534542,3050.1748446493,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -60.0,-2694.48352479536,8901.16117492816,3101.83882506646,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -61.0,-2739.49158354377,9049.4971945109,3153.50280548362,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -62.0,-2784.49964229219,9197.83321409364,3205.16678590078,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -63.0,-2829.50770104061,9346.16923367638,3256.83076631795,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -64.0,-2874.51575978902,9494.50525325912,3308.49474673511,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -65.0,-2919.52381853744,9642.84127284186,3360.15872715227,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -66.0,-2964.53187728586,9791.1772924246,3411.82270756943,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -67.0,-3009.53993603428,9939.51331200734,3463.4866879866,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -68.0,-3054.54799478269,10087.8493315901,3515.15066840376,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -69.0,-3099.55605353111,10236.1853511728,3566.81464882092,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -70.0,-3144.56411227953,10384.5213707556,3618.47862923809,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -71.0,-3189.57217102794,10532.8573903383,3670.14260965525,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -72.0,-3234.58022977636,10681.193409921,3721.80659007241,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -73.0,-3279.58828852478,10829.5294295038,3773.47057048957,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -74.0,-3324.5963472732,10977.8654490865,3825.13455090674,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -75.0,-3369.60440602161,11126.2014686693,3876.7985313239,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -76.0,-3414.61246477003,11274.537488252,3928.46251174106,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -77.0,-3459.62052351845,11422.8735078348,3980.12649215823,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -78.0,-3504.62858226687,11571.2095274175,4031.79047257539,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -79.0,-3549.63664101528,11719.5455470002,4083.45445299255,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -80.0,-3594.6446997637,11867.881566583,4135.11843340971,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -81.0,-3639.65275851212,12016.2175861657,4186.78241382688,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -82.0,-3684.66081726053,12164.5536057485,4238.44639424404,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -83.0,-3729.66887600895,12312.8896253312,4290.1103746612,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -84.0,-3774.67693475737,12461.2256449139,4341.77435507836,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -85.0,-3819.68499350579,12609.5616644967,4393.43833549553,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -86.0,-3864.6930522542,12757.8976840794,4445.10231591269,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -87.0,-3909.70111100262,12906.2337036622,4496.76629632985,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -88.0,-3954.70916975104,13054.5697232449,4548.43027674702,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -89.0,-3999.71722849945,13202.9057428276,4600.09425716418,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -90.0,-4044.72528724787,13351.2417624104,4651.75823758134,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -91.0,-4089.73334599629,13499.5777819931,4703.4222179985,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -92.0,-4134.74140474471,13647.9138015759,4755.08619841567,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -93.0,-4179.74946349312,13796.2498211586,4806.75017883283,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -94.0,-4224.75752224154,13944.5858407413,4858.41415924999,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -95.0,-4269.76558098996,14092.9218603241,4910.07813966715,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -96.0,-4314.77363973837,14241.2578799068,4961.74212008432,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -97.0,-4359.78169848679,14389.5938994896,5013.40610050148,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -98.0,-4404.78975723521,14537.9299190723,5065.07008091864,-45.008058748417,148.336019582741,51.663980417163,0,0,0 -99.0,-4449.79781598363,14686.265938655,5116.73406133581,-45.008058748417,148.336019582741,51.663980417163,0,0,0 diff --git a/data/object_name2.csv b/data/object_name2.csv deleted file mode 100644 index 405e39c..0000000 --- a/data/object_name2.csv +++ /dev/null @@ -1,101 +0,0 @@ -dt,posX,posY,posZ,velX,velY,velZ,accX,accY,accZ -0.0,3.0,2.0,1.0,9.0,-1.0,6.0,0,0,0 -1.0,12.0103049976872,0.996565000770947,7.00343499922905,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -2.0,21.0206099953821,-0.00686999846070524,13.0068699984607,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -3.0,30.0309149930771,-1.01030499769235,19.0103049976924,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -4.0,39.041219990772,-2.013739996924,25.013739996924,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -5.0,48.051524988467,-3.01717499615565,31.0171749961557,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -6.0,57.0618299861619,-4.0206099953873,37.0206099953873,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -7.0,66.0721349838569,-5.02404499461895,43.024044994619,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -8.0,75.0824399815519,-6.0274799938506,49.0274799938506,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -9.0,84.0927449792468,-7.03091499308224,55.0309149930823,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -10.0,93.1030499769418,-8.03434999231389,61.0343499923139,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -11.0,102.113354974637,-9.03778499154554,67.0377849915456,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -12.0,111.123659972332,-10.0412199907772,73.0412199907773,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -13.0,120.133964970027,-11.0446549900088,79.0446549900089,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -14.0,129.144269967722,-12.0480899892405,85.0480899892406,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -15.0,138.154574965417,-13.0515249884721,91.0515249884722,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -16.0,147.164879963112,-14.0549599877038,97.0549599877039,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -17.0,156.175184960806,-15.0583949869354,103.058394986936,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -18.0,165.185489958501,-16.0618299861671,109.061829986167,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -19.0,174.195794956196,-17.0652649853987,115.065264985399,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -20.0,183.206099953891,-18.0686999846304,121.068699984631,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -21.0,192.216404951586,-19.072134983862,127.072134983862,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -22.0,201.226709949281,-20.0755699830937,133.075569983094,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -23.0,210.237014946976,-21.0790049823253,139.079004982325,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -24.0,219.247319944671,-22.082439981557,145.082439981557,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -25.0,228.257624942366,-23.0858749807886,151.085874980789,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -26.0,237.267929940061,-24.0893099800202,157.08930998002,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -27.0,246.278234937756,-25.0927449792519,163.092744979252,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -28.0,255.288539935451,-26.0961799784835,169.096179978484,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -29.0,264.298844933146,-27.0996149777152,175.099614977715,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -30.0,273.309149930841,-28.1030499769468,181.103049976947,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -31.0,282.319454928536,-29.1064849761785,187.106484976179,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -32.0,291.329759926231,-30.1099199754101,193.10991997541,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -33.0,300.340064923926,-31.1133549746418,199.113354974642,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -34.0,309.350369921621,-32.1167899738734,205.116789973874,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -35.0,318.360674919316,-33.1202249731051,211.120224973105,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -36.0,327.370979917011,-34.1236599723367,217.123659972337,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -37.0,336.381284914706,-35.1270949715684,223.127094971568,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -38.0,345.391589912401,-36.1305299708,229.1305299708,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -39.0,354.401894910096,-37.1339649700317,235.133964970032,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -40.0,363.412199907791,-38.1373999692633,241.137399969263,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -41.0,372.422504905485,-39.140834968495,247.140834968495,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -42.0,381.43280990318,-40.1442699677266,253.144269967727,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -43.0,390.443114900875,-41.1477049669583,259.147704966958,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -44.0,399.45341989857,-42.1511399661899,265.15113996619,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -45.0,408.463724896265,-43.1545749654216,271.154574965422,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -46.0,417.47402989396,-44.1580099646532,277.158009964653,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -47.0,426.484334891655,-45.1614449638849,283.161444963885,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -48.0,435.49463988935,-46.1648799631165,289.164879963117,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -49.0,444.504944887045,-47.1683149623482,295.168314962348,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -50.0,453.51524988474,-48.1717499615798,301.17174996158,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -51.0,462.525554882435,-49.1751849608115,307.175184960812,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -52.0,471.53585988013,-50.1786199600431,313.178619960043,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -53.0,480.546164877825,-51.1820549592748,319.182054959275,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -54.0,489.55646987552,-52.1854899585064,325.185489958507,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -55.0,498.566774873215,-53.1889249577381,331.188924957738,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -56.0,507.57707987091,-54.1923599569697,337.19235995697,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -57.0,516.587384868605,-55.1957949562014,343.195794956202,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -58.0,525.5976898663,-56.199229955433,349.199229955433,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -59.0,534.607994863995,-57.2026649546647,355.202664954665,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -60.0,543.618299861689,-58.2060999538963,361.206099953897,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -61.0,552.628604859384,-59.209534953128,367.209534953128,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -62.0,561.638909857079,-60.2129699523596,373.21296995236,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -63.0,570.649214854774,-61.2164049515913,379.216404951592,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -64.0,579.659519852469,-62.2198399508229,385.219839950823,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -65.0,588.669824850164,-63.2232749500546,391.223274950055,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -66.0,597.680129847859,-64.2267099492862,397.226709949287,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -67.0,606.690434845554,-65.2301449485179,403.230144948519,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -68.0,615.700739843249,-66.2335799477495,409.23357994775,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -69.0,624.711044840944,-67.2370149469812,415.237014946982,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -70.0,633.721349838639,-68.2404499462128,421.240449946214,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -71.0,642.731654836333,-69.2438849454445,427.243884945445,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -72.0,651.741959834028,-70.2473199446761,433.247319944677,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -73.0,660.752264831723,-71.2507549439078,439.250754943909,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -74.0,669.762569829418,-72.2541899431394,445.25418994314,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -75.0,678.772874827113,-73.257624942371,451.257624942372,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -76.0,687.783179824808,-74.2610599416027,457.261059941604,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -77.0,696.793484822503,-75.2644949408343,463.264494940835,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -78.0,705.803789820198,-76.267929940066,469.267929940067,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -79.0,714.814094817893,-77.2713649392976,475.271364939299,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -80.0,723.824399815588,-78.2747999385293,481.27479993853,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -81.0,732.834704813282,-79.2782349377609,487.278234937762,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -82.0,741.845009810977,-80.2816699369925,493.281669936994,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -83.0,750.855314808672,-81.2851049362242,499.285104936225,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -84.0,759.865619806367,-82.2885399354558,505.288539935457,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -85.0,768.875924804062,-83.2919749346875,511.291974934689,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -86.0,777.886229801757,-84.2954099339191,517.29540993392,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -87.0,786.896534799452,-85.2988449331508,523.298844933152,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -88.0,795.906839797147,-86.3022799323824,529.302279932384,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -89.0,804.917144794842,-87.305714931614,535.305714931615,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -90.0,813.927449792537,-88.3091499308457,541.309149930847,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -91.0,822.937754790231,-89.3125849300773,547.312584930079,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -92.0,831.948059787926,-90.316019929309,553.31601992931,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -93.0,840.958364785621,-91.3194549285406,559.319454928542,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -94.0,849.968669783316,-92.3228899277723,565.322889927774,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -95.0,858.978974781011,-93.3263249270039,571.326324927005,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -96.0,867.989279778706,-94.3297599262356,577.329759926237,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -97.0,876.999584776401,-95.3331949254672,583.333194925469,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -98.0,886.009889774096,-96.3366299246988,589.3366299247,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 -99.0,895.020194771791,-97.3400649239305,595.340064923932,9.01030499769496,-1.00343499923165,6.00343499923165,0,0,0 diff --git a/dev/.BACKUP/testing.py b/dev/.BACKUP/testing.py new file mode 100644 index 0000000..e69de29 diff --git a/docs/backend-structures.md b/dev/docs/backend-structures.md similarity index 100% rename from docs/backend-structures.md rename to dev/docs/backend-structures.md diff --git a/docs/jpl-horizons.md b/dev/docs/jpl-horizons.md similarity index 100% rename from docs/jpl-horizons.md rename to dev/docs/jpl-horizons.md diff --git a/docs/main-structures.md b/dev/docs/main-structures.md similarity index 100% rename from docs/main-structures.md rename to dev/docs/main-structures.md diff --git a/docs/other-structures.md b/dev/docs/other-structures.md similarity index 100% rename from docs/other-structures.md rename to dev/docs/other-structures.md diff --git a/main.py b/main.py index eaa5345..a41adab 100644 --- a/main.py +++ b/main.py @@ -1,50 +1,96 @@ import nbody as nb -''' -LINE_PROFILE=1 +from nbody.tools.formatter import Formatter + +# objects to query +objs = ('10','199','299','399','499','599','699','799','899') + +# create a set of bodies at 24h later time +bphys = nb.Engine(dt=1800) +test_bodies = nb.horizons_batch(search_queries =objs , time = '2023-11-04') +bphys.attach_bodies(test_bodies) +nb.export_obj(bphys, 'data\\control_data') -bodies = nb.horizons_batch(('10','199','299','399','499','599','699','799','899')) + + +# create a set of bodies and color for simulation later +bodies = nb.horizons_batch(search_queries =objs , time = '2023-11-03') for i,color in enumerate(['#F28322','#BFBEBD', '#D9B391', '#63BAA6', '#F27A5E', '#BFAE99', '#D9B779', '#95BBBF', '#789EBF']): bodies[i].color = color -phys = nb.Engine(dt=1000) +phys = nb.Engine(dt=1800) phys.attach_bodies(bodies) -phys.make_relative_to(bodies[0]) +#choose only to simulate gravity between bodies +phys.do_bodygravity = True phys.do_collisions = False phys.do_fieldgravity = False -phys.simulate(20000) -#phys.save_as('bodies','solarsystem_bodies') +# export initial +nb.export_obj(phys, 'data\\initial_data') +#simulate 1 day +phys.simulate(48) +# export final +nb.export_obj(phys, 'data\\final_data') +diff_pos = [tb.pos-b.pos for (tb,b) in zip(test_bodies, bodies)] +print([p-diff_pos[0] for p in diff_pos]) +''' +RETURNED +(734208.3934936523, 1991346.5834197998, 95390.21323432401), +(30879.216217041016, -888387.130279541, -13982.13922296092), +(-388433.34998279624, -196322.83775445074, 10607.861980419606), +(127065.63578796387, 141509.94929504395, -151.14967669174075), +(-137375.16325378418, -43945.42427062988, -2756.059154611081), +(-19406.46745300293, 11261.982528686523, -3151.591775994748), +(-5973.261642456055, -433.52235412597656, -4189.279098611325), +(-3577.7086639404297, -2188.288528442383, 506.47766675427556) + + ''' -#phys.load_as('bodies','solarsystem_bodies') -eng= nb.Engine(dt=0.05) -bodies = (nb.Body(mass=5, init_pos=(-10.0,0,0), init_vel=(2.0,0,0), bounce=1, radius=2), - nb.Body(mass=10, init_pos=(10.0,0,0), init_vel=(-2.0,0,0), bounce=1, radius=2), - #Body(mass=1, init_pos=(15,1.,0), init_vel=(-0.5,0,0), bounce=1, radius=1) - ) -eng.do_bodygravity = False -eng.do_collisions = True -eng.do_fieldgravity = False -eng.attach_bodies(bodies) -eng.simulate(1000) -sim = nb.MPLVisual(engine=eng, - name='SS', show_info=True, - step_skip_frames=1, step_skip_points=1, max_pts=1, cache=False, body_model='surface') -sim.start() + + + + + + +#save for visualisation +#phys.save_as('bodies', 'solarsys_bodies') +#phys.load_as('bodies', 'solarsys_bodies') + + +# test output periods +syst = nb.Engine(dt=1800) +bodies2 = nb.horizons_batch(search_queries =objs) +for i,col in enumerate(['#F28322','#BFBEBD', '#D9B391', '#63BAA6', '#F27A5E', + '#BFAE99', '#D9B779', '#95BBBF', '#789EBF']): + bodies2[i].color = col +syst.attach_bodies(bodies2) +syst.do_bodygravity = True +syst.do_collisions = False +syst.do_fieldgravity = False +syst.make_relative_to(bodies2[0]) +syst.simulate(15000) + +fmt = Formatter(items=['period'],engine=syst,plotskip=1,c_mass=syst.bodies[0].mass.c()) +for b in syst.bodies: + fmt.target = [b,100] + print(str(fmt)) ''' -import cProfile, pstats -profiler = cProfile.Profile() -profiler.enable() -main() -profiler.disable() -stats = pstats.Stats(profiler).sort_stats('ncalls').reverse_order() -stats.print_stats() - -eng = nb.obj_from('./nbody/tests/testdata/test_enginerun.txt', 'engine') -print([bod['pos'] for bod in eng.bodies]) -vis = nb.mplVisual(eng) -nb.export_obj(eng, 'data') -vis.start() -''' \ No newline at end of file +output +Period: 0.2060 d (sun) +Period: 0.3234 a +Period: 0.6079 a +Period: 0.9765 a (earth) +Period: 1.9560 a +Period: 11.0644 a +Period: 30.4301 a +Period: 86.8747 a +Period: 163.4680 a +''' +dark = {'line':'w', 'face':(0,0,0,0), 'bkgd':'black', 'text':'w'} +sim = nb.MPLVisual(engine=syst, + name='Solar System', show_info=True, + step_skip_frames=300, step_skip_points=150, max_period=1, do_picking=True, color_dict=dark, + focus_body=syst.bodies[0]) +sim.start() diff --git a/LICENSE.txt b/nbody/LICENSE.txt similarity index 100% rename from LICENSE.txt rename to nbody/LICENSE.txt diff --git a/nbody/MATHTYPE b/nbody/MATHTYPE new file mode 100644 index 0000000..05eeb48 --- /dev/null +++ b/nbody/MATHTYPE @@ -0,0 +1 @@ +float \ No newline at end of file diff --git a/nbody/__init__.py b/nbody/__init__.py index fe37a75..500041a 100644 --- a/nbody/__init__.py +++ b/nbody/__init__.py @@ -1,4 +1,10 @@ # NBody __init__.py +''' +The goal of this project is to efficiently simulate the gravitational and kinetic interactions between physical objects +and display them in a user friendly interface. The usage of this project are object oriented and meant to be flexible +and easy to use. + +''' """ File Structure: ⸺ nbody/ @@ -25,24 +31,16 @@ | ├── tools/ | ├── __init__.py + | ├── _config.py | ├── errors.py | ├── formatter.py | ├── horizons.py | └── io.py | ├── __init__.py - └── config.py - - -Valid Import Sequence - .errors - .base - .core.body - .core.engine - .tools.formatter - .core.visual - .tools.io - .tools.horizons + ├── LICENSE.txt + ├── MATHTYPE + └── requirements.txt """ from .core.base import math_conf as CONFIG #noqa from .core.body import Body diff --git a/nbody/core/base.py b/nbody/core/base.py index 94846e4..be65e7b 100644 --- a/nbody/core/base.py +++ b/nbody/core/base.py @@ -1,15 +1,29 @@ -from __future__ import annotations -# Python Builtins +'''`nbody.base` +This library forms the internals of the structures and functioning of the rest of the objects users interact with. + +Each `base.HistoricVector` instance is effectively comprised of 3 `base.HistoricVariable` instances, representing the +components of the vector. The classes have solely been built for use in a 3D instance, +but you may be able to use 2 dimensions inefficiently. + +Arithmetic Functions for each of the object types all produce instances of `Variable` or `Vector` as the output, +except for magnitude. +''' +from __future__ import annotations +# ⤤ allows imports and references in a non chronological order. +#### Python Builtins from numbers import Number +# ⤤ for type checking +#### 3rd Party Libs/Packages from mpmath import mp, fp - -# Local error definitions. +# ⤤ for high prescision arithmetic +#### Local imports from ..tools import errors as e - -# CONFIGURE GLOBAL MATH FUNCTIONS +# ⤤ contains standardized error codes from ..tools import _config as conf +# ⤤ MathContext object + math_conf = conf.MathContext(use=mp) Iterable = (list, tuple) @@ -303,6 +317,7 @@ def __mul__(self,other): if isinstance(temp,Iterable) and len(temp) == 3: return Variable(math_conf.sum([math_conf.mul(val, temp[i]) for (i, val) in enumerate(self.c())])) elif isinstance(temp,NumType): + _nt = math_conf.type return Vector([math_conf.mul(val,temp) for val in self.c()]) else: e.raise_component_error('other or temp',temp) diff --git a/nbody/core/body.py b/nbody/core/body.py index 43a43f8..7fa726d 100644 --- a/nbody/core/body.py +++ b/nbody/core/body.py @@ -1,5 +1,7 @@ import math +# ⤤ sqrt and pi from ..tools import errors as e +# ⤤ standard error messages from .base import (typecheck, _O, _V, Iterable, NumType, NoneType, VectorType, HistoricVector, Variable, Vector, NullVector) @@ -8,8 +10,62 @@ from scipy.constants import G except ModuleNotFoundError: G = 6.6743*10**(-11) +# ⤤ if scipy isnt found, revert to an approximation + class Body: + '''This object is the representation of a single (solid) body with finite mass and size. +Should be placed into an `core.Engine` instance to perform a simulation. + +### Parameters +|Parameter| Required |Type| Description| +|---|---|---| ---| +|`mass` | ✓ | `base.NumType` | mass of the body in kg. | +|`init_pos` | ✓ | `base.Iterable` or `base.VectorType` | initial position of the body in m.| +|`init_vel` | ✕ | `base.Iterable` or `base.VectorType` | initial velocity of the body in ms^-1. Default is `(0,0,0)`.| +|`radius` | ✕ | `base.NumType` | radius of the body in m, modelled as a sphere. Default is `0`. if `radius=0`,\ +collision physics will not be simulated, and will act as a point particle. | +|`bounce` | ✕ | `base.NumType` | coefficient of restitution for the body. the factor describing how much energy\ +is lost in a collision. `1` will give perfect elastic collision, `0` will give a perfect inelastic collision.\ + Default is `0.999`. | +|`color` | ✕ | `str` | color of the body when visualised. can used colors defined in matplotlib docs.| +### Attributes +|Attribute| Type| Description| +|---|---|---| +| `self.identity` |`str` | identifiable string to represent the body by. | +| `self.mass` |`base.Variable` | mass of the body. | +| `self.pos` |`base.HistoricVector` | positional vectors of body. | +| `self.vel` |`base.HistoricVector` | velocity vectors of body. | +| `self.acc` |`base.HistoricVector` | acceleration vectors of body. | +| `self.radius` |`base.Variable` | radius of the body. | +| `self.bounce` |`base.NumType` | coefficient of restitution used when the body is in a collision. | +| `self.color` |`str` | color of the body when visualised. | +### Usage +#### `update(dt=1,vel_change=None,acc_change=None,vel_next=None)` + - evaluates the bodies current position, velocity and acceleration, along with any optional changes, + \over a time interval `dt`. + +#### `_reinitialise(init_pos=None,init_vel=None)` + - resets the body to an initial position and length, erasing all other datapoints for position, + velocity and acceleration. + +#### `get_(item, ind=-1, plotskip=0, c_mass=None, engine=None)` + - calculates and returns a physical quantity of the `Body` object. either `period`, `sma`(semi major axis), or + `ke` (kinetic energy). +### Indexing +- Supports numerical indexing but not slicing. + +| Index | Returns| +|---|---| +|`'pos'`| all points of position as a 2d array.| +|`'vel'`| all points of velocity as a 2d array.| +|`'acc'`| all points of acceleration as a 2d array.| +|`'current'`| 2d array containing the current position, velocity and acceleration.| +|`'info'`| dictionary containing all non kinematic properties of the body| +|`'x'`| 2d array containing all x components of position, velocity and acceleration vectors.| +|`'y'`| 2d array containing all y components of position, velocity and acceleration vectors.| +|`'z'`| 2d array containing all z components of position, velocity and acceleration vectors.| + ''' def __init__(self,mass,init_pos,init_vel=(0,0,0), radius=0,bounce=0.999,color=None,identity=None): @@ -61,6 +117,11 @@ def __getitem__(self, ind): 'mass':self.mass, 'radius':self.radius, 'color':self.color, 'bounce':self.bounce}}[ind] def update(self,dt=1,vel_change=None,acc_change=None,vel_next=None): + '''evaluates the bodies current position, velocity and acceleration, along with any optional changes, +over a time interval `dt`. + `dt:Number` - interval to calculate over. + `vel_change,acc_change,vel_next: Iterable | VectorType` - changes to the bodies current condition. + ''' vel = _V(vel_next) if vel_next else self.vel if acc_change is not None: @@ -81,6 +142,9 @@ def update(self,dt=1,vel_change=None,acc_change=None,vel_next=None): def _reinitialise(self,init_pos=None,init_vel=None): + '''resets the body to an initial position and length, erasing all other datapoints for position, + velocity and acceleration. + ''' self.acc = HistoricVector(0,0,0,identity=f'{self.identity}_acc',units_v=self.acc.units) if init_pos != None: @@ -98,6 +162,9 @@ def _reinitialise(self,init_pos=None,init_vel=None): def get_(self, item, ind=-1, plotskip=0, c_mass=None, engine=None): + '''calculates and returns a physical quantity of the `Body` object. + either `period`, `sma`(semi major axis), or `ke` (kinetic energy). + ''' def sma(): if not plotskip >= ind: a = max((self.pos[i]-engine.barycenter(ind)).magnitude() for i in range(0,ind,plotskip)) @@ -107,7 +174,7 @@ def sma(): def per(): a = sma() if a != 'NaN': - return 2*math.pi*math.sqrt((a**3)/(G*c_mass)) + return 2*math.pi*math.sqrt((a**3)/(G*(c_mass+self.mass).c())) else: return a def ke(): diff --git a/nbody/core/engine.py b/nbody/core/engine.py index 545f90f..eff6e4b 100644 --- a/nbody/core/engine.py +++ b/nbody/core/engine.py @@ -1,12 +1,74 @@ +#### 3rd Party Libs/Packages import numpy as np +# ⤤ for saving engine as binary from tqdm import tqdm, trange +# ⤤ for progress bars so then user has expected time to completion per part +#### Local imports from ..tools import errors as e +# ⤤ standardized error messages from .base import typecheck, _O, Iterable, NumType, Vector, VectorType, NullVector from .body import Body, G +# ⤤ neccesary imports for engine class Engine: + '''This object acts as the physics engine, and simulates the gravitational effects of bodies, and can also\ + simulate collisions as well. +### Parameters +|Parameter| Required |Type| Description| +|---|---|---| ---| +|`dt` | ✕ | `base.NumType` | interval in seconds between each datapoint in the simulation.\ + Lowest will produce most accurate results. Default is `1`(second). | +|`checking_range` | ✕ | `int` | range of points to check for collisions over for each point. Default is `3`.| + +### Attributes +|Attribute| Type| Description| +|---|---|---| +| `self.bodies` |`list` | internal collection of bodies that have been attached. | +| `self.planes` |`list` | internal collection of planes that have been defined. | +| `self.fields` |`list` | internal collection of fields that have been defined. | +| `self.dt` |`base.NumType` | see `dt` above | +| `self.do_collisions` |`bool` | whether to calculate the effect of collisions with planes or other bodies when\ + simulating the trajectories. Default=`True`. | +| `self.do_bodygravity` |`bool` | whether to calculate the effect of gravity due to other bodies when simulating the\ + trajectories. Default=`True`.| +| `self.do_fieldgravity` |`bool` | whether to calculate the effect of fields when simulating the trajectories.\ + Default=`True`.| + +### Usage +#### `attach_bodies(new_bodies)` + - attaches `core.Body` objects to the `Engine` instance. `new_bodies` must be passed as a `base.Iterable`. + +#### `save_as(dump='engine',file_name='nbody_data')` + - saves the current state and all child objects as an .npz file. + * `dump` = either `engine` or `bodies`, choosing to save engine with all children or just the\ + `core.Bodies` objects. +#### `load_as(objects='engine',file_name='nbody_data')` + - loads the chosen file data into the `Engine` instance. `objects` = either `engine` or `bodies` and this specifies\ + the target object(s) to load. +#### `make_relative_to(target_body)` + - reinitialises all bodies in the instance, changing the initial conditions so that `target_body` is located at\ + (0,0,0) and the rest of the objects have the same initial conditions relative to `target_body`. +#### `create_acceleration(accel_vector)` + - creates a constant field of acceleration that can affect the simulated trajectories of bodies. + * `accel_vector` must be an iterable or `base.VectorType` instance. +>[!WARNING] +> if the value of an acceleration field or a body's velocity is sufficiently high, a body may fail to register\ + a collision with a plane or another body. +> +> In these instances, it is neccesary to reduce `dt`. *(and increase `checking_range`, which will sample more \ + points resulting in an earlier check collision being registered.)* +#### `create_plane(const_axis= 'z', const_val= 0)` + - creates an infinite plane with 0 thickness, parallel to a chosen euclidean plane. `const_axis` specifies\ + the plane orientation, e.g, `'z'` would return a plane parallel to the x-y plane. `const_val` specifies\ + the coordinate value it should be locked to. +#### `simulate(self,intervals)` + - runs a simulation over a specified amount of `intervals` (must be `int`). does not return anything,\ + but each of the bodies will contain the new data, and the `Engine` instance can now be passed on to a \ + `Visual` object to create an output. + + ''' def __init__(self,dt=1,checking_range=3): self.bodies, self.planes, self.fields= [], [], [] (self.dt,self._rangechk) = typecheck(((dt,NumType),(checking_range,NumType))) @@ -20,6 +82,8 @@ def __len__(self): return 0 def attach_bodies(self, new_bodies): + '''attaches `core.Body` objects to the `Engine` instance. `new_bodies` must be passed as a `base.Iterable`. + ''' if isinstance(new_bodies,Iterable): for new_body in new_bodies: typecheck((new_body, Body)) @@ -33,27 +97,32 @@ def _loadeng(self,eng): def save_as(self,dump='engine',file_name='nbody_data'): + '''saves the current state and all child objects as an .npz file. + * `dump` = either `engine` or `bodies`, choosing to save engine + with all children or just the `core.Bodies` objects.''' _saveobjs = {'bodies':{'bodies':self.bodies},'engine':{'engine':self}} # saving object as npz file - with open(f'{file_name}.npz','wb') as file: - np.savez(file, **_saveobjs[dump]) + np.savez(f'{file_name}.npz', **_saveobjs[dump]) - def load_as(self,objects='engine',file_name='nbody_data'): - _loadobjs = {'bodies':("self.attach_bodies(_objs['bodies'])",), - 'engine':("self._loadeng(_objs['engine'])",)} + def load_as(self,objects='engine',file_name='nbody_data'): + '''loads the chosen file data into the `Engine` instance. `objects` = either + `engine` or `bodies` and this specifies the target object(s) to load.''' + _loadobjs = {'bodies':("self.attach_bodies(objs['bodies'])",), + 'engine':("self._loadeng(objs['engine'])",)} - with open(f'{file_name}.npz','rb') as file: - _objs = np.load(file,allow_pickle=True) - for func in _loadobjs[objects]: - try: - # usage limited to values in dict above. - eval(func) - except KeyError: - raise LookupError(f'cannot find {objects} value in "{file}"') - + objs = np.load(f'{file_name}.npz',allow_pickle=True) #noqa + if objects == 'engine': + self = objs['engine'] + elif objects == 'bodies': + self.bodies = objs['bodies'] + else: + raise ValueError + objs.close() def make_relative_to(self,target_body): + '''reinitialises all bodies in the instance, changing the initial conditions so that `target_body` is located + at (0,0,0) and the rest of the objects have the same initial conditions relative to `target_body`.''' for body in self.bodies: if body != target_body: body._reinitialise((body.pos-target_body.pos), (body.vel-target_body.vel)) @@ -66,6 +135,8 @@ def make_relative_to(self,target_body): def create_acceleration(self, accel_vector): + '''creates a constant field of acceleration that can affect the simulated trajectories of bodies. + * `accel_vector` must be an iterable or `base.VectorType` instance.''' _acc = _O(accel_vector) if len(_acc) == 3 and isinstance(_acc[0], NumType): # adding a vector instance to the fields list @@ -75,6 +146,9 @@ def create_acceleration(self, accel_vector): e.raise_type_error('accel_vector', (Iterable, *VectorType), accel_vector) def create_plane(self, const_axis ='z', const_val = 0): + '''creates an infinite plane with 0 thickness, parallel to a chosen euclidean plane. `const_axis` specifies the + plane orientation, e.g, `'z'` would return a plane parallel to the x-y plane. `const_val` + specifies the coordinate value it should be locked to.''' if const_axis in ('x', 'y', 'z') and isinstance(const_val, NumType): self.planes.append([const_axis, const_val]) tqdm.write(f'«Engine» → constant plane {const_axis}={const_val} has been initialized.') @@ -141,6 +215,9 @@ def _find_gravity(self,body): def simulate(self,intervals): + '''runs a simulation over a specified amount of `intervals` (must be `int`). does not return anything, but each + of the bodies will contain the new data, and the `Engine` instance can now be passed + on to a `Visual` object to create an output.''' if isinstance(intervals, int) and len(self.bodies) > 0: for _ in trange(intervals, desc=f'«Engine» → Evaluating motion for each interval of {self.dt} seconds', unit='ints'): @@ -162,11 +239,12 @@ def simulate(self,intervals): ) def barycenter(self, index): + '''gets the position of the center of mass of the engine''' mass_dist = NullVector() for b in self.bodies: - mass_dist += Vector(b.pos[index])*b.mass + mass_dist += Vector(b.pos[index])*b.mass # add up all mass*pos total_mass =sum([b.mass.c() for b in self.bodies]) - return mass_dist/total_mass + return mass_dist/total_mass # divide by mass def __getitem__(self, ind): if ind == '_data_': diff --git a/nbody/core/visual.py b/nbody/core/visual.py index 7d797a5..21ca698 100644 --- a/nbody/core/visual.py +++ b/nbody/core/visual.py @@ -1,24 +1,26 @@ - +#### Python Builtins import math +# ⤤ efficient ceil function from time import sleep +# ⤤ used when speed_control is True to change interval +#### 3rd Party Libs/Packages from tqdm import tqdm +# ⤤ progress bars import numpy as np +# ⤤ mgrid used to create surfaces for spheres import matplotlib as mpl -# Plotting and animation Packages import matplotlib.pyplot as plt import matplotlib.animation as animation from matplotlib.widgets import Button, Slider from matplotlib.lines import Line2D from mpl_toolkits.mplot3d.art3d import Line3D from matplotlib.text import Text - - - +# ⤤ visual library, importing multiple classes mainly for type checks on user clicks +#### Local Imports from ..tools.formatter import Formatter - - +# ⤤ used to parse output for info display when show_info is enabled PICKRADIUS = 10 @@ -35,6 +37,62 @@ def sphere(pos,radius,n=20): class MPLVisual: + '''Object that outputs a visual, animated plot of an `core.Engine` instance, and can be customized to users\ + preferences. + +>[!NOTE] +The `core.Engine` instance should already have computed a simulation before insterting into a `mplVisual` instance. + +### Parameters +|Parameter| Required |Type| Description| +|---|---|---| ---| +|`engine` | ✓ | `core.Engine` | engine containing the system that is to be visualized | +|`name` | ✕ | `str` | identifying name of the visual instance. | +|`show_info` | ✕ | `bool` | whether to show a description of live information of the `info_body`\ + (Default: `focus_body`).Default: `False`.| +|`show_grid` | ✕ | `bool` | whether to draw the grid and grid faces of the plot. Default:`True`.| +|`focus_body` | ✕ | `core.Body` | body to keep in the center of the plot. If left as `None`, the plot will not center\ + on a body. Default:`None`| +|`do_picking` | ✕ | `bool` | whether to enable object picking, allowing a user to choose a `focus_body` by clicking on \ + the object, or `info_body` by clicking on the label or legend item.| +### `kwargs` +|Parameter|Type|Default| Description| +|---|---|---|---| +|`step_skip_frames` | `int` |`1` | the step to iterate over of frames. reduces the amount of frames in the final\ + visual, but speeds up the animation. | +|`step_skip_points` | `int` | `1`| the step to iterate over of points. reduces the amount of points in each trail. \ + eg: if `step_skip_frames=10`, and `step_skip_points=5`, each frame would contain 2 more points.| +|`fps` | `int` | `30`|framerate of the animation.| +|`max_pts` | `int` |`None` |maximum amount of points in each trail to plot. will remove oldest points if `max_pts` \ + is exceeded.| +|`max_period` | `int` |`2` |maximum amount of periods for an object to draw until points are cut.| +||||| +|`vect_params` | `dict` |`{vel:False, acc:False, size:1}` | parameters to show acceleration and velocity vectors and\ + a size scaling factor.| +|`speed_control` | `bool` |`False` |whether to enable a slider in the visual to control the speed.| +|`color_dict` | `dict` |`{line:'black', face:(0,0,0,0), bkgd:'white', text:'black'}` | color pallette used by the \ + visual.| +|`focus_range` | `base.Numtype` | `None`|range to plot the grid around, given `focus_body` is not `None`. if `None`,\ + the visual will autoscale, based on the furthest object.| +|`labelling_type` | `str` | `'legend'`|whether to use labels on objects or a legend. either `legend` or `labels`.| +|`body_model` | `str` |`'dots'` |how to draw the objects. can be `surface` or `wireframe` for spherical surface or \ + `dots` as markers.| +||||| +|`info_body` | `core.Body` |`focus_body` |initial object to show information for.| +|`info_calc` | `bool` |`False` |whether to compute all info strings for objects for all frames prior to animation.| +|`anim_cache` | `bool` |`False` |see `matplotlib.animation.FuncAnimation` parameter `cache`.| +||||| +|`is_running` | `bool` |`True` |value used to toggle animation using play/pause button in visual.| +||||| +|`fmt_params` | `dict` | see docstring|dictionary sent to the `Formatter` object to deal with the info output.| +|`file` | `str` |`None` |where to save the `mplVisual` object. if `None` then the object is not saved.| +|`start_index` | `int` |`0` |index of bodies' data to begin animation at.| + +### Usage +#### `start(**viewparams)` + - function to start instances output window and animation. + - `viewparams`: parameters to pass to `axes.view_init()`. initial viewing parameters as `elev`, `azim`, `roll`. + ''' def __init__(self, engine, name='NBody Simulation (Matplotib)', @@ -95,6 +153,9 @@ def __init__(self, self.anim_args = dict(interval=(5 if self.args['speed_control'] is True else 1000/self.args['fps']), frames=flist, cache_frame_data=self.args['anim_cache']) # build data for trails + self.data = {} + for b in self.engine.bodies: + self.data[b] = list(list(float(m) for m in _b.record) for _b in (b.pos.X,b.pos.Y,b.pos.Z)) if self.args['prebuild']: self.trail_data = dict() with tqdm(total = len(self.engine.bodies)*len(flist), @@ -163,8 +224,8 @@ def _sp_ud(val): self.ax.grid(False) self.ax.set_autoscale_on(False) if self.args['file'] is not None: - with open(f'{self.args['save_to']}.npz', 'wb') as file: - np.savez(file, mplVisual=self) + with open(f'{self.args['file']}.npz', 'wb') as file: + np.save(file, MPLVisual=self) tqdm.write(f'«mplVisual» → Saved instance to {self.args['save_to']}.npz') def _draw_info(self, ind): if self.info_data is None: @@ -207,9 +268,9 @@ def gen_trail(self, f, b): raise TypeError except TypeError: lower = self.args['start_index'] - body_data_f = list(list(float(m) for m in - _b.record[lower:f:self.plt['ptstep']]) - for _b in (b.pos.X,b.pos.Y,b.pos.Z)) + body_data_f = list(list(m for m in + _b[lower:f:self.plt['ptstep']]) + for _b in self.data[b]) if self.plt['maxpts'] is not None: while any(len(i) > self.plt['maxpts'] for i in body_data_f): for i in body_data_f: @@ -350,6 +411,9 @@ def _toggle(self, event): def start(self, **viewparams): + ''' + - function to start instances output window and animation. + - `viewparams`: parameters to pass to `axes.view_init()`. initial viewing parameters as `elev`, `azim`, `roll`.''' tqdm.write('«mplVisual» → Starting Visual Environment') self.anim = animation.FuncAnimation(self.fig, func=self._animate, **self.anim_args) # change view point if viewparams specified diff --git a/nbody/requirements.txt b/nbody/requirements.txt new file mode 100644 index 0000000..65778cb --- /dev/null +++ b/nbody/requirements.txt @@ -0,0 +1,72 @@ +numpy >= 1.26.0 + +astroquery==0.4.6 + astropy + # numpy + packaging + pyerfa + #numpy + PyYAML + beautifulsoup4 + soupsieve + html5lib + six + webencodings + keyring + jaraco.classes + more-itertools + pywin32-ctypes + # numpy + pyvo + astropy + #numpy + packaging + pyerfa + #numpy + PyYAML + # requests + requests + certifi + charset-normalizer + idna + urllib3 + +matplotlib==3.8.2 + contourpy + numpy + cycler + fonttools + kiwisolver + numpy + packaging + Pillow + pyparsing + python-dateutil + six + +mpmath==1.3.0 + gmpy2 == 2.2.0a1 + +pandas==2.1.3 + # numpy + python-dateutil + six + pytz + tzdata + +Pint==0.22 + + typing_extensions +pytest==7.4.3 + colorama + iniconfig + packaging + pluggy + +scipy==1.11.4 + # numpy + +tqdm==4.66.1 + colorama + + diff --git a/nbody/tools/_config.py b/nbody/tools/_config.py index a5a7022..f0465a6 100644 --- a/nbody/tools/_config.py +++ b/nbody/tools/_config.py @@ -2,22 +2,31 @@ from math import sqrt def fltmat(obj): return obj -def fltnorm(*obj): +def fltnorm(obj): return sqrt(sum(x**2 for x in obj)) +def fs(a,b): + return a-b +def fa(a,b): + return a+b +def fd(a,b): + return a/b +def fm(a,b): + return a*b +def fpo(a,b): + return a**b class MathContext: def __init__(self,use=None): - with open('MATHTYPE', 'r') as file: + with open('nbody\MATHTYPE', 'r') as file: lines = file.readlines() use = eval(lines[0]) - print(f'{use}') if use == float: self.type = use - self.add = float.__add__ - self.sub = float.__sub__ + self.add = fa + self.sub = fs self.sum = sum - self.div = float.__truediv__ - self.mul = float.__mul__ - self.pow = float.__pow__ + self.div = fd + self.mul = fm + self.pow = pow self.norm = fltnorm self.matrix = fltmat self.chop = float diff --git a/nbody/tools/formatter.py b/nbody/tools/formatter.py index eb21ccf..4607fb5 100644 --- a/nbody/tools/formatter.py +++ b/nbody/tools/formatter.py @@ -1,5 +1,6 @@ from pint import Quantity, UnitRegistry +# ⤤ unit parsing from ..core.base import Vector, Iterable, _O ur = UnitRegistry() Q_ = ur.Quantity @@ -159,3 +160,4 @@ def __str__(self): else: return '' +globals \ No newline at end of file diff --git a/nbody/tools/horizons.py b/nbody/tools/horizons.py index 696dec7..07ff505 100644 --- a/nbody/tools/horizons.py +++ b/nbody/tools/horizons.py @@ -1,10 +1,14 @@ import re +# ⤤ input string parsing from astroquery.jplhorizons import Horizons import astropy.units as ast from datetime import datetime, timedelta +# ⤤ collectively get data from jpl horizons from tqdm import tqdm +# ⤤ progress bars from . import errors as e +# ⤤ standard error messages def horizons_query(searchquery,observer='0',time='2023-11-03',num_type=float,return_type='body'): from ..core.body import typecheck, Body diff --git a/nbody/tools/io.py b/nbody/tools/io.py index bf2982d..5daa764 100644 --- a/nbody/tools/io.py +++ b/nbody/tools/io.py @@ -1,9 +1,18 @@ from __future__ import annotations +# ⤤ allows imports and references in a non chronological order. +#### Python Builtins import os +# ⤤ checking if file exists and directory management +#### 3rd Party Libs/Packages import pandas as pd +# ⤤ efficient way to parse a dictionary to a csv. from mpmath import mpf +# change to mathcontext.type from tqdm import tqdm +# ⤤ progress bars from . import errors as e +# ⤤ standard error messages +#### Local Imports from ..core.base import Vector, NumType, _O from ..core.body import Body from ..core.engine import Engine diff --git a/requirements.txt b/requirements.txt index 65778cb..225c152 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,72 +1 @@ -numpy >= 1.26.0 - -astroquery==0.4.6 - astropy - # numpy - packaging - pyerfa - #numpy - PyYAML - beautifulsoup4 - soupsieve - html5lib - six - webencodings - keyring - jaraco.classes - more-itertools - pywin32-ctypes - # numpy - pyvo - astropy - #numpy - packaging - pyerfa - #numpy - PyYAML - # requests - requests - certifi - charset-normalizer - idna - urllib3 - -matplotlib==3.8.2 - contourpy - numpy - cycler - fonttools - kiwisolver - numpy - packaging - Pillow - pyparsing - python-dateutil - six - -mpmath==1.3.0 - gmpy2 == 2.2.0a1 - -pandas==2.1.3 - # numpy - python-dateutil - six - pytz - tzdata - -Pint==0.22 - - typing_extensions -pytest==7.4.3 - colorama - iniconfig - packaging - pluggy - -scipy==1.11.4 - # numpy - -tqdm==4.66.1 - colorama - - +include nbody\requirements.txt \ No newline at end of file diff --git a/solarsystem_bodies.npz b/solarsystem_bodies.npz deleted file mode 100644 index 0dba61e..0000000 Binary files a/solarsystem_bodies.npz and /dev/null differ diff --git a/temp.html b/temp.html deleted file mode 100644 index 05b715a..0000000 --- a/temp.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - -
- - - - - - - - \ No newline at end of file