TranslationalInitialCondition (hwx.inspire.motion.InitialCondition)#

class TranslationalInitialCondition(self, **kwds)#

Bases: InitialCondition

Defines translational velocity for one or more parts.

Velocity initial conditions can be used to set parts into motion immediately with a prescribed velocity. In this way no “ramp up” time is required, unlike what you see when using a velocity actuator which has a profile function that begins from a velocity of zero.

Example

from hwx import inspire
from hwx.inspire import motion

model = inspire.newModel()
model.createSolidBlock()
a = motion.AngularInitialCondition(parts = model.parts)
i = motion.TranslationalInitialCondition(parts = model.parts)
model.gravityMagnitude = 0

analysis = motion.MbdAnalysis()
analysis.analyze(dtout=1/5)
inspire.fitView()