1
0

Merge remote-tracking branch 'origin/main' into main

# Conflicts:
#	lib/objects.py
#	plots/2bodies_leapfrog_dEm.png
#	plots/2bodies_leapfrog_dL2.png
This commit is contained in:
Alex_Hubert
2021-11-19 14:38:33 +01:00
9 changed files with 35 additions and 37 deletions

View File

@@ -8,7 +8,6 @@ import numpy as np
from lib.plots import DynamicUpdate from lib.plots import DynamicUpdate
from lib.units import * from lib.units import *
class Body: class Body:
def __init__(self, mass, position, velocity): def __init__(self, mass, position, velocity):
@@ -29,7 +28,6 @@ class Body:
def __str__(self): # Called upon "str(body)" def __str__(self): # Called upon "str(body)"
return r"Body of mass: {0:.2f} $M_\odot$".format(self.m/Ms) return r"Body of mass: {0:.2f} $M_\odot$".format(self.m/Ms)
class System(Body): class System(Body):
def __init__(self, bodylist, blackstyle=True): def __init__(self, bodylist, blackstyle=True):

View File

@@ -27,7 +27,7 @@ def main():
v = np.array([v1, v2, v3]) v = np.array([v1, v2, v3])
#integration parameters #integration parameters
duration, step = 100*yr, np.array([1./(365.25*2.), 1./365.25])*yr #integration time and step in years duration, step = 100*yr, np.array([1./(365.25*4.), 1./(365.25*2.), 1./365.25])*yr #integration time and step in years
integrator = "leapfrog" integrator = "leapfrog"
n_bodies = 2 n_bodies = 2
display = False display = False

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 KiB

After

Width:  |  Height:  |  Size: 222 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

After

Width:  |  Height:  |  Size: 181 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 390 KiB