From 6da8a27606591bdba68a051c8c8bcff2a1f924a1 Mon Sep 17 00:00:00 2001 From: Alex_Hubert Date: Fri, 19 Nov 2021 16:39:52 +0100 Subject: [PATCH] minor modification + system clas update comshift --- lib/objects.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/objects.py b/lib/objects.py index 091e597..3d20332 100755 --- a/lib/objects.py +++ b/lib/objects.py @@ -93,14 +93,14 @@ class System(Body): def COMV(self): #return center of mass velocity in cartesian np_array coord = np.zeros(3) for body in self.bodylist: - coord = coord + body.p + coord = coord + body.v coord = coord/self.M return coord def COMShift(self): #Shift coordinates of bodies in system to COM frame and set COM at rest for body in self.bodylist: body.q = body.q - self.COM - body.p = body.p - self.COMV + body.v = body.v - self.COMV @property def L(self): #return angular momentum of bodies in system