1
0

add description to display, coplanar 3 bodies with test mass

This commit is contained in:
Thibault Barnouin
2021-11-13 19:27:15 +01:00
parent 27844f5cb8
commit d5feffb0fe
14 changed files with 6 additions and 6 deletions

View File

@@ -92,7 +92,7 @@ class DynamicUpdate():
self.fig.savefig("tmp/{0:06d}.png".format(step),bbox_inches="tight") self.fig.savefig("tmp/{0:06d}.png".format(step),bbox_inches="tight")
def close(self): def close(self):
self.fig.close() plt.close()
#Example #Example
def __call__(self): def __call__(self):

View File

@@ -25,16 +25,16 @@ def main():
v = np.array([v1, v2, v3]) v = np.array([v1, v2, v3])
bodylist = [] bodylist = []
for i in range(2): for i in range(3):
bodylist.append(Body(m[i], q[i], v[i])) bodylist.append(Body(m[i], q[i], v[i]))
dyn_syst = System(bodylist) dyn_syst = System(bodylist)
dyn_syst.COMShift() dyn_syst.COMShift()
duration, step = 100*yr, 1e4 duration, step = 100*yr, 1e4
#E, L = dyn_syst.leapfrog(duration, step, recover_param=True)#, display=True) #E, L = dyn_syst.leapfrog(duration, step, recover_param=True, display=True)
E, L = dyn_syst.hermite(duration,step, recover_param=True)#, display=True) E, L = dyn_syst.hermite(duration,step, recover_param=True, display=True)
parameters = [duration, step, dyn_syst, "hermite"] parameters = [duration, step, dyn_syst, "hermite"]
display_parameters(E, L, parameters=parameters, savename="2bodies_hermite") display_parameters(E, L, parameters=parameters, savename="3bodies_hermite")
return 0 return 0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 319 KiB

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 320 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 444 KiB

After

Width:  |  Height:  |  Size: 549 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 292 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 307 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 796 KiB

After

Width:  |  Height:  |  Size: 362 KiB