5.2.1 TimeSwitchThe time-dependent, stage-switching function. Each of the constraints supplied to the TimeSwitch must be a Mech constraint object, or a list of constraint objects. Each constraint or list of constraints must constrain the same number of degrees of freedom. Note that the constraint numbers of the constraints that are inside of the TimeSwitch are irrelevant. The constraint number of the entire TimeSwitch is the only one used to reference the entire constraint. Examples This loads the Modeler2D package. The following example shows how a TimeSwitch constraint (constraint 1) might be used to model a pin on a slider that slides along a horizontal track on the ground until the value of time reaches 2.0, at which time the pin begins to slide up an inclined track. This constraint could replace the StageSwitch constraint used in the slider-ramp model in Section 5.1. Here is a valid TimeSwitch constraint.
Out[4]= | |
The following example shows how a TimeSwitch constraint that constrains two degrees of freedom might be implemented. The first constraint in the TimeSwitch constraint forces the origin of the slider to be coincident with the origin of the ground. If the value of time rises above 4.0, the second constraint pair becomes active, which forces the origin of the slider to lie upon an inclined line, while the Y coordinate of the origin of the slider is a function of time. Here is a valid TimeSwitch constraint.
Out[5]= | |
|