fix plotting gravity forces
@@ -616,6 +616,9 @@ class StructTimeStepInfo(object):
np.cross( np.dot( CAslaveG, self.mb_FoR_vel[global_ibody,3:6]), self.pos[inode,:]) +
np.dot(Csm, np.cross(np.dot(CGAmaster.T, self.mb_FoR_vel[0,3:6]), pos_previous)))
+ self.gravity_forces[inode,0:3] = np.dot(Csm, self.gravity_forces[inode,0:3])
+ self.gravity_forces[inode,3:6] = np.dot(Csm, self.gravity_forces[inode,3:6])
+
# self.pos_dot[inode,:] = (np.dot(np.transpose(Csm),self.pos_dot[inode,:]) +
# np.dot(np.transpose(CGAmaster),delta_vel_ms[0:3]) +
# np.dot(Csm.T, np.cross( np.dot(CAslaveG, self.mb_FoR_vel[global_ibody,3:6]), pos_previous)) -
@@ -676,7 +679,8 @@ class StructTimeStepInfo(object):
np.dot(np.transpose(CGAmaster),delta_vel_ms[0:3]) +
np.dot(Csm.T, np.cross( np.dot(CAslaveG, self.mb_FoR_vel[global_ibody,3:6]), pos_previous)) -
np.cross(np.dot(CGAmaster.T, self.mb_FoR_vel[0,3:6]), self.pos[inode,:]))
-
+ self.gravity_forces[inode,0:3] = np.dot(Csm.T, self.gravity_forces[inode,0:3])
+ self.gravity_forces[inode,3:6] = np.dot(Csm.T, self.gravity_forces[inode,3:6])
# np.cross(np.dot(CGAmaster.T, delta_vel_ms[3:6]), pos_previous))
for ielem in range(self.psi.shape[0]):
