1
0

phi change

This commit is contained in:
Alex_Hubert
2022-01-14 15:38:00 +01:00
parent dabd43ffcb
commit 22747db964
8 changed files with 9 additions and 6 deletions

View File

@@ -186,6 +186,7 @@ class System(Body):
def eccCOM(self): #exentricity of two body sub system
if len(self.bodylist) == 2 :
ecc = (2.*self.ECOM*(np.linalg.norm(self.LCOM)**2))/(Ga**2*self.M**2*self.mu**3) + 1.
else :
ecc = np.nan
return ecc
@@ -215,13 +216,15 @@ class System(Body):
return sma
@property
def phi(self): #return angle in degree between plans formed by body1 and body2 (perurbator) trajectories
def phi(self): #return angle in degree between plans formed by perturbator plan and reference plan
if len(self.bodylist) == 3 :
body1 = self.bodylist[0]
body2 = self.bodylist[2]
n1 = np.cross(body1.q, body1.v)
n2 = np.cross(body2.q, body2.v)
n1 = np.cross(body1.q-self.COM, body1.v-self.COMV)
n2 = np.cross(body2.q-self.COM, body2.v-self.COMV)
n1 = np.array([0., 0., 1.], dtype=np.longdouble)
phi = np.arccos(np.dot(n1, n2) / (np.linalg.norm(n1) * np.linalg.norm(n2)))*180./np.pi
else :
phi = np.nan
return phi
return phi

View File

@@ -12,7 +12,7 @@ from lib.units import *
def main():
#initialisation
m = np.array([1., 1., 1e-1],dtype=np.longdouble)*Ms#/Ms # Masses in Solar mass
a = np.array([1., 1., 5.5],dtype=np.longdouble)*au#/au # Semi-major axis in astronomical units
a = np.array([.75, .75, 5.],dtype=np.longdouble)*au#/au # Semi-major axis in astronomical units
e = np.array([0., 0., 0.25],dtype=np.longdouble) # Eccentricity
psi = np.array([0., 0., 80.],dtype=np.longdouble)*np.pi/180. # Inclination of the orbital plane in degrees
@@ -27,7 +27,7 @@ def main():
v = np.array([v1, v2, v3],dtype=np.longdouble)
#integration parameters
duration, step = 5000*yr, np.longdouble(1./2.*86400.) #integration time and step in seconds
duration, step = 1000*yr, np.longdouble(1./2.*86400.) #integration time and step in seconds
integrator = "leapfrog"
n_bodies = 3
display = False

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 58 KiB