Пример #1
0
    def adddynamics(self):
        I = self.inertia_about_point

        effectiveforce = self.mass * self.aCM
        momentofeffectiveforce = I.dot(self.alNBody) + self.wNBody.cross(
            I.dot(self.wNBody)) + self.mass * (
                self.pCM - self.about_point).cross(self.about_point_dd)
        self.KE = .5 * self.mass * self.vCM.dot(
            self.vCM) + .5 * self.wNBody.dot(self.inertia_CM.dot(self.wNBody))

        self.effectiveforces = []
        self.effectiveforces.append(Force(effectiveforce, self.about_point_d))
        self.effectiveforces.append(Force(momentofeffectiveforce, self.wNBody))
        #        self.system.addmomentum(self.linearmomentum,self.vCM)
        #        self.system.addmomentum(self.angularmomentum,self.wNBody)
        #        self.system.addKE(self.KE)
        return self.effectiveforces
Пример #2
0
    def adddynamics(self):
        effectiveforce = self.mass * self.aCM
        self.KE = .5 * self.mass * self.vCM.dot(self.vCM)

        self.effectiveforces = []
        self.effectiveforces.append(Force(effectiveforce, self.vCM))

        return self.effectiveforces
Пример #3
0
 def addforce(self, force, velocity):
     f = Force(force, velocity)
     self.forces.append(f)
     return f